@novu/api 3.14.4 → 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 +6 -6
- package/funcs/activityTrack.d.ts +1 -1
- package/funcs/activityTrack.js +1 -1
- package/funcs/environmentVariablesDelete.d.ts +3 -3
- package/funcs/environmentVariablesDelete.d.ts.map +1 -1
- package/funcs/environmentVariablesDelete.js +8 -8
- package/funcs/environmentVariablesDelete.js.map +1 -1
- package/funcs/environmentVariablesRetrieve.d.ts +3 -3
- package/funcs/environmentVariablesRetrieve.d.ts.map +1 -1
- package/funcs/environmentVariablesRetrieve.js +8 -8
- package/funcs/environmentVariablesRetrieve.js.map +1 -1
- package/funcs/environmentVariablesUpdate.d.ts +1 -1
- package/funcs/environmentVariablesUpdate.d.ts.map +1 -1
- package/funcs/environmentVariablesUpdate.js +6 -6
- package/funcs/environmentVariablesUpdate.js.map +1 -1
- package/funcs/environmentVariablesUsage.d.ts +1 -1
- package/funcs/environmentVariablesUsage.d.ts.map +1 -1
- package/funcs/environmentVariablesUsage.js +6 -6
- package/funcs/environmentVariablesUsage.js.map +1 -1
- package/funcs/subscribersNotificationsList.js +0 -1
- package/funcs/subscribersNotificationsList.js.map +1 -1
- 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/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/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/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 +8 -8
- package/sdk/environmentvariables.d.ts.map +1 -1
- package/sdk/environmentvariables.js +12 -12
- package/sdk/environmentvariables.js.map +1 -1
- package/src/funcs/activityTrack.ts +1 -1
- package/src/funcs/environmentVariablesDelete.ts +10 -8
- package/src/funcs/environmentVariablesRetrieve.ts +10 -8
- package/src/funcs/environmentVariablesUpdate.ts +8 -6
- package/src/funcs/environmentVariablesUsage.ts +6 -6
- package/src/funcs/subscribersNotificationsList.ts +0 -1
- package/src/funcs/translationsMasterUpload.ts +4 -3
- package/src/funcs/translationsUpload.ts +4 -3
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +9 -0
- package/src/models/components/marksubscribernotificationsasseendto.ts +31 -4
- 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 +12 -12
|
@@ -32,13 +32,13 @@ class EnvironmentVariables extends sdks_js_1.ClientSDK {
|
|
|
32
32
|
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesCreate_js_1.environmentVariablesCreate)(this, createEnvironmentVariableRequestDto, idempotencyKey, options));
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Get environment variable
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* Returns a single environment variable by
|
|
38
|
+
* Returns a single environment variable by key. Secret values are masked.
|
|
39
39
|
*/
|
|
40
|
-
async retrieve(
|
|
41
|
-
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesRetrieve_js_1.environmentVariablesRetrieve)(this,
|
|
40
|
+
async retrieve(variableKey, idempotencyKey, options) {
|
|
41
|
+
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesRetrieve_js_1.environmentVariablesRetrieve)(this, variableKey, idempotencyKey, options));
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Update a variable
|
|
@@ -46,17 +46,17 @@ class EnvironmentVariables extends sdks_js_1.ClientSDK {
|
|
|
46
46
|
* @remarks
|
|
47
47
|
* Updates an existing environment variable. Providing values replaces all existing per-environment values.
|
|
48
48
|
*/
|
|
49
|
-
async update(updateEnvironmentVariableRequestDto,
|
|
50
|
-
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesUpdate_js_1.environmentVariablesUpdate)(this, updateEnvironmentVariableRequestDto,
|
|
49
|
+
async update(updateEnvironmentVariableRequestDto, variableKey, idempotencyKey, options) {
|
|
50
|
+
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesUpdate_js_1.environmentVariablesUpdate)(this, updateEnvironmentVariableRequestDto, variableKey, idempotencyKey, options));
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Delete
|
|
53
|
+
* Delete environment variable
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* Deletes an environment variable by
|
|
56
|
+
* Deletes an environment variable by key.
|
|
57
57
|
*/
|
|
58
|
-
async delete(
|
|
59
|
-
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesDelete_js_1.environmentVariablesDelete)(this,
|
|
58
|
+
async delete(variableKey, idempotencyKey, options) {
|
|
59
|
+
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesDelete_js_1.environmentVariablesDelete)(this, variableKey, idempotencyKey, options));
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Retrieve a variable usage
|
|
@@ -64,8 +64,8 @@ class EnvironmentVariables extends sdks_js_1.ClientSDK {
|
|
|
64
64
|
* @remarks
|
|
65
65
|
* Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step controls. **variableId** is required.
|
|
66
66
|
*/
|
|
67
|
-
async usage(
|
|
68
|
-
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesUsage_js_1.environmentVariablesUsage)(this,
|
|
67
|
+
async usage(variableKey, idempotencyKey, options) {
|
|
68
|
+
return (0, fp_js_1.unwrapAsync)((0, environmentVariablesUsage_js_1.environmentVariablesUsage)(this, variableKey, idempotencyKey, options));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
exports.EnvironmentVariables = EnvironmentVariables;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environmentvariables.js","sourceRoot":"","sources":["../src/sdk/environmentvariables.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,0FAAoF;AACpF,sFAAgF;AAChF,8FAAwF;AACxF,0FAAoF;AACpF,wFAAkF;AAClF,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,oBAAqB,SAAQ,mBAAS;IACjD;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,MAA2B,EAC3B,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,mCACgD,EAChD,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,mCAAmC,EACnC,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,
|
|
1
|
+
{"version":3,"file":"environmentvariables.js","sourceRoot":"","sources":["../src/sdk/environmentvariables.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,0FAAoF;AACpF,sFAAgF;AAChF,8FAAwF;AACxF,0FAAoF;AACpF,wFAAkF;AAClF,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,oBAAqB,SAAQ,mBAAS;IACjD;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,MAA2B,EAC3B,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,mCACgD,EAChD,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,mCAAmC,EACnC,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,WAAmB,EACnB,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,8DAA4B,EAC7C,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,mCACgD,EAChD,WAAmB,EACnB,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,mCAAmC,EACnC,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,cAAmC,EACnC,OAAwB;QAKxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,WAAmB,EACnB,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAnID,oDAmIC"}
|
|
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Track activity and engagement events
|
|
30
|
+
* Track provider activity and engagement events
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
33
|
* Track activity and engagement events for a specific delivery provider
|
|
@@ -26,14 +26,14 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Delete
|
|
29
|
+
* Delete environment variable
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Deletes an environment variable by
|
|
32
|
+
* Deletes an environment variable by key.
|
|
33
33
|
*/
|
|
34
34
|
export function environmentVariablesDelete(
|
|
35
35
|
client: NovuCore,
|
|
36
|
-
|
|
36
|
+
variableKey: string,
|
|
37
37
|
idempotencyKey?: string | undefined,
|
|
38
38
|
options?: RequestOptions,
|
|
39
39
|
): APIPromise<
|
|
@@ -54,7 +54,7 @@ export function environmentVariablesDelete(
|
|
|
54
54
|
> {
|
|
55
55
|
return new APIPromise($do(
|
|
56
56
|
client,
|
|
57
|
-
|
|
57
|
+
variableKey,
|
|
58
58
|
idempotencyKey,
|
|
59
59
|
options,
|
|
60
60
|
));
|
|
@@ -62,7 +62,7 @@ export function environmentVariablesDelete(
|
|
|
62
62
|
|
|
63
63
|
async function $do(
|
|
64
64
|
client: NovuCore,
|
|
65
|
-
|
|
65
|
+
variableKey: string,
|
|
66
66
|
idempotencyKey?: string | undefined,
|
|
67
67
|
options?: RequestOptions,
|
|
68
68
|
): Promise<
|
|
@@ -87,7 +87,7 @@ async function $do(
|
|
|
87
87
|
const input:
|
|
88
88
|
operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequest =
|
|
89
89
|
{
|
|
90
|
-
|
|
90
|
+
variableKey: variableKey,
|
|
91
91
|
idempotencyKey: idempotencyKey,
|
|
92
92
|
};
|
|
93
93
|
|
|
@@ -106,12 +106,14 @@ async function $do(
|
|
|
106
106
|
const body = null;
|
|
107
107
|
|
|
108
108
|
const pathParams = {
|
|
109
|
-
|
|
109
|
+
variableKey: encodeSimple("variableKey", payload.variableKey, {
|
|
110
110
|
explode: false,
|
|
111
111
|
charEncoding: "percent",
|
|
112
112
|
}),
|
|
113
113
|
};
|
|
114
|
-
const path = pathToFunc("/v1/environment-variables/{
|
|
114
|
+
const path = pathToFunc("/v1/environment-variables/{variableKey}")(
|
|
115
|
+
pathParams,
|
|
116
|
+
);
|
|
115
117
|
|
|
116
118
|
const headers = new Headers(compactMap({
|
|
117
119
|
Accept: "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
|
+
* 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",
|
|
@@ -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",
|
|
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
|
|
|
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
|
|
|
@@ -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);
|
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, {
|
|
@@ -10,7 +10,10 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type EnvironmentVariablesControllerGetEnvironmentVariableRequest = {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The unique key of the environment variable (e.g. BASE_URL)
|
|
15
|
+
*/
|
|
16
|
+
variableKey: string;
|
|
14
17
|
/**
|
|
15
18
|
* A header for idempotency purposes
|
|
16
19
|
*/
|
|
@@ -25,7 +28,7 @@ export type EnvironmentVariablesControllerGetEnvironmentVariableResponse = {
|
|
|
25
28
|
/** @internal */
|
|
26
29
|
export type EnvironmentVariablesControllerGetEnvironmentVariableRequest$Outbound =
|
|
27
30
|
{
|
|
28
|
-
|
|
31
|
+
variableKey: string;
|
|
29
32
|
"idempotency-key"?: string | undefined;
|
|
30
33
|
};
|
|
31
34
|
|
|
@@ -36,7 +39,7 @@ export const EnvironmentVariablesControllerGetEnvironmentVariableRequest$outboun
|
|
|
36
39
|
z.ZodTypeDef,
|
|
37
40
|
EnvironmentVariablesControllerGetEnvironmentVariableRequest
|
|
38
41
|
> = z.object({
|
|
39
|
-
|
|
42
|
+
variableKey: z.string(),
|
|
40
43
|
idempotencyKey: z.string().optional(),
|
|
41
44
|
}).transform((v) => {
|
|
42
45
|
return remap$(v, {
|
|
@@ -10,7 +10,10 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest = {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The unique key of the environment variable (e.g. BASE_URL)
|
|
15
|
+
*/
|
|
16
|
+
variableKey: string;
|
|
14
17
|
/**
|
|
15
18
|
* A header for idempotency purposes
|
|
16
19
|
*/
|
|
@@ -26,7 +29,7 @@ export type EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse =
|
|
|
26
29
|
/** @internal */
|
|
27
30
|
export type EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest$Outbound =
|
|
28
31
|
{
|
|
29
|
-
|
|
32
|
+
variableKey: string;
|
|
30
33
|
"idempotency-key"?: string | undefined;
|
|
31
34
|
};
|
|
32
35
|
|
|
@@ -37,7 +40,7 @@ export const EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest$ou
|
|
|
37
40
|
z.ZodTypeDef,
|
|
38
41
|
EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest
|
|
39
42
|
> = z.object({
|
|
40
|
-
|
|
43
|
+
variableKey: z.string(),
|
|
41
44
|
idempotencyKey: z.string().optional(),
|
|
42
45
|
}).transform((v) => {
|
|
43
46
|
return remap$(v, {
|
|
@@ -10,7 +10,10 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type EnvironmentVariablesControllerUpdateEnvironmentVariableRequest = {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The unique key of the environment variable (e.g. BASE_URL)
|
|
15
|
+
*/
|
|
16
|
+
variableKey: string;
|
|
14
17
|
/**
|
|
15
18
|
* A header for idempotency purposes
|
|
16
19
|
*/
|
|
@@ -27,7 +30,7 @@ export type EnvironmentVariablesControllerUpdateEnvironmentVariableResponse = {
|
|
|
27
30
|
/** @internal */
|
|
28
31
|
export type EnvironmentVariablesControllerUpdateEnvironmentVariableRequest$Outbound =
|
|
29
32
|
{
|
|
30
|
-
|
|
33
|
+
variableKey: string;
|
|
31
34
|
"idempotency-key"?: string | undefined;
|
|
32
35
|
UpdateEnvironmentVariableRequestDto:
|
|
33
36
|
components.UpdateEnvironmentVariableRequestDto$Outbound;
|
|
@@ -40,7 +43,7 @@ export const EnvironmentVariablesControllerUpdateEnvironmentVariableRequest$outb
|
|
|
40
43
|
z.ZodTypeDef,
|
|
41
44
|
EnvironmentVariablesControllerUpdateEnvironmentVariableRequest
|
|
42
45
|
> = z.object({
|
|
43
|
-
|
|
46
|
+
variableKey: z.string(),
|
|
44
47
|
idempotencyKey: z.string().optional(),
|
|
45
48
|
updateEnvironmentVariableRequestDto:
|
|
46
49
|
components.UpdateEnvironmentVariableRequestDto$outboundSchema,
|
|
@@ -26,10 +26,6 @@ export type SubscribersControllerGetSubscriberNotificationsRequest = {
|
|
|
26
26
|
limit?: number | undefined;
|
|
27
27
|
after?: string | undefined;
|
|
28
28
|
offset?: number | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Filter by workflow tags
|
|
31
|
-
*/
|
|
32
|
-
tags?: Array<string> | undefined;
|
|
33
29
|
/**
|
|
34
30
|
* Filter by read/unread state
|
|
35
31
|
*/
|
|
@@ -87,7 +83,6 @@ export type SubscribersControllerGetSubscriberNotificationsRequest$Outbound = {
|
|
|
87
83
|
limit: number;
|
|
88
84
|
after?: string | undefined;
|
|
89
85
|
offset?: number | undefined;
|
|
90
|
-
tags?: Array<string> | undefined;
|
|
91
86
|
read?: boolean | undefined;
|
|
92
87
|
archived?: boolean | undefined;
|
|
93
88
|
snoozed?: boolean | undefined;
|
|
@@ -111,7 +106,6 @@ export const SubscribersControllerGetSubscriberNotificationsRequest$outboundSche
|
|
|
111
106
|
limit: z.number().default(10),
|
|
112
107
|
after: z.string().optional(),
|
|
113
108
|
offset: z.number().optional(),
|
|
114
|
-
tags: z.array(z.string()).optional(),
|
|
115
109
|
read: z.boolean().optional(),
|
|
116
110
|
archived: z.boolean().optional(),
|
|
117
111
|
snoozed: z.boolean().optional(),
|
package/src/sdk/activity.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
10
10
|
|
|
11
11
|
export class Activity extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
* Track activity and engagement events
|
|
13
|
+
* Track provider activity and engagement events
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* Track activity and engagement events for a specific delivery provider
|