@novu/api 0.0.1-alpha.179 → 0.0.1-alpha.182

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 (257) hide show
  1. package/README.md +6 -8
  2. package/docs/sdks/admin/README.md +2 -2
  3. package/docs/sdks/authentication/README.md +2 -2
  4. package/docs/sdks/credentials/README.md +3 -3
  5. package/docs/sdks/integrations/README.md +6 -6
  6. package/docs/sdks/messages/README.md +3 -3
  7. package/docs/sdks/notifications/README.md +6 -6
  8. package/docs/sdks/novu/README.md +6 -6
  9. package/docs/sdks/novumessages/README.md +3 -3
  10. package/docs/sdks/novunotifications/README.md +2 -2
  11. package/docs/sdks/novusubscribers/README.md +3 -3
  12. package/docs/sdks/preferences/README.md +4 -4
  13. package/docs/sdks/properties/README.md +1 -1
  14. package/docs/sdks/stats/README.md +2 -2
  15. package/docs/sdks/subscribers/README.md +6 -6
  16. package/docs/sdks/topics/README.md +5 -5
  17. package/docs/sdks/webhooks/README.md +1 -1
  18. package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -1
  19. package/funcs/adminTestingControllerIdempotency.js +7 -4
  20. package/funcs/adminTestingControllerIdempotency.js.map +1 -1
  21. package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -1
  22. package/funcs/adminTestingControllerIdempotencyGet.js +7 -4
  23. package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -1
  24. package/funcs/cancel.d.ts.map +1 -1
  25. package/funcs/cancel.js +7 -4
  26. package/funcs/cancel.js.map +1 -1
  27. package/funcs/integrationsCreate.d.ts.map +1 -1
  28. package/funcs/integrationsCreate.js +7 -4
  29. package/funcs/integrationsCreate.js.map +1 -1
  30. package/funcs/integrationsDelete.d.ts.map +1 -1
  31. package/funcs/integrationsDelete.js +7 -4
  32. package/funcs/integrationsDelete.js.map +1 -1
  33. package/funcs/integrationsList.d.ts.map +1 -1
  34. package/funcs/integrationsList.js +7 -4
  35. package/funcs/integrationsList.js.map +1 -1
  36. package/funcs/integrationsListActive.d.ts.map +1 -1
  37. package/funcs/integrationsListActive.js +7 -4
  38. package/funcs/integrationsListActive.js.map +1 -1
  39. package/funcs/integrationsSetAsPrimary.d.ts.map +1 -1
  40. package/funcs/integrationsSetAsPrimary.js +5 -4
  41. package/funcs/integrationsSetAsPrimary.js.map +1 -1
  42. package/funcs/integrationsUpdate.d.ts.map +1 -1
  43. package/funcs/integrationsUpdate.js +5 -4
  44. package/funcs/integrationsUpdate.js.map +1 -1
  45. package/funcs/integrationsWebhooksRetrieve.d.ts.map +1 -1
  46. package/funcs/integrationsWebhooksRetrieve.js +7 -4
  47. package/funcs/integrationsWebhooksRetrieve.js.map +1 -1
  48. package/funcs/messagesDelete.d.ts.map +1 -1
  49. package/funcs/messagesDelete.js +7 -4
  50. package/funcs/messagesDelete.js.map +1 -1
  51. package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
  52. package/funcs/messagesDeleteByTransactionId.js +7 -4
  53. package/funcs/messagesDeleteByTransactionId.js.map +1 -1
  54. package/funcs/messagesRetrieve.d.ts.map +1 -1
  55. package/funcs/messagesRetrieve.js +7 -4
  56. package/funcs/messagesRetrieve.js.map +1 -1
  57. package/funcs/notificationsList.d.ts.map +1 -1
  58. package/funcs/notificationsList.js +7 -4
  59. package/funcs/notificationsList.js.map +1 -1
  60. package/funcs/notificationsRetrieve.d.ts.map +1 -1
  61. package/funcs/notificationsRetrieve.js +7 -4
  62. package/funcs/notificationsRetrieve.js.map +1 -1
  63. package/funcs/notificationsStatsGraph.d.ts.map +1 -1
  64. package/funcs/notificationsStatsGraph.js +7 -4
  65. package/funcs/notificationsStatsGraph.js.map +1 -1
  66. package/funcs/notificationsStatsRetrieve.d.ts.map +1 -1
  67. package/funcs/notificationsStatsRetrieve.js +7 -4
  68. package/funcs/notificationsStatsRetrieve.js.map +1 -1
  69. package/funcs/subscribersAuthenticationChatAccessOauth.d.ts.map +1 -1
  70. package/funcs/subscribersAuthenticationChatAccessOauth.js +7 -4
  71. package/funcs/subscribersAuthenticationChatAccessOauth.js.map +1 -1
  72. package/funcs/subscribersAuthenticationChatAccessOauthCallBack.d.ts.map +1 -1
  73. package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js +7 -4
  74. package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js.map +1 -1
  75. package/funcs/subscribersCreate.d.ts.map +1 -1
  76. package/funcs/subscribersCreate.js +7 -4
  77. package/funcs/subscribersCreate.js.map +1 -1
  78. package/funcs/subscribersCreateBulk.d.ts.map +1 -1
  79. package/funcs/subscribersCreateBulk.js +7 -4
  80. package/funcs/subscribersCreateBulk.js.map +1 -1
  81. package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
  82. package/funcs/subscribersCredentialsAppend.js +7 -4
  83. package/funcs/subscribersCredentialsAppend.js.map +1 -1
  84. package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
  85. package/funcs/subscribersCredentialsDelete.js +7 -4
  86. package/funcs/subscribersCredentialsDelete.js.map +1 -1
  87. package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
  88. package/funcs/subscribersCredentialsUpdate.js +7 -4
  89. package/funcs/subscribersCredentialsUpdate.js.map +1 -1
  90. package/funcs/subscribersDelete.d.ts.map +1 -1
  91. package/funcs/subscribersDelete.js +7 -4
  92. package/funcs/subscribersDelete.js.map +1 -1
  93. package/funcs/subscribersList.d.ts.map +1 -1
  94. package/funcs/subscribersList.js +7 -4
  95. package/funcs/subscribersList.js.map +1 -1
  96. package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
  97. package/funcs/subscribersMessagesMarkAll.js +7 -4
  98. package/funcs/subscribersMessagesMarkAll.js.map +1 -1
  99. package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
  100. package/funcs/subscribersMessagesMarkAllAs.js +7 -4
  101. package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
  102. package/funcs/subscribersMessagesUpdateAsSeen.d.ts.map +1 -1
  103. package/funcs/subscribersMessagesUpdateAsSeen.js +7 -4
  104. package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
  105. package/funcs/subscribersNotificationsFeed.d.ts.map +1 -1
  106. package/funcs/subscribersNotificationsFeed.js +7 -4
  107. package/funcs/subscribersNotificationsFeed.js.map +1 -1
  108. package/funcs/subscribersNotificationsUnseenCount.d.ts.map +1 -1
  109. package/funcs/subscribersNotificationsUnseenCount.js +7 -4
  110. package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
  111. package/funcs/subscribersPreferencesList.d.ts.map +1 -1
  112. package/funcs/subscribersPreferencesList.js +7 -4
  113. package/funcs/subscribersPreferencesList.js.map +1 -1
  114. package/funcs/subscribersPreferencesRetrieveByLevel.d.ts.map +1 -1
  115. package/funcs/subscribersPreferencesRetrieveByLevel.js +7 -4
  116. package/funcs/subscribersPreferencesRetrieveByLevel.js.map +1 -1
  117. package/funcs/subscribersPreferencesUpdate.d.ts.map +1 -1
  118. package/funcs/subscribersPreferencesUpdate.js +7 -4
  119. package/funcs/subscribersPreferencesUpdate.js.map +1 -1
  120. package/funcs/subscribersPreferencesUpdateGlobal.d.ts.map +1 -1
  121. package/funcs/subscribersPreferencesUpdateGlobal.js +7 -4
  122. package/funcs/subscribersPreferencesUpdateGlobal.js.map +1 -1
  123. package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
  124. package/funcs/subscribersPropertiesUpdateOnlineFlag.js +7 -4
  125. package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
  126. package/funcs/subscribersRetrieve.d.ts.map +1 -1
  127. package/funcs/subscribersRetrieve.js +7 -4
  128. package/funcs/subscribersRetrieve.js.map +1 -1
  129. package/funcs/subscribersUpdate.d.ts.map +1 -1
  130. package/funcs/subscribersUpdate.js +7 -4
  131. package/funcs/subscribersUpdate.js.map +1 -1
  132. package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.d.ts.map +1 -1
  133. package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js +3 -2
  134. package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js.map +1 -1
  135. package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.d.ts.map +1 -1
  136. package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js +3 -2
  137. package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js.map +1 -1
  138. package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.d.ts.map +1 -1
  139. package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js +3 -2
  140. package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js.map +1 -1
  141. package/funcs/topicsCreate.d.ts.map +1 -1
  142. package/funcs/topicsCreate.js +7 -4
  143. package/funcs/topicsCreate.js.map +1 -1
  144. package/funcs/topicsDelete.d.ts.map +1 -1
  145. package/funcs/topicsDelete.js +7 -4
  146. package/funcs/topicsDelete.js.map +1 -1
  147. package/funcs/topicsList.d.ts.map +1 -1
  148. package/funcs/topicsList.js +7 -4
  149. package/funcs/topicsList.js.map +1 -1
  150. package/funcs/topicsRename.d.ts.map +1 -1
  151. package/funcs/topicsRename.js +7 -4
  152. package/funcs/topicsRename.js.map +1 -1
  153. package/funcs/topicsRetrieve.d.ts.map +1 -1
  154. package/funcs/topicsRetrieve.js +7 -4
  155. package/funcs/topicsRetrieve.js.map +1 -1
  156. package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
  157. package/funcs/topicsSubscribersAssign.js +7 -4
  158. package/funcs/topicsSubscribersAssign.js.map +1 -1
  159. package/funcs/topicsSubscribersRemove.d.ts.map +1 -1
  160. package/funcs/topicsSubscribersRemove.js +7 -4
  161. package/funcs/topicsSubscribersRemove.js.map +1 -1
  162. package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
  163. package/funcs/topicsSubscribersRetrieve.js +7 -4
  164. package/funcs/topicsSubscribersRetrieve.js.map +1 -1
  165. package/funcs/trigger.d.ts.map +1 -1
  166. package/funcs/trigger.js +7 -4
  167. package/funcs/trigger.js.map +1 -1
  168. package/funcs/triggerBroadcast.d.ts.map +1 -1
  169. package/funcs/triggerBroadcast.js +7 -4
  170. package/funcs/triggerBroadcast.js.map +1 -1
  171. package/funcs/triggerBulk.d.ts.map +1 -1
  172. package/funcs/triggerBulk.js +7 -4
  173. package/funcs/triggerBulk.js.map +1 -1
  174. package/hooks/novu-custom-hook.js +1 -1
  175. package/hooks/novu-custom-hook.js.map +1 -1
  176. package/lib/config.d.ts +3 -3
  177. package/lib/config.js +3 -3
  178. package/lib/config.js.map +1 -1
  179. package/lib/encodings.d.ts +10 -9
  180. package/lib/encodings.d.ts.map +1 -1
  181. package/lib/encodings.js +74 -48
  182. package/lib/encodings.js.map +1 -1
  183. package/lib/primitives.d.ts +1 -0
  184. package/lib/primitives.d.ts.map +1 -1
  185. package/lib/primitives.js +11 -1
  186. package/lib/primitives.js.map +1 -1
  187. package/lib/sdks.d.ts.map +1 -1
  188. package/lib/sdks.js +4 -1
  189. package/lib/sdks.js.map +1 -1
  190. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts +5 -0
  191. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts.map +1 -1
  192. package/models/components/activitynotificationexecutiondetailresponsedto.js +2 -0
  193. package/models/components/activitynotificationexecutiondetailresponsedto.js.map +1 -1
  194. package/models/components/activitynotificationjobresponsedto.d.ts +5 -0
  195. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  196. package/models/components/activitynotificationjobresponsedto.js +2 -0
  197. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  198. package/package.json +1 -1
  199. package/src/funcs/adminTestingControllerIdempotency.ts +7 -4
  200. package/src/funcs/adminTestingControllerIdempotencyGet.ts +7 -4
  201. package/src/funcs/cancel.ts +7 -4
  202. package/src/funcs/integrationsCreate.ts +7 -4
  203. package/src/funcs/integrationsDelete.ts +7 -4
  204. package/src/funcs/integrationsList.ts +7 -4
  205. package/src/funcs/integrationsListActive.ts +7 -4
  206. package/src/funcs/integrationsSetAsPrimary.ts +5 -4
  207. package/src/funcs/integrationsUpdate.ts +5 -4
  208. package/src/funcs/integrationsWebhooksRetrieve.ts +7 -4
  209. package/src/funcs/messagesDelete.ts +7 -4
  210. package/src/funcs/messagesDeleteByTransactionId.ts +7 -4
  211. package/src/funcs/messagesRetrieve.ts +7 -4
  212. package/src/funcs/notificationsList.ts +7 -4
  213. package/src/funcs/notificationsRetrieve.ts +7 -4
  214. package/src/funcs/notificationsStatsGraph.ts +7 -4
  215. package/src/funcs/notificationsStatsRetrieve.ts +7 -4
  216. package/src/funcs/subscribersAuthenticationChatAccessOauth.ts +7 -4
  217. package/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +7 -4
  218. package/src/funcs/subscribersCreate.ts +7 -4
  219. package/src/funcs/subscribersCreateBulk.ts +7 -4
  220. package/src/funcs/subscribersCredentialsAppend.ts +7 -4
  221. package/src/funcs/subscribersCredentialsDelete.ts +7 -4
  222. package/src/funcs/subscribersCredentialsUpdate.ts +7 -4
  223. package/src/funcs/subscribersDelete.ts +7 -4
  224. package/src/funcs/subscribersList.ts +7 -4
  225. package/src/funcs/subscribersMessagesMarkAll.ts +7 -4
  226. package/src/funcs/subscribersMessagesMarkAllAs.ts +7 -4
  227. package/src/funcs/subscribersMessagesUpdateAsSeen.ts +7 -4
  228. package/src/funcs/subscribersNotificationsFeed.ts +7 -4
  229. package/src/funcs/subscribersNotificationsUnseenCount.ts +7 -4
  230. package/src/funcs/subscribersPreferencesList.ts +7 -4
  231. package/src/funcs/subscribersPreferencesRetrieveByLevel.ts +7 -4
  232. package/src/funcs/subscribersPreferencesUpdate.ts +7 -4
  233. package/src/funcs/subscribersPreferencesUpdateGlobal.ts +7 -4
  234. package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +7 -4
  235. package/src/funcs/subscribersRetrieve.ts +7 -4
  236. package/src/funcs/subscribersUpdate.ts +7 -4
  237. package/src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts +3 -2
  238. package/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts +3 -2
  239. package/src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts +3 -2
  240. package/src/funcs/topicsCreate.ts +7 -4
  241. package/src/funcs/topicsDelete.ts +7 -4
  242. package/src/funcs/topicsList.ts +7 -4
  243. package/src/funcs/topicsRename.ts +7 -4
  244. package/src/funcs/topicsRetrieve.ts +7 -4
  245. package/src/funcs/topicsSubscribersAssign.ts +7 -4
  246. package/src/funcs/topicsSubscribersRemove.ts +7 -4
  247. package/src/funcs/topicsSubscribersRetrieve.ts +7 -4
  248. package/src/funcs/trigger.ts +7 -4
  249. package/src/funcs/triggerBroadcast.ts +7 -4
  250. package/src/funcs/triggerBulk.ts +7 -4
  251. package/src/hooks/novu-custom-hook.ts +1 -1
  252. package/src/lib/config.ts +3 -3
  253. package/src/lib/encodings.ts +95 -61
  254. package/src/lib/primitives.ts +14 -0
  255. package/src/lib/sdks.ts +4 -1
  256. package/src/models/components/activitynotificationexecutiondetailresponsedto.ts +7 -0
  257. package/src/models/components/activitynotificationjobresponsedto.ts +7 -0
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -73,14 +74,14 @@ export async function topicsDelete(
73
74
 
74
75
  const path = pathToFunc("/v1/topics/{topicKey}")(pathParams);
75
76
 
76
- const headers = new Headers({
77
+ const headers = new Headers(compactMap({
77
78
  Accept: "application/json",
78
79
  "Idempotency-Key": encodeSimple(
79
80
  "Idempotency-Key",
80
81
  payload["Idempotency-Key"],
81
82
  { explode: false, charEncoding: "none" },
82
83
  ),
83
- });
84
+ }));
84
85
 
85
86
  const secConfig = await extractSecurity(client._options.apiKey);
86
87
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -125,7 +126,7 @@ export async function topicsDelete(
125
126
 
126
127
  const doResult = await client._do(req, {
127
128
  context,
128
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
129
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
129
130
  retryConfig: context.retryConfig,
130
131
  retryCodes: context.retryCodes,
131
132
  });
@@ -155,7 +156,9 @@ export async function topicsDelete(
155
156
  operations.TopicsControllerDeleteTopicResponse$inboundSchema.optional(),
156
157
  { hdrs: true },
157
158
  ),
158
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
159
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
160
+ hdrs: true,
161
+ }),
159
162
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
160
163
  M.fail([429, 503]),
