@novu/api 0.1.2 → 0.1.5
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 +7 -3
- package/docs/sdks/messages/README.md +2 -8
- package/docs/sdks/notifications/README.md +2 -6
- package/docs/sdks/novunotifications/README.md +0 -6
- package/docs/sdks/preferences/README.md +166 -5
- package/docs/sdks/subscribers/README.md +2 -2
- package/docs/sdks/topics/README.md +0 -4
- package/funcs/subscribersPreferencesRetrieve.d.ts +16 -0
- package/funcs/subscribersPreferencesRetrieve.d.ts.map +1 -0
- package/funcs/subscribersPreferencesRetrieve.js +141 -0
- package/funcs/subscribersPreferencesRetrieve.js.map +1 -0
- package/funcs/subscribersPreferencesUpdate.d.ts +6 -2
- package/funcs/subscribersPreferencesUpdate.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdate.js +18 -12
- package/funcs/subscribersPreferencesUpdate.js.map +1 -1
- package/funcs/subscribersPreferencesUpdateLegacy.d.ts +13 -0
- package/funcs/subscribersPreferencesUpdateLegacy.d.ts.map +1 -0
- package/funcs/subscribersPreferencesUpdateLegacy.js +139 -0
- package/funcs/subscribersPreferencesUpdateLegacy.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/getsubscriberpreferencesdto.d.ts +39 -0
- package/models/components/getsubscriberpreferencesdto.d.ts.map +1 -0
- package/models/components/getsubscriberpreferencesdto.js +63 -0
- package/models/components/getsubscriberpreferencesdto.js.map +1 -0
- package/models/components/globalpreferencedto.d.ts +38 -0
- package/models/components/globalpreferencedto.d.ts.map +1 -0
- package/models/components/globalpreferencedto.js +62 -0
- package/models/components/globalpreferencedto.js.map +1 -0
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/overrides.d.ts +112 -0
- package/models/components/overrides.d.ts.map +1 -0
- package/models/components/overrides.js +110 -0
- package/models/components/overrides.js.map +1 -0
- package/models/components/patchpreferencechannelsdto.d.ts +52 -0
- package/models/components/patchpreferencechannelsdto.d.ts.map +1 -0
- package/models/components/patchpreferencechannelsdto.js +76 -0
- package/models/components/patchpreferencechannelsdto.js.map +1 -0
- package/models/components/patchsubscriberpreferencesdto.d.ts +38 -0
- package/models/components/patchsubscriberpreferencesdto.d.ts.map +1 -0
- package/models/components/patchsubscriberpreferencesdto.js +62 -0
- package/models/components/patchsubscriberpreferencesdto.js.map +1 -0
- package/models/components/triggereventtoallrequestdto.d.ts +15 -15
- package/models/components/triggereventtoallrequestdto.d.ts.map +1 -1
- package/models/components/triggereventtoallrequestdto.js +20 -18
- package/models/components/triggereventtoallrequestdto.js.map +1 -1
- package/models/components/workflowinfodto.d.ts +42 -0
- package/models/components/workflowinfodto.d.ts.map +1 -0
- package/models/components/workflowinfodto.js +63 -0
- package/models/components/workflowinfodto.js.map +1 -0
- package/models/components/workflowpreferencedto.d.ts +50 -0
- package/models/components/workflowpreferencedto.d.ts.map +1 -0
- package/models/components/workflowpreferencedto.js +68 -0
- package/models/components/workflowpreferencedto.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts +66 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts.map +1 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js +110 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js.map +1 -0
- package/models/operations/subscriberscontrollerupdatesubscriberpreferences.d.ts +68 -0
- package/models/operations/subscriberscontrollerupdatesubscriberpreferences.d.ts.map +1 -0
- package/models/operations/subscriberscontrollerupdatesubscriberpreferences.js +118 -0
- package/models/operations/subscriberscontrollerupdatesubscriberpreferences.js.map +1 -0
- package/package.json +1 -1
- package/sdk/preferences.d.ts +15 -1
- package/sdk/preferences.d.ts.map +1 -1
- package/sdk/preferences.js +22 -2
- package/sdk/preferences.js.map +1 -1
- package/sources/json-development.json +1165 -0
- package/src/funcs/subscribersPreferencesRetrieve.ts +203 -0
- package/src/funcs/subscribersPreferencesUpdate.ts +27 -20
- package/src/funcs/subscribersPreferencesUpdateLegacy.ts +202 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/getsubscriberpreferencesdto.ts +90 -0
- package/src/models/components/globalpreferencedto.ts +82 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/overrides.ts +141 -0
- package/src/models/components/patchpreferencechannelsdto.ts +106 -0
- package/src/models/components/patchsubscriberpreferencesdto.ts +84 -0
- package/src/models/components/triggereventtoallrequestdto.ts +35 -24
- package/src/models/components/workflowinfodto.ts +81 -0
- package/src/models/components/workflowpreferencedto.ts +108 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/subscriberscontrollergetsubscriberpreferences.ts +183 -0
- package/src/models/operations/subscriberscontrollerupdatesubscriberpreferences.ts +189 -0
- package/src/sdk/preferences.ts +46 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import * as components from "../components/index.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
export type SubscribersControllerUpdateSubscriberPreferencesRequest = {
|
|
6
|
+
subscriberId: string;
|
|
7
|
+
/**
|
|
8
|
+
* A header for idempotency purposes
|
|
9
|
+
*/
|
|
10
|
+
idempotencyKey?: string | undefined;
|
|
11
|
+
patchSubscriberPreferencesDto: components.PatchSubscriberPreferencesDto;
|
|
12
|
+
};
|
|
13
|
+
export type SubscribersControllerUpdateSubscriberPreferencesResponse = {
|
|
14
|
+
headers: {
|
|
15
|
+
[k: string]: Array<string>;
|
|
16
|
+
};
|
|
17
|
+
result: components.GetSubscriberPreferencesDto;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesRequest, z.ZodTypeDef, unknown>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type SubscribersControllerUpdateSubscriberPreferencesRequest$Outbound = {
|
|
23
|
+
subscriberId: string;
|
|
24
|
+
"idempotency-key"?: string | undefined;
|
|
25
|
+
PatchSubscriberPreferencesDto: components.PatchSubscriberPreferencesDto$Outbound;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberPreferencesRequest>;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace SubscribersControllerUpdateSubscriberPreferencesRequest$ {
|
|
34
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema` instead. */
|
|
35
|
+
const inboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesRequest, z.ZodTypeDef, unknown>;
|
|
36
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema` instead. */
|
|
37
|
+
const outboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberPreferencesRequest>;
|
|
38
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesRequest$Outbound` instead. */
|
|
39
|
+
type Outbound = SubscribersControllerUpdateSubscriberPreferencesRequest$Outbound;
|
|
40
|
+
}
|
|
41
|
+
export declare function subscribersControllerUpdateSubscriberPreferencesRequestToJSON(subscribersControllerUpdateSubscriberPreferencesRequest: SubscribersControllerUpdateSubscriberPreferencesRequest): string;
|
|
42
|
+
export declare function subscribersControllerUpdateSubscriberPreferencesRequestFromJSON(jsonString: string): SafeParseResult<SubscribersControllerUpdateSubscriberPreferencesRequest, SDKValidationError>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesResponse, z.ZodTypeDef, unknown>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type SubscribersControllerUpdateSubscriberPreferencesResponse$Outbound = {
|
|
47
|
+
Headers: {
|
|
48
|
+
[k: string]: Array<string>;
|
|
49
|
+
};
|
|
50
|
+
Result: components.GetSubscriberPreferencesDto$Outbound;
|
|
51
|
+
};
|
|
52
|
+
/** @internal */
|
|
53
|
+
export declare const SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesResponse$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberPreferencesResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export declare namespace SubscribersControllerUpdateSubscriberPreferencesResponse$ {
|
|
59
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema` instead. */
|
|
60
|
+
const inboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesResponse, z.ZodTypeDef, unknown>;
|
|
61
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema` instead. */
|
|
62
|
+
const outboundSchema: z.ZodType<SubscribersControllerUpdateSubscriberPreferencesResponse$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberPreferencesResponse>;
|
|
63
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesResponse$Outbound` instead. */
|
|
64
|
+
type Outbound = SubscribersControllerUpdateSubscriberPreferencesResponse$Outbound;
|
|
65
|
+
}
|
|
66
|
+
export declare function subscribersControllerUpdateSubscriberPreferencesResponseToJSON(subscribersControllerUpdateSubscriberPreferencesResponse: SubscribersControllerUpdateSubscriberPreferencesResponse): string;
|
|
67
|
+
export declare function subscribersControllerUpdateSubscriberPreferencesResponseFromJSON(jsonString: string): SafeParseResult<SubscribersControllerUpdateSubscriberPreferencesResponse, SDKValidationError>;
|
|
68
|
+
//# sourceMappingURL=subscriberscontrollerupdatesubscriberpreferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriberscontrollerupdatesubscriberpreferences.d.ts","sourceRoot":"","sources":["../../src/models/operations/subscriberscontrollerupdatesubscriberpreferences.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,uDAAuD,GAAG;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,6BAA6B,EAAE,UAAU,CAAC,6BAA6B,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,wDAAwD,GAAG;IACrE,OAAO,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IACxC,MAAM,EAAE,UAAU,CAAC,2BAA2B,CAAC;CAChD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qEAAqE,EAChF,CAAC,CAAC,OAAO,CACP,uDAAuD,EACvD,CAAC,CAAC,UAAU,EACZ,OAAO,CAWP,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,gEAAgE,GAAG;IAC7E,YAAY,EAAE,MAAM,C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Q,GAClB,iEAAiE,CAAC;CACrE;AAED,wBAAgB,8DAA8D,CAC5E,wDAAwD,EACtD,wDAAwD,GACzD,MAAM,CAKR;AAED,wBAAgB,gEAAgE,CAC9E,UAAU,EAAE,MAAM,GACjB,eAAe,CAChB,wDAAwD,EACxD,kBAAkB,CACnB,CAQA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.subscribersControllerUpdateSubscriberPreferencesResponseFromJSON = exports.subscribersControllerUpdateSubscriberPreferencesResponseToJSON = exports.SubscribersControllerUpdateSubscriberPreferencesResponse$ = exports.SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema = exports.subscribersControllerUpdateSubscriberPreferencesRequestFromJSON = exports.subscribersControllerUpdateSubscriberPreferencesRequestToJSON = exports.SubscribersControllerUpdateSubscriberPreferencesRequest$ = exports.SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema = void 0;
|
|
30
|
+
const z = __importStar(require("zod"));
|
|
31
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
32
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
33
|
+
const components = __importStar(require("../components/index.js"));
|
|
34
|
+
/** @internal */
|
|
35
|
+
exports.SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema = z.object({
|
|
36
|
+
subscriberId: z.string(),
|
|
37
|
+
"idempotency-key": z.string().optional(),
|
|
38
|
+
PatchSubscriberPreferencesDto: components.PatchSubscriberPreferencesDto$inboundSchema,
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return (0, primitives_js_1.remap)(v, {
|
|
41
|
+
"idempotency-key": "idempotencyKey",
|
|
42
|
+
"PatchSubscriberPreferencesDto": "patchSubscriberPreferencesDto",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
exports.SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema = z.object({
|
|
47
|
+
subscriberId: z.string(),
|
|
48
|
+
idempotencyKey: z.string().optional(),
|
|
49
|
+
patchSubscriberPreferencesDto: components.PatchSubscriberPreferencesDto$outboundSchema,
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return (0, primitives_js_1.remap)(v, {
|
|
52
|
+
idempotencyKey: "idempotency-key",
|
|
53
|
+
patchSubscriberPreferencesDto: "PatchSubscriberPreferencesDto",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
var SubscribersControllerUpdateSubscriberPreferencesRequest$;
|
|
61
|
+
(function (SubscribersControllerUpdateSubscriberPreferencesRequest$) {
|
|
62
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema` instead. */
|
|
63
|
+
SubscribersControllerUpdateSubscriberPreferencesRequest$.inboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema;
|
|
64
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema` instead. */
|
|
65
|
+
SubscribersControllerUpdateSubscriberPreferencesRequest$.outboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema;
|
|
66
|
+
})(SubscribersControllerUpdateSubscriberPreferencesRequest$ || (exports.SubscribersControllerUpdateSubscriberPreferencesRequest$ = SubscribersControllerUpdateSubscriberPreferencesRequest$ = {}));
|
|
67
|
+
function subscribersControllerUpdateSubscriberPreferencesRequestToJSON(subscribersControllerUpdateSubscriberPreferencesRequest) {
|
|
68
|
+
return JSON.stringify(exports.SubscribersControllerUpdateSubscriberPreferencesRequest$outboundSchema
|
|
69
|
+
.parse(subscribersControllerUpdateSubscriberPreferencesRequest));
|
|
70
|
+
}
|
|
71
|
+
exports.subscribersControllerUpdateSubscriberPreferencesRequestToJSON = subscribersControllerUpdateSubscriberPreferencesRequestToJSON;
|
|
72
|
+
function subscribersControllerUpdateSubscriberPreferencesRequestFromJSON(jsonString) {
|
|
73
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SubscribersControllerUpdateSubscriberPreferencesRequest$inboundSchema
|
|
74
|
+
.parse(JSON.parse(x)), `Failed to parse 'SubscribersControllerUpdateSubscriberPreferencesRequest' from JSON`);
|
|
75
|
+
}
|
|
76
|
+
exports.subscribersControllerUpdateSubscriberPreferencesRequestFromJSON = subscribersControllerUpdateSubscriberPreferencesRequestFromJSON;
|
|
77
|
+
/** @internal */
|
|
78
|
+
exports.SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema = z.object({
|
|
79
|
+
Headers: z.record(z.array(z.string())),
|
|
80
|
+
Result: components.GetSubscriberPreferencesDto$inboundSchema,
|
|
81
|
+
}).transform((v) => {
|
|
82
|
+
return (0, primitives_js_1.remap)(v, {
|
|
83
|
+
"Headers": "headers",
|
|
84
|
+
"Result": "result",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
/** @internal */
|
|
88
|
+
exports.SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema = z.object({
|
|
89
|
+
headers: z.record(z.array(z.string())),
|
|
90
|
+
result: components.GetSubscriberPreferencesDto$outboundSchema,
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return (0, primitives_js_1.remap)(v, {
|
|
93
|
+
headers: "Headers",
|
|
94
|
+
result: "Result",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
100
|
+
*/
|
|
101
|
+
var SubscribersControllerUpdateSubscriberPreferencesResponse$;
|
|
102
|
+
(function (SubscribersControllerUpdateSubscriberPreferencesResponse$) {
|
|
103
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema` instead. */
|
|
104
|
+
SubscribersControllerUpdateSubscriberPreferencesResponse$.inboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema;
|
|
105
|
+
/** @deprecated use `SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema` instead. */
|
|
106
|
+
SubscribersControllerUpdateSubscriberPreferencesResponse$.outboundSchema = exports.SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema;
|
|
107
|
+
})(SubscribersControllerUpdateSubscriberPreferencesResponse$ || (exports.SubscribersControllerUpdateSubscriberPreferencesResponse$ = SubscribersControllerUpdateSubscriberPreferencesResponse$ = {}));
|
|
108
|
+
function subscribersControllerUpdateSubscriberPreferencesResponseToJSON(subscribersControllerUpdateSubscriberPreferencesResponse) {
|
|
109
|
+
return JSON.stringify(exports.SubscribersControllerUpdateSubscriberPreferencesResponse$outboundSchema
|
|
110
|
+
.parse(subscribersControllerUpdateSubscriberPreferencesResponse));
|
|
111
|
+
}
|
|
112
|
+
exports.subscribersControllerUpdateSubscriberPreferencesResponseToJSON = subscribersControllerUpdateSubscriberPreferencesResponseToJSON;
|
|
113
|
+
function subscribersControllerUpdateSubscriberPreferencesResponseFromJSON(jsonString) {
|
|
114
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SubscribersControllerUpdateSubscriberPreferencesResponse$inboundSchema
|
|
115
|
+
.parse(JSON.parse(x)), `Failed to parse 'SubscribersControllerUpdateSubscriberPreferencesResponse' from JSON`);
|
|
116
|
+
}
|
|
117
|
+
exports.subscribersControllerUpdateSubscriberPreferencesResponseFromJSON = subscribersControllerUpdateSubscriberPreferencesResponseFromJSON;
|
|
118
|
+
//# sourceMappingURL=subscriberscontrollerupdatesubscriberpreferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriberscontrollerupdatesubscriberpreferences.js","sourceRoot":"","sources":["../../src/models/operations/subscriberscontrollerupdatesubscriberpreferences.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAiBrD,gBAAgB;AACH,QAAA,qEAAqE,GAK5E,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,6BAA6B,EAC3B,UAA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8EAAsE;SACnE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzB,sFAAsF,CACvF,CAAC;AACJ,CAAC;AAbD,4IAaC"}
|
package/package.json
CHANGED
package/sdk/preferences.d.ts
CHANGED
|
@@ -17,6 +17,20 @@ export declare class Preferences extends ClientSDK {
|
|
|
17
17
|
/**
|
|
18
18
|
* Update subscriber preference
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
updateLegacy(request: operations.SubscribersV1ControllerUpdateSubscriberPreferenceRequest, options?: RequestOptions): Promise<operations.SubscribersV1ControllerUpdateSubscriberPreferenceResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Get subscriber preferences
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Get subscriber global and workflow specific preferences
|
|
26
|
+
*/
|
|
27
|
+
retrieve(subscriberId: string, idempotencyKey?: string | undefined, options?: RequestOptions): Promise<operations.SubscribersControllerGetSubscriberPreferencesResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Update subscriber global or workflow specific preferences
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Update subscriber global or workflow specific preferences
|
|
33
|
+
*/
|
|
34
|
+
update(patchSubscriberPreferencesDto: components.PatchSubscriberPreferencesDto, subscriberId: string, idempotencyKey?: string | undefined, options?: RequestOptions): Promise<operations.SubscribersControllerUpdateSubscriberPreferencesResponse>;
|
|
21
35
|
}
|
|
22
36
|
//# sourceMappingURL=preferences.d.ts.map
|
package/sdk/preferences.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../src/sdk/preferences.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../src/sdk/preferences.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KA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
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Preferences = void 0;
|
|
7
7
|
const subscribersPreferencesList_js_1 = require("../funcs/subscribersPreferencesList.js");
|
|
8
|
+
const subscribersPreferencesRetrieve_js_1 = require("../funcs/subscribersPreferencesRetrieve.js");
|
|
8
9
|
const subscribersPreferencesRetrieveByLevel_js_1 = require("../funcs/subscribersPreferencesRetrieveByLevel.js");
|
|
9
10
|
const subscribersPreferencesUpdate_js_1 = require("../funcs/subscribersPreferencesUpdate.js");
|
|
10
11
|
const subscribersPreferencesUpdateGlobal_js_1 = require("../funcs/subscribersPreferencesUpdateGlobal.js");
|
|
12
|
+
const subscribersPreferencesUpdateLegacy_js_1 = require("../funcs/subscribersPreferencesUpdateLegacy.js");
|
|
11
13
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
12
14
|
const fp_js_1 = require("../types/fp.js");
|
|
13
15
|
class Preferences extends sdks_js_1.ClientSDK {
|
|
@@ -32,8 +34,26 @@ class Preferences extends sdks_js_1.ClientSDK {
|
|
|
32
34
|
/**
|
|
33
35
|
* Update subscriber preference
|
|
34
36
|
*/
|
|
35
|
-
async
|
|
36
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
37
|
+
async updateLegacy(request, options) {
|
|
38
|
+
return (0, fp_js_1.unwrapAsync)((0, subscribersPreferencesUpdateLegacy_js_1.subscribersPreferencesUpdateLegacy)(this, request, options));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get subscriber preferences
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* Get subscriber global and workflow specific preferences
|
|
45
|
+
*/
|
|
46
|
+
async retrieve(subscriberId, idempotencyKey, options) {
|
|
47
|
+
return (0, fp_js_1.unwrapAsync)((0, subscribersPreferencesRetrieve_js_1.subscribersPreferencesRetrieve)(this, subscriberId, idempotencyKey, options));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update subscriber global or workflow specific preferences
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Update subscriber global or workflow specific preferences
|
|
54
|
+
*/
|
|
55
|
+
async update(patchSubscriberPreferencesDto, subscriberId, idempotencyKey, options) {
|
|
56
|
+
return (0, fp_js_1.unwrapAsync)((0, subscribersPreferencesUpdate_js_1.subscribersPreferencesUpdate)(this, patchSubscriberPreferencesDto, subscriberId, idempotencyKey, options));
|
|
37
57
|
}
|
|
38
58
|
}
|
|
39
59
|
exports.Preferences = Preferences;
|
package/sdk/preferences.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../src/sdk/preferences.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,gHAA0G;AAC1G,8FAAwF;AACxF,0GAAoG;AACpG,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,WAAY,SAAQ,mBAAS;IACxC;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,YAAoB,EACpB,uBAA6C,EAC7C,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,2CACwD,EACxD,YAAoB,EACpB,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0EAAkC,EACnD,IAAI,EACJ,2CAA2C,EAC3C,YAAY,EACZ,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OACyE,EACzE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../src/sdk/preferences.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,kGAA4F;AAC5F,gHAA0G;AAC1G,8FAAwF;AACxF,0GAAoG;AACpG,0GAAoG;AACpG,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,WAAY,SAAQ,mBAAS;IACxC;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,YAAoB,EACpB,uBAA6C,EAC7C,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,2CACwD,EACxD,YAAoB,EACpB,cAAmC,EACnC,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0EAAkC,EACnD,IAAI,EACJ,2CAA2C,EAC3C,YAAY,EACZ,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OACyE,EACzE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,OACqE,EACrE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0EAAkC,EACnD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,YAAoB,EACpB,cAAmC,EACnC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAA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