@novu/api 0.5.0 → 0.6.1

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 (225) hide show
  1. package/README.md +124 -68
  2. package/bin/mcp-server.js +223 -173
  3. package/bin/mcp-server.js.map +65 -64
  4. package/docs/sdks/authentication/README.md +17 -17
  5. package/docs/sdks/integrations/README.md +55 -55
  6. package/docs/sdks/novu/README.md +146 -146
  7. package/docs/sdks/novumessages/README.md +34 -34
  8. package/docs/sdks/stats/README.md +14 -14
  9. package/docs/sdks/subscribers/README.md +82 -82
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/lib/sdks.d.ts.map +1 -1
  14. package/lib/sdks.js +2 -8
  15. package/lib/sdks.js.map +1 -1
  16. package/lib/security.d.ts +4 -3
  17. package/lib/security.d.ts.map +1 -1
  18. package/lib/security.js +6 -1
  19. package/lib/security.js.map +1 -1
  20. package/mcp-server/extensions.d.ts +11 -0
  21. package/mcp-server/extensions.d.ts.map +1 -0
  22. package/mcp-server/extensions.js +6 -0
  23. package/mcp-server/extensions.js.map +1 -0
  24. package/mcp-server/mcp-server.js +1 -1
  25. package/mcp-server/prompts.d.ts +26 -0
  26. package/mcp-server/prompts.d.ts.map +1 -0
  27. package/mcp-server/prompts.js +48 -0
  28. package/mcp-server/prompts.js.map +1 -0
  29. package/mcp-server/resources.d.ts +9 -4
  30. package/mcp-server/resources.d.ts.map +1 -1
  31. package/mcp-server/resources.js +38 -10
  32. package/mcp-server/resources.js.map +1 -1
  33. package/mcp-server/server.d.ts.map +1 -1
  34. package/mcp-server/server.js +31 -24
  35. package/mcp-server/server.js.map +1 -1
  36. package/mcp-server/tools/integrationsCreate.js +1 -1
  37. package/mcp-server/tools/integrationsDelete.js +1 -1
  38. package/mcp-server/tools/integrationsList.js +1 -1
  39. package/mcp-server/tools/integrationsListActive.js +1 -1
  40. package/mcp-server/tools/integrationsSetAsPrimary.js +1 -1
  41. package/mcp-server/tools/integrationsUpdate.js +1 -1
  42. package/mcp-server/tools/integrationsWebhooksRetrieve.js +1 -1
  43. package/mcp-server/tools/messagesDelete.js +1 -1
  44. package/mcp-server/tools/messagesDeleteByTransactionId.js +1 -1
  45. package/mcp-server/tools/messagesRetrieve.js +1 -1
  46. package/mcp-server/tools/notificationsList.js +1 -1
  47. package/mcp-server/tools/notificationsRetrieve.js +1 -1
  48. package/mcp-server/tools/notificationsStatsGraph.js +1 -1
  49. package/mcp-server/tools/notificationsStatsRetrieve.js +1 -1
  50. package/mcp-server/tools/subscribersAuthenticationChatAccessOauth.js +1 -1
  51. package/mcp-server/tools/subscribersAuthenticationChatAccessOauthCallBack.js +1 -1
  52. package/mcp-server/tools/subscribersCreate.js +1 -1
  53. package/mcp-server/tools/subscribersCreateBulk.js +1 -1
  54. package/mcp-server/tools/subscribersCredentialsAppend.js +1 -1
  55. package/mcp-server/tools/subscribersCredentialsDelete.js +1 -1
  56. package/mcp-server/tools/subscribersCredentialsUpdate.js +1 -1
  57. package/mcp-server/tools/subscribersDelete.js +1 -1
  58. package/mcp-server/tools/subscribersList.js +1 -1
  59. package/mcp-server/tools/subscribersMessagesMarkAll.js +1 -1
  60. package/mcp-server/tools/subscribersMessagesMarkAllAs.js +1 -1
  61. package/mcp-server/tools/subscribersMessagesUpdateAsSeen.js +1 -1
  62. package/mcp-server/tools/subscribersNotificationsFeed.js +1 -1
  63. package/mcp-server/tools/subscribersNotificationsUnseenCount.js +1 -1
  64. package/mcp-server/tools/subscribersPatch.js +1 -1
  65. package/mcp-server/tools/subscribersPreferencesList.js +1 -1
  66. package/mcp-server/tools/subscribersPreferencesUpdate.js +1 -1
  67. package/mcp-server/tools/subscribersPropertiesUpdateOnlineFlag.js +1 -1
  68. package/mcp-server/tools/subscribersRetrieve.js +1 -1
  69. package/mcp-server/tools/subscribersSearch.js +1 -1
  70. package/mcp-server/tools/topicsCreate.js +1 -1
  71. package/mcp-server/tools/topicsDelete.js +1 -1
  72. package/mcp-server/tools/topicsList.js +1 -1
  73. package/mcp-server/tools/topicsRename.js +1 -1
  74. package/mcp-server/tools/topicsRetrieve.js +1 -1
  75. package/mcp-server/tools/topicsSubscribersAssign.js +1 -1
  76. package/mcp-server/tools/topicsSubscribersRemove.js +1 -1
  77. package/mcp-server/tools/topicsSubscribersRetrieve.js +1 -1
  78. package/mcp-server/tools.d.ts.map +1 -1
  79. package/mcp-server/tools.js +4 -0
  80. package/mcp-server/tools.js.map +1 -1
  81. package/models/components/activitynotificationjobresponsedto.d.ts +9 -0
  82. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  83. package/models/components/activitynotificationjobresponsedto.js +2 -0
  84. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  85. package/models/components/channelsettingsdto.d.ts +8 -8
  86. package/models/components/channelsettingsdto.d.ts.map +1 -1
  87. package/models/components/channelsettingsdto.js +14 -13
  88. package/models/components/channelsettingsdto.js.map +1 -1
  89. package/models/components/index.d.ts +0 -1
  90. package/models/components/index.d.ts.map +1 -1
  91. package/models/components/index.js +0 -1
  92. package/models/components/index.js.map +1 -1
  93. package/models/components/integrationresponsedto.d.ts +8 -8
  94. package/models/components/integrationresponsedto.d.ts.map +1 -1
  95. package/models/components/integrationresponsedto.js +13 -14
  96. package/models/components/integrationresponsedto.js.map +1 -1
  97. package/models/components/markallmessageasrequestdto.d.ts +8 -8
  98. package/models/components/markallmessageasrequestdto.d.ts.map +1 -1
  99. package/models/components/markallmessageasrequestdto.js +14 -13
  100. package/models/components/markallmessageasrequestdto.js.map +1 -1
  101. package/models/components/messagemarkasrequestdto.d.ts +8 -8
  102. package/models/components/messagemarkasrequestdto.d.ts.map +1 -1
  103. package/models/components/messagemarkasrequestdto.js +13 -14
  104. package/models/components/messagemarkasrequestdto.js.map +1 -1
  105. package/models/components/overrides.d.ts +8 -8
  106. package/models/components/overrides.d.ts.map +1 -1
  107. package/models/components/overrides.js +14 -13
  108. package/models/components/overrides.js.map +1 -1
  109. package/models/components/patchsubscriberrequestdto.d.ts +15 -15
  110. package/models/components/patchsubscriberrequestdto.d.ts.map +1 -1
  111. package/models/components/patchsubscriberrequestdto.js +19 -20
  112. package/models/components/patchsubscriberrequestdto.js.map +1 -1
  113. package/models/components/subscriberchanneldto.d.ts +8 -8
  114. package/models/components/subscriberchanneldto.d.ts.map +1 -1
  115. package/models/components/subscriberchanneldto.js +13 -14
  116. package/models/components/subscriberchanneldto.js.map +1 -1
  117. package/models/components/subscriberpayloaddto.d.ts +13 -13
  118. package/models/components/subscriberpayloaddto.d.ts.map +1 -1
  119. package/models/components/subscriberpayloaddto.js +16 -17
  120. package/models/components/subscriberpayloaddto.js.map +1 -1
  121. package/models/operations/eventscontrollercancel.d.ts +2 -3
  122. package/models/operations/eventscontrollercancel.d.ts.map +1 -1
  123. package/models/operations/eventscontrollercancel.js +2 -3
  124. package/models/operations/eventscontrollercancel.js.map +1 -1
  125. package/models/operations/notificationscontrollerlistnotifications.d.ts +2 -2
  126. package/package.json +2 -2
  127. package/sdk/authentication.d.ts +4 -4
  128. package/sdk/authentication.d.ts.map +1 -1
  129. package/sdk/authentication.js +6 -6
  130. package/sdk/authentication.js.map +1 -1
  131. package/sdk/integrations.d.ts +7 -7
  132. package/sdk/integrations.d.ts.map +1 -1
  133. package/sdk/integrations.js +9 -9
  134. package/sdk/integrations.js.map +1 -1
  135. package/sdk/novumessages.d.ts +4 -4
  136. package/sdk/novumessages.d.ts.map +1 -1
  137. package/sdk/novumessages.js +6 -6
  138. package/sdk/novumessages.js.map +1 -1
  139. package/sdk/sdk.d.ts +12 -12
  140. package/sdk/sdk.d.ts.map +1 -1
  141. package/sdk/sdk.js +15 -15
  142. package/sdk/sdk.js.map +1 -1
  143. package/sdk/stats.d.ts +4 -4
  144. package/sdk/stats.d.ts.map +1 -1
  145. package/sdk/stats.js +6 -6
  146. package/sdk/stats.js.map +1 -1
  147. package/sdk/subscribers.d.ts +26 -26
  148. package/sdk/subscribers.d.ts.map +1 -1
  149. package/sdk/subscribers.js +29 -29
  150. package/sdk/subscribers.js.map +1 -1
  151. package/sources/json-development.json +1146 -1148
  152. package/src/lib/config.ts +3 -3
  153. package/src/lib/sdks.ts +2 -7
  154. package/src/lib/security.ts +11 -3
  155. package/src/mcp-server/extensions.ts +17 -0
  156. package/src/mcp-server/mcp-server.ts +1 -1
  157. package/src/mcp-server/prompts.ts +110 -0
  158. package/src/mcp-server/resources.ts +76 -14
  159. package/src/mcp-server/server.ts +41 -24
  160. package/src/mcp-server/tools/integrationsCreate.ts +1 -1
  161. package/src/mcp-server/tools/integrationsDelete.ts +1 -1
  162. package/src/mcp-server/tools/integrationsList.ts +1 -1
  163. package/src/mcp-server/tools/integrationsListActive.ts +1 -1
  164. package/src/mcp-server/tools/integrationsSetAsPrimary.ts +1 -1
  165. package/src/mcp-server/tools/integrationsUpdate.ts +1 -1
  166. package/src/mcp-server/tools/integrationsWebhooksRetrieve.ts +1 -1
  167. package/src/mcp-server/tools/messagesDelete.ts +1 -1
  168. package/src/mcp-server/tools/messagesDeleteByTransactionId.ts +1 -1
  169. package/src/mcp-server/tools/messagesRetrieve.ts +1 -1
  170. package/src/mcp-server/tools/notificationsList.ts +1 -1
  171. package/src/mcp-server/tools/notificationsRetrieve.ts +1 -1
  172. package/src/mcp-server/tools/notificationsStatsGraph.ts +1 -1
  173. package/src/mcp-server/tools/notificationsStatsRetrieve.ts +1 -1
  174. package/src/mcp-server/tools/subscribersAuthenticationChatAccessOauth.ts +1 -1
  175. package/src/mcp-server/tools/subscribersAuthenticationChatAccessOauthCallBack.ts +1 -1
  176. package/src/mcp-server/tools/subscribersCreate.ts +1 -1
  177. package/src/mcp-server/tools/subscribersCreateBulk.ts +1 -1
  178. package/src/mcp-server/tools/subscribersCredentialsAppend.ts +1 -1
  179. package/src/mcp-server/tools/subscribersCredentialsDelete.ts +1 -1
  180. package/src/mcp-server/tools/subscribersCredentialsUpdate.ts +1 -1
  181. package/src/mcp-server/tools/subscribersDelete.ts +1 -1
  182. package/src/mcp-server/tools/subscribersList.ts +1 -1
  183. package/src/mcp-server/tools/subscribersMessagesMarkAll.ts +1 -1
  184. package/src/mcp-server/tools/subscribersMessagesMarkAllAs.ts +1 -1
  185. package/src/mcp-server/tools/subscribersMessagesUpdateAsSeen.ts +1 -1
  186. package/src/mcp-server/tools/subscribersNotificationsFeed.ts +1 -1
  187. package/src/mcp-server/tools/subscribersNotificationsUnseenCount.ts +1 -1
  188. package/src/mcp-server/tools/subscribersPatch.ts +1 -1
  189. package/src/mcp-server/tools/subscribersPreferencesList.ts +1 -1
  190. package/src/mcp-server/tools/subscribersPreferencesUpdate.ts +1 -1
  191. package/src/mcp-server/tools/subscribersPropertiesUpdateOnlineFlag.ts +1 -1
  192. package/src/mcp-server/tools/subscribersRetrieve.ts +1 -1
  193. package/src/mcp-server/tools/subscribersSearch.ts +1 -1
  194. package/src/mcp-server/tools/topicsCreate.ts +1 -1
  195. package/src/mcp-server/tools/topicsDelete.ts +1 -1
  196. package/src/mcp-server/tools/topicsList.ts +1 -1
  197. package/src/mcp-server/tools/topicsRename.ts +1 -1
  198. package/src/mcp-server/tools/topicsRetrieve.ts +1 -1
  199. package/src/mcp-server/tools/topicsSubscribersAssign.ts +1 -1
  200. package/src/mcp-server/tools/topicsSubscribersRemove.ts +1 -1
  201. package/src/mcp-server/tools/topicsSubscribersRetrieve.ts +1 -1
  202. package/src/mcp-server/tools.ts +5 -0
  203. package/src/models/components/activitynotificationjobresponsedto.ts +7 -0
  204. package/src/models/components/channelsettingsdto.ts +14 -18
  205. package/src/models/components/index.ts +0 -1
  206. package/src/models/components/integrationresponsedto.ts +18 -14
  207. package/src/models/components/markallmessageasrequestdto.ts +14 -18
  208. package/src/models/components/messagemarkasrequestdto.ts +18 -14
  209. package/src/models/components/overrides.ts +14 -16
  210. package/src/models/components/patchsubscriberrequestdto.ts +23 -37
  211. package/src/models/components/subscriberchanneldto.ts +18 -14
  212. package/src/models/components/subscriberpayloaddto.ts +37 -19
  213. package/src/models/operations/eventscontrollercancel.ts +4 -5
  214. package/src/models/operations/notificationscontrollerlistnotifications.ts +2 -2
  215. package/src/sdk/authentication.ts +16 -16
  216. package/src/sdk/integrations.ts +17 -17
  217. package/src/sdk/novumessages.ts +16 -16
  218. package/src/sdk/sdk.ts +24 -24
  219. package/src/sdk/stats.ts +10 -10
  220. package/src/sdk/subscribers.ts +61 -61
  221. package/models/components/databooleandto.d.ts +0 -29
  222. package/models/components/databooleandto.d.ts.map +0 -1
  223. package/models/components/databooleandto.js +0 -59
  224. package/models/components/databooleandto.js.map +0 -1
  225. package/src/models/components/databooleandto.ts +0 -62