161
164
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -66,14 +67,14 @@ export async function topicsList(
66
67
  "pageSize": payload.pageSize,
67
68
  });
68
69
 
69
- const headers = new Headers({
70
+ const headers = new Headers(compactMap({
70
71
  Accept: "application/json",
71
72
  "Idempotency-Key": encodeSimple(
72
73
  "Idempotency-Key",
73
74
  payload["Idempotency-Key"],
74
75
  { explode: false, charEncoding: "none" },
75
76
  ),
76
- });
77
+ }));
77
78
 
78
79
  const secConfig = await extractSecurity(client._options.apiKey);
79
80
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -119,7 +120,7 @@ export async function topicsList(
119
120
 
120
121
  const doResult = await client._do(req, {
121
122
  context,
122
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
123
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
123
124
  retryConfig: context.retryConfig,
124
125
  retryCodes: context.retryCodes,
125
126
  });
@@ -148,7 +149,9 @@ export async function topicsList(
148
149
  hdrs: true,
149
150
  key: "Result",
150
151
  }),
151
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
152
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
153
+ hdrs: true,
154
+ }),
152
155
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
153
156
  M.fail([429, 503]),
154
157
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -78,7 +79,7 @@ export async function topicsRename(
78
79
 
79
80
  const path = pathToFunc("/v1/topics/{topicKey}")(pathParams);
80
81
 
81
- const headers = new Headers({
82
+ const headers = new Headers(compactMap({
82
83
  "Content-Type": "application/json",
83
84
  Accept: "application/json",
84
85
  "Idempotency-Key": encodeSimple(
@@ -86,7 +87,7 @@ export async function topicsRename(
86
87
  payload["Idempotency-Key"],
87
88
  { explode: false, charEncoding: "none" },
88
89
  ),
89
- });
90
+ }));
90
91
 
91
92
  const secConfig = await extractSecurity(client._options.apiKey);
92
93
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -131,7 +132,7 @@ export async function topicsRename(
131
132
 
132
133
  const doResult = await client._do(req, {
133
134
  context,
134
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
135
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
135
136
  retryConfig: context.retryConfig,
136
137
  retryCodes: context.retryCodes,
137
138
  });
@@ -160,7 +161,9 @@ export async function topicsRename(
160
161
  hdrs: true,
161
162
  key: "Result",
162
163
  }),
163
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
164
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
165
+ hdrs: true,
166
+ }),
164
167
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
165
168
  M.fail([429, 503]),
