@novu/api 3.14.3 → 3.15.0

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 (163) hide show
  1. package/README.md +30 -30
  2. package/funcs/activityTrack.d.ts +1 -1
  3. package/funcs/activityTrack.js +1 -1
  4. package/funcs/environmentVariablesCreate.d.ts +1 -1
  5. package/funcs/environmentVariablesCreate.js +1 -1
  6. package/funcs/environmentVariablesDelete.d.ts +2 -2
  7. package/funcs/environmentVariablesDelete.d.ts.map +1 -1
  8. package/funcs/environmentVariablesDelete.js +7 -7
  9. package/funcs/environmentVariablesDelete.js.map +1 -1
  10. package/funcs/environmentVariablesList.d.ts +1 -1
  11. package/funcs/environmentVariablesList.js +1 -1
  12. package/funcs/environmentVariablesRetrieve.d.ts +2 -2
  13. package/funcs/environmentVariablesRetrieve.d.ts.map +1 -1
  14. package/funcs/environmentVariablesRetrieve.js +7 -7
  15. package/funcs/environmentVariablesRetrieve.js.map +1 -1
  16. package/funcs/environmentVariablesUpdate.d.ts +2 -2
  17. package/funcs/environmentVariablesUpdate.d.ts.map +1 -1
  18. package/funcs/environmentVariablesUpdate.js +7 -7
  19. package/funcs/environmentVariablesUpdate.js.map +1 -1
  20. package/funcs/environmentVariablesUsage.d.ts +3 -3
  21. package/funcs/environmentVariablesUsage.d.ts.map +1 -1
  22. package/funcs/environmentVariablesUsage.js +8 -8
  23. package/funcs/environmentVariablesUsage.js.map +1 -1
  24. package/funcs/subscribersNotificationsArchive.d.ts +2 -2
  25. package/funcs/subscribersNotificationsArchive.js +2 -2
  26. package/funcs/subscribersNotificationsArchiveAll.d.ts +1 -1
  27. package/funcs/subscribersNotificationsArchiveAll.js +1 -1
  28. package/funcs/subscribersNotificationsArchiveAllRead.d.ts +1 -1
  29. package/funcs/subscribersNotificationsArchiveAllRead.js +1 -1
  30. package/funcs/subscribersNotificationsCompleteAction.d.ts +2 -2
  31. package/funcs/subscribersNotificationsCompleteAction.js +2 -2
  32. package/funcs/subscribersNotificationsCount.d.ts +2 -2
  33. package/funcs/subscribersNotificationsCount.js +2 -2
  34. package/funcs/subscribersNotificationsDelete.d.ts +2 -2
  35. package/funcs/subscribersNotificationsDelete.js +2 -2
  36. package/funcs/subscribersNotificationsDeleteAll.d.ts +1 -1
  37. package/funcs/subscribersNotificationsDeleteAll.js +1 -1
  38. package/funcs/subscribersNotificationsList.d.ts +1 -1
  39. package/funcs/subscribersNotificationsList.js +1 -2
  40. package/funcs/subscribersNotificationsList.js.map +1 -1
  41. package/funcs/subscribersNotificationsMarkAllAsRead.d.ts +1 -1
  42. package/funcs/subscribersNotificationsMarkAllAsRead.js +1 -1
  43. package/funcs/subscribersNotificationsMarkAsRead.d.ts +2 -2
  44. package/funcs/subscribersNotificationsMarkAsRead.js +2 -2
  45. package/funcs/subscribersNotificationsMarkAsSeen.d.ts +1 -1
  46. package/funcs/subscribersNotificationsMarkAsSeen.js +1 -1
  47. package/funcs/subscribersNotificationsMarkAsUnread.d.ts +2 -2
  48. package/funcs/subscribersNotificationsMarkAsUnread.js +2 -2
  49. package/funcs/subscribersNotificationsRevertAction.d.ts +2 -2
  50. package/funcs/subscribersNotificationsRevertAction.js +2 -2
  51. package/funcs/subscribersNotificationsSnooze.d.ts +2 -2
  52. package/funcs/subscribersNotificationsSnooze.js +2 -2
  53. package/funcs/subscribersNotificationsUnarchive.d.ts +2 -2
  54. package/funcs/subscribersNotificationsUnarchive.js +2 -2
  55. package/funcs/subscribersNotificationsUnsnooze.d.ts +2 -2
  56. package/funcs/subscribersNotificationsUnsnooze.js +2 -2
  57. package/funcs/translationsMasterUpload.js +3 -2
  58. package/funcs/translationsMasterUpload.js.map +1 -1
  59. package/funcs/translationsUpload.js +3 -2
  60. package/funcs/translationsUpload.js.map +1 -1
  61. package/funcs/workflowsStepsGeneratePreview.d.ts +1 -1
  62. package/funcs/workflowsStepsGeneratePreview.js +1 -1
  63. package/jsr.json +1 -1
  64. package/lib/config.d.ts +4 -4
  65. package/lib/config.js +4 -4
  66. package/lib/config.js.map +1 -1
  67. package/lib/encodings.d.ts +1 -0
  68. package/lib/encodings.d.ts.map +1 -1
  69. package/lib/encodings.js +7 -0
  70. package/lib/encodings.js.map +1 -1
  71. package/models/components/getchannelconnectionresponsedto.d.ts +1 -0
  72. package/models/components/getchannelconnectionresponsedto.d.ts.map +1 -1
  73. package/models/components/getchannelconnectionresponsedto.js +1 -0
  74. package/models/components/getchannelconnectionresponsedto.js.map +1 -1
  75. package/models/components/getchannelendpointresponsedto.d.ts +1 -0
  76. package/models/components/getchannelendpointresponsedto.d.ts.map +1 -1
  77. package/models/components/getchannelendpointresponsedto.js +1 -0
  78. package/models/components/getchannelendpointresponsedto.js.map +1 -1
  79. package/models/components/marksubscribernotificationsasseendto.d.ts +12 -3
  80. package/models/components/marksubscribernotificationsasseendto.d.ts.map +1 -1
  81. package/models/components/marksubscribernotificationsasseendto.js +9 -2
  82. package/models/components/marksubscribernotificationsasseendto.js.map +1 -1
  83. package/models/components/providersidenum.d.ts +1 -0
  84. package/models/components/providersidenum.d.ts.map +1 -1
  85. package/models/components/providersidenum.js +1 -0
  86. package/models/components/providersidenum.js.map +1 -1
  87. package/models/components/updateallsubscribernotificationsdto.d.ts +12 -3
  88. package/models/components/updateallsubscribernotificationsdto.d.ts.map +1 -1
  89. package/models/components/updateallsubscribernotificationsdto.js +8 -2
  90. package/models/components/updateallsubscribernotificationsdto.js.map +1 -1
  91. package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.d.ts +5 -2
  92. package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.d.ts.map +1 -1
  93. package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.js +1 -1
  94. package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.js.map +1 -1
  95. package/models/operations/environmentvariablescontrollergetenvironmentvariable.d.ts +5 -2
  96. package/models/operations/environmentvariablescontrollergetenvironmentvariable.d.ts.map +1 -1
  97. package/models/operations/environmentvariablescontrollergetenvironmentvariable.js +1 -1
  98. package/models/operations/environmentvariablescontrollergetenvironmentvariable.js.map +1 -1
  99. package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.d.ts +5 -2
  100. package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.d.ts.map +1 -1
  101. package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.js +1 -1
  102. package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.js.map +1 -1
  103. package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.d.ts +5 -2
  104. package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.d.ts.map +1 -1
  105. package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.js +1 -1
  106. package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.js.map +1 -1
  107. package/models/operations/subscriberscontrollergetsubscribernotifications.d.ts +0 -5
  108. package/models/operations/subscriberscontrollergetsubscribernotifications.d.ts.map +1 -1
  109. package/models/operations/subscriberscontrollergetsubscribernotifications.js +0 -1
  110. package/models/operations/subscriberscontrollergetsubscribernotifications.js.map +1 -1
  111. package/package.json +1 -1
  112. package/sdk/activity.d.ts +1 -1
  113. package/sdk/activity.js +1 -1
  114. package/sdk/environmentvariables.d.ts +11 -11
  115. package/sdk/environmentvariables.d.ts.map +1 -1
  116. package/sdk/environmentvariables.js +15 -15
  117. package/sdk/environmentvariables.js.map +1 -1
  118. package/sdk/novunotifications.d.ts +26 -26
  119. package/sdk/novunotifications.js +26 -26
  120. package/sdk/steps.d.ts +1 -1
  121. package/sdk/steps.js +1 -1
  122. package/src/funcs/activityTrack.ts +1 -1
  123. package/src/funcs/environmentVariablesCreate.ts +1 -1
  124. package/src/funcs/environmentVariablesDelete.ts +9 -7
  125. package/src/funcs/environmentVariablesList.ts +1 -1
  126. package/src/funcs/environmentVariablesRetrieve.ts +9 -7
  127. package/src/funcs/environmentVariablesUpdate.ts +9 -7
  128. package/src/funcs/environmentVariablesUsage.ts +8 -8
  129. package/src/funcs/subscribersNotificationsArchive.ts +2 -2
  130. package/src/funcs/subscribersNotificationsArchiveAll.ts +1 -1
  131. package/src/funcs/subscribersNotificationsArchiveAllRead.ts +1 -1
  132. package/src/funcs/subscribersNotificationsCompleteAction.ts +2 -2
  133. package/src/funcs/subscribersNotificationsCount.ts +2 -2
  134. package/src/funcs/subscribersNotificationsDelete.ts +2 -2
  135. package/src/funcs/subscribersNotificationsDeleteAll.ts +1 -1
  136. package/src/funcs/subscribersNotificationsList.ts +1 -2
  137. package/src/funcs/subscribersNotificationsMarkAllAsRead.ts +1 -1
  138. package/src/funcs/subscribersNotificationsMarkAsRead.ts +2 -2
  139. package/src/funcs/subscribersNotificationsMarkAsSeen.ts +1 -1
  140. package/src/funcs/subscribersNotificationsMarkAsUnread.ts +2 -2
  141. package/src/funcs/subscribersNotificationsRevertAction.ts +2 -2
  142. package/src/funcs/subscribersNotificationsSnooze.ts +2 -2
  143. package/src/funcs/subscribersNotificationsUnarchive.ts +2 -2
  144. package/src/funcs/subscribersNotificationsUnsnooze.ts +2 -2
  145. package/src/funcs/translationsMasterUpload.ts +4 -3
  146. package/src/funcs/translationsUpload.ts +4 -3
  147. package/src/funcs/workflowsStepsGeneratePreview.ts +1 -1
  148. package/src/lib/config.ts +4 -4
  149. package/src/lib/encodings.ts +9 -0
  150. package/src/models/components/getchannelconnectionresponsedto.ts +1 -0
  151. package/src/models/components/getchannelendpointresponsedto.ts +1 -0
  152. package/src/models/components/marksubscribernotificationsasseendto.ts +31 -4
  153. package/src/models/components/providersidenum.ts +1 -0
  154. package/src/models/components/updateallsubscribernotificationsdto.ts +20 -4
  155. package/src/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.ts +6 -3
  156. package/src/models/operations/environmentvariablescontrollergetenvironmentvariable.ts +6 -3
  157. package/src/models/operations/environmentvariablescontrollergetenvironmentvariableusage.ts +6 -3
  158. package/src/models/operations/environmentvariablescontrollerupdateenvironmentvariable.ts +6 -3
  159. package/src/models/operations/subscriberscontrollergetsubscribernotifications.ts +0 -6
  160. package/src/sdk/activity.ts +1 -1
  161. package/src/sdk/environmentvariables.ts +15 -15
  162. package/src/sdk/novunotifications.ts +26 -26
  163. package/src/sdk/steps.ts +1 -1