@@ -5,12 +5,12 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [chatAccessOauthCallBack](#chataccessoauthcallback) - Handle providers oauth redirect
9
8
  * [chatAccessOauth](#chataccessoauth) - Handle chat oauth
9
+ * [chatAccessOauthCallBack](#chataccessoauthcallback) - Handle providers oauth redirect
10
10
 
11
- ## chatAccessOauthCallBack
11
+ ## chatAccessOauth
12
12
 
13
- Handle providers oauth redirect
13
+ Handle chat oauth
14
14
 
15
15
  ### Example Usage
16
16
 
@@ -22,12 +22,11 @@ const novu = new Novu({
22
22
  });
23
23
 
24
24
  async function run() {
25
- const result = await novu.subscribers.authentication.chatAccessOauthCallBack({
25
+ const result = await novu.subscribers.authentication.chatAccessOauth({
26
26
  subscriberId: "<id>",
27
27
  providerId: "<id>",
28
28
  hmacHash: "<value>",
29
29
  environmentId: "<id>",
30
- code: "<value>",
31
30
  });
32
31
 
33
32
  // Handle the result
@@ -43,7 +42,7 @@ The standalone function version of this method:
43
42
 
44
43
  ```typescript
45
44
  import { NovuCore } from "@novu/api/core.js";
46
- import { subscribersAuthenticationChatAccessOauthCallBack } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauthCallBack.js";
45
+ import { subscribersAuthenticationChatAccessOauth } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauth.js";
47
46
 
48
47
  // Use `NovuCore` for best tree-shaking performance.
49
48
  // You can create one instance of it to use across an application.
@@ -52,12 +51,11 @@ const novu = new NovuCore({
52
51
  });
53
52
 
54
53
  async function run() {
55
- const res = await subscribersAuthenticationChatAccessOauthCallBack(novu, {
54
+ const res = await subscribersAuthenticationChatAccessOauth(novu, {
56
55
  subscriberId: "<id>",
57
56
  providerId: "<id>",
58
57
  hmacHash: "<value>",
59
58
  environmentId: "<id>",
60
- code: "<value>",
61
59
  });
62
60
 
63
61
  if (!res.ok) {
@@ -77,14 +75,14 @@ run();
77
75
 
78
76
  | Parameter | Type | Required | Description |
79
77
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
80
- | `request` | [operations.SubscribersV1ControllerChatOauthCallbackRequest](../../models/operations/subscribersv1controllerchatoauthcallbackrequest.md) | :heavy_check_mark: | The request object to use for the request. |
78
+ | `request` | [operations.SubscribersV1ControllerChatAccessOauthRequest](../../models/operations/subscribersv1controllerchataccessoauthrequest.md) | :heavy_check_mark: | The request object to use for the request. |
81
79
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
82
80
  | `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. |
83
81
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
84
82
 
85
83
  ### Response
86
84
 
87
- **Promise\<[operations.SubscribersV1ControllerChatOauthCallbackResponse](../../models/operations/subscribersv1controllerchatoauthcallbackresponse.md)\>**
85
+ **Promise\<[operations.SubscribersV1ControllerChatAccessOauthResponse](../../models/operations/subscribersv1controllerchataccessoauthresponse.md)\>**
88
86
 
89
87
  ### Errors
90
88
 
@@ -96,9 +94,9 @@ run();
96
94
  | errors.ErrorDto | 500 | application/json |
97
95
  | errors.SDKError | 4XX, 5XX | \*/\* |
98
96
 
99
- ## chatAccessOauth
97
+ ## chatAccessOauthCallBack
100
98
 
101
- Handle chat oauth
99
+ Handle providers oauth redirect
102
100
 
103
101
  ### Example Usage
104
102
 
@@ -110,11 +108,12 @@ const novu = new Novu({
110
108
  });
111
109
 
112
110
  async function run() {
113
- const result = await novu.subscribers.authentication.chatAccessOauth({
111
+ const result = await novu.subscribers.authentication.chatAccessOauthCallBack({
114
112
  subscriberId: "<id>",
115
113
  providerId: "<id>",
116
114
  hmacHash: "<value>",
117
115
  environmentId: "<id>",
116
+ code: "<value>",
118
117
  });
119
118
 
120
119
  // Handle the result
@@ -130,7 +129,7 @@ The standalone function version of this method:
130
129
 
131
130
  ```typescript
132
131
  import { NovuCore } from "@novu/api/core.js";
133
- import { subscribersAuthenticationChatAccessOauth } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauth.js";
132
+ import { subscribersAuthenticationChatAccessOauthCallBack } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauthCallBack.js";
134
133
 
135
134
  // Use `NovuCore` for best tree-shaking performance.
136
135
  // You can create one instance of it to use across an application.
@@ -139,11 +138,12 @@ const novu = new NovuCore({
139
138
  });
140
139
 
141
140
  async function run() {
142
- const res = await subscribersAuthenticationChatAccessOauth(novu, {
141
+ const res = await subscribersAuthenticationChatAccessOauthCallBack(novu, {
143
142
  subscriberId: "<id>",
144
143
  providerId: "<id>",
145
144
  hmacHash: "<value>",
146
145
  environmentId: "<id>",
146
+ code: "<value>",
147
147
  });
148
148
 
149
149
  if (!res.ok) {
@@ -163,14 +163,14 @@ run();
163
163
 
164
164
  | Parameter | Type | Required | Description |
165
165
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
166
- | `request` | [operations.SubscribersV1ControllerChatAccessOauthRequest](../../models/operations/subscribersv1controllerchataccessoauthrequest.md) | :heavy_check_mark: | The request object to use for the request. |
166
+ | `request` | [operations.SubscribersV1ControllerChatOauthCallbackRequest](../../models/operations/subscribersv1controllerchatoauthcallbackrequest.md) | :heavy_check_mark: | The request object to use for the request. |
167
167
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
168
168
  | `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. |
169
169
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
170
170
 
171
171
  ### Response
172
172
 
173
- **Promise\<[operations.SubscribersV1ControllerChatAccessOauthResponse](../../models/operations/subscribersv1controllerchataccessoauthresponse.md)\>**
173
+ **Promise\<[operations.SubscribersV1ControllerChatOauthCallbackResponse](../../models/operations/subscribersv1controllerchatoauthcallbackresponse.md)\>**
174
174
 
175
175
  ### Errors
176
176
 
@@ -10,10 +10,10 @@ With the help of the Integration Store, you can easily integrate your favorite d
10
10
 
11
11
  * [list](#list) - Get integrations
12
12
  * [create](#create) - Create integration
13
- * [listActive](#listactive) - Get active integrations
14
13
  * [update](#update) - Update integration
15
14
  * [delete](#delete) - Delete integration
16
15
  * [setAsPrimary](#setasprimary) - Set integration as primary
16
+ * [listActive](#listactive) - Get active integrations
17
17
 
18
18
  ## list
19
19
 
@@ -174,9 +174,9 @@ run();
174
174
  | errors.ErrorDto | 500 | application/json |
175
175
  | errors.SDKError | 4XX, 5XX | \*/\* |
176
176
 
177
- ## listActive
177
+ ## update
178
178
 
179
- Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change
179
+ Update integration
180
180
 
181
181
  ### Example Usage
182
182
 
@@ -188,7 +188,7 @@ const novu = new Novu({
188
188
  });
189
189
 
190
190
  async function run() {
191
- const result = await novu.integrations.listActive();
191
+ const result = await novu.integrations.update({}, "<id>");
192
192
 
193
193
  // Handle the result
194
194
  console.log(result);
@@ -203,7 +203,7 @@ The standalone function version of this method:
203
203
 
204
204
  ```typescript
205
205
  import { NovuCore } from "@novu/api/core.js";
206
- import { integrationsListActive } from "@novu/api/funcs/integrationsListActive.js";
206
+ import { integrationsUpdate } from "@novu/api/funcs/integrationsUpdate.js";
207
207
 
208
208
  // Use `NovuCore` for best tree-shaking performance.
209
209
  // You can create one instance of it to use across an application.
@@ -212,7 +212,7 @@ const novu = new NovuCore({
212
212
  });
213
213
 
214
214
  async function run() {
215
- const res = await integrationsListActive(novu);
215
+ const res = await integrationsUpdate(novu, {}, "<id>");
216
216
 
217
217
  if (!res.ok) {
218
218
  throw res.error;
@@ -231,6 +231,8 @@ run();
231
231
 
232
232
  | Parameter | Type | Required | Description |
233
233
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
234
+ | `integrationId` | *string* | :heavy_check_mark: | N/A |
235
+ | `updateIntegrationRequestDto` | [components.UpdateIntegrationRequestDto](../../models/components/updateintegrationrequestdto.md) | :heavy_check_mark: | N/A |
234
236
  | `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
235
237
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
236
238
  | `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. |
@@ -238,21 +240,21 @@ run();
238
240
 
239
241
  ### Response
240
242
 
241
- **Promise\<[operations.IntegrationsControllerGetActiveIntegrationsResponse](../../models/operations/integrationscontrollergetactiveintegrationsresponse.md)\>**
243
+ **Promise\<[operations.IntegrationsControllerUpdateIntegrationByIdResponse](../../models/operations/integrationscontrollerupdateintegrationbyidresponse.md)\>**
242
244
 
243
245
  ### Errors
244
246
 
245
- | Error Type | Status Code | Content Type |
246
- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
247
- | errors.ErrorDto | 414 | application/json |
248
- | errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
249
- | errors.ValidationErrorDto | 422 | application/json |
250
- | errors.ErrorDto | 500 | application/json |
251
- | errors.SDKError | 4XX, 5XX | \*/\* |
247
+ | Error Type | Status Code | Content Type |
248
+ | --------------------------------- | --------------------------------- | --------------------------------- |
249
+ | errors.ErrorDto | 414 | application/json |
250
+ | errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
251
+ | errors.ValidationErrorDto | 422 | application/json |
252
+ | errors.ErrorDto | 500 | application/json |
253
+ | errors.SDKError | 4XX, 5XX | \*/\* |
252
254
 
253
- ## update
255
+ ## delete
254
256
 
255
- Update integration
257
+ Delete integration
256
258
 
257
259
  ### Example Usage
258
260
 
@@ -264,7 +266,7 @@ const novu = new Novu({
264
266
  });
265
267
 
266
268
  async function run() {
267
- const result = await novu.integrations.update({}, "<id>");
269
+ const result = await novu.integrations.delete("<id>");
268
270
 
269
271
  // Handle the result
270
272
  console.log(result);
@@ -279,7 +281,7 @@ The standalone function version of this method:
279
281
 
280
282
  ```typescript
281
283
  import { NovuCore } from "@novu/api/core.js";
282
- import { integrationsUpdate } from "@novu/api/funcs/integrationsUpdate.js";
284
+ import { integrationsDelete } from "@novu/api/funcs/integrationsDelete.js";
283
285
 
284
286
  // Use `NovuCore` for best tree-shaking performance.
285
287
  // You can create one instance of it to use across an application.
@@ -288,7 +290,7 @@ const novu = new NovuCore({
288
290
  });
289
291
 
290
292
  async function run() {
291
- const res = await integrationsUpdate(novu, {}, "<id>");
293
+ const res = await integrationsDelete(novu, "<id>");
292
294
 
293
295
  if (!res.ok) {
294
296
  throw res.error;
@@ -308,7 +310,6 @@ run();
308
310
  | Parameter | Type | Required | Description |
309
311
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
310
312
  | `integrationId` | *string* | :heavy_check_mark: | N/A |
311
- | `updateIntegrationRequestDto` | [components.UpdateIntegrationRequestDto](../../models/components/updateintegrationrequestdto.md) | :heavy_check_mark: | N/A |
312
313
  | `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
313
314
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
314
315
  | `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. |
@@ -316,21 +317,21 @@ run();
316
317
 
317
318
  ### Response
318
319
 
319
- **Promise\<[operations.IntegrationsControllerUpdateIntegrationByIdResponse](../../models/operations/integrationscontrollerupdateintegrationbyidresponse.md)\>**
320
+ **Promise\<[operations.IntegrationsControllerRemoveIntegrationResponse](../../models/operations/integrationscontrollerremoveintegrationresponse.md)\>**
320
321
 
321
322
  ### Errors
322
323
 
323
- | Error Type | Status Code | Content Type |
324
- | --------------------------------- | --------------------------------- | --------------------------------- |
325
- | errors.ErrorDto | 414 | application/json |
326
- | errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
327
- | errors.ValidationErrorDto | 422 | application/json |
328
- | errors.ErrorDto | 500 | application/json |
329
- | errors.SDKError | 4XX, 5XX | \*/\* |
324
+ | Error Type | Status Code | Content Type |
325
+ | -------------------------------------- | -------------------------------------- | -------------------------------------- |
326
+ | errors.ErrorDto | 414 | application/json |
327
+ | errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
328
+ | errors.ValidationErrorDto | 422 | application/json |
329
+ | errors.ErrorDto | 500 | application/json |
330
+ | errors.SDKError | 4XX, 5XX | \*/\* |
330
331
 
331
- ## delete
332
+ ## setAsPrimary
332
333
 
333
- Delete integration
334
+ Set integration as primary
334
335
 
335
336
  ### Example Usage
336
337
 
@@ -342,7 +343,7 @@ const novu = new Novu({
342
343
  });
343
344
 
344
345
  async function run() {
345
- const result = await novu.integrations.delete("<id>");
346
+ const result = await novu.integrations.setAsPrimary("<id>");
346
347
 
347
348
  // Handle the result
348
349
  console.log(result);
@@ -357,7 +358,7 @@ The standalone function version of this method:
357
358
 
358
359
  ```typescript
359
360
  import { NovuCore } from "@novu/api/core.js";
360
- import { integrationsDelete } from "@novu/api/funcs/integrationsDelete.js";
361
+ import { integrationsSetAsPrimary } from "@novu/api/funcs/integrationsSetAsPrimary.js";
361
362
 
362
363
  // Use `NovuCore` for best tree-shaking performance.
363
364
  // You can create one instance of it to use across an application.
@@ -366,7 +367,7 @@ const novu = new NovuCore({
366
367
  });
367
368
 
368
369
  async function run() {
369
- const res = await integrationsDelete(novu, "<id>");
370
+ const res = await integrationsSetAsPrimary(novu, "<id>");
370
371
 
371
372
  if (!res.ok) {
372
373
  throw res.error;
@@ -393,21 +394,21 @@ run();
393
394
 
394
395
  ### Response
395
396
 
396
- **Promise\<[operations.IntegrationsControllerRemoveIntegrationResponse](../../models/operations/integrationscontrollerremoveintegrationresponse.md)\>**
397
+ **Promise\<[operations.IntegrationsControllerSetIntegrationAsPrimaryResponse](../../models/operations/integrationscontrollersetintegrationasprimaryresponse.md)\>**
397
398
 
398
399
  ### Errors
399
400
 
400
- | Error Type | Status Code | Content Type |
401
- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
402
- | errors.ErrorDto | 414 | application/json |
403
- | errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
404
- | errors.ValidationErrorDto | 422 | application/json |
405
- | errors.ErrorDto | 500 | application/json |
406
- | errors.SDKError | 4XX, 5XX | \*/\* |
401
+ | Error Type | Status Code | Content Type |
402
+ | --------------------------------- | --------------------------------- | --------------------------------- |
403
+ | errors.ErrorDto | 414 | application/json |
404
+ | errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
405
+ | errors.ValidationErrorDto | 422 | application/json |
406
+ | errors.ErrorDto | 500 | application/json |
407
+ | errors.SDKError | 4XX, 5XX | \*/\* |
407
408
 
408
- ## setAsPrimary
409
+ ## listActive
409
410
 
410
- Set integration as primary
411
+ Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change
411
412
 
412
413
  ### Example Usage
413
414
 
@@ -419,7 +420,7 @@ const novu = new Novu({
419
420
  });
420
421
 
421
422
  async function run() {
422
- const result = await novu.integrations.setAsPrimary("<id>");
423
+ const result = await novu.integrations.listActive();
423
424
 
424
425
  // Handle the result
425
426
  console.log(result);
@@ -434,7 +435,7 @@ The standalone function version of this method:
434
435
 
435
436
  ```typescript
436
437
  import { NovuCore } from "@novu/api/core.js";
437
- import { integrationsSetAsPrimary } from "@novu/api/funcs/integrationsSetAsPrimary.js";
438
+ import { integrationsListActive } from "@novu/api/funcs/integrationsListActive.js";
438
439
 
439
440
  // Use `NovuCore` for best tree-shaking performance.
440
441
  // You can create one instance of it to use across an application.
@@ -443,7 +444,7 @@ const novu = new NovuCore({
443
444
  });
444
445
 
445
446
  async function run() {
446
- const res = await integrationsSetAsPrimary(novu, "<id>");
447
+ const res = await integrationsListActive(novu);
447
448
 
448
449
  if (!res.ok) {
449
450
  throw res.error;
@@ -462,7 +463,6 @@ run();
462
463
 
463
464
  | Parameter | Type | Required | Description |
464
465
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
465
- | `integrationId` | *string* | :heavy_check_mark: | N/A |
466
466
  | `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
467
467
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
468
468
  | `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. |
@@ -470,14 +470,14 @@ run();
470
470
 
471
471
  ### Response
472
472
 
473
- **Promise\<[operations.IntegrationsControllerSetIntegrationAsPrimaryResponse](../../models/operations/integrationscontrollersetintegrationasprimaryresponse.md)\>**
473
+ **Promise\<[operations.IntegrationsControllerGetActiveIntegrationsResponse](../../models/operations/integrationscontrollergetactiveintegrationsresponse.md)\>**
474
474
 
475
475
  ### Errors
476
476
 
477
- | Error Type | Status Code | Content Type |
478
- | --------------------------------- | --------------------------------- | --------------------------------- |
479
- | errors.ErrorDto | 414 | application/json |
480
- | errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
481
- | errors.ValidationErrorDto | 422 | application/json |
482
- | errors.ErrorDto | 500 | application/json |
483
- | errors.SDKError | 4XX, 5XX | \*/\* |
477
+ | Error Type | Status Code | Content Type |
478
+ | -------------------------------------- | -------------------------------------- | -------------------------------------- |
479
+ | errors.ErrorDto | 414 | application/json |
480
+ | errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
481
+ | errors.ValidationErrorDto | 422 | application/json |
482
+ | errors.ErrorDto | 500 | application/json |
483
+ | errors.SDKError | 4XX, 5XX | \*/\* |