166
169
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -73,14 +74,14 @@ export async function topicsRetrieve(
73
74
 
74
75
  const path = pathToFunc("/v1/topics/{topicKey}")(pathParams);
75
76
 
76
- const headers = new Headers({
77
+ const headers = new Headers(compactMap({
77
78
  Accept: "application/json",
78
79
  "Idempotency-Key": encodeSimple(
79
80
  "Idempotency-Key",
80
81
  payload["Idempotency-Key"],
81
82
  { explode: false, charEncoding: "none" },
82
83
  ),
83
- });
84
+ }));
84
85
 
85
86
  const secConfig = await extractSecurity(client._options.apiKey);
86
87
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -125,7 +126,7 @@ export async function topicsRetrieve(
125
126
 
126
127
  const doResult = await client._do(req, {
127
128
  context,
128
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
129
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
129
130
  retryConfig: context.retryConfig,
130
131
  retryCodes: context.retryCodes,
131
132
  });
@@ -154,7 +155,9 @@ export async function topicsRetrieve(
154
155
  hdrs: true,
155
156
  key: "Result",
156
157
  }),
157
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
158
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
159
+ hdrs: true,
160
+ }),
158
161
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
159
162
  M.fail([429, 503]),
160
163
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -78,7 +79,7 @@ export async function topicsSubscribersAssign(
78
79
 
79
80
  const path = pathToFunc("/v1/topics/{topicKey}/subscribers")(pathParams);
80
81
 
81
- const headers = new Headers({
82
+ const headers = new Headers(compactMap({
82
83
  "Content-Type": "application/json",
83
84
  Accept: "application/json",
84
85
  "Idempotency-Key": encodeSimple(
@@ -86,7 +87,7 @@ export async function topicsSubscribersAssign(
86
87
  payload["Idempotency-Key"],
87
88
  { explode: false, charEncoding: "none" },
88
89
  ),
89
- });
90
+ }));
90
91
 
91
92
  const secConfig = await extractSecurity(client._options.apiKey);
92
93
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -131,7 +132,7 @@ export async function topicsSubscribersAssign(
131
132
 
132
133
  const doResult = await client._do(req, {
133
134
  context,
134
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
135
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
135
136
  retryConfig: context.retryConfig,
136
137
  retryCodes: context.retryCodes,
137
138
  });
@@ -160,7 +161,9 @@ export async function topicsSubscribersAssign(
160
161
  hdrs: true,
161
162
  key: "Result",
162
163
  }),
163
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
164
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
165
+ hdrs: true,
166
+ }),
164
167
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
165
168
  M.fail([429, 503]),
