dub 0.46.8 → 0.46.9
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/RUNTIMES.md +26 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/security.js +1 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.d.ts +122 -0
- package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.js +120 -1
- package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/leadevent.d.ts +122 -0
- package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadevent.js +117 -1
- package/dist/commonjs/models/components/leadevent.js.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.d.ts +122 -0
- package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.js +120 -1
- package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/saleevent.d.ts +122 -0
- package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/saleevent.js +118 -1
- package/dist/commonjs/models/components/saleevent.js.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.d.ts +123 -0
- package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.js +119 -1
- package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.d.ts +123 -0
- package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.js +119 -1
- package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.d.ts +123 -0
- package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.js +115 -1
- package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts +123 -0
- package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js +119 -1
- package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/security.js +1 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.d.ts +122 -0
- package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.js +114 -0
- package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
- package/dist/esm/models/components/leadevent.d.ts +122 -0
- package/dist/esm/models/components/leadevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadevent.js +111 -0
- package/dist/esm/models/components/leadevent.js.map +1 -1
- package/dist/esm/models/components/salecreatedevent.d.ts +122 -0
- package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/salecreatedevent.js +114 -0
- package/dist/esm/models/components/salecreatedevent.js.map +1 -1
- package/dist/esm/models/components/saleevent.d.ts +122 -0
- package/dist/esm/models/components/saleevent.d.ts.map +1 -1
- package/dist/esm/models/components/saleevent.js +112 -0
- package/dist/esm/models/components/saleevent.js.map +1 -1
- package/dist/esm/models/operations/createcustomer.d.ts +123 -0
- package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/createcustomer.js +114 -0
- package/dist/esm/models/operations/createcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomer.d.ts +123 -0
- package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomer.js +114 -0
- package/dist/esm/models/operations/getcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomers.d.ts +123 -0
- package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomers.js +110 -0
- package/dist/esm/models/operations/getcustomers.js.map +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts +123 -0
- package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecustomer.js +114 -0
- package/dist/esm/models/operations/updatecustomer.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +1 -1
- package/src/models/components/leadcreatedevent.ts +220 -0
- package/src/models/components/leadevent.ts +200 -0
- package/src/models/components/salecreatedevent.ts +220 -0
- package/src/models/components/saleevent.ts +216 -0
- package/src/models/operations/createcustomer.ts +219 -0
- package/src/models/operations/getcustomer.ts +219 -0
- package/src/models/operations/getcustomers.ts +203 -0
- package/src/models/operations/updatecustomer.ts +219 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
@@ -49,6 +50,35 @@ export type CreateCustomerLink = {
|
|
|
49
50
|
programId: string | null;
|
|
50
51
|
};
|
|
51
52
|
|
|
53
|
+
export type CreateCustomerPartner = {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
email: string;
|
|
57
|
+
image?: string | null | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const CreateCustomerType = {
|
|
61
|
+
Percentage: "percentage",
|
|
62
|
+
Flat: "flat",
|
|
63
|
+
} as const;
|
|
64
|
+
export type CreateCustomerType = ClosedEnum<typeof CreateCustomerType>;
|
|
65
|
+
|
|
66
|
+
export const CreateCustomerInterval = {
|
|
67
|
+
Month: "month",
|
|
68
|
+
Year: "year",
|
|
69
|
+
} as const;
|
|
70
|
+
export type CreateCustomerInterval = ClosedEnum<typeof CreateCustomerInterval>;
|
|
71
|
+
|
|
72
|
+
export type CreateCustomerDiscount = {
|
|
73
|
+
id: string;
|
|
74
|
+
couponId: string | null;
|
|
75
|
+
couponTestId: string | null;
|
|
76
|
+
amount: number;
|
|
77
|
+
type: CreateCustomerType;
|
|
78
|
+
duration: number | null;
|
|
79
|
+
interval: CreateCustomerInterval | null;
|
|
80
|
+
};
|
|
81
|
+
|
|
52
82
|
/**
|
|
53
83
|
* The customer was created.
|
|
54
84
|
*/
|
|
@@ -82,6 +112,8 @@ export type CreateCustomerResponseBody = {
|
|
|
82
112
|
*/
|
|
83
113
|
createdAt: string;
|
|
84
114
|
link?: CreateCustomerLink | null | undefined;
|
|
115
|
+
partner?: CreateCustomerPartner | null | undefined;
|
|
116
|
+
discount?: CreateCustomerDiscount | null | undefined;
|
|
85
117
|
};
|
|
86
118
|
|
|
87
119
|
/** @internal */
|
|
@@ -213,6 +245,183 @@ export function createCustomerLinkFromJSON(
|
|
|
213
245
|
);
|
|
214
246
|
}
|
|
215
247
|
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const CreateCustomerPartner$inboundSchema: z.ZodType<
|
|
250
|
+
CreateCustomerPartner,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
unknown
|
|
253
|
+
> = z.object({
|
|
254
|
+
id: z.string(),
|
|
255
|
+
name: z.string(),
|
|
256
|
+
email: z.string(),
|
|
257
|
+
image: z.nullable(z.string()).optional(),
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export type CreateCustomerPartner$Outbound = {
|
|
262
|
+
id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
email: string;
|
|
265
|
+
image?: string | null | undefined;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const CreateCustomerPartner$outboundSchema: z.ZodType<
|
|
270
|
+
CreateCustomerPartner$Outbound,
|
|
271
|
+
z.ZodTypeDef,
|
|
272
|
+
CreateCustomerPartner
|
|
273
|
+
> = z.object({
|
|
274
|
+
id: z.string(),
|
|
275
|
+
name: z.string(),
|
|
276
|
+
email: z.string(),
|
|
277
|
+
image: z.nullable(z.string()).optional(),
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @internal
|
|
282
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
283
|
+
*/
|
|
284
|
+
export namespace CreateCustomerPartner$ {
|
|
285
|
+
/** @deprecated use `CreateCustomerPartner$inboundSchema` instead. */
|
|
286
|
+
export const inboundSchema = CreateCustomerPartner$inboundSchema;
|
|
287
|
+
/** @deprecated use `CreateCustomerPartner$outboundSchema` instead. */
|
|
288
|
+
export const outboundSchema = CreateCustomerPartner$outboundSchema;
|
|
289
|
+
/** @deprecated use `CreateCustomerPartner$Outbound` instead. */
|
|
290
|
+
export type Outbound = CreateCustomerPartner$Outbound;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function createCustomerPartnerToJSON(
|
|
294
|
+
createCustomerPartner: CreateCustomerPartner,
|
|
295
|
+
): string {
|
|
296
|
+
return JSON.stringify(
|
|
297
|
+
CreateCustomerPartner$outboundSchema.parse(createCustomerPartner),
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function createCustomerPartnerFromJSON(
|
|
302
|
+
jsonString: string,
|
|
303
|
+
): SafeParseResult<CreateCustomerPartner, SDKValidationError> {
|
|
304
|
+
return safeParse(
|
|
305
|
+
jsonString,
|
|
306
|
+
(x) => CreateCustomerPartner$inboundSchema.parse(JSON.parse(x)),
|
|
307
|
+
`Failed to parse 'CreateCustomerPartner' from JSON`,
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** @internal */
|
|
312
|
+
export const CreateCustomerType$inboundSchema: z.ZodNativeEnum<
|
|
313
|
+
typeof CreateCustomerType
|
|
314
|
+
> = z.nativeEnum(CreateCustomerType);
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const CreateCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
318
|
+
typeof CreateCustomerType
|
|
319
|
+
> = CreateCustomerType$inboundSchema;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @internal
|
|
323
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
324
|
+
*/
|
|
325
|
+
export namespace CreateCustomerType$ {
|
|
326
|
+
/** @deprecated use `CreateCustomerType$inboundSchema` instead. */
|
|
327
|
+
export const inboundSchema = CreateCustomerType$inboundSchema;
|
|
328
|
+
/** @deprecated use `CreateCustomerType$outboundSchema` instead. */
|
|
329
|
+
export const outboundSchema = CreateCustomerType$outboundSchema;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** @internal */
|
|
333
|
+
export const CreateCustomerInterval$inboundSchema: z.ZodNativeEnum<
|
|
334
|
+
typeof CreateCustomerInterval
|
|
335
|
+
> = z.nativeEnum(CreateCustomerInterval);
|
|
336
|
+
|
|
337
|
+
/** @internal */
|
|
338
|
+
export const CreateCustomerInterval$outboundSchema: z.ZodNativeEnum<
|
|
339
|
+
typeof CreateCustomerInterval
|
|
340
|
+
> = CreateCustomerInterval$inboundSchema;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @internal
|
|
344
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
345
|
+
*/
|
|
346
|
+
export namespace CreateCustomerInterval$ {
|
|
347
|
+
/** @deprecated use `CreateCustomerInterval$inboundSchema` instead. */
|
|
348
|
+
export const inboundSchema = CreateCustomerInterval$inboundSchema;
|
|
349
|
+
/** @deprecated use `CreateCustomerInterval$outboundSchema` instead. */
|
|
350
|
+
export const outboundSchema = CreateCustomerInterval$outboundSchema;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** @internal */
|
|
354
|
+
export const CreateCustomerDiscount$inboundSchema: z.ZodType<
|
|
355
|
+
CreateCustomerDiscount,
|
|
356
|
+
z.ZodTypeDef,
|
|
357
|
+
unknown
|
|
358
|
+
> = z.object({
|
|
359
|
+
id: z.string(),
|
|
360
|
+
couponId: z.nullable(z.string()),
|
|
361
|
+
couponTestId: z.nullable(z.string()),
|
|
362
|
+
amount: z.number(),
|
|
363
|
+
type: CreateCustomerType$inboundSchema,
|
|
364
|
+
duration: z.nullable(z.number()),
|
|
365
|
+
interval: z.nullable(CreateCustomerInterval$inboundSchema),
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
/** @internal */
|
|
369
|
+
export type CreateCustomerDiscount$Outbound = {
|
|
370
|
+
id: string;
|
|
371
|
+
couponId: string | null;
|
|
372
|
+
couponTestId: string | null;
|
|
373
|
+
amount: number;
|
|
374
|
+
type: string;
|
|
375
|
+
duration: number | null;
|
|
376
|
+
interval: string | null;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/** @internal */
|
|
380
|
+
export const CreateCustomerDiscount$outboundSchema: z.ZodType<
|
|
381
|
+
CreateCustomerDiscount$Outbound,
|
|
382
|
+
z.ZodTypeDef,
|
|
383
|
+
CreateCustomerDiscount
|
|
384
|
+
> = z.object({
|
|
385
|
+
id: z.string(),
|
|
386
|
+
couponId: z.nullable(z.string()),
|
|
387
|
+
couponTestId: z.nullable(z.string()),
|
|
388
|
+
amount: z.number(),
|
|
389
|
+
type: CreateCustomerType$outboundSchema,
|
|
390
|
+
duration: z.nullable(z.number()),
|
|
391
|
+
interval: z.nullable(CreateCustomerInterval$outboundSchema),
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* @internal
|
|
396
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
397
|
+
*/
|
|
398
|
+
export namespace CreateCustomerDiscount$ {
|
|
399
|
+
/** @deprecated use `CreateCustomerDiscount$inboundSchema` instead. */
|
|
400
|
+
export const inboundSchema = CreateCustomerDiscount$inboundSchema;
|
|
401
|
+
/** @deprecated use `CreateCustomerDiscount$outboundSchema` instead. */
|
|
402
|
+
export const outboundSchema = CreateCustomerDiscount$outboundSchema;
|
|
403
|
+
/** @deprecated use `CreateCustomerDiscount$Outbound` instead. */
|
|
404
|
+
export type Outbound = CreateCustomerDiscount$Outbound;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export function createCustomerDiscountToJSON(
|
|
408
|
+
createCustomerDiscount: CreateCustomerDiscount,
|
|
409
|
+
): string {
|
|
410
|
+
return JSON.stringify(
|
|
411
|
+
CreateCustomerDiscount$outboundSchema.parse(createCustomerDiscount),
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export function createCustomerDiscountFromJSON(
|
|
416
|
+
jsonString: string,
|
|
417
|
+
): SafeParseResult<CreateCustomerDiscount, SDKValidationError> {
|
|
418
|
+
return safeParse(
|
|
419
|
+
jsonString,
|
|
420
|
+
(x) => CreateCustomerDiscount$inboundSchema.parse(JSON.parse(x)),
|
|
421
|
+
`Failed to parse 'CreateCustomerDiscount' from JSON`,
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
216
425
|
/** @internal */
|
|
217
426
|
export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
|
|
218
427
|
CreateCustomerResponseBody,
|
|
@@ -227,6 +436,10 @@ export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
|
|
|
227
436
|
country: z.nullable(z.string()).optional(),
|
|
228
437
|
createdAt: z.string(),
|
|
229
438
|
link: z.nullable(z.lazy(() => CreateCustomerLink$inboundSchema)).optional(),
|
|
439
|
+
partner: z.nullable(z.lazy(() => CreateCustomerPartner$inboundSchema))
|
|
440
|
+
.optional(),
|
|
441
|
+
discount: z.nullable(z.lazy(() => CreateCustomerDiscount$inboundSchema))
|
|
442
|
+
.optional(),
|
|
230
443
|
});
|
|
231
444
|
|
|
232
445
|
/** @internal */
|
|
@@ -239,6 +452,8 @@ export type CreateCustomerResponseBody$Outbound = {
|
|
|
239
452
|
country?: string | null | undefined;
|
|
240
453
|
createdAt: string;
|
|
241
454
|
link?: CreateCustomerLink$Outbound | null | undefined;
|
|
455
|
+
partner?: CreateCustomerPartner$Outbound | null | undefined;
|
|
456
|
+
discount?: CreateCustomerDiscount$Outbound | null | undefined;
|
|
242
457
|
};
|
|
243
458
|
|
|
244
459
|
/** @internal */
|
|
@@ -255,6 +470,10 @@ export const CreateCustomerResponseBody$outboundSchema: z.ZodType<
|
|
|
255
470
|
country: z.nullable(z.string()).optional(),
|
|
256
471
|
createdAt: z.string(),
|
|
257
472
|
link: z.nullable(z.lazy(() => CreateCustomerLink$outboundSchema)).optional(),
|
|
473
|
+
partner: z.nullable(z.lazy(() => CreateCustomerPartner$outboundSchema))
|
|
474
|
+
.optional(),
|
|
475
|
+
discount: z.nullable(z.lazy(() => CreateCustomerDiscount$outboundSchema))
|
|
476
|
+
.optional(),
|
|
258
477
|
});
|
|
259
478
|
|
|
260
479
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
@@ -37,6 +38,35 @@ export type GetCustomerLink = {
|
|
|
37
38
|
programId: string | null;
|
|
38
39
|
};
|
|
39
40
|
|
|
41
|
+
export type GetCustomerPartner = {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
email: string;
|
|
45
|
+
image?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const GetCustomerType = {
|
|
49
|
+
Percentage: "percentage",
|
|
50
|
+
Flat: "flat",
|
|
51
|
+
} as const;
|
|
52
|
+
export type GetCustomerType = ClosedEnum<typeof GetCustomerType>;
|
|
53
|
+
|
|
54
|
+
export const GetCustomerInterval = {
|
|
55
|
+
Month: "month",
|
|
56
|
+
Year: "year",
|
|
57
|
+
} as const;
|
|
58
|
+
export type GetCustomerInterval = ClosedEnum<typeof GetCustomerInterval>;
|
|
59
|
+
|
|
60
|
+
export type GetCustomerDiscount = {
|
|
61
|
+
id: string;
|
|
62
|
+
couponId: string | null;
|
|
63
|
+
couponTestId: string | null;
|
|
64
|
+
amount: number;
|
|
65
|
+
type: GetCustomerType;
|
|
66
|
+
duration: number | null;
|
|
67
|
+
interval: GetCustomerInterval | null;
|
|
68
|
+
};
|
|
69
|
+
|
|
40
70
|
/**
|
|
41
71
|
* The customer object.
|
|
42
72
|
*/
|
|
@@ -70,6 +100,8 @@ export type GetCustomerResponseBody = {
|
|
|
70
100
|
*/
|
|
71
101
|
createdAt: string;
|
|
72
102
|
link?: GetCustomerLink | null | undefined;
|
|
103
|
+
partner?: GetCustomerPartner | null | undefined;
|
|
104
|
+
discount?: GetCustomerDiscount | null | undefined;
|
|
73
105
|
};
|
|
74
106
|
|
|
75
107
|
/** @internal */
|
|
@@ -190,6 +222,183 @@ export function getCustomerLinkFromJSON(
|
|
|
190
222
|
);
|
|
191
223
|
}
|
|
192
224
|
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const GetCustomerPartner$inboundSchema: z.ZodType<
|
|
227
|
+
GetCustomerPartner,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = z.object({
|
|
231
|
+
id: z.string(),
|
|
232
|
+
name: z.string(),
|
|
233
|
+
email: z.string(),
|
|
234
|
+
image: z.nullable(z.string()).optional(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export type GetCustomerPartner$Outbound = {
|
|
239
|
+
id: string;
|
|
240
|
+
name: string;
|
|
241
|
+
email: string;
|
|
242
|
+
image?: string | null | undefined;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export const GetCustomerPartner$outboundSchema: z.ZodType<
|
|
247
|
+
GetCustomerPartner$Outbound,
|
|
248
|
+
z.ZodTypeDef,
|
|
249
|
+
GetCustomerPartner
|
|
250
|
+
> = z.object({
|
|
251
|
+
id: z.string(),
|
|
252
|
+
name: z.string(),
|
|
253
|
+
email: z.string(),
|
|
254
|
+
image: z.nullable(z.string()).optional(),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @internal
|
|
259
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
260
|
+
*/
|
|
261
|
+
export namespace GetCustomerPartner$ {
|
|
262
|
+
/** @deprecated use `GetCustomerPartner$inboundSchema` instead. */
|
|
263
|
+
export const inboundSchema = GetCustomerPartner$inboundSchema;
|
|
264
|
+
/** @deprecated use `GetCustomerPartner$outboundSchema` instead. */
|
|
265
|
+
export const outboundSchema = GetCustomerPartner$outboundSchema;
|
|
266
|
+
/** @deprecated use `GetCustomerPartner$Outbound` instead. */
|
|
267
|
+
export type Outbound = GetCustomerPartner$Outbound;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function getCustomerPartnerToJSON(
|
|
271
|
+
getCustomerPartner: GetCustomerPartner,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
GetCustomerPartner$outboundSchema.parse(getCustomerPartner),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function getCustomerPartnerFromJSON(
|
|
279
|
+
jsonString: string,
|
|
280
|
+
): SafeParseResult<GetCustomerPartner, SDKValidationError> {
|
|
281
|
+
return safeParse(
|
|
282
|
+
jsonString,
|
|
283
|
+
(x) => GetCustomerPartner$inboundSchema.parse(JSON.parse(x)),
|
|
284
|
+
`Failed to parse 'GetCustomerPartner' from JSON`,
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const GetCustomerType$inboundSchema: z.ZodNativeEnum<
|
|
290
|
+
typeof GetCustomerType
|
|
291
|
+
> = z.nativeEnum(GetCustomerType);
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const GetCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
295
|
+
typeof GetCustomerType
|
|
296
|
+
> = GetCustomerType$inboundSchema;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @internal
|
|
300
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
301
|
+
*/
|
|
302
|
+
export namespace GetCustomerType$ {
|
|
303
|
+
/** @deprecated use `GetCustomerType$inboundSchema` instead. */
|
|
304
|
+
export const inboundSchema = GetCustomerType$inboundSchema;
|
|
305
|
+
/** @deprecated use `GetCustomerType$outboundSchema` instead. */
|
|
306
|
+
export const outboundSchema = GetCustomerType$outboundSchema;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const GetCustomerInterval$inboundSchema: z.ZodNativeEnum<
|
|
311
|
+
typeof GetCustomerInterval
|
|
312
|
+
> = z.nativeEnum(GetCustomerInterval);
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
export const GetCustomerInterval$outboundSchema: z.ZodNativeEnum<
|
|
316
|
+
typeof GetCustomerInterval
|
|
317
|
+
> = GetCustomerInterval$inboundSchema;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @internal
|
|
321
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
322
|
+
*/
|
|
323
|
+
export namespace GetCustomerInterval$ {
|
|
324
|
+
/** @deprecated use `GetCustomerInterval$inboundSchema` instead. */
|
|
325
|
+
export const inboundSchema = GetCustomerInterval$inboundSchema;
|
|
326
|
+
/** @deprecated use `GetCustomerInterval$outboundSchema` instead. */
|
|
327
|
+
export const outboundSchema = GetCustomerInterval$outboundSchema;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const GetCustomerDiscount$inboundSchema: z.ZodType<
|
|
332
|
+
GetCustomerDiscount,
|
|
333
|
+
z.ZodTypeDef,
|
|
334
|
+
unknown
|
|
335
|
+
> = z.object({
|
|
336
|
+
id: z.string(),
|
|
337
|
+
couponId: z.nullable(z.string()),
|
|
338
|
+
couponTestId: z.nullable(z.string()),
|
|
339
|
+
amount: z.number(),
|
|
340
|
+
type: GetCustomerType$inboundSchema,
|
|
341
|
+
duration: z.nullable(z.number()),
|
|
342
|
+
interval: z.nullable(GetCustomerInterval$inboundSchema),
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type GetCustomerDiscount$Outbound = {
|
|
347
|
+
id: string;
|
|
348
|
+
couponId: string | null;
|
|
349
|
+
couponTestId: string | null;
|
|
350
|
+
amount: number;
|
|
351
|
+
type: string;
|
|
352
|
+
duration: number | null;
|
|
353
|
+
interval: string | null;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const GetCustomerDiscount$outboundSchema: z.ZodType<
|
|
358
|
+
GetCustomerDiscount$Outbound,
|
|
359
|
+
z.ZodTypeDef,
|
|
360
|
+
GetCustomerDiscount
|
|
361
|
+
> = z.object({
|
|
362
|
+
id: z.string(),
|
|
363
|
+
couponId: z.nullable(z.string()),
|
|
364
|
+
couponTestId: z.nullable(z.string()),
|
|
365
|
+
amount: z.number(),
|
|
366
|
+
type: GetCustomerType$outboundSchema,
|
|
367
|
+
duration: z.nullable(z.number()),
|
|
368
|
+
interval: z.nullable(GetCustomerInterval$outboundSchema),
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @internal
|
|
373
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
374
|
+
*/
|
|
375
|
+
export namespace GetCustomerDiscount$ {
|
|
376
|
+
/** @deprecated use `GetCustomerDiscount$inboundSchema` instead. */
|
|
377
|
+
export const inboundSchema = GetCustomerDiscount$inboundSchema;
|
|
378
|
+
/** @deprecated use `GetCustomerDiscount$outboundSchema` instead. */
|
|
379
|
+
export const outboundSchema = GetCustomerDiscount$outboundSchema;
|
|
380
|
+
/** @deprecated use `GetCustomerDiscount$Outbound` instead. */
|
|
381
|
+
export type Outbound = GetCustomerDiscount$Outbound;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function getCustomerDiscountToJSON(
|
|
385
|
+
getCustomerDiscount: GetCustomerDiscount,
|
|
386
|
+
): string {
|
|
387
|
+
return JSON.stringify(
|
|
388
|
+
GetCustomerDiscount$outboundSchema.parse(getCustomerDiscount),
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function getCustomerDiscountFromJSON(
|
|
393
|
+
jsonString: string,
|
|
394
|
+
): SafeParseResult<GetCustomerDiscount, SDKValidationError> {
|
|
395
|
+
return safeParse(
|
|
396
|
+
jsonString,
|
|
397
|
+
(x) => GetCustomerDiscount$inboundSchema.parse(JSON.parse(x)),
|
|
398
|
+
`Failed to parse 'GetCustomerDiscount' from JSON`,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
193
402
|
/** @internal */
|
|
194
403
|
export const GetCustomerResponseBody$inboundSchema: z.ZodType<
|
|
195
404
|
GetCustomerResponseBody,
|
|
@@ -204,6 +413,10 @@ export const GetCustomerResponseBody$inboundSchema: z.ZodType<
|
|
|
204
413
|
country: z.nullable(z.string()).optional(),
|
|
205
414
|
createdAt: z.string(),
|
|
206
415
|
link: z.nullable(z.lazy(() => GetCustomerLink$inboundSchema)).optional(),
|
|
416
|
+
partner: z.nullable(z.lazy(() => GetCustomerPartner$inboundSchema))
|
|
417
|
+
.optional(),
|
|
418
|
+
discount: z.nullable(z.lazy(() => GetCustomerDiscount$inboundSchema))
|
|
419
|
+
.optional(),
|
|
207
420
|
});
|
|
208
421
|
|
|
209
422
|
/** @internal */
|
|
@@ -216,6 +429,8 @@ export type GetCustomerResponseBody$Outbound = {
|
|
|
216
429
|
country?: string | null | undefined;
|
|
217
430
|
createdAt: string;
|
|
218
431
|
link?: GetCustomerLink$Outbound | null | undefined;
|
|
432
|
+
partner?: GetCustomerPartner$Outbound | null | undefined;
|
|
433
|
+
discount?: GetCustomerDiscount$Outbound | null | undefined;
|
|
219
434
|
};
|
|
220
435
|
|
|
221
436
|
/** @internal */
|
|
@@ -232,6 +447,10 @@ export const GetCustomerResponseBody$outboundSchema: z.ZodType<
|
|
|
232
447
|
country: z.nullable(z.string()).optional(),
|
|
233
448
|
createdAt: z.string(),
|
|
234
449
|
link: z.nullable(z.lazy(() => GetCustomerLink$outboundSchema)).optional(),
|
|
450
|
+
partner: z.nullable(z.lazy(() => GetCustomerPartner$outboundSchema))
|
|
451
|
+
.optional(),
|
|
452
|
+
discount: z.nullable(z.lazy(() => GetCustomerDiscount$outboundSchema))
|
|
453
|
+
.optional(),
|
|
235
454
|
});
|
|
236
455
|
|
|
237
456
|
/**
|