@novu/api 0.0.1-alpha.160 → 0.0.1-alpha.162

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.
Files changed (177) hide show
  1. package/README.md +1 -1
  2. package/docs/sdks/credentials/README.md +27 -39
  3. package/docs/sdks/integrations/README.md +5 -9
  4. package/docs/sdks/messages/README.md +5 -7
  5. package/docs/sdks/novumessages/README.md +16 -24
  6. package/docs/sdks/novusubscribers/README.md +33 -45
  7. package/docs/sdks/preferences/README.md +10 -16
  8. package/docs/sdks/properties/README.md +7 -11
  9. package/docs/sdks/subscribers/README.md +43 -47
  10. package/docs/sdks/topics/README.md +7 -11
  11. package/funcs/adminTestingControllerIdempotency.d.ts +1 -1
  12. package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -1
  13. package/funcs/adminTestingControllerIdempotency.js +4 -1
  14. package/funcs/adminTestingControllerIdempotency.js.map +1 -1
  15. package/funcs/adminTestingControllerIdempotencyGet.d.ts +1 -1
  16. package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -1
  17. package/funcs/adminTestingControllerIdempotencyGet.js +1 -2
  18. package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -1
  19. package/funcs/integrationsUpdate.d.ts +2 -1
  20. package/funcs/integrationsUpdate.d.ts.map +1 -1
  21. package/funcs/integrationsUpdate.js +7 -2
  22. package/funcs/integrationsUpdate.js.map +1 -1
  23. package/funcs/messagesDeleteByTransactionId.d.ts +1 -1
  24. package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
  25. package/funcs/messagesDeleteByTransactionId.js +7 -2
  26. package/funcs/messagesDeleteByTransactionId.js.map +1 -1
  27. package/funcs/subscribersCredentialsAppend.d.ts +2 -1
  28. package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
  29. package/funcs/subscribersCredentialsAppend.js +7 -2
  30. package/funcs/subscribersCredentialsAppend.js.map +1 -1
  31. package/funcs/subscribersCredentialsDelete.d.ts +1 -1
  32. package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
  33. package/funcs/subscribersCredentialsDelete.js +7 -2
  34. package/funcs/subscribersCredentialsDelete.js.map +1 -1
  35. package/funcs/subscribersCredentialsUpdate.d.ts +2 -1
  36. package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
  37. package/funcs/subscribersCredentialsUpdate.js +7 -2
  38. package/funcs/subscribersCredentialsUpdate.js.map +1 -1
  39. package/funcs/subscribersList.d.ts +1 -1
  40. package/funcs/subscribersList.d.ts.map +1 -1
  41. package/funcs/subscribersList.js +12 -10
  42. package/funcs/subscribersList.js.map +1 -1
  43. package/funcs/subscribersMessagesMarkAll.d.ts +2 -1
  44. package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
  45. package/funcs/subscribersMessagesMarkAll.js +7 -2
  46. package/funcs/subscribersMessagesMarkAll.js.map +1 -1
  47. package/funcs/subscribersMessagesMarkAllAs.d.ts +2 -1
  48. package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
  49. package/funcs/subscribersMessagesMarkAllAs.js +7 -2
  50. package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
  51. package/funcs/subscribersPreferencesList.d.ts +1 -1
  52. package/funcs/subscribersPreferencesList.d.ts.map +1 -1
  53. package/funcs/subscribersPreferencesList.js +7 -2
  54. package/funcs/subscribersPreferencesList.js.map +1 -1
  55. package/funcs/subscribersPreferencesUpdateGlobal.d.ts +2 -1
  56. package/funcs/subscribersPreferencesUpdateGlobal.d.ts.map +1 -1
  57. package/funcs/subscribersPreferencesUpdateGlobal.js +7 -2
  58. package/funcs/subscribersPreferencesUpdateGlobal.js.map +1 -1
  59. package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts +2 -1
  60. package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
  61. package/funcs/subscribersPropertiesUpdateOnlineFlag.js +7 -2
  62. package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
  63. package/funcs/subscribersRetrieve.d.ts +1 -1
  64. package/funcs/subscribersRetrieve.d.ts.map +1 -1
  65. package/funcs/subscribersRetrieve.js +7 -2
  66. package/funcs/subscribersRetrieve.js.map +1 -1
  67. package/funcs/subscribersUpdate.d.ts +2 -1
  68. package/funcs/subscribersUpdate.d.ts.map +1 -1
  69. package/funcs/subscribersUpdate.js +7 -2
  70. package/funcs/subscribersUpdate.js.map +1 -1
  71. package/funcs/topicsRename.d.ts +2 -1
  72. package/funcs/topicsRename.d.ts.map +1 -1
  73. package/funcs/topicsRename.js +7 -2
  74. package/funcs/topicsRename.js.map +1 -1
  75. package/funcs/topicsSubscribersAssign.d.ts +2 -1
  76. package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
  77. package/funcs/topicsSubscribersAssign.js +7 -2
  78. package/funcs/topicsSubscribersAssign.js.map +1 -1
  79. package/funcs/topicsSubscribersRemove.d.ts +2 -1
  80. package/funcs/topicsSubscribersRemove.d.ts.map +1 -1
  81. package/funcs/topicsSubscribersRemove.js +7 -2
  82. package/funcs/topicsSubscribersRemove.js.map +1 -1
  83. package/funcs/topicsSubscribersRetrieve.d.ts +1 -1
  84. package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
  85. package/funcs/topicsSubscribersRetrieve.js +7 -2
  86. package/funcs/topicsSubscribersRetrieve.js.map +1 -1
  87. package/lib/config.d.ts +2 -2
  88. package/lib/config.js +2 -2
  89. package/models/components/idempotencyresponse.d.ts +32 -0
  90. package/models/components/idempotencyresponse.d.ts.map +1 -0
  91. package/models/components/idempotencyresponse.js +59 -0
  92. package/models/components/idempotencyresponse.js.map +1 -0
  93. package/models/components/index.d.ts +1 -0
  94. package/models/components/index.d.ts.map +1 -1
  95. package/models/components/index.js +1 -0
  96. package/models/components/index.js.map +1 -1
  97. package/models/operations/testingcontrolleridempotency.d.ts +2 -0
  98. package/models/operations/testingcontrolleridempotency.d.ts.map +1 -1
  99. package/models/operations/testingcontrolleridempotency.js +4 -0
  100. package/models/operations/testingcontrolleridempotency.js.map +1 -1
  101. package/models/operations/testingcontrolleridempotencyget.d.ts +3 -0
  102. package/models/operations/testingcontrolleridempotencyget.d.ts.map +1 -1
  103. package/models/operations/testingcontrolleridempotencyget.js +5 -0
  104. package/models/operations/testingcontrolleridempotencyget.js.map +1 -1
  105. package/package.json +1 -1
  106. package/sdk/admin.d.ts +2 -2
  107. package/sdk/admin.d.ts.map +1 -1
  108. package/sdk/credentials.d.ts +4 -3
  109. package/sdk/credentials.d.ts.map +1 -1
  110. package/sdk/credentials.js +6 -6
  111. package/sdk/credentials.js.map +1 -1
  112. package/sdk/integrations.d.ts +1 -1
  113. package/sdk/integrations.d.ts.map +1 -1
  114. package/sdk/integrations.js +2 -2
  115. package/sdk/integrations.js.map +1 -1
  116. package/sdk/messages.d.ts +1 -1
  117. package/sdk/messages.d.ts.map +1 -1
  118. package/sdk/messages.js +2 -2
  119. package/sdk/messages.js.map +1 -1
  120. package/sdk/novumessages.d.ts +3 -2
  121. package/sdk/novumessages.d.ts.map +1 -1
  122. package/sdk/novumessages.js +4 -4
  123. package/sdk/novumessages.js.map +1 -1
  124. package/sdk/novusubscribers.d.ts +4 -3
  125. package/sdk/novusubscribers.d.ts.map +1 -1
  126. package/sdk/novusubscribers.js +6 -6
  127. package/sdk/novusubscribers.js.map +1 -1
  128. package/sdk/preferences.d.ts +3 -2
  129. package/sdk/preferences.d.ts.map +1 -1
  130. package/sdk/preferences.js +4 -4
  131. package/sdk/preferences.js.map +1 -1
  132. package/sdk/properties.d.ts +2 -1
  133. package/sdk/properties.d.ts.map +1 -1
  134. package/sdk/properties.js +2 -2
  135. package/sdk/properties.js.map +1 -1
  136. package/sdk/subscribers.d.ts +3 -3
  137. package/sdk/subscribers.d.ts.map +1 -1
  138. package/sdk/subscribers.js +6 -6
  139. package/sdk/subscribers.js.map +1 -1
  140. package/sdk/topics.d.ts +1 -1
  141. package/sdk/topics.d.ts.map +1 -1
  142. package/sdk/topics.js +2 -2
  143. package/sdk/topics.js.map +1 -1
  144. package/src/funcs/adminTestingControllerIdempotency.ts +6 -6
  145. package/src/funcs/adminTestingControllerIdempotencyGet.ts +5 -5
  146. package/src/funcs/integrationsUpdate.ts +11 -2
  147. package/src/funcs/messagesDeleteByTransactionId.ts +11 -2
  148. package/src/funcs/subscribersCredentialsAppend.ts +13 -2
  149. package/src/funcs/subscribersCredentialsDelete.ts +11 -2
  150. package/src/funcs/subscribersCredentialsUpdate.ts +13 -2
  151. package/src/funcs/subscribersList.ts +17 -10
  152. package/src/funcs/subscribersMessagesMarkAll.ts +11 -2
  153. package/src/funcs/subscribersMessagesMarkAllAs.ts +11 -2
  154. package/src/funcs/subscribersPreferencesList.ts +11 -2
  155. package/src/funcs/subscribersPreferencesUpdateGlobal.ts +14 -3
  156. package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +14 -2
  157. package/src/funcs/subscribersRetrieve.ts +10 -2
  158. package/src/funcs/subscribersUpdate.ts +11 -2
  159. package/src/funcs/topicsRename.ts +11 -2
  160. package/src/funcs/topicsSubscribersAssign.ts +11 -2
  161. package/src/funcs/topicsSubscribersRemove.ts +11 -2
  162. package/src/funcs/topicsSubscribersRetrieve.ts +10 -2
  163. package/src/lib/config.ts +2 -2
  164. package/src/models/components/idempotencyresponse.ts +69 -0
  165. package/src/models/components/index.ts +1 -0
  166. package/src/models/operations/testingcontrolleridempotency.ts +6 -0
  167. package/src/models/operations/testingcontrolleridempotencyget.ts +7 -0
  168. package/src/sdk/admin.ts +2 -2
  169. package/src/sdk/credentials.ts +21 -6
  170. package/src/sdk/integrations.ts +6 -2
  171. package/src/sdk/messages.ts +6 -2
  172. package/src/sdk/novumessages.ts +13 -4
  173. package/src/sdk/novusubscribers.ts +19 -6
  174. package/src/sdk/preferences.ts +14 -5
  175. package/src/sdk/properties.ts +8 -2
  176. package/src/sdk/subscribers.ts +18 -6
  177. package/src/sdk/topics.ts +6 -2
