Files

668 lines
49 KiB
Markdown

# Notification
(*notification*)
## Overview
### Available Operations
* [getApiV1NotificationId](#getapiv1notificationid)
* [putApiV1NotificationId](#putapiv1notificationid)
* [deleteApiV1NotificationId](#deleteapiv1notificationid)
* [getApiV1Notification](#getapiv1notification)
* [postApiV1Notification](#postapiv1notification)
* [getApiV1NotificationSchema](#getapiv1notificationschema)
* [postApiV1NotificationTest](#postapiv1notificationtest)
* [postApiV1NotificationTestall](#postapiv1notificationtestall)
* [postApiV1NotificationActionName](#postapiv1notificationactionname)
## getApiV1NotificationId
### Example Usage
<!-- UsageSnippet language="typescript" operationID="get_/api/v1/notification/{id}" method="get" path="/api/v1/notification/{id}" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const result = await prowlarr.notification.getApiV1NotificationId({
id: 383207,
});
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationGetApiV1NotificationId } from "prowlarr/funcs/notificationGetApiV1NotificationId.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationGetApiV1NotificationId(prowlarr, {
id: 383207,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("notificationGetApiV1NotificationId failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.GetApiV1NotificationIdRequest](../../models/operations/getapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## putApiV1NotificationId
### Example Usage
<!-- UsageSnippet language="typescript" operationID="put_/api/v1/notification/{id}" method="put" path="/api/v1/notification/{id}" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const result = await prowlarr.notification.putApiV1NotificationId({
id: "<id>",
});
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationPutApiV1NotificationId } from "prowlarr/funcs/notificationPutApiV1NotificationId.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationPutApiV1NotificationId(prowlarr, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("notificationPutApiV1NotificationId failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.PutApiV1NotificationIdRequest](../../models/operations/putapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## deleteApiV1NotificationId
### Example Usage
<!-- UsageSnippet language="typescript" operationID="delete_/api/v1/notification/{id}" method="delete" path="/api/v1/notification/{id}" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.notification.deleteApiV1NotificationId({
id: 312155,
});
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationDeleteApiV1NotificationId } from "prowlarr/funcs/notificationDeleteApiV1NotificationId.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationDeleteApiV1NotificationId(prowlarr, {
id: 312155,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("notificationDeleteApiV1NotificationId failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.DeleteApiV1NotificationIdRequest](../../models/operations/deleteapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<void\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## getApiV1Notification
### Example Usage
<!-- UsageSnippet language="typescript" operationID="get_/api/v1/notification" method="get" path="/api/v1/notification" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const result = await prowlarr.notification.getApiV1Notification();
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationGetApiV1Notification } from "prowlarr/funcs/notificationGetApiV1Notification.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationGetApiV1Notification(prowlarr);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("notificationGetApiV1Notification failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.NotificationResource[]](../../models/.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## postApiV1Notification
### Example Usage
<!-- UsageSnippet language="typescript" operationID="post_/api/v1/notification" method="post" path="/api/v1/notification" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const result = await prowlarr.notification.postApiV1Notification({});
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationPostApiV1Notification } from "prowlarr/funcs/notificationPostApiV1Notification.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationPostApiV1Notification(prowlarr, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("notificationPostApiV1Notification failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.PostApiV1NotificationRequest](../../models/operations/postapiv1notificationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## getApiV1NotificationSchema
### Example Usage
<!-- UsageSnippet language="typescript" operationID="get_/api/v1/notification/schema" method="get" path="/api/v1/notification/schema" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const result = await prowlarr.notification.getApiV1NotificationSchema();
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationGetApiV1NotificationSchema } from "prowlarr/funcs/notificationGetApiV1NotificationSchema.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationGetApiV1NotificationSchema(prowlarr);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("notificationGetApiV1NotificationSchema failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.NotificationResource[]](../../models/.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## postApiV1NotificationTest
### Example Usage
<!-- UsageSnippet language="typescript" operationID="post_/api/v1/notification/test" method="post" path="/api/v1/notification/test" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.notification.postApiV1NotificationTest({});
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationPostApiV1NotificationTest } from "prowlarr/funcs/notificationPostApiV1NotificationTest.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationPostApiV1NotificationTest(prowlarr, {});
if (res.ok) {
const { value: result } = res;
} else {
console.log("notificationPostApiV1NotificationTest failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.PostApiV1NotificationTestRequest](../../models/operations/postapiv1notificationtestrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<void\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## postApiV1NotificationTestall
### Example Usage
<!-- UsageSnippet language="typescript" operationID="post_/api/v1/notification/testall" method="post" path="/api/v1/notification/testall" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.notification.postApiV1NotificationTestall();
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationPostApiV1NotificationTestall } from "prowlarr/funcs/notificationPostApiV1NotificationTestall.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationPostApiV1NotificationTestall(prowlarr);
if (res.ok) {
const { value: result } = res;
} else {
console.log("notificationPostApiV1NotificationTestall failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<void\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |
## postApiV1NotificationActionName
### Example Usage
<!-- UsageSnippet language="typescript" operationID="post_/api/v1/notification/action/{name}" method="post" path="/api/v1/notification/action/{name}" -->
```typescript
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.notification.postApiV1NotificationActionName({
name: "<value>",
});
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { ProwlarrCore } from "prowlarr/core.js";
import { notificationPostApiV1NotificationActionName } from "prowlarr/funcs/notificationPostApiV1NotificationActionName.js";
// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
const res = await notificationPostApiV1NotificationActionName(prowlarr, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("notificationPostApiV1NotificationActionName failed:", res.error);
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.PostApiV1NotificationActionNameRequest](../../models/operations/postapiv1notificationactionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<void\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.APIError | 4XX, 5XX | \*/\* |