@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.
- package/README.md +30 -30
- package/funcs/activityTrack.d.ts +1 -1
- package/funcs/activityTrack.js +1 -1
- package/funcs/environmentVariablesCreate.d.ts +1 -1
- package/funcs/environmentVariablesCreate.js +1 -1
- package/funcs/environmentVariablesDelete.d.ts +2 -2
- package/funcs/environmentVariablesDelete.d.ts.map +1 -1
- package/funcs/environmentVariablesDelete.js +7 -7
- package/funcs/environmentVariablesDelete.js.map +1 -1
- package/funcs/environmentVariablesList.d.ts +1 -1
- package/funcs/environmentVariablesList.js +1 -1
- package/funcs/environmentVariablesRetrieve.d.ts +2 -2
- package/funcs/environmentVariablesRetrieve.d.ts.map +1 -1
- package/funcs/environmentVariablesRetrieve.js +7 -7
- package/funcs/environmentVariablesRetrieve.js.map +1 -1
- package/funcs/environmentVariablesUpdate.d.ts +2 -2
- package/funcs/environmentVariablesUpdate.d.ts.map +1 -1
- package/funcs/environmentVariablesUpdate.js +7 -7
- package/funcs/environmentVariablesUpdate.js.map +1 -1
- package/funcs/environmentVariablesUsage.d.ts +3 -3
- package/funcs/environmentVariablesUsage.d.ts.map +1 -1
- package/funcs/environmentVariablesUsage.js +8 -8
- package/funcs/environmentVariablesUsage.js.map +1 -1
- package/funcs/subscribersNotificationsArchive.d.ts +2 -2
- package/funcs/subscribersNotificationsArchive.js +2 -2
- package/funcs/subscribersNotificationsArchiveAll.d.ts +1 -1
- package/funcs/subscribersNotificationsArchiveAll.js +1 -1
- package/funcs/subscribersNotificationsArchiveAllRead.d.ts +1 -1
- package/funcs/subscribersNotificationsArchiveAllRead.js +1 -1
- package/funcs/subscribersNotificationsCompleteAction.d.ts +2 -2
- package/funcs/subscribersNotificationsCompleteAction.js +2 -2
- package/funcs/subscribersNotificationsCount.d.ts +2 -2
- package/funcs/subscribersNotificationsCount.js +2 -2
- package/funcs/subscribersNotificationsDelete.d.ts +2 -2
- package/funcs/subscribersNotificationsDelete.js +2 -2
- package/funcs/subscribersNotificationsDeleteAll.d.ts +1 -1
- package/funcs/subscribersNotificationsDeleteAll.js +1 -1
- package/funcs/subscribersNotificationsList.d.ts +1 -1
- package/funcs/subscribersNotificationsList.js +1 -2
- package/funcs/subscribersNotificationsList.js.map +1 -1
- package/funcs/subscribersNotificationsMarkAllAsRead.d.ts +1 -1
- package/funcs/subscribersNotificationsMarkAllAsRead.js +1 -1
- package/funcs/subscribersNotificationsMarkAsRead.d.ts +2 -2
- package/funcs/subscribersNotificationsMarkAsRead.js +2 -2
- package/funcs/subscribersNotificationsMarkAsSeen.d.ts +1 -1
- package/funcs/subscribersNotificationsMarkAsSeen.js +1 -1
- package/funcs/subscribersNotificationsMarkAsUnread.d.ts +2 -2
- package/funcs/subscribersNotificationsMarkAsUnread.js +2 -2
- package/funcs/subscribersNotificationsRevertAction.d.ts +2 -2
- package/funcs/subscribersNotificationsRevertAction.js +2 -2
- package/funcs/subscribersNotificationsSnooze.d.ts +2 -2
- package/funcs/subscribersNotificationsSnooze.js +2 -2
- package/funcs/subscribersNotificationsUnarchive.d.ts +2 -2
- package/funcs/subscribersNotificationsUnarchive.js +2 -2
- package/funcs/subscribersNotificationsUnsnooze.d.ts +2 -2
- package/funcs/subscribersNotificationsUnsnooze.js +2 -2
- package/funcs/translationsMasterUpload.js +3 -2
- package/funcs/translationsMasterUpload.js.map +1 -1
- package/funcs/translationsUpload.js +3 -2
- package/funcs/translationsUpload.js.map +1 -1
- package/funcs/workflowsStepsGeneratePreview.d.ts +1 -1
- package/funcs/workflowsStepsGeneratePreview.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +7 -0
- package/lib/encodings.js.map +1 -1
- package/models/components/getchannelconnectionresponsedto.d.ts +1 -0
- package/models/components/getchannelconnectionresponsedto.d.ts.map +1 -1
- package/models/components/getchannelconnectionresponsedto.js +1 -0
- package/models/components/getchannelconnectionresponsedto.js.map +1 -1
- package/models/components/getchannelendpointresponsedto.d.ts +1 -0
- package/models/components/getchannelendpointresponsedto.d.ts.map +1 -1
- package/models/components/getchannelendpointresponsedto.js +1 -0
- package/models/components/getchannelendpointresponsedto.js.map +1 -1
- package/models/components/marksubscribernotificationsasseendto.d.ts +12 -3
- package/models/components/marksubscribernotificationsasseendto.d.ts.map +1 -1
- package/models/components/marksubscribernotificationsasseendto.js +9 -2
- package/models/components/marksubscribernotificationsasseendto.js.map +1 -1
- package/models/components/providersidenum.d.ts +1 -0
- package/models/components/providersidenum.d.ts.map +1 -1
- package/models/components/providersidenum.js +1 -0
- package/models/components/providersidenum.js.map +1 -1
- package/models/components/updateallsubscribernotificationsdto.d.ts +12 -3
- package/models/components/updateallsubscribernotificationsdto.d.ts.map +1 -1
- package/models/components/updateallsubscribernotificationsdto.js +8 -2
- package/models/components/updateallsubscribernotificationsdto.js.map +1 -1
- package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.d.ts +5 -2
- package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.d.ts.map +1 -1
- package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.js +1 -1
- package/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.js.map +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariable.d.ts +5 -2
- package/models/operations/environmentvariablescontrollergetenvironmentvariable.d.ts.map +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariable.js +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariable.js.map +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.d.ts +5 -2
- package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.d.ts.map +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.js +1 -1
- package/models/operations/environmentvariablescontrollergetenvironmentvariableusage.js.map +1 -1
- package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.d.ts +5 -2
- package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.d.ts.map +1 -1
- package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.js +1 -1
- package/models/operations/environmentvariablescontrollerupdateenvironmentvariable.js.map +1 -1
- package/models/operations/subscriberscontrollergetsubscribernotifications.d.ts +0 -5
- package/models/operations/subscriberscontrollergetsubscribernotifications.d.ts.map +1 -1
- package/models/operations/subscriberscontrollergetsubscribernotifications.js +0 -1
- package/models/operations/subscriberscontrollergetsubscribernotifications.js.map +1 -1
- package/package.json +1 -1
- package/sdk/activity.d.ts +1 -1
- package/sdk/activity.js +1 -1
- package/sdk/environmentvariables.d.ts +11 -11
- package/sdk/environmentvariables.d.ts.map +1 -1
- package/sdk/environmentvariables.js +15 -15
- package/sdk/environmentvariables.js.map +1 -1
- package/sdk/novunotifications.d.ts +26 -26
- package/sdk/novunotifications.js +26 -26
- package/sdk/steps.d.ts +1 -1
- package/sdk/steps.js +1 -1
- package/src/funcs/activityTrack.ts +1 -1
- package/src/funcs/environmentVariablesCreate.ts +1 -1
- package/src/funcs/environmentVariablesDelete.ts +9 -7
- package/src/funcs/environmentVariablesList.ts +1 -1
- package/src/funcs/environmentVariablesRetrieve.ts +9 -7
- package/src/funcs/environmentVariablesUpdate.ts +9 -7
- package/src/funcs/environmentVariablesUsage.ts +8 -8
- package/src/funcs/subscribersNotificationsArchive.ts +2 -2
- package/src/funcs/subscribersNotificationsArchiveAll.ts +1 -1
- package/src/funcs/subscribersNotificationsArchiveAllRead.ts +1 -1
- package/src/funcs/subscribersNotificationsCompleteAction.ts +2 -2
- package/src/funcs/subscribersNotificationsCount.ts +2 -2
- package/src/funcs/subscribersNotificationsDelete.ts +2 -2
- package/src/funcs/subscribersNotificationsDeleteAll.ts +1 -1
- package/src/funcs/subscribersNotificationsList.ts +1 -2
- package/src/funcs/subscribersNotificationsMarkAllAsRead.ts +1 -1
- package/src/funcs/subscribersNotificationsMarkAsRead.ts +2 -2
- package/src/funcs/subscribersNotificationsMarkAsSeen.ts +1 -1
- package/src/funcs/subscribersNotificationsMarkAsUnread.ts +2 -2
- package/src/funcs/subscribersNotificationsRevertAction.ts +2 -2
- package/src/funcs/subscribersNotificationsSnooze.ts +2 -2
- package/src/funcs/subscribersNotificationsUnarchive.ts +2 -2
- package/src/funcs/subscribersNotificationsUnsnooze.ts +2 -2
- package/src/funcs/translationsMasterUpload.ts +4 -3
- package/src/funcs/translationsUpload.ts +4 -3
- package/src/funcs/workflowsStepsGeneratePreview.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +9 -0
- package/src/models/components/getchannelconnectionresponsedto.ts +1 -0
- package/src/models/components/getchannelendpointresponsedto.ts +1 -0
- package/src/models/components/marksubscribernotificationsasseendto.ts +31 -4
- package/src/models/components/providersidenum.ts +1 -0
- package/src/models/components/updateallsubscribernotificationsdto.ts +20 -4
- package/src/models/operations/environmentvariablescontrollerdeleteenvironmentvariable.ts +6 -3
- package/src/models/operations/environmentvariablescontrollergetenvironmentvariable.ts +6 -3
- package/src/models/operations/environmentvariablescontrollergetenvironmentvariableusage.ts +6 -3
- package/src/models/operations/environmentvariablescontrollerupdateenvironmentvariable.ts +6 -3
- package/src/models/operations/subscriberscontrollergetsubscribernotifications.ts +0 -6
- package/src/sdk/activity.ts +1 -1
- package/src/sdk/environmentvariables.ts +15 -15
- package/src/sdk/novunotifications.ts +26 -26
- 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
|
|
32
|
+
* Returns a single environment variable by key. Secret values are masked.
|
|
33
33
|
*/
|
|
34
34
|
export function environmentVariablesRetrieve(
|
|
35
35
|
client: NovuCore,
|
|
36
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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/{
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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/{
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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/{
|
|
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
|
-
*
|
|
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
|
|
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
|
|
114
|
-
const
|
|
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
|
|
114
|
-
const
|
|
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.
|
|
62
|
-
sdkVersion: "3.
|
|
63
|
-
genVersion: "2.879.
|
|
64
|
-
userAgent: "speakeasy-sdk/typescript 3.
|
|
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;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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?:
|
|
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?:
|
|
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.
|
|
67
|
+
tags: z.lazy(() => MarkSubscriberNotificationsAsSeenDtoTags$outboundSchema)
|
|
68
|
+
.optional(),
|
|
42
69
|
data: z.string().optional(),
|
|
43
70
|
contextKeys: z.array(z.string()).optional(),
|
|
44
71
|
});
|
|
@@ -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?:
|
|
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?:
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
40
|
+
variableKey: z.string(),
|
|
38
41
|
idempotencyKey: z.string().optional(),
|
|
39
42
|
}).transform((v) => {
|
|
40
43
|
return remap$(v, {
|