@novu/api 0.0.1-alpha.147 → 0.0.1-alpha.148

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.
@@ -261,7 +261,24 @@ const novu = new Novu({
261
261
  });
262
262
 
263
263
  async function run() {
264
- const result = await novu.subscribers.update({}, "<id>");
264
+ const result = await novu.subscribers.update({
265
+ email: "john.doe@example.com",
266
+ firstName: "John",
267
+ lastName: "Doe",
268
+ phone: "+1234567890",
269
+ avatar: "https://example.com/avatar.jpg",
270
+ locale: "en-US",
271
+ data: {
272
+ "preferences": {
273
+ "notifications": true,
274
+ "theme": "dark",
275
+ },
276
+ "tags": [
277
+ "premium",
278
+ "newsletter",
279
+ ],
280
+ },
281
+ }, "<id>");
265
282
 
266
283
  // Handle the result
267
284
  console.log(result);
@@ -285,7 +302,24 @@ const novu = new NovuCore({
285
302
  });
286
303
 
287
304
  async function run() {
288
- const res = await subscribersUpdate(novu, {}, "<id>");
305
+ const res = await subscribersUpdate(novu, {
306
+ email: "john.doe@example.com",
307
+ firstName: "John",
308
+ lastName: "Doe",
309
+ phone: "+1234567890",
310
+ avatar: "https://example.com/avatar.jpg",
311
+ locale: "en-US",
312
+ data: {
313
+ "preferences": {
314
+ "notifications": true,
315
+ "theme": "dark",
316
+ },
317
+ "tags": [
318
+ "premium",
319
+ "newsletter",
320
+ ],
321
+ },
322
+ }, "<id>");
289
323
 
290
324
  if (!res.ok) {
291
325
  throw res.error;
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "1.0";
30
- readonly sdkVersion: "0.0.1-alpha.147";
30
+ readonly sdkVersion: "0.0.1-alpha.148";
31
31
  readonly genVersion: "2.481.0";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.147 2.481.0 1.0 @novu/api";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.148 2.481.0 1.0 @novu/api";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -30,8 +30,8 @@ exports.serverURLFromOptions = serverURLFromOptions;
30
30
  exports.SDK_METADATA = {
31
31
  language: "typescript",
32
32
  openapiDocVersion: "1.0",
33
- sdkVersion: "0.0.1-alpha.147",
33
+ sdkVersion: "0.0.1-alpha.148",
34
34
  genVersion: "2.481.0",
35
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.147 2.481.0 1.0 @novu/api",
35
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.148 2.481.0 1.0 @novu/api",
36
36
  };
37
37
  //# sourceMappingURL=config.js.map
@@ -4,11 +4,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
4
  import { ChannelPreference, ChannelPreference$Outbound } from "./channelpreference.js";
5
5
  export type UpdateSubscriberPreferenceRequestDto = {
6
6
  /**
7
- * The subscriber preferences for every ChannelTypeEnum for the workflow assigned.
7
+ * Optional preferences for each channel type in the assigned workflow.
8
8
  */
9
9
  channel?: ChannelPreference | undefined;
10
10
  /**
11
- * Sets if the workflow is fully enabled for all channels or not for the subscriber.
11
+ * Indicates whether the workflow is fully enabled for all channels for the subscriber.
12
12
  */
13
13
  enabled?: boolean | undefined;
14
14
  };
@@ -1,38 +1,44 @@
1
1
  import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- export type UpdateSubscriberRequestDtoData = {};
4
+ import { SubscriberChannelDto, SubscriberChannelDto$Outbound } from "./subscriberchanneldto.js";
5
5
  export type UpdateSubscriberRequestDto = {
6
+ /**
7
+ * The email address of the subscriber.
8
+ */
6
9
  email?: string | undefined;
10
+ /**
11
+ * The first name of the subscriber.
12
+ */
7
13
  firstName?: string | undefined;
14
+ /**
15
+ * The last name of the subscriber.
16
+ */
8
17
  lastName?: string | undefined;
18
+ /**
19
+ * The phone number of the subscriber.
20
+ */
9
21
  phone?: string | undefined;
22
+ /**
23
+ * The avatar URL of the subscriber.
24
+ */
10
25
  avatar?: string | undefined;
26
+ /**
27
+ * The locale of the subscriber, for example "en-US".
28
+ */
11
29
  locale?: string | undefined;
12
- data?: UpdateSubscriberRequestDtoData | undefined;
13
- channels?: Array<string> | undefined;
30
+ /**
31
+ * Custom data associated with the subscriber. Can contain any additional properties.
32
+ */
33
+ data?: {
34
+ [k: string]: any;
35
+ } | undefined;
36
+ /**
37
+ * An array of communication channels for the subscriber.
38
+ */
39
+ channels?: Array<SubscriberChannelDto> | undefined;
14
40
  };
15
41
  /** @internal */
16
- export declare const UpdateSubscriberRequestDtoData$inboundSchema: z.ZodType<UpdateSubscriberRequestDtoData, z.ZodTypeDef, unknown>;
17
- /** @internal */
18
- export type UpdateSubscriberRequestDtoData$Outbound = {};
19
- /** @internal */
20
- export declare const UpdateSubscriberRequestDtoData$outboundSchema: z.ZodType<UpdateSubscriberRequestDtoData$Outbound, z.ZodTypeDef, UpdateSubscriberRequestDtoData>;
21
- /**
22
- * @internal
23
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
24
- */
25
- export declare namespace UpdateSubscriberRequestDtoData$ {
26
- /** @deprecated use `UpdateSubscriberRequestDtoData$inboundSchema` instead. */
27
- const inboundSchema: z.ZodType<UpdateSubscriberRequestDtoData, z.ZodTypeDef, unknown>;
28
- /** @deprecated use `UpdateSubscriberRequestDtoData$outboundSchema` instead. */
29
- const outboundSchema: z.ZodType<UpdateSubscriberRequestDtoData$Outbound, z.ZodTypeDef, UpdateSubscriberRequestDtoData>;
30
- /** @deprecated use `UpdateSubscriberRequestDtoData$Outbound` instead. */
31
- type Outbound = UpdateSubscriberRequestDtoData$Outbound;
32
- }
33
- export declare function updateSubscriberRequestDtoDataToJSON(updateSubscriberRequestDtoData: UpdateSubscriberRequestDtoData): string;
34
- export declare function updateSubscriberRequestDtoDataFromJSON(jsonString: string): SafeParseResult<UpdateSubscriberRequestDtoData, SDKValidationError>;
35
- /** @internal */
36
42
  export declare const UpdateSubscriberRequestDto$inboundSchema: z.ZodType<UpdateSubscriberRequestDto, z.ZodTypeDef, unknown>;
37
43
  /** @internal */
38
44
  export type UpdateSubscriberRequestDto$Outbound = {
@@ -42,8 +48,10 @@ export type UpdateSubscriberRequestDto$Outbound = {
42
48
  phone?: string | undefined;
43
49
  avatar?: string | undefined;
44
50
  locale?: string | undefined;
45
- data?: UpdateSubscriberRequestDtoData$Outbound | undefined;
46
- channels?: Array<string> | undefined;
51
+ data?: {
52
+ [k: string]: any;
53
+ } | undefined;
54
+ channels?: Array<SubscriberChannelDto$Outbound> | undefined;
47
55
  };
48
56
  /** @internal */
49
57
  export declare const UpdateSubscriberRequestDto$outboundSchema: z.ZodType<UpdateSubscriberRequestDto$Outbound, z.ZodTypeDef, UpdateSubscriberRequestDto>;
@@ -1 +1 @@
1
- {"version":3,"file":"updatesubscriberrequestdto.d.ts","sourceRoot":"","sources":["../../src/models/components/updatesubscriberrequestdto.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEhD,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC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MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,uCAAuC,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,0BAA0B,CAU1B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,2BAA2B,CAAC;IAC3C,0EAA0E;IACnE,MAAM,aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,0FAA4C,CAAC;IACxE,qEAAqE;IACrE,KAAY,QAAQ,GAAG,mCAAmC,CAAC;CAC5D;AAED,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
1
+ {"version":3,"file":"updatesubscriberrequestdto.d.ts","sourceRoot":"","sources":["../../src/models/components/updatesubscriberrequestdto.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OA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aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,0FAA4C,CAAC;IACxE,qEAAqE;IACrE,KAAY,QAAQ,GAAG,mCAAmC,CAAC;CAC5D;AAED,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
@@ -26,32 +26,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.updateSubscriberRequestDtoFromJSON = exports.updateSubscriberRequestDtoToJSON = exports.UpdateSubscriberRequestDto$ = exports.UpdateSubscriberRequestDto$outboundSchema = exports.UpdateSubscriberRequestDto$inboundSchema = exports.updateSubscriberRequestDtoDataFromJSON = exports.updateSubscriberRequestDtoDataToJSON = exports.UpdateSubscriberRequestDtoData$ = exports.UpdateSubscriberRequestDtoData$outboundSchema = exports.UpdateSubscriberRequestDtoData$inboundSchema = void 0;
29
+ exports.updateSubscriberRequestDtoFromJSON = exports.updateSubscriberRequestDtoToJSON = exports.UpdateSubscriberRequestDto$ = exports.UpdateSubscriberRequestDto$outboundSchema = exports.UpdateSubscriberRequestDto$inboundSchema = void 0;
30
30
  const z = __importStar(require("zod"));
31
31
  const schemas_js_1 = require("../../lib/schemas.js");
32
- /** @internal */
33
- exports.UpdateSubscriberRequestDtoData$inboundSchema = z.object({});
34
- /** @internal */
35
- exports.UpdateSubscriberRequestDtoData$outboundSchema = z.object({});
36
- /**
37
- * @internal
38
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
39
- */
40
- var UpdateSubscriberRequestDtoData$;
41
- (function (UpdateSubscriberRequestDtoData$) {
42
- /** @deprecated use `UpdateSubscriberRequestDtoData$inboundSchema` instead. */
43
- UpdateSubscriberRequestDtoData$.inboundSchema = exports.UpdateSubscriberRequestDtoData$inboundSchema;
44
- /** @deprecated use `UpdateSubscriberRequestDtoData$outboundSchema` instead. */
45
- UpdateSubscriberRequestDtoData$.outboundSchema = exports.UpdateSubscriberRequestDtoData$outboundSchema;
46
- })(UpdateSubscriberRequestDtoData$ || (exports.UpdateSubscriberRequestDtoData$ = UpdateSubscriberRequestDtoData$ = {}));
47
- function updateSubscriberRequestDtoDataToJSON(updateSubscriberRequestDtoData) {
48
- return JSON.stringify(exports.UpdateSubscriberRequestDtoData$outboundSchema.parse(updateSubscriberRequestDtoData));
49
- }
50
- exports.updateSubscriberRequestDtoDataToJSON = updateSubscriberRequestDtoDataToJSON;
51
- function updateSubscriberRequestDtoDataFromJSON(jsonString) {
52
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateSubscriberRequestDtoData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSubscriberRequestDtoData' from JSON`);
53
- }
54
- exports.updateSubscriberRequestDtoDataFromJSON = updateSubscriberRequestDtoDataFromJSON;
32
+ const subscriberchanneldto_js_1 = require("./subscriberchanneldto.js");
55
33
  /** @internal */
56
34
  exports.UpdateSubscriberRequestDto$inboundSchema = z.object({
57
35
  email: z.string().optional(),
@@ -60,8 +38,8 @@ exports.UpdateSubscriberRequestDto$inboundSchema = z.object({
60
38
  phone: z.string().optional(),
61
39
  avatar: z.string().optional(),
62
40
  locale: z.string().optional(),
63
- data: z.lazy(() => exports.UpdateSubscriberRequestDtoData$inboundSchema).optional(),
64
- channels: z.array(z.string()).optional(),
41
+ data: z.record(z.any()).optional(),
42
+ channels: z.array(subscriberchanneldto_js_1.SubscriberChannelDto$inboundSchema).optional(),
65
43
  });
66
44
  /** @internal */
67
45
  exports.UpdateSubscriberRequestDto$outboundSchema = z.object({
@@ -71,8 +49,8 @@ exports.UpdateSubscriberRequestDto$outboundSchema = z.object({
71
49
  phone: z.string().optional(),
72
50
  avatar: z.string().optional(),
73
51
  locale: z.string().optional(),
74
- data: z.lazy(() => exports.UpdateSubscriberRequestDtoData$outboundSchema).optional(),
75
- channels: z.array(z.string()).optional(),
52
+ data: z.record(z.any()).optional(),
53
+ channels: z.array(subscriberchanneldto_js_1.SubscriberChannelDto$outboundSchema).optional(),
76
54
  });
77
55
  /**
78
56
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"updatesubscriberrequestdto.js","sourceRoot":"","sources":["../../src/models/components/updatesubscriberrequestdto.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,qDAAiD;AAiBjD,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAKjB,gBAAgB;AACH,QAAA,6CAA6C,GAItD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB;;;GAGG;AACH,IAAiB,+BAA+B,CAO/C;AAPD,WAAiB,+BAA+B;IAC9C,8EAA8E;IACjE,6CAAa,GAAG,oDAA4C,CAAC;IAC1E,+EAA+E;IAClE,8CAAc,GAAG,qDAA6C,CAAC;AAG9E,CAAC,EAPgB,+BAA+B,+CAA/B,+BAA+B,QAO/C;AAED,SAAgB,oCAAoC,CAClD,8BAA8D;IAE9D,OAAO,IAAI,CAAC,SAAS,CACnB,qDAA6C,CAAC,KAAK,CACjD,8BAA8B,CAC/B,CACF,CAAC;AACJ,CAAC;AARD,oFAQC;AAED,SAAgB,sCAAsC,CACpD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oDAA4C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,4DAA4D,CAC7D,CAAC;AACJ,CAAC;AARD,wFAQC;AAED,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,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AC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC;AARD,gFAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/api",
3
- "version": "0.0.1-alpha.147",
3
+ "version": "0.0.1-alpha.148",
4
4
  "author": "Novu",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0",
58
- sdkVersion: "0.0.1-alpha.147",
58
+ sdkVersion: "0.0.1-alpha.148",
59
59
  genVersion: "2.481.0",
60
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.147 2.481.0 1.0 @novu/api",
60
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.148 2.481.0 1.0 @novu/api",
61
61
  } as const;
@@ -15,11 +15,11 @@ import {
15
15
 
16
16
  export type UpdateSubscriberPreferenceRequestDto = {
17
17
  /**
18
- * The subscriber preferences for every ChannelTypeEnum for the workflow assigned.
18
+ * Optional preferences for each channel type in the assigned workflow.
19
19
  */
20
20
  channel?: ChannelPreference | undefined;
21
21
  /**
22
- * Sets if the workflow is fully enabled for all channels or not for the subscriber.
22
+ * Indicates whether the workflow is fully enabled for all channels for the subscriber.
23
23
  */
24
24
  enabled?: boolean | undefined;
25
25
  };
@@ -6,70 +6,48 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
-
10
- export type UpdateSubscriberRequestDtoData = {};
9
+ import {
10
+ SubscriberChannelDto,
11
+ SubscriberChannelDto$inboundSchema,
12
+ SubscriberChannelDto$Outbound,
13
+ SubscriberChannelDto$outboundSchema,
14
+ } from "./subscriberchanneldto.js";
11
15
 
12
16
  export type UpdateSubscriberRequestDto = {
17
+ /**
18
+ * The email address of the subscriber.
19
+ */
13
20
  email?: string | undefined;
21
+ /**
22
+ * The first name of the subscriber.
23
+ */
14
24
  firstName?: string | undefined;
25
+ /**
26
+ * The last name of the subscriber.
27
+ */
15
28
  lastName?: string | undefined;
29
+ /**
30
+ * The phone number of the subscriber.
31
+ */
16
32
  phone?: string | undefined;
33
+ /**
34
+ * The avatar URL of the subscriber.
35
+ */
17
36
  avatar?: string | undefined;
37
+ /**
38
+ * The locale of the subscriber, for example "en-US".
39
+ */
18
40
  locale?: string | undefined;
19
- data?: UpdateSubscriberRequestDtoData | undefined;
20
- channels?: Array<string> | undefined;
41
+ /**
42
+ * Custom data associated with the subscriber. Can contain any additional properties.
43
+ */
44
+ data?: { [k: string]: any } | undefined;
45
+ /**
46
+ * An array of communication channels for the subscriber.
47
+ */
48
+ channels?: Array<SubscriberChannelDto> | undefined;
21
49
  };
22
50
 
23
- /** @internal */
24
- export const UpdateSubscriberRequestDtoData$inboundSchema: z.ZodType<
25
- UpdateSubscriberRequestDtoData,
26
- z.ZodTypeDef,
27
- unknown
28
- > = z.object({});
29
-
30
- /** @internal */
31
- export type UpdateSubscriberRequestDtoData$Outbound = {};
32
-
33
- /** @internal */
34
- export const UpdateSubscriberRequestDtoData$outboundSchema: z.ZodType<
35
- UpdateSubscriberRequestDtoData$Outbound,
36
- z.ZodTypeDef,
37
- UpdateSubscriberRequestDtoData
38
- > = z.object({});
39
-
40
- /**
41
- * @internal
42
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
- */
44
- export namespace UpdateSubscriberRequestDtoData$ {
45
- /** @deprecated use `UpdateSubscriberRequestDtoData$inboundSchema` instead. */
46
- export const inboundSchema = UpdateSubscriberRequestDtoData$inboundSchema;
47
- /** @deprecated use `UpdateSubscriberRequestDtoData$outboundSchema` instead. */
48
- export const outboundSchema = UpdateSubscriberRequestDtoData$outboundSchema;
49
- /** @deprecated use `UpdateSubscriberRequestDtoData$Outbound` instead. */
50
- export type Outbound = UpdateSubscriberRequestDtoData$Outbound;
51
- }
52
-
53
- export function updateSubscriberRequestDtoDataToJSON(
54
- updateSubscriberRequestDtoData: UpdateSubscriberRequestDtoData,
55
- ): string {
56
- return JSON.stringify(
57
- UpdateSubscriberRequestDtoData$outboundSchema.parse(
58
- updateSubscriberRequestDtoData,
59
- ),
60
- );
61
- }
62
-
63
- export function updateSubscriberRequestDtoDataFromJSON(
64
- jsonString: string,
65
- ): SafeParseResult<UpdateSubscriberRequestDtoData, SDKValidationError> {
66
- return safeParse(
67
- jsonString,
68
- (x) => UpdateSubscriberRequestDtoData$inboundSchema.parse(JSON.parse(x)),
69
- `Failed to parse 'UpdateSubscriberRequestDtoData' from JSON`,
70
- );
71
- }
72
-
73
51
  /** @internal */
74
52
  export const UpdateSubscriberRequestDto$inboundSchema: z.ZodType<
75
53
  UpdateSubscriberRequestDto,
@@ -82,8 +60,8 @@ export const UpdateSubscriberRequestDto$inboundSchema: z.ZodType<
82
60
  phone: z.string().optional(),
83
61
  avatar: z.string().optional(),
84
62
  locale: z.string().optional(),
85
- data: z.lazy(() => UpdateSubscriberRequestDtoData$inboundSchema).optional(),
86
- channels: z.array(z.string()).optional(),
63
+ data: z.record(z.any()).optional(),
64
+ channels: z.array(SubscriberChannelDto$inboundSchema).optional(),
87
65
  });
88
66
 
89
67
  /** @internal */
@@ -94,8 +72,8 @@ export type UpdateSubscriberRequestDto$Outbound = {
94
72
  phone?: string | undefined;
95
73
  avatar?: string | undefined;
96
74
  locale?: string | undefined;
97
- data?: UpdateSubscriberRequestDtoData$Outbound | undefined;
98
- channels?: Array<string> | undefined;
75
+ data?: { [k: string]: any } | undefined;
76
+ channels?: Array<SubscriberChannelDto$Outbound> | undefined;
99
77
  };
100
78
 
101
79
  /** @internal */
@@ -110,8 +88,8 @@ export const UpdateSubscriberRequestDto$outboundSchema: z.ZodType<
110
88
  phone: z.string().optional(),
111
89
  avatar: z.string().optional(),
112
90
  locale: z.string().optional(),
113
- data: z.lazy(() => UpdateSubscriberRequestDtoData$outboundSchema).optional(),
114
- channels: z.array(z.string()).optional(),
91
+ data: z.record(z.any()).optional(),
92
+ channels: z.array(SubscriberChannelDto$outboundSchema).optional(),
115
93
  });
116
94
 
117
95
  /**