166
169
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -82,7 +83,7 @@ export async function topicsSubscribersRemove(
82
83
  pathParams,
83
84
  );
84
85
 
85
- const headers = new Headers({
86
+ const headers = new Headers(compactMap({
86
87
  "Content-Type": "application/json",
87
88
  Accept: "application/json",
88
89
  "Idempotency-Key": encodeSimple(
@@ -90,7 +91,7 @@ export async function topicsSubscribersRemove(
90
91
  payload["Idempotency-Key"],
91
92
  { explode: false, charEncoding: "none" },
92
93
  ),
93
- });
94
+ }));
94
95
 
95
96
  const secConfig = await extractSecurity(client._options.apiKey);
96
97
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -135,7 +136,7 @@ export async function topicsSubscribersRemove(
135
136
 
136
137
  const doResult = await client._do(req, {
137
138
  context,
138
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
139
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
139
140
  retryConfig: context.retryConfig,
140
141
  retryCodes: context.retryCodes,
141
142
  });
@@ -166,7 +167,9 @@ export async function topicsSubscribersRemove(
166
167
  .optional(),
167
168
  { hdrs: true },
168
169
  ),
169
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
170
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
171
+ hdrs: true,
172
+ }),
170
173
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
171
174
  M.fail([429, 503]),
172
175
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -84,14 +85,14 @@ export async function topicsSubscribersRetrieve(
84
85
  "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}",
85
86
  )(pathParams);
