@novu/api 0.0.1-alpha.160 → 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 +1 -1
- 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/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 +1 -1
- package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -1
- package/funcs/adminTestingControllerIdempotency.js +4 -1
- package/funcs/adminTestingControllerIdempotency.js.map +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.d.ts +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.js +1 -2
- package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -1
- 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/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/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 +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/testingcontrolleridempotency.d.ts +2 -0
- package/models/operations/testingcontrolleridempotency.d.ts.map +1 -1
- package/models/operations/testingcontrolleridempotency.js +4 -0
- package/models/operations/testingcontrolleridempotency.js.map +1 -1
- package/models/operations/testingcontrolleridempotencyget.d.ts +3 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts.map +1 -1
- package/models/operations/testingcontrolleridempotencyget.js +5 -0
- package/models/operations/testingcontrolleridempotencyget.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +2 -2
- package/sdk/admin.d.ts.map +1 -1
- 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/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 +6 -6
- package/src/funcs/adminTestingControllerIdempotencyGet.ts +5 -5
- 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/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/idempotencyresponse.ts +58 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/testingcontrolleridempotency.ts +6 -0
- package/src/models/operations/testingcontrolleridempotencyget.ts +7 -0
- package/src/sdk/admin.ts +2 -2
- 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/subscribers.ts +18 -6
- package/src/sdk/topics.ts +6 -2
package/README.md
CHANGED
|
@@ -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. |
|
|
@@ -24,12 +24,9 @@ const novu = new Novu({
|
|
|
24
24
|
|
|
25
25
|
async function run() {
|
|
26
26
|
const result = await novu.subscribers.messages.markAllAs({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
markAs: "read",
|
|
31
|
-
},
|
|
32
|
-
});
|
|
27
|
+
messageId: "<value>",
|
|
28
|
+
markAs: "read",
|
|
29
|
+
}, "<id>");
|
|
33
30
|
|
|
34
31
|
// Handle the result
|
|
35
32
|
console.log(result);
|
|
@@ -54,12 +51,9 @@ const novu = new NovuCore({
|
|
|
54
51
|
|
|
55
52
|
async function run() {
|
|
56
53
|
const res = await subscribersMessagesMarkAllAs(novu, {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
markAs: "read",
|
|
61
|
-
},
|
|
62
|
-
});
|
|
54
|
+
messageId: "<value>",
|
|
55
|
+
markAs: "read",
|
|
56
|
+
}, "<id>");
|
|
63
57
|
|
|
64
58
|
if (!res.ok) {
|
|
65
59
|
throw res.error;
|
|
@@ -78,7 +72,9 @@ run();
|
|
|
78
72
|
|
|
79
73
|
| Parameter | Type | Required | Description |
|
|
80
74
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
81
|
-
| `
|
|
75
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
76
|
+
| `messageMarkAsRequestDto` | [components.MessageMarkAsRequestDto](../../models/components/messagemarkasrequestdto.md) | :heavy_check_mark: | N/A |
|
|
77
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
82
78
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
83
79
|
| `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. |
|
|
84
80
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -110,11 +106,8 @@ const novu = new Novu({
|
|
|
110
106
|
|
|
111
107
|
async function run() {
|
|
112
108
|
const result = await novu.subscribers.messages.markAll({
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
markAs: "seen",
|
|
116
|
-
},
|
|
117
|
-
});
|
|
109
|
+
markAs: "seen",
|
|
110
|
+
}, "<id>");
|
|
118
111
|
|
|
119
112
|
// Handle the result
|
|
120
113
|
console.log(result);
|
|
@@ -139,11 +132,8 @@ const novu = new NovuCore({
|
|
|
139
132
|
|
|
140
133
|
async function run() {
|
|
141
134
|
const res = await subscribersMessagesMarkAll(novu, {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
markAs: "seen",
|
|
145
|
-
},
|
|
146
|
-
});
|
|
135
|
+
markAs: "seen",
|
|
136
|
+
}, "<id>");
|
|
147
137
|
|
|
148
138
|
if (!res.ok) {
|
|
149
139
|
throw res.error;
|
|
@@ -162,7 +152,9 @@ run();
|
|
|
162
152
|
|
|
163
153
|
| Parameter | Type | Required | Description |
|
|
164
154
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
165
|
-
| `
|
|
155
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
156
|
+
| `markAllMessageAsRequestDto` | [components.MarkAllMessageAsRequestDto](../../models/components/markallmessageasrequestdto.md) | :heavy_check_mark: | N/A |
|
|
157
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
166
158
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
167
159
|
| `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. |
|
|
168
160
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -24,15 +24,12 @@ const novu = new Novu({
|
|
|
24
24
|
|
|
25
25
|
async function run() {
|
|
26
26
|
const result = await novu.topics.subscribers.assign({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
});
|
|
27
|
+
subscribers: [
|
|
28
|
+
"<value>",
|
|
29
|
+
"<value>",
|
|
30
|
+
"<value>",
|
|
31
|
+
],
|
|
32
|
+
}, "<value>");
|
|
36
33
|
|
|
37
34
|
// Handle the result
|
|
38
35
|
console.log(result);
|
|
@@ -57,15 +54,12 @@ const novu = new NovuCore({
|
|
|
57
54
|
|
|
58
55
|
async function run() {
|
|
59
56
|
const res = await topicsSubscribersAssign(novu, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
});
|
|
57
|
+
subscribers: [
|
|
58
|
+
"<value>",
|
|
59
|
+
"<value>",
|
|
60
|
+
"<value>",
|
|
61
|
+
],
|
|
62
|
+
}, "<value>");
|
|
69
63
|
|
|
70
64
|
if (!res.ok) {
|
|
71
65
|
throw res.error;
|
|
@@ -84,7 +78,9 @@ run();
|
|
|
84
78
|
|
|
85
79
|
| Parameter | Type | Required | Description |
|
|
86
80
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
87
|
-
| `
|
|
81
|
+
| `topicKey` | *string* | :heavy_check_mark: | The topic key |
|
|
82
|
+
| `addSubscribersRequestDto` | [components.AddSubscribersRequestDto](../../models/components/addsubscribersrequestdto.md) | :heavy_check_mark: | N/A |
|
|
83
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
88
84
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
89
85
|
| `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. |
|
|
90
86
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -115,10 +111,7 @@ const novu = new Novu({
|
|
|
115
111
|
});
|
|
116
112
|
|
|
117
113
|
async function run() {
|
|
118
|
-
const result = await novu.topics.subscribers.retrieve(
|
|
119
|
-
externalSubscriberId: "<id>",
|
|
120
|
-
topicKey: "<value>",
|
|
121
|
-
});
|
|
114
|
+
const result = await novu.topics.subscribers.retrieve("<id>", "<value>");
|
|
122
115
|
|
|
123
116
|
// Handle the result
|
|
124
117
|
console.log(result);
|
|
@@ -142,10 +135,7 @@ const novu = new NovuCore({
|
|
|
142
135
|
});
|
|
143
136
|
|
|
144
137
|
async function run() {
|
|
145
|
-
const res = await topicsSubscribersRetrieve(novu,
|
|
146
|
-
externalSubscriberId: "<id>",
|
|
147
|
-
topicKey: "<value>",
|
|
148
|
-
});
|
|
138
|
+
const res = await topicsSubscribersRetrieve(novu, "<id>", "<value>");
|
|
149
139
|
|
|
150
140
|
if (!res.ok) {
|
|
151
141
|
throw res.error;
|
|
@@ -164,7 +154,9 @@ run();
|
|
|
164
154
|
|
|
165
155
|
| Parameter | Type | Required | Description |
|
|
166
156
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
167
|
-
| `
|
|
157
|
+
| `externalSubscriberId` | *string* | :heavy_check_mark: | The external subscriber id |
|
|
158
|
+
| `topicKey` | *string* | :heavy_check_mark: | The topic key |
|
|
159
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
168
160
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
169
161
|
| `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. |
|
|
170
162
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -196,14 +188,11 @@ const novu = new Novu({
|
|
|
196
188
|
|
|
197
189
|
async function run() {
|
|
198
190
|
const result = await novu.topics.subscribers.remove({
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
],
|
|
205
|
-
},
|
|
206
|
-
});
|
|
191
|
+
subscribers: [
|
|
192
|
+
"<value>",
|
|
193
|
+
"<value>",
|
|
194
|
+
],
|
|
195
|
+
}, "<value>");
|
|
207
196
|
|
|
208
197
|
// Handle the result
|
|
209
198
|
console.log(result);
|
|
@@ -228,14 +217,11 @@ const novu = new NovuCore({
|
|
|
228
217
|
|
|
229
218
|
async function run() {
|
|
230
219
|
const res = await topicsSubscribersRemove(novu, {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
],
|
|
237
|
-
},
|
|
238
|
-
});
|
|
220
|
+
subscribers: [
|
|
221
|
+
"<value>",
|
|
222
|
+
"<value>",
|
|
223
|
+
],
|
|
224
|
+
}, "<value>");
|
|
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
|
+
| `topicKey` | *string* | :heavy_check_mark: | The topic key |
|
|
244
|
+
| `removeSubscribersRequestDto` | [components.RemoveSubscribersRequestDto](../../models/components/removesubscribersrequestdto.md) | :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. |
|
|
@@ -24,9 +24,7 @@ const novu = new Novu({
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
async function run() {
|
|
27
|
-
const result = await novu.subscribers.preferences.list(
|
|
28
|
-
subscriberId: "<id>",
|
|
29
|
-
});
|
|
27
|
+
const result = await novu.subscribers.preferences.list("<id>");
|
|
30
28
|
|
|
31
29
|
// Handle the result
|
|
32
30
|
console.log(result);
|
|
@@ -50,9 +48,7 @@ const novu = new NovuCore({
|
|
|
50
48
|
});
|
|
51
49
|
|
|
52
50
|
async function run() {
|
|
53
|
-
const res = await subscribersPreferencesList(novu,
|
|
54
|
-
subscriberId: "<id>",
|
|
55
|
-
});
|
|
51
|
+
const res = await subscribersPreferencesList(novu, "<id>");
|
|
56
52
|
|
|
57
53
|
if (!res.ok) {
|
|
58
54
|
throw res.error;
|
|
@@ -71,7 +67,9 @@ run();
|
|
|
71
67
|
|
|
72
68
|
| Parameter | Type | Required | Description |
|
|
73
69
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
74
|
-
| `
|
|
70
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
71
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
72
|
+
| `includeInactiveChannels` | *boolean* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true |
|
|
75
73
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
76
74
|
| `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
75
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -102,10 +100,7 @@ const novu = new Novu({
|
|
|
102
100
|
});
|
|
103
101
|
|
|
104
102
|
async function run() {
|
|
105
|
-
const result = await novu.subscribers.preferences.updateGlobal({
|
|
106
|
-
subscriberId: "<id>",
|
|
107
|
-
updateSubscriberGlobalPreferencesRequestDto: {},
|
|
108
|
-
});
|
|
103
|
+
const result = await novu.subscribers.preferences.updateGlobal({}, "<id>");
|
|
109
104
|
|
|
110
105
|
// Handle the result
|
|
111
106
|
console.log(result);
|
|
@@ -129,10 +124,7 @@ const novu = new NovuCore({
|
|
|
129
124
|
});
|
|
130
125
|
|
|
131
126
|
async function run() {
|
|
132
|
-
const res = await subscribersPreferencesUpdateGlobal(novu, {
|
|
133
|
-
subscriberId: "<id>",
|
|
134
|
-
updateSubscriberGlobalPreferencesRequestDto: {},
|
|
135
|
-
});
|
|
127
|
+
const res = await subscribersPreferencesUpdateGlobal(novu, {}, "<id>");
|
|
136
128
|
|
|
137
129
|
if (!res.ok) {
|
|
138
130
|
throw res.error;
|
|
@@ -151,7 +143,9 @@ run();
|
|
|
151
143
|
|
|
152
144
|
| Parameter | Type | Required | Description |
|
|
153
145
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
154
|
-
| `
|
|
146
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
147
|
+
| `updateSubscriberGlobalPreferencesRequestDto` | [components.UpdateSubscriberGlobalPreferencesRequestDto](../../models/components/updatesubscriberglobalpreferencesrequestdto.md) | :heavy_check_mark: | N/A |
|
|
148
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
155
149
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
156
150
|
| `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. |
|
|
157
151
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|