@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 { 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 subscribersMessagesMarkAll(
78
79
  pathParams,
79
80
  );
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 subscribersMessagesMarkAll(
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 subscribersMessagesMarkAll(
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
  });
@@ -161,7 +162,9 @@ export async function subscribersMessagesMarkAll(
161
162
  operations.SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema,
162
163
  { hdrs: true, key: "Result" },
163
164
  ),
164
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
165
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
166
+ hdrs: true,
167
+ }),
165
168
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
166
169
  M.fail([429, 503]),
167
170
  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 subscribersMessagesMarkAllAs(
78
79
  pathParams,
79
80
  );
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 subscribersMessagesMarkAllAs(
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 subscribersMessagesMarkAllAs(
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
  });
@@ -161,7 +162,9 @@ export async function subscribersMessagesMarkAllAs(
161
162
  operations.SubscribersControllerMarkMessagesAsResponse$inboundSchema,
162
163
  { hdrs: true, key: "Result" },
163
164
  ),
164
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
165
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
166
+ hdrs: true,
167
+ }),
165
168
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
166
169
  M.fail([429, 503]),
167
170
  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";
@@ -77,7 +78,7 @@ export async function subscribersMessagesUpdateAsSeen(
77
78
  "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}",
78
79
  )(pathParams);
79
80
 