86
87
 
87
- const headers = new Headers({
88
+ const headers = new Headers(compactMap({
88
89
  Accept: "application/json",
89
90
  "Idempotency-Key": encodeSimple(
90
91
  "Idempotency-Key",
91
92
  payload["Idempotency-Key"],
92
93
  { explode: false, charEncoding: "none" },
93
94
  ),
94
- });
95
+ }));
95
96
 
96
97
  const secConfig = await extractSecurity(client._options.apiKey);
97
98
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -136,7 +137,7 @@ export async function topicsSubscribersRetrieve(
136
137
 
137
138
  const doResult = await client._do(req, {
138
139
  context,
139
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
140
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
140
141
  retryConfig: context.retryConfig,
141
142
  retryCodes: context.retryCodes,
142
143
  });
@@ -166,7 +167,9 @@ export async function topicsSubscribersRetrieve(
166
167
  operations.TopicsControllerGetTopicSubscriberResponse$inboundSchema,
167
168
  { hdrs: true, key: "Result" },
168
169
  ),
169
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
170
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
171
+ hdrs: true,
172
+ }),
170
173
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
171
174
  M.fail([429, 503]),
172
175
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -72,7 +73,7 @@ export async function trigger(
72
73
 
73
74
  const path = pathToFunc("/v1/events/trigger")();
74
75
 
75
- const headers = new Headers({
76
+ const headers = new Headers(compactMap({
76
77
  "Content-Type": "application/json",
77
78
  Accept: "application/json",
78
79
  "Idempotency-Key": encodeSimple(
@@ -80,7 +81,7 @@ export async function trigger(
80
81
  payload["Idempotency-Key"],
81
82
  { explode: false, charEncoding: "none" },
82
83
  ),
83
- });
84
+ }));
84
85
 
85
86
  const secConfig = await extractSecurity(client._options.apiKey);
86
87
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -125,7 +126,7 @@ export async function trigger(
125
126
 
126
127
  const doResult = await client._do(req, {
127
128
  context,
128
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
129
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
129
130
  retryConfig: context.retryConfig,
130
131
  retryCodes: context.retryCodes,
131
132
  });
@@ -154,7 +155,9 @@ export async function trigger(
154
155
  hdrs: true,
155
156
  key: "Result",
156
157
  }),
157
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
158
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
159
+ hdrs: true,
160
+ }),
158
161
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
159
162
  M.fail([429, 503]),