package/README.md CHANGED
@@ -412,7 +412,7 @@ const novu = new Novu({
412
412
  });
413
413
 
414
414
  async function run() {
415
- const result = await novu.subscribers.list({});
415
+ const result = await novu.subscribers.list();
416
416
 
417
417
  for await (const page of result) {
418
418
  // Handle the page
@@ -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
- subscriberId: "<id>",
28
- updateSubscriberChannelRequestDto: {
29
- providerId: "pushpad",
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
- subscriberId: "<id>",
60
- updateSubscriberChannelRequestDto: {
61
- providerId: "pushpad",
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
- | `request` | [operations.SubscribersControllerUpdateSubscriberChannelRequest](../../models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- subscriberId: "<id>",
120
- updateSubscriberChannelRequestDto: {
121
- providerId: "zulip",
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
- subscriberId: "<id>",
152
- updateSubscriberChannelRequestDto: {
153
- providerId: "zulip",
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
- | `request` | [operations.SubscribersControllerModifySubscriberChannelRequest](../../models/operations/subscriberscontrollermodifysubscriberchannelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.SubscribersControllerDeleteSubscriberCredentialsRequest](../../models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.IntegrationsControllerUpdateIntegrationByIdRequest](../../models/operations/integrationscontrollerupdateintegrationbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.MessagesControllerDeleteMessagesByTransactionIdRequest](../../models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- subscriberId: "<id>",
28
- messageMarkAsRequestDto: {
29
- messageId: "<value>",
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
- subscriberId: "<id>",
58
- messageMarkAsRequestDto: {
59
- messageId: "<value>",
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
- | `request` | [operations.SubscribersControllerMarkMessagesAsRequest](../../models/operations/subscriberscontrollermarkmessagesasrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- subscriberId: "<id>",
114
- markAllMessageAsRequestDto: {
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
- subscriberId: "<id>",
143
- markAllMessageAsRequestDto: {
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
- | `request` | [operations.SubscribersControllerMarkAllUnreadAsReadRequest](../../models/operations/subscriberscontrollermarkallunreadasreadrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- topicKey: "<value>",
28
- addSubscribersRequestDto: {
29
- subscribers: [
30
- "<value>",
31
- "<value>",
32
- "<value>",
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
- topicKey: "<value>",
61
- addSubscribersRequestDto: {
62
- subscribers: [
63
- "<value>",
64
- "<value>",
65
- "<value>",
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
- | `request` | [operations.TopicsControllerAssignRequest](../../models/operations/topicscontrollerassignrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.TopicsControllerGetTopicSubscriberRequest](../../models/operations/topicscontrollergettopicsubscriberrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- topicKey: "<value>",
200
- removeSubscribersRequestDto: {
201
- subscribers: [
202
- "<value>",
203
- "<value>",
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
- topicKey: "<value>",
232
- removeSubscribersRequestDto: {
233
- subscribers: [
234
- "<value>",
235
- "<value>",
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
- | `request` | [operations.TopicsControllerRemoveSubscribersRequest](../../models/operations/topicscontrollerremovesubscribersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.SubscribersControllerListSubscriberPreferencesRequest](../../models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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
- | `request` | [operations.SubscribersControllerUpdateSubscriberGlobalPreferencesRequest](../../models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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. |