80
- const headers = new Headers({
81
+ const headers = new Headers(compactMap({
81
82
  "Content-Type": "application/json",
82
83
  Accept: "application/json",
83
84
  "Idempotency-Key": encodeSimple(
@@ -85,7 +86,7 @@ export async function subscribersMessagesUpdateAsSeen(
85
86
  payload["Idempotency-Key"],
86
87
  { explode: false, charEncoding: "none" },
87
88
  ),
88
- });
89
+ }));
89
90
 
90
91
  const secConfig = await extractSecurity(client._options.apiKey);
91
92
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -130,7 +131,7 @@ export async function subscribersMessagesUpdateAsSeen(
130
131
 
131
132
  const doResult = await client._do(req, {
132
133
  context,
133
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
134
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
134
135
  retryConfig: context.retryConfig,
135
136
  retryCodes: context.retryCodes,
136
137
  });
@@ -160,7 +161,9 @@ export async function subscribersMessagesUpdateAsSeen(
160
161
  operations.SubscribersControllerMarkActionAsSeenResponse$inboundSchema,
161
162
  { hdrs: true, 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 { 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";
@@ -75,14 +76,14 @@ export async function subscribersNotificationsFeed(
75
76
  "seen": payload.seen,
76
77
  });
77
78
 
78
- const headers = new Headers({
79
+ const headers = new Headers(compactMap({
79
80
  Accept: "application/json",
80
81
  "Idempotency-Key": encodeSimple(
81
82
  "Idempotency-Key",
82
83
  payload["Idempotency-Key"],
83
84
  { explode: false, charEncoding: "none" },
84
85
  ),
85
- });
86
+ }));
86
87
 
87
88
  const secConfig = await extractSecurity(client._options.apiKey);
88
89
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -128,7 +129,7 @@ export async function subscribersNotificationsFeed(
128
129
 
129
130
  const doResult = await client._do(req, {
130
131
  context,
131
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
132
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
132
133
  retryConfig: context.retryConfig,
133
134
  retryCodes: context.retryCodes,
134
135
  });
@@ -159,7 +160,9 @@ export async function subscribersNotificationsFeed(
159
160
  .SubscribersControllerGetNotificationsFeedResponse$inboundSchema,
160
161
  { hdrs: true, key: "Result" },
161
162
  ),
162
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
163
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
164
+ hdrs: true,
165
+ }),
163
166
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
164
167
  M.fail([429, 503]),
165
168
  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";
@@ -72,14 +73,14 @@ export async function subscribersNotificationsUnseenCount(
72
73
  "seen": payload.seen,
73
74
  });
74
75
 
75
- const headers = new Headers({
76
+ const headers = new Headers(compactMap({
76
77
  Accept: "application/json",
77
78
  "Idempotency-Key": encodeSimple(
78
79
  "Idempotency-Key",
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 };
@@ -125,7 +126,7 @@ export async function subscribersNotificationsUnseenCount(
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 subscribersNotificationsUnseenCount(
155
156
  operations.SubscribersControllerGetUnseenCountResponse$inboundSchema,
156
157
  { hdrs: true, key: "Result" },
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";
@@ -81,14 +82,14 @@ export async function subscribersPreferencesList(
81
82
  "includeInactiveChannels": payload.includeInactiveChannels,
82
83
  });
83
84
 
84
- const headers = new Headers({
85
+ const headers = new Headers(compactMap({
85
86
  Accept: "application/json",
86
87
  "Idempotency-Key": encodeSimple(
87
88
  "Idempotency-Key",
88
89
  payload["Idempotency-Key"],
89
90
  { explode: false, charEncoding: "none" },
90
91
  ),
91
- });
92
+ }));
92
93
 
93
94
  const secConfig = await extractSecurity(client._options.apiKey);
94
95
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -134,7 +135,7 @@ export async function subscribersPreferencesList(
134
135
 
135
136
  const doResult = await client._do(req, {
136
137
  context,
137
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
138
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
138
139
  retryConfig: context.retryConfig,
139
140
  retryCodes: context.retryCodes,
140
141
  });
@@ -165,7 +166,9 @@ export async function subscribersPreferencesList(
165
166
  .SubscribersControllerListSubscriberPreferencesResponse$inboundSchema,
166
167
  { hdrs: true, key: "Result" },
167
168
  ),
168
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
169
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
170
+ hdrs: true,
171
+ }),
169
172
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
170
173
  M.fail([429, 503]),
171
174
  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";
@@ -77,14 +78,14 @@ export async function subscribersPreferencesRetrieveByLevel(
77
78
  "includeInactiveChannels": payload.includeInactiveChannels,
78
79
  });
79
80
 
80
- const headers = new Headers({
81
+ const headers = new Headers(compactMap({
81
82
  Accept: "application/json",
82
83
  "Idempotency-Key": encodeSimple(
83
84
  "Idempotency-Key",
84
85
  payload["Idempotency-Key"],
85
86
  { explode: false, charEncoding: "none" },
86
87
  ),
87
- });
88
+ }));
88
89
 
89
90
  const secConfig = await extractSecurity(client._options.apiKey);
90
91
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -130,7 +131,7 @@ export async function subscribersPreferencesRetrieveByLevel(
130
131
 
131
132
  const doResult = await client._do(req, {
132
133
  context,
133
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
134
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
134
135
  retryConfig: context.retryConfig,
135
136
  retryCodes: context.retryCodes,
136
137
  });
@@ -161,7 +162,9 @@ export async function subscribersPreferencesRetrieveByLevel(
161
162
  .SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema,
162
163
  { hdrs: true, key: "Result" },
163
164
  ),
164
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
165
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
166
+ hdrs: true,
167
+ }),
165
168
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
166
169
  M.fail([429, 503]),
167
170
  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";
@@ -76,7 +77,7 @@ export async function subscribersPreferencesUpdate(
76
77
  "/v1/subscribers/{subscriberId}/preferences/{parameter}",
77
78
  )(pathParams);
78
79
 
79
- const headers = new Headers({
80
+ const headers = new Headers(compactMap({
80
81
  "Content-Type": "application/json",
81
82
  Accept: "application/json",
82
83
  "Idempotency-Key": encodeSimple(
@@ -84,7 +85,7 @@ export async function subscribersPreferencesUpdate(
84
85
  payload["Idempotency-Key"],
85
86
  { explode: false, charEncoding: "none" },
86
87
  ),
87
- });
88
+ }));
88
89
 
89
90
  const secConfig = await extractSecurity(client._options.apiKey);
90
91
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -129,7 +130,7 @@ export async function subscribersPreferencesUpdate(
129
130
 
130
131
  const doResult = await client._do(req, {
131
132
  context,
132
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
133
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
133
134
  retryConfig: context.retryConfig,
134
135
  retryCodes: context.retryCodes,
135
136
  });
@@ -160,7 +161,9 @@ export async function subscribersPreferencesUpdate(
160
161
  .SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema,
161
162
  { hdrs: true, 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";
@@ -84,7 +85,7 @@ export async function subscribersPreferencesUpdateGlobal(
84
85
  pathParams,
85
86
  );
86
87
 
87
- const headers = new Headers({
88
+ const headers = new Headers(compactMap({
88
89
  "Content-Type": "application/json",
89
90
  Accept: "application/json",
90
91
  "Idempotency-Key": encodeSimple(
@@ -92,7 +93,7 @@ export async function subscribersPreferencesUpdateGlobal(
92
93
  payload["Idempotency-Key"],
93
94
  { explode: false, charEncoding: "none" },
94
95
  ),
95
- });
96
+ }));
96
97
 
97
98
  const secConfig = await extractSecurity(client._options.apiKey);
98
99
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -137,7 +138,7 @@ export async function subscribersPreferencesUpdateGlobal(
137
138
 
138
139
  const doResult = await client._do(req, {
139
140
  context,
140
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
141
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
141
142
  retryConfig: context.retryConfig,
142
143
  retryCodes: context.retryCodes,
143
144
  });
@@ -168,7 +169,9 @@ export async function subscribersPreferencesUpdateGlobal(
168
169
  .SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema,
169
170
  { hdrs: true, key: "Result" },
170
171
  ),
171
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
172
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
173
+ hdrs: true,
174
+ }),
172
175
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
173
176
  M.fail([429, 503]),
174
177
  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";
@@ -87,7 +88,7 @@ export async function subscribersPropertiesUpdateOnlineFlag(
87
88
  pathParams,
88
89
  );
89
90
 
90
- const headers = new Headers({
91
+ const headers = new Headers(compactMap({
91
92
  "Content-Type": "application/json",
92
93
  Accept: "application/json",
93
94
  "Idempotency-Key": encodeSimple(
@@ -95,7 +96,7 @@ export async function subscribersPropertiesUpdateOnlineFlag(
95
96
  payload["Idempotency-Key"],
96
97
  { explode: false, charEncoding: "none" },
97
98
  ),
98
- });
99
+ }));
99
100
 
100
101
  const secConfig = await extractSecurity(client._options.apiKey);
101
102
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -140,7 +141,7 @@ export async function subscribersPropertiesUpdateOnlineFlag(
140
141
 
141
142
  const doResult = await client._do(req, {
142
143
  context,
143
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
144
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
144
145
  retryConfig: context.retryConfig,
145
146
  retryCodes: context.retryCodes,
146
147
  });
@@ -171,7 +172,9 @@ export async function subscribersPropertiesUpdateOnlineFlag(
171
172
  .SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema,
172
173
  { hdrs: true, key: "Result" },
173
174
  ),
174
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
175
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
176
+ hdrs: true,
177
+ }),
175
178
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
176
179
  M.fail([429, 503]),
177
180
  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";
@@ -81,14 +82,14 @@ export async function subscribersRetrieve(
81
82
  "includeTopics": payload.includeTopics,
82
83
  });
83
84
 
84
- const headers = new Headers({
85
+ const headers = new Headers(compactMap({
85
86
  Accept: "application/json",
86
87
  "Idempotency-Key": encodeSimple(
87
88
  "Idempotency-Key",
88
89
  payload["Idempotency-Key"],
89
90
  { explode: false, charEncoding: "none" },
90
91
  ),
91
- });
92
+ }));
92
93
 
93
94
  const secConfig = await extractSecurity(client._options.apiKey);
94
95
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -134,7 +135,7 @@ export async function subscribersRetrieve(
134
135
 
135
136
  const doResult = await client._do(req, {
136
137
  context,
137
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
138
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
138
139
  retryConfig: context.retryConfig,
139
140
  retryCodes: context.retryCodes,
140
141
  });
@@ -164,7 +165,9 @@ export async function subscribersRetrieve(
164
165
  operations.SubscribersControllerGetSubscriberResponse$inboundSchema,
165
166
  { hdrs: true, key: "Result" },
166
167
  ),
167
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
168
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
169
+ hdrs: true,
170
+ }),
168
171
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
169
172
  M.fail([429, 503]),
170
173
  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";
@@ -79,7 +80,7 @@ export async function subscribersUpdate(
79
80
 
80
81
  const path = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams);
81
82
 
82
- const headers = new Headers({
83
+ const headers = new Headers(compactMap({
83
84
  "Content-Type": "application/json",
84
85
  Accept: "application/json",
85
86
  "Idempotency-Key": encodeSimple(
@@ -87,7 +88,7 @@ export async function subscribersUpdate(
87
88
  payload["Idempotency-Key"],
88
89
  { explode: false, charEncoding: "none" },
89
90
  ),
90
- });
91
+ }));
91
92
 
92
93
  const secConfig = await extractSecurity(client._options.apiKey);
93
94
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -132,7 +133,7 @@ export async function subscribersUpdate(
132
133
 
133
134
  const doResult = await client._do(req, {
134
135
  context,
135
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
136
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
136
137
  retryConfig: context.retryConfig,
137
138
  retryCodes: context.retryCodes,
138
139
  });
@@ -162,7 +163,9 @@ export async function subscribersUpdate(
162
163
  operations.SubscribersControllerUpdateSubscriberResponse$inboundSchema,
163
164
  { hdrs: true, key: "Result" },
164
165
  ),
165
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
166
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
167
+ hdrs: true,
168
+ }),
166
169
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
167
170
  M.fail([429, 503]),
168
171
  M.fail(["4XX", "5XX"]),
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { NovuCore } from "../core.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { RequestOptions } from "../lib/sdks.js";
9
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
11
  import { pathToFunc } from "../lib/url.js";
@@ -38,9 +39,9 @@ export async function testApiRateLimitBulkControllerGlobalCategoryNoCostOverride
38
39
  "/v1/rate-limiting-trigger-bulk/global-category-no-cost-override",
39
40
  )();
40
41
 
41
- const headers = new Headers({
42
+ const headers = new Headers(compactMap({
42
43
  Accept: "application/json",
43
- });
44
+ }));
44
45
 
45
46
  const secConfig = await extractSecurity(client._options.apiKey);
46
47
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { NovuCore } from "../core.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { RequestOptions } from "../lib/sdks.js";
9
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
11
  import { pathToFunc } from "../lib/url.js";
@@ -38,9 +39,9 @@ export async function testApiRateLimitBulkControllerNoCategoryNoCostOverride(
38
39
  "/v1/rate-limiting-trigger-bulk/no-category-no-cost-override",
39
40
  )();
40
41
 
41
- const headers = new Headers({
42
+ const headers = new Headers(compactMap({
42
43
  Accept: "application/json",
43
- });
44
+ }));
44
45
 
45
46
  const secConfig = await extractSecurity(client._options.apiKey);
46
47
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { NovuCore } from "../core.js";
7
7
  import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
8
9
  import { RequestOptions } from "../lib/sdks.js";
9
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
11
  import { pathToFunc } from "../lib/url.js";
@@ -38,9 +39,9 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride
38
39
  "/v1/rate-limiting-trigger-bulk/no-category-single-cost-override",
39
40
  )();
40
41
 
41
- const headers = new Headers({
42
+ const headers = new Headers(compactMap({
42
43
  Accept: "application/json",
43
- });
44
+ }));
44
45
 
45
46
  const secConfig = await extractSecurity(client._options.apiKey);
46
47
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -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";
@@ -69,7 +70,7 @@ export async function topicsCreate(
69
70
 
70
71
  const path = pathToFunc("/v1/topics")();
71
72
 
72
- const headers = new Headers({
73
+ const headers = new Headers(compactMap({
73
74
  "Content-Type": "application/json",
74
75
  Accept: "application/json",
75
76
  "Idempotency-Key": encodeSimple(
@@ -77,7 +78,7 @@ export async function topicsCreate(
77
78
  payload["Idempotency-Key"],
78
79
  { explode: false, charEncoding: "none" },
79
80
  ),
80
- });
81
+ }));
81
82
 
82
83
  const secConfig = await extractSecurity(client._options.apiKey);
83
84
  const securityInput = secConfig == null ? {} : { apiKey: secConfig };
@@ -122,7 +123,7 @@ export async function topicsCreate(
122
123
 
123
124
  const doResult = await client._do(req, {
124
125
  context,
125
- errorCodes: ["400", "404", "409", "422", "429", "4XX", "503", "5XX"],
126
+ errorCodes: ["400", "404", "409", "422", "429", "4XX", "500", "503", "5XX"],
126
127
  retryConfig: context.retryConfig,
127
128
  retryCodes: context.retryCodes,
128
129
  });
@@ -151,7 +152,9 @@ export async function topicsCreate(
151
152
  hdrs: true,
152
153
  key: "Result",
153
154
  }),
154
- M.jsonErr([400, 404, 409], errors.ErrorDto$inboundSchema, { hdrs: true }),
155
+ M.jsonErr([400, 404, 409, 500], errors.ErrorDto$inboundSchema, {
156
+ hdrs: true,
157
+ }),
155
158
  M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
156
159
  M.fail([429, 503]),
157
160
  M.fail(["4XX", "5XX"]),