160
163
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -71,7 +72,7 @@ export async function triggerBroadcast(
71
72
 
72
73
  const path = pathToFunc("/v1/events/trigger/broadcast")();
73
74
 
74
- const headers = new Headers({
75
+ const headers = new Headers(compactMap({
75
76
  "Content-Type": "application/json",
76
77
  Accept: "application/json",
77
78
  "Idempotency-Key": encodeSimple(
@@ -79,7 +80,7 @@ export async function triggerBroadcast(
79
80
  payload["Idempotency-Key"],
80
81
  { explode: false, charEncoding: "none" },
81
82
  ),
82
- });
83
+ }));
83
84
 
84
85
  const secConfig = await extractSecurity(client._options.apiKey);
85
86
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -124,7 +125,7 @@ export async function triggerBroadcast(
124
125
 
125
126
  const doResult = await client._do(req, {
126
127
  context,
127
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
128
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
128
129
  retryConfig: context.retryConfig,
129
130
  retryCodes: context.retryCodes,
130
131
  });
@@ -154,7 +155,9 @@ export async function triggerBroadcast(
154
155
  operations.EventsControllerBroadcastEventToAllResponse$inboundSchema,
155
156
  { hdrs: true, key: "Result" },
156
157
  ),
157
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
158
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
159
+ hdrs: true,
160
+ }),
158
161
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
159
162
  M.fail([429, 503]),
160
163
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import { NovuCore } from "../core.js";
6
6
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { safeParse } from "../lib/schemas.js";
9
10
  import { RequestOptions } from "../lib/sdks.js";
10
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -71,7 +72,7 @@ export async function triggerBulk(
71
72
 
72
73
  const path = pathToFunc("/v1/events/trigger/bulk")();
73
74
 
74
- const headers = new Headers({
75
+ const headers = new Headers(compactMap({
75
76
  "Content-Type": "application/json",
76
77
  Accept: "application/json",
77
78
  "Idempotency-Key": encodeSimple(
@@ -79,7 +80,7 @@ export async function triggerBulk(
79
80
  payload["Idempotency-Key"],
80
81
  { explode: false, charEncoding: "none" },
81
82
  ),
82
- });
83
+ }));
83
84
 
84
85
  const secConfig = await extractSecurity(client._options.apiKey);
85
86
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -124,7 +125,7 @@ export async function triggerBulk(
124
125
 
125
126
  const doResult = await client._do(req, {
126
127
  context,
127
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
128
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
128
129
  retryConfig: context.retryConfig,
129
130
  retryCodes: context.retryCodes,
130
131
  });
@@ -153,7 +154,9 @@ export async function triggerBulk(
153
154
  hdrs: true,
154
155
  key: "Result",
155
156
  }),
156
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
157
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
158
+ hdrs: true,
159
+ }),
157
160
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
158
161
  M.fail([429, 503]),
159
162
  M.fail(["4XX", "5XX"]),
@@ -18,7 +18,7 @@ export class NovuCustomHook
18
18
  }
19
19
  const updatedHeaders = this.updateHeaderValue(headers, idempotencyKey, this.generateIdempotencyKey)
20
20
 
21
- return {...input, options: {headers: updatedHeaders}}
21
+ return {...input, options: {...input.options, headers: updatedHeaders}}
22
22
  }
23
23
 
24
24
  beforeRequest(_hookCtx: BeforeRequestContext, request: Request): Request {
package/src/lib/config.ts CHANGED
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0",
58
- sdkVersion: "0.0.1-alpha.179",
59
- genVersion: "2.493.4",
60
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.179 2.493.4 1.0 @novu/api",
58
+ sdkVersion: "0.0.1-alpha.182",
59
+ genVersion: "2.493.11",
60
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.182 2.493.11 1.0 @novu/api",
61
61
  } as const;