@novu/api 0.0.1-alpha.155 → 0.0.1-alpha.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/docs/sdks/admin/README.md +161 -0
- package/docs/sdks/credentials/README.md +27 -39
- package/docs/sdks/integrations/README.md +5 -9
- package/docs/sdks/messages/README.md +5 -7
- package/docs/sdks/novu/README.md +211 -1
- package/docs/sdks/novumessages/README.md +16 -24
- package/docs/sdks/novusubscribers/README.md +33 -45
- package/docs/sdks/preferences/README.md +10 -16
- package/docs/sdks/properties/README.md +7 -11
- package/docs/sdks/subscribers/README.md +43 -47
- package/docs/sdks/topics/README.md +7 -11
- package/funcs/adminTestingControllerIdempotency.d.ts +11 -0
- package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -0
- package/funcs/adminTestingControllerIdempotency.js +115 -0
- package/funcs/adminTestingControllerIdempotency.js.map +1 -0
- package/funcs/adminTestingControllerIdempotencyGet.d.ts +10 -0
- package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -0
- package/funcs/adminTestingControllerIdempotencyGet.js +108 -0
- package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -0
- package/funcs/integrationsUpdate.d.ts +2 -1
- package/funcs/integrationsUpdate.d.ts.map +1 -1
- package/funcs/integrationsUpdate.js +7 -2
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +7 -2
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts +2 -1
- package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +7 -2
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +7 -2
- package/funcs/subscribersCredentialsDelete.js.map +1 -1
- package/funcs/subscribersCredentialsUpdate.d.ts +2 -1
- package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
- package/funcs/subscribersCredentialsUpdate.js +7 -2
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersList.d.ts +1 -1
- package/funcs/subscribersList.d.ts.map +1 -1
- package/funcs/subscribersList.js +12 -10
- package/funcs/subscribersList.js.map +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts +2 -1
- package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +7 -2
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts +2 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +7 -2
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersPreferencesList.d.ts +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +7 -2
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesUpdateGlobal.d.ts +2 -1
- package/funcs/subscribersPreferencesUpdateGlobal.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdateGlobal.js +7 -2
- package/funcs/subscribersPreferencesUpdateGlobal.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts +2 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +7 -2
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.d.ts +1 -1
- package/funcs/subscribersRetrieve.d.ts.map +1 -1
- package/funcs/subscribersRetrieve.js +7 -2
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersUpdate.d.ts +2 -1
- package/funcs/subscribersUpdate.d.ts.map +1 -1
- package/funcs/subscribersUpdate.js +7 -2
- package/funcs/subscribersUpdate.js.map +1 -1
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js.map +1 -0
- package/funcs/topicsRename.d.ts +2 -1
- package/funcs/topicsRename.d.ts.map +1 -1
- package/funcs/topicsRename.js +7 -2
- package/funcs/topicsRename.js.map +1 -1
- package/funcs/topicsSubscribersAssign.d.ts +2 -1
- package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
- package/funcs/topicsSubscribersAssign.js +7 -2
- package/funcs/topicsSubscribersAssign.js.map +1 -1
- package/funcs/topicsSubscribersRemove.d.ts +2 -1
- package/funcs/topicsSubscribersRemove.d.ts.map +1 -1
- package/funcs/topicsSubscribersRemove.js +7 -2
- package/funcs/topicsSubscribersRemove.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +7 -2
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/idempotencybodydto.d.ts +29 -0
- package/models/components/idempotencybodydto.d.ts.map +1 -0
- package/models/components/idempotencybodydto.js +59 -0
- package/models/components/idempotencybodydto.js.map +1 -0
- package/models/components/idempotencyresponse.d.ts +25 -0
- package/models/components/idempotencyresponse.d.ts.map +1 -0
- package/models/components/idempotencyresponse.js +55 -0
- package/models/components/idempotencyresponse.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/testingcontrolleridempotency.d.ts +66 -0
- package/models/operations/testingcontrolleridempotency.d.ts.map +1 -0
- package/models/operations/testingcontrolleridempotency.js +112 -0
- package/models/operations/testingcontrolleridempotency.js.map +1 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts +64 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts.map +1 -0
- package/models/operations/testingcontrolleridempotencyget.js +108 -0
- package/models/operations/testingcontrolleridempotencyget.js.map +1 -0
- package/package.json +1 -1
- package/sdk/admin.d.ts +8 -0
- package/sdk/admin.d.ts.map +1 -0
- package/sdk/admin.js +20 -0
- package/sdk/admin.js.map +1 -0
- package/sdk/credentials.d.ts +4 -3
- package/sdk/credentials.d.ts.map +1 -1
- package/sdk/credentials.js +6 -6
- package/sdk/credentials.js.map +1 -1
- package/sdk/integrations.d.ts +1 -1
- package/sdk/integrations.d.ts.map +1 -1
- package/sdk/integrations.js +2 -2
- package/sdk/integrations.js.map +1 -1
- package/sdk/messages.d.ts +1 -1
- package/sdk/messages.d.ts.map +1 -1
- package/sdk/messages.js +2 -2
- package/sdk/messages.js.map +1 -1
- package/sdk/novumessages.d.ts +3 -2
- package/sdk/novumessages.d.ts.map +1 -1
- package/sdk/novumessages.js +4 -4
- package/sdk/novumessages.js.map +1 -1
- package/sdk/novusubscribers.d.ts +4 -3
- package/sdk/novusubscribers.d.ts.map +1 -1
- package/sdk/novusubscribers.js +6 -6
- package/sdk/novusubscribers.js.map +1 -1
- package/sdk/preferences.d.ts +3 -2
- package/sdk/preferences.d.ts.map +1 -1
- package/sdk/preferences.js +4 -4
- package/sdk/preferences.js.map +1 -1
- package/sdk/properties.d.ts +2 -1
- package/sdk/properties.d.ts.map +1 -1
- package/sdk/properties.js +2 -2
- package/sdk/properties.js.map +1 -1
- package/sdk/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +16 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/subscribers.d.ts +3 -3
- package/sdk/subscribers.d.ts.map +1 -1
- package/sdk/subscribers.js +6 -6
- package/sdk/subscribers.js.map +1 -1
- package/sdk/topics.d.ts +1 -1
- package/sdk/topics.d.ts.map +1 -1
- package/sdk/topics.js +2 -2
- package/sdk/topics.js.map +1 -1
- package/src/funcs/adminTestingControllerIdempotency.ts +160 -0
- package/src/funcs/adminTestingControllerIdempotencyGet.ts +155 -0
- package/src/funcs/integrationsUpdate.ts +11 -2
- package/src/funcs/messagesDeleteByTransactionId.ts +11 -2
- package/src/funcs/subscribersCredentialsAppend.ts +13 -2
- package/src/funcs/subscribersCredentialsDelete.ts +11 -2
- package/src/funcs/subscribersCredentialsUpdate.ts +13 -2
- package/src/funcs/subscribersList.ts +17 -10
- package/src/funcs/subscribersMessagesMarkAll.ts +11 -2
- package/src/funcs/subscribersMessagesMarkAllAs.ts +11 -2
- package/src/funcs/subscribersPreferencesList.ts +11 -2
- package/src/funcs/subscribersPreferencesUpdateGlobal.ts +14 -3
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +14 -2
- package/src/funcs/subscribersRetrieve.ts +10 -2
- package/src/funcs/subscribersUpdate.ts +11 -2
- package/src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts +114 -0
- package/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts +114 -0
- package/src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts +114 -0
- package/src/funcs/topicsRename.ts +11 -2
- package/src/funcs/topicsSubscribersAssign.ts +11 -2
- package/src/funcs/topicsSubscribersRemove.ts +11 -2
- package/src/funcs/topicsSubscribersRetrieve.ts +10 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/idempotencybodydto.ts +66 -0
- package/src/models/components/idempotencyresponse.ts +58 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/testingcontrolleridempotency.ts +167 -0
- package/src/models/operations/testingcontrolleridempotencyget.ts +168 -0
- package/src/sdk/admin.ts +36 -0
- package/src/sdk/credentials.ts +21 -6
- package/src/sdk/integrations.ts +6 -2
- package/src/sdk/messages.ts +6 -2
- package/src/sdk/novumessages.ts +13 -4
- package/src/sdk/novusubscribers.ts +19 -6
- package/src/sdk/preferences.ts +14 -5
- package/src/sdk/properties.ts +8 -2
- package/src/sdk/sdk.ts +40 -0
- package/src/sdk/subscribers.ts +18 -6
- package/src/sdk/topics.ts +6 -2
package/README.md
CHANGED
|
@@ -218,6 +218,11 @@ run();
|
|
|
218
218
|
<details open>
|
|
219
219
|
<summary>Available methods</summary>
|
|
220
220
|
|
|
221
|
+
### [admin](docs/sdks/admin/README.md)
|
|
222
|
+
|
|
223
|
+
* [testingControllerIdempotency](docs/sdks/admin/README.md#testingcontrolleridempotency)
|
|
224
|
+
* [testingControllerIdempotencyGet](docs/sdks/admin/README.md#testingcontrolleridempotencyget)
|
|
225
|
+
|
|
221
226
|
### [integrations](docs/sdks/integrations/README.md)
|
|
222
227
|
|
|
223
228
|
* [list](docs/sdks/integrations/README.md#list) - Get integrations
|
|
@@ -253,6 +258,9 @@ run();
|
|
|
253
258
|
* [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event
|
|
254
259
|
* [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all
|
|
255
260
|
* [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event
|
|
261
|
+
* [testApiRateLimitBulkControllerNoCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride)
|
|
262
|
+
* [testApiRateLimitBulkControllerNoCategorySingleCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride)
|
|
263
|
+
* [testApiRateLimitBulkControllerGlobalCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride)
|
|
256
264
|
|
|
257
265
|
### [subscribers](docs/sdks/subscribers/README.md)
|
|
258
266
|
|
|
@@ -328,6 +336,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
328
336
|
|
|
329
337
|
<summary>Available standalone functions</summary>
|
|
330
338
|
|
|
339
|
+
- [`adminTestingControllerIdempotency`](docs/sdks/admin/README.md#testingcontrolleridempotency)
|
|
340
|
+
- [`adminTestingControllerIdempotencyGet`](docs/sdks/admin/README.md#testingcontrolleridempotencyget)
|
|
331
341
|
- [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event
|
|
332
342
|
- [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration
|
|
333
343
|
- [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration
|
|
@@ -364,6 +374,9 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
364
374
|
- [`subscribersPropertiesUpdateOnlineFlag`](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status
|
|
365
375
|
- [`subscribersRetrieve`](docs/sdks/subscribers/README.md#retrieve) - Get subscriber
|
|
366
376
|
- [`subscribersUpdate`](docs/sdks/subscribers/README.md#update) - Update subscriber
|
|
377
|
+
- [`testApiRateLimitBulkControllerGlobalCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride)
|
|
378
|
+
- [`testApiRateLimitBulkControllerNoCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride)
|
|
379
|
+
- [`testApiRateLimitBulkControllerNoCategorySingleCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride)
|
|
367
380
|
- [`topicsCreate`](docs/sdks/topics/README.md#create) - Topic creation
|
|
368
381
|
- [`topicsDelete`](docs/sdks/topics/README.md#delete) - Delete topic
|
|
369
382
|
- [`topicsList`](docs/sdks/topics/README.md#list) - Get topic list filtered
|
|
@@ -399,7 +412,7 @@ const novu = new Novu({
|
|
|
399
412
|
});
|
|
400
413
|
|
|
401
414
|
async function run() {
|
|
402
|
-
const result = await novu.subscribers.list(
|
|
415
|
+
const result = await novu.subscribers.list();
|
|
403
416
|
|
|
404
417
|
for await (const page of result) {
|
|
405
418
|
// Handle the page
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Admin
|
|
2
|
+
(*admin*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
testing
|
|
7
|
+
<https://docs.novu.co/platform/organizations>
|
|
8
|
+
|
|
9
|
+
### Available Operations
|
|
10
|
+
|
|
11
|
+
* [testingControllerIdempotency](#testingcontrolleridempotency)
|
|
12
|
+
* [testingControllerIdempotencyGet](#testingcontrolleridempotencyget)
|
|
13
|
+
|
|
14
|
+
## testingControllerIdempotency
|
|
15
|
+
|
|
16
|
+
### Example Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { Novu } from "@novu/api";
|
|
20
|
+
|
|
21
|
+
const novu = new Novu({
|
|
22
|
+
apiKey: "<YOUR_API_KEY_HERE>",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
async function run() {
|
|
26
|
+
const result = await novu.admin.testingControllerIdempotency({
|
|
27
|
+
data: 6704.42,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Handle the result
|
|
31
|
+
console.log(result);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
run();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Standalone function
|
|
38
|
+
|
|
39
|
+
The standalone function version of this method:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
43
|
+
import { adminTestingControllerIdempotency } from "@novu/api/funcs/adminTestingControllerIdempotency.js";
|
|
44
|
+
|
|
45
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
46
|
+
// You can create one instance of it to use across an application.
|
|
47
|
+
const novu = new NovuCore({
|
|
48
|
+
apiKey: "<YOUR_API_KEY_HERE>",
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
async function run() {
|
|
52
|
+
const res = await adminTestingControllerIdempotency(novu, {
|
|
53
|
+
data: 6704.42,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
throw res.error;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
|
|
62
|
+
// Handle the result
|
|
63
|
+
console.log(result);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
run();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Parameter | Type | Required | Description |
|
|
72
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
73
|
+
| `idempotencyBodyDto` | [components.IdempotencyBodyDto](../../models/components/idempotencybodydto.md) | :heavy_check_mark: | N/A |
|
|
74
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
75
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
76
|
+
| `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. |
|
|
77
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
78
|
+
|
|
79
|
+
### Response
|
|
80
|
+
|
|
81
|
+
**Promise\<[operations.TestingControllerIdempotencyResponse](../../models/operations/testingcontrolleridempotencyresponse.md)\>**
|
|
82
|
+
|
|
83
|
+
### Errors
|
|
84
|
+
|
|
85
|
+
| Error Type | Status Code | Content Type |
|
|
86
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
87
|
+
| errors.ErrorDto | 400, 404, 409 | application/json |
|
|
88
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
89
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
90
|
+
|
|
91
|
+
## testingControllerIdempotencyGet
|
|
92
|
+
|
|
93
|
+
### Example Usage
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { Novu } from "@novu/api";
|
|
97
|
+
|
|
98
|
+
const novu = new Novu({
|
|
99
|
+
apiKey: "<YOUR_API_KEY_HERE>",
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
async function run() {
|
|
103
|
+
const result = await novu.admin.testingControllerIdempotencyGet();
|
|
104
|
+
|
|
105
|
+
// Handle the result
|
|
106
|
+
console.log(result);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
run();
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Standalone function
|
|
113
|
+
|
|
114
|
+
The standalone function version of this method:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
118
|
+
import { adminTestingControllerIdempotencyGet } from "@novu/api/funcs/adminTestingControllerIdempotencyGet.js";
|
|
119
|
+
|
|
120
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
121
|
+
// You can create one instance of it to use across an application.
|
|
122
|
+
const novu = new NovuCore({
|
|
123
|
+
apiKey: "<YOUR_API_KEY_HERE>",
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
async function run() {
|
|
127
|
+
const res = await adminTestingControllerIdempotencyGet(novu);
|
|
128
|
+
|
|
129
|
+
if (!res.ok) {
|
|
130
|
+
throw res.error;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const { value: result } = res;
|
|
134
|
+
|
|
135
|
+
// Handle the result
|
|
136
|
+
console.log(result);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
run();
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Parameters
|
|
143
|
+
|
|
144
|
+
| Parameter | Type | Required | Description |
|
|
145
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
146
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
147
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
148
|
+
| `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. |
|
|
149
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
150
|
+
|
|
151
|
+
### Response
|
|
152
|
+
|
|
153
|
+
**Promise\<[operations.TestingControllerIdempotencyGetResponse](../../models/operations/testingcontrolleridempotencygetresponse.md)\>**
|
|
154
|
+
|
|
155
|
+
### Errors
|
|
156
|
+
|
|
157
|
+
| Error Type | Status Code | Content Type |
|
|
158
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
159
|
+
| errors.ErrorDto | 400, 404, 409 | application/json |
|
|
160
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
161
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -24,14 +24,11 @@ const novu = new Novu({
|
|
|
24
24
|
|
|
25
25
|
async function run() {
|
|
26
26
|
const result = await novu.subscribers.credentials.update({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
credentials: {
|
|
31
|
-
webhookUrl: "https://example.com/webhook",
|
|
32
|
-
},
|
|
27
|
+
providerId: "pushpad",
|
|
28
|
+
credentials: {
|
|
29
|
+
webhookUrl: "https://example.com/webhook",
|
|
33
30
|
},
|
|
34
|
-
});
|
|
31
|
+
}, "<id>");
|
|
35
32
|
|
|
36
33
|
// Handle the result
|
|
37
34
|
console.log(result);
|
|
@@ -56,14 +53,11 @@ const novu = new NovuCore({
|
|
|
56
53
|
|
|
57
54
|
async function run() {
|
|
58
55
|
const res = await subscribersCredentialsUpdate(novu, {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
credentials: {
|
|
63
|
-
webhookUrl: "https://example.com/webhook",
|
|
64
|
-
},
|
|
56
|
+
providerId: "pushpad",
|
|
57
|
+
credentials: {
|
|
58
|
+
webhookUrl: "https://example.com/webhook",
|
|
65
59
|
},
|
|
66
|
-
});
|
|
60
|
+
}, "<id>");
|
|
67
61
|
|
|
68
62
|
if (!res.ok) {
|
|
69
63
|
throw res.error;
|
|
@@ -82,7 +76,9 @@ run();
|
|
|
82
76
|
|
|
83
77
|
| Parameter | Type | Required | Description |
|
|
84
78
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
85
|
-
| `
|
|
79
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
80
|
+
| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A |
|
|
81
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
86
82
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
87
83
|
| `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. |
|
|
88
84
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -116,14 +112,11 @@ const novu = new Novu({
|
|
|
116
112
|
|
|
117
113
|
async function run() {
|
|
118
114
|
const result = await novu.subscribers.credentials.append({
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
credentials: {
|
|
123
|
-
webhookUrl: "https://example.com/webhook",
|
|
124
|
-
},
|
|
115
|
+
providerId: "zulip",
|
|
116
|
+
credentials: {
|
|
117
|
+
webhookUrl: "https://example.com/webhook",
|
|
125
118
|
},
|
|
126
|
-
});
|
|
119
|
+
}, "<id>");
|
|
127
120
|
|
|
128
121
|
// Handle the result
|
|
129
122
|
console.log(result);
|
|
@@ -148,14 +141,11 @@ const novu = new NovuCore({
|
|
|
148
141
|
|
|
149
142
|
async function run() {
|
|
150
143
|
const res = await subscribersCredentialsAppend(novu, {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
credentials: {
|
|
155
|
-
webhookUrl: "https://example.com/webhook",
|
|
156
|
-
},
|
|
144
|
+
providerId: "zulip",
|
|
145
|
+
credentials: {
|
|
146
|
+
webhookUrl: "https://example.com/webhook",
|
|
157
147
|
},
|
|
158
|
-
});
|
|
148
|
+
}, "<id>");
|
|
159
149
|
|
|
160
150
|
if (!res.ok) {
|
|
161
151
|
throw res.error;
|
|
@@ -174,7 +164,9 @@ run();
|
|
|
174
164
|
|
|
175
165
|
| Parameter | Type | Required | Description |
|
|
176
166
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
177
|
-
| `
|
|
167
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
168
|
+
| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A |
|
|
169
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
178
170
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
179
171
|
| `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. |
|
|
180
172
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -205,10 +197,7 @@ const novu = new Novu({
|
|
|
205
197
|
});
|
|
206
198
|
|
|
207
199
|
async function run() {
|
|
208
|
-
const result = await novu.subscribers.credentials.delete(
|
|
209
|
-
subscriberId: "<id>",
|
|
210
|
-
providerId: "<id>",
|
|
211
|
-
});
|
|
200
|
+
const result = await novu.subscribers.credentials.delete("<id>", "<id>");
|
|
212
201
|
|
|
213
202
|
// Handle the result
|
|
214
203
|
console.log(result);
|
|
@@ -232,10 +221,7 @@ const novu = new NovuCore({
|
|
|
232
221
|
});
|
|
233
222
|
|
|
234
223
|
async function run() {
|
|
235
|
-
const res = await subscribersCredentialsDelete(novu,
|
|
236
|
-
subscriberId: "<id>",
|
|
237
|
-
providerId: "<id>",
|
|
238
|
-
});
|
|
224
|
+
const res = await subscribersCredentialsDelete(novu, "<id>", "<id>");
|
|
239
225
|
|
|
240
226
|
if (!res.ok) {
|
|
241
227
|
throw res.error;
|
|
@@ -254,7 +240,9 @@ run();
|
|
|
254
240
|
|
|
255
241
|
| Parameter | Type | Required | Description |
|
|
256
242
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
257
|
-
| `
|
|
243
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
244
|
+
| `providerId` | *string* | :heavy_check_mark: | N/A |
|
|
245
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
258
246
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
259
247
|
| `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. |
|
|
260
248
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -258,10 +258,7 @@ const novu = new Novu({
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
async function run() {
|
|
261
|
-
const result = await novu.integrations.update({
|
|
262
|
-
integrationId: "<id>",
|
|
263
|
-
updateIntegrationRequestDto: {},
|
|
264
|
-
});
|
|
261
|
+
const result = await novu.integrations.update({}, "<id>");
|
|
265
262
|
|
|
266
263
|
// Handle the result
|
|
267
264
|
console.log(result);
|
|
@@ -285,10 +282,7 @@ const novu = new NovuCore({
|
|
|
285
282
|
});
|
|
286
283
|
|
|
287
284
|
async function run() {
|
|
288
|
-
const res = await integrationsUpdate(novu, {
|
|
289
|
-
integrationId: "<id>",
|
|
290
|
-
updateIntegrationRequestDto: {},
|
|
291
|
-
});
|
|
285
|
+
const res = await integrationsUpdate(novu, {}, "<id>");
|
|
292
286
|
|
|
293
287
|
if (!res.ok) {
|
|
294
288
|
throw res.error;
|
|
@@ -307,7 +301,9 @@ run();
|
|
|
307
301
|
|
|
308
302
|
| Parameter | Type | Required | Description |
|
|
309
303
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
310
|
-
| `
|
|
304
|
+
| `integrationId` | *string* | :heavy_check_mark: | N/A |
|
|
305
|
+
| `updateIntegrationRequestDto` | [components.UpdateIntegrationRequestDto](../../models/components/updateintegrationrequestdto.md) | :heavy_check_mark: | N/A |
|
|
306
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
311
307
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
312
308
|
| `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. |
|
|
313
309
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -175,9 +175,7 @@ const novu = new Novu({
|
|
|
175
175
|
});
|
|
176
176
|
|
|
177
177
|
async function run() {
|
|
178
|
-
const result = await novu.messages.deleteByTransactionId(
|
|
179
|
-
transactionId: "<id>",
|
|
180
|
-
});
|
|
178
|
+
const result = await novu.messages.deleteByTransactionId("<id>");
|
|
181
179
|
|
|
182
180
|
// Handle the result
|
|
183
181
|
console.log(result);
|
|
@@ -201,9 +199,7 @@ const novu = new NovuCore({
|
|
|
201
199
|
});
|
|
202
200
|
|
|
203
201
|
async function run() {
|
|
204
|
-
const res = await messagesDeleteByTransactionId(novu,
|
|
205
|
-
transactionId: "<id>",
|
|
206
|
-
});
|
|
202
|
+
const res = await messagesDeleteByTransactionId(novu, "<id>");
|
|
207
203
|
|
|
208
204
|
if (!res.ok) {
|
|
209
205
|
throw res.error;
|
|
@@ -222,7 +218,9 @@ run();
|
|
|
222
218
|
|
|
223
219
|
| Parameter | Type | Required | Description |
|
|
224
220
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
225
|
-
| `
|
|
221
|
+
| `transactionId` | *string* | :heavy_check_mark: | N/A |
|
|
222
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
223
|
+
| `channel` | [operations.Channel](../../models/operations/channel.md) | :heavy_minus_sign: | The channel of the message to be deleted |
|
|
226
224
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
227
225
|
| `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. |
|
|
228
226
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|