@@ -29,11 +29,11 @@ import { Result } from "../types/fp.js";
29
29
  * Get environment variable
30
30
  *
31
31
  * @remarks
32
- * Returns a single environment variable by id. Secret values are masked.
32
+ * Returns a single environment variable by key. Secret values are masked.
33
33
  */
34
34
  export function environmentVariablesRetrieve(
35
35
  client: NovuCore,
36
- variableId: string,
36
+ variableKey: string,
37
37
  idempotencyKey?: string | undefined,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -53,7 +53,7 @@ export function environmentVariablesRetrieve(
53
53
  > {
54
54
  return new APIPromise($do(
55
55
  client,
56
- variableId,
56
+ variableKey,
57
57
  idempotencyKey,
58
58
  options,
59
59
  ));
@@ -61,7 +61,7 @@ export function environmentVariablesRetrieve(
61
61
 
62
62
  async function $do(
63
63
  client: NovuCore,
64
- variableId: string,
64
+ variableKey: string,
65
65
  idempotencyKey?: string | undefined,
66
66
  options?: RequestOptions,
67
67
  ): Promise<
@@ -84,7 +84,7 @@ async function $do(
84
84
  > {
85
85
  const input:
86
86
  operations.EnvironmentVariablesControllerGetEnvironmentVariableRequest = {
87
- variableId: variableId,
87
+ variableKey: variableKey,
88
88
  idempotencyKey: idempotencyKey,
89
89
  };
90
90
 
@@ -103,12 +103,14 @@ async function $do(
103
103
  const body = null;
104
104
 
105
105
  const pathParams = {
106
- variableId: encodeSimple("variableId", payload.variableId, {
106
+ variableKey: encodeSimple("variableKey", payload.variableKey, {
107
107
  explode: false,
108
108
  charEncoding: "percent",
109
109
  }),
110
110
  };
111
- const path = pathToFunc("/v1/environment-variables/{variableId}")(pathParams);
111
+ const path = pathToFunc("/v1/environment-variables/{variableKey}")(
112
+ pathParams,
113
+ );
112
114
 
113
115
  const headers = new Headers(compactMap({
114
116
  Accept: "application/json",
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Update environment variable
30
+ * Update a variable
31
31
  *
32
32
  * @remarks
33
33
  * Updates an existing environment variable. Providing values replaces all existing per-environment values.
@@ -36,7 +36,7 @@ export function environmentVariablesUpdate(
36
36
  client: NovuCore,
37
37
  updateEnvironmentVariableRequestDto:
38
38
  components.UpdateEnvironmentVariableRequestDto,
39
- variableId: string,
39
+ variableKey: string,
40
40
  idempotencyKey?: string | undefined,
41
41
  options?: RequestOptions,
42
42
  ): APIPromise<
@@ -57,7 +57,7 @@ export function environmentVariablesUpdate(
57
57
  return new APIPromise($do(
58
58
  client,
59
59
  updateEnvironmentVariableRequestDto,
60
- variableId,
60
+ variableKey,
61
61
  idempotencyKey,
62
62
  options,
63
63
  ));
@@ -67,7 +67,7 @@ async function $do(
67
67
  client: NovuCore,
68
68
  updateEnvironmentVariableRequestDto:
69
69
  components.UpdateEnvironmentVariableRequestDto,
70
- variableId: string,
70
+ variableKey: string,
71
71
  idempotencyKey?: string | undefined,
72
72
  options?: RequestOptions,
73
73
  ): Promise<
@@ -93,7 +93,7 @@ async function $do(
93
93
  {
94
94
  updateEnvironmentVariableRequestDto:
95
95
  updateEnvironmentVariableRequestDto,
96
- variableId: variableId,
96
+ variableKey: variableKey,
97
97
  idempotencyKey: idempotencyKey,
98
98
  };
99
99
 
@@ -114,12 +114,14 @@ async function $do(
114
114
  });
115
115
 
116
116
  const pathParams = {
117
- variableId: encodeSimple("variableId", payload.variableId, {
117
+ variableKey: encodeSimple("variableKey", payload.variableKey, {
118
118
  explode: false,
119
119
  charEncoding: "percent",
120
120
  }),
121
121
  };
122
- const path = pathToFunc("/v1/environment-variables/{variableId}")(pathParams);
122
+ const path = pathToFunc("/v1/environment-variables/{variableKey}")(
123
+ pathParams,
124
+ );
123
125
 
124
126
  const headers = new Headers(compactMap({
125
127
  "Content-Type": "application/json",
@@ -26,14 +26,14 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Get environment variable usage
29
+ * Retrieve a variable usage
30
30
  *
31
31
  * @remarks
32
- * Returns the workflows that reference this environment variable via {{env.KEY}} in their step controls.
32
+ * Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step controls. **variableId** is required.
33
33
  */
34
34
  export function environmentVariablesUsage(
35
35
  client: NovuCore,
36
- variableId: string,
36
+ variableKey: string,
37
37
  idempotencyKey?: string | undefined,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -53,7 +53,7 @@ export function environmentVariablesUsage(
53
53
  > {
54
54
  return new APIPromise($do(
55
55
  client,
56
- variableId,
56
+ variableKey,
57
57
  idempotencyKey,
58
58
  options,
59
59
  ));
@@ -61,7 +61,7 @@ export function environmentVariablesUsage(
61
61
 
62
62
  async function $do(
63
63
  client: NovuCore,
64
- variableId: string,
64
+ variableKey: string,
65
65
  idempotencyKey?: string | undefined,
66
66
  options?: RequestOptions,
67
67
  ): Promise<
@@ -85,7 +85,7 @@ async function $do(
85
85
  const input:
86
86
  operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest =
87
87
  {
88
- variableId: variableId,
88
+ variableKey: variableKey,
89
89
  idempotencyKey: idempotencyKey,
90
90
  };
91
91
 
@@ -104,12 +104,12 @@ async function $do(
104
104
  const body = null;
105
105
 
106
106
  const pathParams = {
107
- variableId: encodeSimple("variableId", payload.variableId, {
107
+ variableKey: encodeSimple("variableKey", payload.variableKey, {
108
108
  explode: false,
109
109
  charEncoding: "percent",
110
110
  }),
111
111
  };
112
- const path = pathToFunc("/v1/environment-variables/{variableId}/usage")(
112
+ const path = pathToFunc("/v1/environment-variables/{variableKey}/usage")(
113
113
  pathParams,
114
114
  );
115
115
 
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Archive notification
29
+ * Archive a notification
30
30
  *
31
31
  * @remarks
32
- * Archive a specific notification by its unique identifier **notificationId**.
32
+ * Archive a specific in-app (inbox) notification by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsArchive(
35
35
  client: NovuCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Archive all notifications
31
31
  *
32
32
  * @remarks
33
- * Archive all notifications matching the specified filters. Supports context-based filtering.
33
+ * Archive all in-app (inbox) notifications matching the specified filters. Supports context-based filtering.
34
34
  */
35
35
  export function subscribersNotificationsArchiveAll(
36
36
  client: NovuCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Archive all read notifications
31
31
  *
32
32
  * @remarks
33
- * Archive all read notifications matching the specified filters. Supports context-based filtering.
33
+ * Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based filtering.
34
34
  */
35
35
  export function subscribersNotificationsArchiveAllRead(
36
36
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Complete notification action
29
+ * Complete a notification action
30
30
  *
31
31
  * @remarks
32
- * Mark a notification action (primary or secondary) as completed by its unique identifier **notificationId** and action type.
32
+ * Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique identifier **notificationId** and action type **actionType**.
33
33
  */
34
34
  export function subscribersNotificationsCompleteAction(
35
35
  client: NovuCore,
@@ -29,8 +29,8 @@ import { Result } from "../types/fp.js";
29
29
  * Retrieve subscriber notifications count
30
30
  *
31
31
  * @remarks
32
- * Retrieve count of notifications for a subscriber by its unique key identifier **subscriberId**.
33
- * Supports multiple filters to count notifications by different criteria, including context keys.
32
+ * Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier **subscriberId**.
33
+ * Supports multiple filters to count in-app (inbox) notifications by different criteria, including context keys.
34
34
  */
35
35
  export function subscribersNotificationsCount(
36
36
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Delete notification
29
+ * Delete a notification
30
30
  *
31
31
  * @remarks
32
- * Delete a specific notification by its unique identifier **notificationId**.
32
+ * Delete a specific in-app (inbox) notification permanently by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsDelete(
35
35
  client: NovuCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Delete all notifications
31
31
  *
32
32
  * @remarks
33
- * Delete all notifications matching the specified filters. Supports context-based filtering.
33
+ * Permanently delete all in-app (inbox) notifications matching the specified filters. Supports context-based filtering.
34
34
  */
35
35
  export function subscribersNotificationsDeleteAll(
36
36
  client: NovuCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Retrieve subscriber notifications
30
30
  *
31
31
  * @remarks
32
- * Retrieve in-app notifications for a subscriber by its unique key identifier **subscriberId**.
32
+ * Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier **subscriberId**.
33
33
  * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, and context keys.
34
34
  */
35
35
  export function subscribersNotificationsList(
@@ -117,7 +117,6 @@ async function $do(
117
117
  "seen": payload.seen,
118
118
  "severity": payload.severity,
119
119
  "snoozed": payload.snoozed,
120
- "tags": payload.tags,
121
120
  });
122
121
 
123
122
  const headers = new Headers(compactMap({
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Mark all notifications as read
31
31
  *
32
32
  * @remarks
33
- * Mark all notifications matching the specified filters as read. Supports context-based filtering.
33
+ * Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based filtering.
34
34
  */
35
35
  export function subscribersNotificationsMarkAllAsRead(
36
36
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Mark notification as read
29
+ * Mark a notification as read
30
30
  *
31
31
  * @remarks
32
- * Mark a specific notification as read by its unique identifier **notificationId**.
32
+ * Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsMarkAsRead(
35
35
  client: NovuCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Mark notifications as seen
31
31
  *
32
32
  * @remarks
33
- * Mark specific notifications or notifications matching filters as seen. Supports context-based filtering.
33
+ * Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering.
34
34
  */
35
35
  export function subscribersNotificationsMarkAsSeen(
36
36
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Mark notification as unread
29
+ * Mark a notification as unread
30
30
  *
31
31
  * @remarks
32
- * Mark a specific notification as unread by its unique identifier **notificationId**.
32
+ * Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsMarkAsUnread(
35
35
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Revert notification action
29
+ * Revert a notification action
30
30
  *
31
31
  * @remarks
32
- * Revert a notification action (primary or secondary) to pending state by its unique identifier **notificationId** and action type.
32
+ * Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its unique identifier **notificationId** and action type **actionType**.
33
33
  */
34
34
  export function subscribersNotificationsRevertAction(
35
35
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Snooze notification
29
+ * Snooze a notification
30
30
  *
31
31
  * @remarks
32
- * Snooze a specific notification by its unique identifier **notificationId** until a specified time.
32
+ * Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a specified time.
33
33
  */
34
34
  export function subscribersNotificationsSnooze(
35
35
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Unarchive notification
29
+ * Unarchive a notification
30
30
  *
31
31
  * @remarks
32
- * Unarchive a specific notification by its unique identifier **notificationId**.
32
+ * Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsUnarchive(
35
35
  client: NovuCore,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Unsnooze notification
29
+ * Unsnooze a notification
30
30
  *
31
31
  * @remarks
32
- * Unsnooze a specific notification by its unique identifier **notificationId**.
32
+ * Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**.
33
33
  */
34
34
  export function subscribersNotificationsUnsnooze(
35
35
  client: NovuCore,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { NovuCore } from "../core.js";
6
- import { appendForm, encodeSimple } from "../lib/encodings.js";
6
+ import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js";
7
7
  import {
8
8
  bytesToBlob,
9
9
  getContentTypeFromFileName,
@@ -110,8 +110,9 @@ async function $do(
110
110
  const body = new FormData();
111
111
 
112
112
  if (isBlobLike(payload.RequestBody.file)) {
113
- const blob = payload.RequestBody.file;
114
- const name = "name" in blob ? (blob.name as string) : undefined;
113
+ const file = payload.RequestBody.file;
114
+ const blob = await normalizeBlob(file);
115
+ const name = "name" in file ? (file.name as string) : undefined;
115
116
  appendForm(body, "file", blob, name);
116
117
  } else if (isReadableStream(payload.RequestBody.file.content)) {
117
118
  const buffer = await readableStreamToArrayBuffer(
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { NovuCore } from "../core.js";
6
- import { appendForm, encodeSimple } from "../lib/encodings.js";
6
+ import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js";
7
7
  import {
8
8
  bytesToBlob,
9
9
  getContentTypeFromFileName,
@@ -110,8 +110,9 @@ async function $do(
110
110
 
111
111
  for (const fileItem of payload.RequestBody.files ?? []) {
112
112
  if (isBlobLike(fileItem)) {
113
- const blob = fileItem;
114
- const name = "name" in blob ? (blob.name as string) : undefined;
113
+ const file = fileItem;
114
+ const blob = await normalizeBlob(file);
115
+ const name = "name" in file ? (file.name as string) : undefined;
115
116
  appendForm(body, "files[]", blob, name);
116
117
  } else if (isReadableStream(fileItem.content)) {
117
118
  const buffer = await readableStreamToArrayBuffer(fileItem.content);
@@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Generate step preview
29
+ * Generate a step preview
30
30
  *
31
31
  * @remarks
32
32
  * Generates a preview for a specific workflow step by its unique identifier **stepId**
package/src/lib/config.ts CHANGED
@@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
 
59
59
  export const SDK_METADATA = {
60
60
  language: "typescript",
61
- openapiDocVersion: "3.14.0",
62
- sdkVersion: "3.14.3",
63
- genVersion: "2.879.1",
64
- userAgent: "speakeasy-sdk/typescript 3.14.3 2.879.1 3.14.0 @novu/api",
61
+ openapiDocVersion: "3.15.0",
62
+ sdkVersion: "3.15.0",
63
+ genVersion: "2.879.11",
64
+ userAgent: "speakeasy-sdk/typescript 3.15.0 2.879.11 3.15.0 @novu/api",
65
65
  } as const;
@@ -514,3 +514,12 @@ export function appendForm(
514
514
  fd.append(key, String(value));
515
515
  }
516
516
  }
517
+
518
+ export async function normalizeBlob(
519
+ value: Pick<Blob, "arrayBuffer" | "type">,
520
+ ): Promise<Blob> {
521
+ if (value instanceof Blob) {
522
+ return value;
523
+ }
524
+ return new Blob([await value.arrayBuffer()], { type: value.type });
525
+ }
@@ -86,6 +86,7 @@ export const ProviderId = {
86
86
  Imedia: "imedia",
87
87
  Sinch: "sinch",
88
88
  IsendproSms: "isendpro-sms",
89
+ CmTelecom: "cm-telecom",
89
90
  Fcm: "fcm",
90
91
  Apns: "apns",
91
92
  Expo: "expo",
@@ -102,6 +102,7 @@ export const GetChannelEndpointResponseDtoProviderId = {
102
102
  Imedia: "imedia",
103
103
  Sinch: "sinch",
104
104
  IsendproSms: "isendpro-sms",
105
+ CmTelecom: "cm-telecom",
105
106
  Fcm: "fcm",
106
107
  Apns: "apns",
107
108
  Expo: "expo",
@@ -4,15 +4,20 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
 
7
+ /**
8
+ * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups).
9
+ */
10
+ export type MarkSubscriberNotificationsAsSeenDtoTags = {};
11
+
7
12
  export type MarkSubscriberNotificationsAsSeenDto = {
8
13
  /**
9
14
  * Specific notification IDs to mark as seen
10
15
  */
11
16
  notificationIds?: Array<string> | undefined;
12
17
  /**
13
- * Filter notifications by workflow tags
18
+ * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups).
14
19
  */
15
- tags?: Array<string> | undefined;
20
+ tags?: MarkSubscriberNotificationsAsSeenDtoTags | undefined;
16
21
  /**
17
22
  * Filter notifications by data attributes (JSON string)
18
23
  */
@@ -23,10 +28,31 @@ export type MarkSubscriberNotificationsAsSeenDto = {
23
28
  contextKeys?: Array<string> | undefined;
24
29
  };
25
30
 
31
+ /** @internal */
32
+ export type MarkSubscriberNotificationsAsSeenDtoTags$Outbound = {};
33
+
34
+ /** @internal */
35
+ export const MarkSubscriberNotificationsAsSeenDtoTags$outboundSchema: z.ZodType<
36
+ MarkSubscriberNotificationsAsSeenDtoTags$Outbound,
37
+ z.ZodTypeDef,
38
+ MarkSubscriberNotificationsAsSeenDtoTags
39
+ > = z.object({});
40
+
41
+ export function markSubscriberNotificationsAsSeenDtoTagsToJSON(
42
+ markSubscriberNotificationsAsSeenDtoTags:
43
+ MarkSubscriberNotificationsAsSeenDtoTags,
44
+ ): string {
45
+ return JSON.stringify(
46
+ MarkSubscriberNotificationsAsSeenDtoTags$outboundSchema.parse(
47
+ markSubscriberNotificationsAsSeenDtoTags,
48
+ ),
49
+ );
50
+ }
51
+
26
52
  /** @internal */
27
53
  export type MarkSubscriberNotificationsAsSeenDto$Outbound = {
28
54
  notificationIds?: Array<string> | undefined;
29
- tags?: Array<string> | undefined;
55
+ tags?: MarkSubscriberNotificationsAsSeenDtoTags$Outbound | undefined;
30
56
  data?: string | undefined;
31
57
  contextKeys?: Array<string> | undefined;
32
58
  };
@@ -38,7 +64,8 @@ export const MarkSubscriberNotificationsAsSeenDto$outboundSchema: z.ZodType<
38
64
  MarkSubscriberNotificationsAsSeenDto
39
65
  > = z.object({
40
66
  notificationIds: z.array(z.string()).optional(),
41
- tags: z.array(z.string()).optional(),
67
+ tags: z.lazy(() => MarkSubscriberNotificationsAsSeenDtoTags$outboundSchema)
68
+ .optional(),
42
69
  data: z.string().optional(),
43
70
  contextKeys: z.array(z.string()).optional(),
44
71
  });
@@ -66,6 +66,7 @@ export const ProvidersIdEnum = {
66
66
  Imedia: "imedia",
67
67
  Sinch: "sinch",
68
68
  IsendproSms: "isendpro-sms",
69
+ CmTelecom: "cm-telecom",
69
70
  Fcm: "fcm",
70
71
  Apns: "apns",
71
72
  Expo: "expo",
@@ -4,11 +4,16 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
 
7
+ /**
8
+ * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups).
9
+ */
10
+ export type Tags = {};
11
+
7
12
  export type UpdateAllSubscriberNotificationsDto = {
8
13
  /**
9
- * Filter notifications by workflow tags
14
+ * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups).
10
15
  */
11
- tags?: Array<string> | undefined;
16
+ tags?: Tags | undefined;
12
17
  /**
13
18
  * Filter notifications by data attributes (JSON string)
14
19
  */
@@ -19,9 +24,20 @@ export type UpdateAllSubscriberNotificationsDto = {
19
24
  contextKeys?: Array<string> | undefined;
20
25
  };
21
26
 
27
+ /** @internal */
28
+ export type Tags$Outbound = {};
29
+
30
+ /** @internal */
31
+ export const Tags$outboundSchema: z.ZodType<Tags$Outbound, z.ZodTypeDef, Tags> =
32
+ z.object({});
33
+
34
+ export function tagsToJSON(tags: Tags): string {
35
+ return JSON.stringify(Tags$outboundSchema.parse(tags));
36
+ }
37
+
22
38
  /** @internal */
23
39
  export type UpdateAllSubscriberNotificationsDto$Outbound = {
24
- tags?: Array<string> | undefined;
40
+ tags?: Tags$Outbound | undefined;
25
41
  data?: string | undefined;
26
42
  contextKeys?: Array<string> | undefined;
27
43
  };
@@ -32,7 +48,7 @@ export const UpdateAllSubscriberNotificationsDto$outboundSchema: z.ZodType<
32
48
  z.ZodTypeDef,
33
49
  UpdateAllSubscriberNotificationsDto
34
50
  > = z.object({
35
- tags: z.array(z.string()).optional(),
51
+ tags: z.lazy(() => Tags$outboundSchema).optional(),
36
52
  data: z.string().optional(),
37
53
  contextKeys: z.array(z.string()).optional(),
38
54
  });
@@ -9,7 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type EnvironmentVariablesControllerDeleteEnvironmentVariableRequest = {
12
- variableId: string;
12
+ /**
13
+ * The unique key of the environment variable (e.g. BASE_URL)
14
+ */
15
+ variableKey: string;
13
16
  /**
14
17
  * A header for idempotency purposes
15
18
  */
@@ -23,7 +26,7 @@ export type EnvironmentVariablesControllerDeleteEnvironmentVariableResponse = {
23
26
  /** @internal */
24
27
  export type EnvironmentVariablesControllerDeleteEnvironmentVariableRequest$Outbound =
25
28
  {
26
- variableId: string;
29
+ variableKey: string;
27
30
  "idempotency-key"?: string | undefined;
28
31
  };
29
32
 
@@ -34,7 +37,7 @@ export const EnvironmentVariablesControllerDeleteEnvironmentVariableRequest$outb
34
37
  z.ZodTypeDef,
35
38
  EnvironmentVariablesControllerDeleteEnvironmentVariableRequest
36
39
  > = z.object({
37
- variableId: z.string(),
40
+ variableKey: z.string(),
38
41
  idempotencyKey: z.string().optional(),
39
42
  }).transform((v) => {
40
43
  return remap$(v, {