dub 0.71.2 → 0.71.4
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 +43 -29
- package/dist/commonjs/funcs/analyticsRetrieve.js +0 -1
- package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +0 -1
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/analyticstoplinks.d.ts +6 -2
- package/dist/commonjs/models/components/analyticstoplinks.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticstoplinks.js +2 -1
- package/dist/commonjs/models/components/analyticstoplinks.js.map +1 -1
- package/dist/commonjs/models/components/partneranalyticstoplinks.d.ts +6 -2
- package/dist/commonjs/models/components/partneranalyticstoplinks.d.ts.map +1 -1
- package/dist/commonjs/models/components/partneranalyticstoplinks.js +2 -1
- package/dist/commonjs/models/components/partneranalyticstoplinks.js.map +1 -1
- package/dist/commonjs/models/operations/createpartner.d.ts +56 -56
- package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createpartner.js +87 -93
- package/dist/commonjs/models/operations/createpartner.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +58 -105
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +13 -45
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listpartners.d.ts +56 -56
- package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpartners.js +93 -88
- package/dist/commonjs/models/operations/listpartners.js.map +1 -1
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts +58 -105
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/retrieveanalytics.js +13 -47
- package/dist/commonjs/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/commonjs/models/operations/retrievepartneranalytics.d.ts +1 -1
- package/dist/commonjs/sdk/customers.d.ts +6 -6
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.js +8 -8
- package/dist/commonjs/sdk/customers.js.map +1 -1
- package/dist/commonjs/sdk/domains.d.ts +10 -10
- package/dist/commonjs/sdk/domains.d.ts.map +1 -1
- package/dist/commonjs/sdk/domains.js +13 -13
- package/dist/commonjs/sdk/domains.js.map +1 -1
- package/dist/commonjs/sdk/folders.d.ts +10 -10
- package/dist/commonjs/sdk/folders.d.ts.map +1 -1
- package/dist/commonjs/sdk/folders.js +13 -13
- package/dist/commonjs/sdk/folders.js.map +1 -1
- package/dist/commonjs/sdk/links.d.ts +19 -19
- package/dist/commonjs/sdk/links.d.ts.map +1 -1
- package/dist/commonjs/sdk/links.js +24 -24
- package/dist/commonjs/sdk/links.js.map +1 -1
- package/dist/commonjs/sdk/partners.d.ts +10 -10
- package/dist/commonjs/sdk/partners.d.ts.map +1 -1
- package/dist/commonjs/sdk/partners.js +13 -13
- package/dist/commonjs/sdk/partners.js.map +1 -1
- package/dist/commonjs/sdk/tags.d.ts +10 -10
- package/dist/commonjs/sdk/tags.d.ts.map +1 -1
- package/dist/commonjs/sdk/tags.js +13 -13
- package/dist/commonjs/sdk/tags.js.map +1 -1
- package/dist/esm/funcs/analyticsRetrieve.js +0 -1
- package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +0 -1
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/analyticstoplinks.d.ts +6 -2
- package/dist/esm/models/components/analyticstoplinks.d.ts.map +1 -1
- package/dist/esm/models/components/analyticstoplinks.js +2 -1
- package/dist/esm/models/components/analyticstoplinks.js.map +1 -1
- package/dist/esm/models/components/partneranalyticstoplinks.d.ts +6 -2
- package/dist/esm/models/components/partneranalyticstoplinks.d.ts.map +1 -1
- package/dist/esm/models/components/partneranalyticstoplinks.js +2 -1
- package/dist/esm/models/components/partneranalyticstoplinks.js.map +1 -1
- package/dist/esm/models/operations/createpartner.d.ts +56 -56
- package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
- package/dist/esm/models/operations/createpartner.js +71 -77
- package/dist/esm/models/operations/createpartner.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +58 -105
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +12 -43
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listpartners.d.ts +56 -56
- package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
- package/dist/esm/models/operations/listpartners.js +77 -72
- package/dist/esm/models/operations/listpartners.js.map +1 -1
- package/dist/esm/models/operations/retrieveanalytics.d.ts +58 -105
- package/dist/esm/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/esm/models/operations/retrieveanalytics.js +12 -45
- package/dist/esm/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/esm/models/operations/retrievepartneranalytics.d.ts +1 -1
- package/dist/esm/sdk/customers.d.ts +6 -6
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/customers.js +8 -8
- package/dist/esm/sdk/customers.js.map +1 -1
- package/dist/esm/sdk/domains.d.ts +10 -10
- package/dist/esm/sdk/domains.d.ts.map +1 -1
- package/dist/esm/sdk/domains.js +13 -13
- package/dist/esm/sdk/domains.js.map +1 -1
- package/dist/esm/sdk/folders.d.ts +10 -10
- package/dist/esm/sdk/folders.d.ts.map +1 -1
- package/dist/esm/sdk/folders.js +13 -13
- package/dist/esm/sdk/folders.js.map +1 -1
- package/dist/esm/sdk/links.d.ts +19 -19
- package/dist/esm/sdk/links.d.ts.map +1 -1
- package/dist/esm/sdk/links.js +24 -24
- package/dist/esm/sdk/links.js.map +1 -1
- package/dist/esm/sdk/partners.d.ts +10 -10
- package/dist/esm/sdk/partners.d.ts.map +1 -1
- package/dist/esm/sdk/partners.js +13 -13
- package/dist/esm/sdk/partners.js.map +1 -1
- package/dist/esm/sdk/tags.d.ts +10 -10
- package/dist/esm/sdk/tags.d.ts.map +1 -1
- package/dist/esm/sdk/tags.js +13 -13
- package/dist/esm/sdk/tags.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsRetrieve.ts +0 -1
- package/src/funcs/eventsList.ts +0 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/analyticstoplinks.ts +8 -3
- package/src/models/components/partneranalyticstoplinks.ts +8 -3
- package/src/models/operations/createpartner.ts +233 -194
- package/src/models/operations/listevents.ts +70 -140
- package/src/models/operations/listpartners.ts +194 -231
- package/src/models/operations/retrieveanalytics.ts +70 -140
- package/src/models/operations/retrievepartneranalytics.ts +1 -1
- package/src/sdk/customers.ts +14 -14
- package/src/sdk/domains.ts +24 -24
- package/src/sdk/folders.ts +24 -24
- package/src/sdk/links.ts +36 -36
- package/src/sdk/partners.ts +23 -23
- package/src/sdk/tags.ts +24 -24
|
@@ -178,7 +178,7 @@ export const CreatePartnerStatus = {
|
|
|
178
178
|
*/
|
|
179
179
|
export type CreatePartnerStatus = ClosedEnum<typeof CreatePartnerStatus>;
|
|
180
180
|
|
|
181
|
-
export type
|
|
181
|
+
export type CreatePartnerLinks = {
|
|
182
182
|
/**
|
|
183
183
|
* The unique ID of the short link.
|
|
184
184
|
*/
|
|
@@ -224,7 +224,7 @@ export type Links = {
|
|
|
224
224
|
/**
|
|
225
225
|
* If the partner was banned from the program, this is the reason for the ban.
|
|
226
226
|
*/
|
|
227
|
-
export const
|
|
227
|
+
export const CreatePartnerBannedReason = {
|
|
228
228
|
TosViolation: "tos_violation",
|
|
229
229
|
InappropriateContent: "inappropriate_content",
|
|
230
230
|
FakeTraffic: "fake_traffic",
|
|
@@ -235,9 +235,11 @@ export const BannedReason = {
|
|
|
235
235
|
/**
|
|
236
236
|
* If the partner was banned from the program, this is the reason for the ban.
|
|
237
237
|
*/
|
|
238
|
-
export type
|
|
238
|
+
export type CreatePartnerBannedReason = ClosedEnum<
|
|
239
|
+
typeof CreatePartnerBannedReason
|
|
240
|
+
>;
|
|
239
241
|
|
|
240
|
-
export type
|
|
242
|
+
export type Fields8 = {
|
|
241
243
|
key: string;
|
|
242
244
|
label: string;
|
|
243
245
|
required: boolean;
|
|
@@ -246,7 +248,7 @@ export type Eight = {
|
|
|
246
248
|
type: "phone";
|
|
247
249
|
};
|
|
248
250
|
|
|
249
|
-
export type
|
|
251
|
+
export type Fields7 = {
|
|
250
252
|
key: string;
|
|
251
253
|
label: string;
|
|
252
254
|
required: boolean;
|
|
@@ -255,22 +257,22 @@ export type Seven = {
|
|
|
255
257
|
type: "number";
|
|
256
258
|
};
|
|
257
259
|
|
|
258
|
-
export type
|
|
260
|
+
export type CreatePartnerFieldsPartnersOptions = {
|
|
259
261
|
label: string;
|
|
260
262
|
value: string;
|
|
261
263
|
};
|
|
262
264
|
|
|
263
|
-
export type
|
|
265
|
+
export type Fields6 = {
|
|
264
266
|
key: string;
|
|
265
267
|
label: string;
|
|
266
268
|
required: boolean;
|
|
267
269
|
locked: boolean;
|
|
268
270
|
position: number;
|
|
269
271
|
type: "multiSelect";
|
|
270
|
-
options: Array<
|
|
272
|
+
options: Array<CreatePartnerFieldsPartnersOptions>;
|
|
271
273
|
};
|
|
272
274
|
|
|
273
|
-
export type
|
|
275
|
+
export type Fields5 = {
|
|
274
276
|
key: string;
|
|
275
277
|
label: string;
|
|
276
278
|
required: boolean;
|
|
@@ -279,7 +281,7 @@ export type Five = {
|
|
|
279
281
|
type: "date";
|
|
280
282
|
};
|
|
281
283
|
|
|
282
|
-
export type
|
|
284
|
+
export type CreatePartnerFields4 = {
|
|
283
285
|
key: string;
|
|
284
286
|
label: string;
|
|
285
287
|
required: boolean;
|
|
@@ -288,63 +290,70 @@ export type Fields4 = {
|
|
|
288
290
|
type: "country";
|
|
289
291
|
};
|
|
290
292
|
|
|
291
|
-
export type
|
|
293
|
+
export type CreatePartnerFieldsOptions = {
|
|
292
294
|
label: string;
|
|
293
295
|
value: string;
|
|
294
296
|
};
|
|
295
297
|
|
|
296
|
-
export type
|
|
298
|
+
export type CreatePartnerFields3 = {
|
|
297
299
|
key: string;
|
|
298
300
|
label: string;
|
|
299
301
|
required: boolean;
|
|
300
302
|
locked: boolean;
|
|
301
303
|
position: number;
|
|
302
304
|
type: "select";
|
|
303
|
-
options: Array<
|
|
305
|
+
options: Array<CreatePartnerFieldsOptions>;
|
|
304
306
|
};
|
|
305
307
|
|
|
306
|
-
export type
|
|
308
|
+
export type CreatePartnerFieldsPartnersConstraints = {
|
|
307
309
|
maxLength?: number | undefined;
|
|
308
310
|
};
|
|
309
311
|
|
|
310
|
-
export type
|
|
312
|
+
export type CreatePartnerFields2 = {
|
|
311
313
|
key: string;
|
|
312
314
|
label: string;
|
|
313
315
|
required: boolean;
|
|
314
316
|
locked: boolean;
|
|
315
317
|
position: number;
|
|
316
318
|
type: "textarea";
|
|
317
|
-
constraints?:
|
|
319
|
+
constraints?: CreatePartnerFieldsPartnersConstraints | undefined;
|
|
318
320
|
};
|
|
319
321
|
|
|
320
|
-
export type
|
|
322
|
+
export type CreatePartnerFieldsConstraints = {
|
|
321
323
|
maxLength?: number | undefined;
|
|
322
324
|
pattern?: string | undefined;
|
|
323
325
|
};
|
|
324
326
|
|
|
325
|
-
export type
|
|
327
|
+
export type CreatePartnerFields1 = {
|
|
326
328
|
key: string;
|
|
327
329
|
label: string;
|
|
328
330
|
required: boolean;
|
|
329
331
|
locked: boolean;
|
|
330
332
|
position: number;
|
|
331
333
|
type: "text";
|
|
332
|
-
constraints?:
|
|
334
|
+
constraints?: CreatePartnerFieldsConstraints | undefined;
|
|
333
335
|
};
|
|
334
336
|
|
|
335
|
-
export type
|
|
336
|
-
|
|
|
337
|
-
|
|
|
338
|
-
|
|
|
339
|
-
|
|
|
340
|
-
|
|
|
341
|
-
|
|
|
342
|
-
|
|
|
343
|
-
|
|
|
344
|
-
|
|
345
|
-
export type
|
|
337
|
+
export type CreatePartnerFields =
|
|
338
|
+
| CreatePartnerFields1
|
|
339
|
+
| CreatePartnerFields2
|
|
340
|
+
| CreatePartnerFields3
|
|
341
|
+
| CreatePartnerFields4
|
|
342
|
+
| Fields5
|
|
343
|
+
| Fields6
|
|
344
|
+
| Fields7
|
|
345
|
+
| Fields8;
|
|
346
|
+
|
|
347
|
+
export type CreatePartnerReferralFormData = {
|
|
346
348
|
fields: Array<
|
|
347
|
-
|
|
349
|
+
| CreatePartnerFields1
|
|
350
|
+
| CreatePartnerFields2
|
|
351
|
+
| CreatePartnerFields3
|
|
352
|
+
| CreatePartnerFields4
|
|
353
|
+
| Fields5
|
|
354
|
+
| Fields6
|
|
355
|
+
| Fields7
|
|
356
|
+
| Fields8
|
|
348
357
|
>;
|
|
349
358
|
};
|
|
350
359
|
|
|
@@ -420,7 +429,7 @@ export type CreatePartnerResponseBody = {
|
|
|
420
429
|
/**
|
|
421
430
|
* The partner's referral links in this program.
|
|
422
431
|
*/
|
|
423
|
-
links: Array<
|
|
432
|
+
links: Array<CreatePartnerLinks> | null;
|
|
424
433
|
/**
|
|
425
434
|
* The total commissions paid to the partner for their referrals
|
|
426
435
|
*/
|
|
@@ -440,8 +449,8 @@ export type CreatePartnerResponseBody = {
|
|
|
440
449
|
/**
|
|
441
450
|
* If the partner was banned from the program, this is the reason for the ban.
|
|
442
451
|
*/
|
|
443
|
-
bannedReason?:
|
|
444
|
-
referralFormData?:
|
|
452
|
+
bannedReason?: CreatePartnerBannedReason | null | undefined;
|
|
453
|
+
referralFormData?: CreatePartnerReferralFormData | null | undefined;
|
|
445
454
|
/**
|
|
446
455
|
* The total number of clicks on the partner's links
|
|
447
456
|
*/
|
|
@@ -684,37 +693,41 @@ export const CreatePartnerStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
684
693
|
> = z.nativeEnum(CreatePartnerStatus);
|
|
685
694
|
|
|
686
695
|
/** @internal */
|
|
687
|
-
export const
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
696
|
+
export const CreatePartnerLinks$inboundSchema: z.ZodType<
|
|
697
|
+
CreatePartnerLinks,
|
|
698
|
+
z.ZodTypeDef,
|
|
699
|
+
unknown
|
|
700
|
+
> = z.object({
|
|
701
|
+
id: z.string(),
|
|
702
|
+
domain: z.string(),
|
|
703
|
+
key: z.string(),
|
|
704
|
+
shortLink: z.string(),
|
|
705
|
+
url: z.string(),
|
|
706
|
+
clicks: z.number().default(0),
|
|
707
|
+
leads: z.number().default(0),
|
|
708
|
+
conversions: z.number().default(0),
|
|
709
|
+
sales: z.number().default(0),
|
|
710
|
+
saleAmount: z.number().default(0),
|
|
711
|
+
});
|
|
700
712
|
|
|
701
|
-
export function
|
|
713
|
+
export function createPartnerLinksFromJSON(
|
|
702
714
|
jsonString: string,
|
|
703
|
-
): SafeParseResult<
|
|
715
|
+
): SafeParseResult<CreatePartnerLinks, SDKValidationError> {
|
|
704
716
|
return safeParse(
|
|
705
717
|
jsonString,
|
|
706
|
-
(x) =>
|
|
707
|
-
`Failed to parse '
|
|
718
|
+
(x) => CreatePartnerLinks$inboundSchema.parse(JSON.parse(x)),
|
|
719
|
+
`Failed to parse 'CreatePartnerLinks' from JSON`,
|
|
708
720
|
);
|
|
709
721
|
}
|
|
710
722
|
|
|
711
723
|
/** @internal */
|
|
712
|
-
export const
|
|
713
|
-
|
|
724
|
+
export const CreatePartnerBannedReason$inboundSchema: z.ZodNativeEnum<
|
|
725
|
+
typeof CreatePartnerBannedReason
|
|
726
|
+
> = z.nativeEnum(CreatePartnerBannedReason);
|
|
714
727
|
|
|
715
728
|
/** @internal */
|
|
716
|
-
export const
|
|
717
|
-
.object({
|
|
729
|
+
export const Fields8$inboundSchema: z.ZodType<Fields8, z.ZodTypeDef, unknown> =
|
|
730
|
+
z.object({
|
|
718
731
|
key: z.string(),
|
|
719
732
|
label: z.string(),
|
|
720
733
|
required: z.boolean(),
|
|
@@ -723,19 +736,19 @@ export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
|
|
|
723
736
|
type: z.literal("phone"),
|
|
724
737
|
});
|
|
725
738
|
|
|
726
|
-
export function
|
|
739
|
+
export function fields8FromJSON(
|
|
727
740
|
jsonString: string,
|
|
728
|
-
): SafeParseResult<
|
|
741
|
+
): SafeParseResult<Fields8, SDKValidationError> {
|
|
729
742
|
return safeParse(
|
|
730
743
|
jsonString,
|
|
731
|
-
(x) =>
|
|
732
|
-
`Failed to parse '
|
|
744
|
+
(x) => Fields8$inboundSchema.parse(JSON.parse(x)),
|
|
745
|
+
`Failed to parse 'Fields8' from JSON`,
|
|
733
746
|
);
|
|
734
747
|
}
|
|
735
748
|
|
|
736
749
|
/** @internal */
|
|
737
|
-
export const
|
|
738
|
-
.object({
|
|
750
|
+
export const Fields7$inboundSchema: z.ZodType<Fields7, z.ZodTypeDef, unknown> =
|
|
751
|
+
z.object({
|
|
739
752
|
key: z.string(),
|
|
740
753
|
label: z.string(),
|
|
741
754
|
required: z.boolean(),
|
|
@@ -744,19 +757,19 @@ export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
|
|
|
744
757
|
type: z.literal("number"),
|
|
745
758
|
});
|
|
746
759
|
|
|
747
|
-
export function
|
|
760
|
+
export function fields7FromJSON(
|
|
748
761
|
jsonString: string,
|
|
749
|
-
): SafeParseResult<
|
|
762
|
+
): SafeParseResult<Fields7, SDKValidationError> {
|
|
750
763
|
return safeParse(
|
|
751
764
|
jsonString,
|
|
752
|
-
(x) =>
|
|
753
|
-
`Failed to parse '
|
|
765
|
+
(x) => Fields7$inboundSchema.parse(JSON.parse(x)),
|
|
766
|
+
`Failed to parse 'Fields7' from JSON`,
|
|
754
767
|
);
|
|
755
768
|
}
|
|
756
769
|
|
|
757
770
|
/** @internal */
|
|
758
|
-
export const
|
|
759
|
-
|
|
771
|
+
export const CreatePartnerFieldsPartnersOptions$inboundSchema: z.ZodType<
|
|
772
|
+
CreatePartnerFieldsPartnersOptions,
|
|
760
773
|
z.ZodTypeDef,
|
|
761
774
|
unknown
|
|
762
775
|
> = z.object({
|
|
@@ -764,41 +777,44 @@ export const FieldsOptions$inboundSchema: z.ZodType<
|
|
|
764
777
|
value: z.string(),
|
|
765
778
|
});
|
|
766
779
|
|
|
767
|
-
export function
|
|
780
|
+
export function createPartnerFieldsPartnersOptionsFromJSON(
|
|
768
781
|
jsonString: string,
|
|
769
|
-
): SafeParseResult<
|
|
782
|
+
): SafeParseResult<CreatePartnerFieldsPartnersOptions, SDKValidationError> {
|
|
770
783
|
return safeParse(
|
|
771
784
|
jsonString,
|
|
772
|
-
(x) =>
|
|
773
|
-
|
|
785
|
+
(x) =>
|
|
786
|
+
CreatePartnerFieldsPartnersOptions$inboundSchema.parse(JSON.parse(x)),
|
|
787
|
+
`Failed to parse 'CreatePartnerFieldsPartnersOptions' from JSON`,
|
|
774
788
|
);
|
|
775
789
|
}
|
|
776
790
|
|
|
777
791
|
/** @internal */
|
|
778
|
-
export const
|
|
779
|
-
.object({
|
|
792
|
+
export const Fields6$inboundSchema: z.ZodType<Fields6, z.ZodTypeDef, unknown> =
|
|
793
|
+
z.object({
|
|
780
794
|
key: z.string(),
|
|
781
795
|
label: z.string(),
|
|
782
796
|
required: z.boolean(),
|
|
783
797
|
locked: z.boolean(),
|
|
784
798
|
position: z.number().int(),
|
|
785
799
|
type: z.literal("multiSelect"),
|
|
786
|
-
options: z.array(
|
|
800
|
+
options: z.array(
|
|
801
|
+
z.lazy(() => CreatePartnerFieldsPartnersOptions$inboundSchema),
|
|
802
|
+
),
|
|
787
803
|
});
|
|
788
804
|
|
|
789
|
-
export function
|
|
805
|
+
export function fields6FromJSON(
|
|
790
806
|
jsonString: string,
|
|
791
|
-
): SafeParseResult<
|
|
807
|
+
): SafeParseResult<Fields6, SDKValidationError> {
|
|
792
808
|
return safeParse(
|
|
793
809
|
jsonString,
|
|
794
|
-
(x) =>
|
|
795
|
-
`Failed to parse '
|
|
810
|
+
(x) => Fields6$inboundSchema.parse(JSON.parse(x)),
|
|
811
|
+
`Failed to parse 'Fields6' from JSON`,
|
|
796
812
|
);
|
|
797
813
|
}
|
|
798
814
|
|
|
799
815
|
/** @internal */
|
|
800
|
-
export const
|
|
801
|
-
.object({
|
|
816
|
+
export const Fields5$inboundSchema: z.ZodType<Fields5, z.ZodTypeDef, unknown> =
|
|
817
|
+
z.object({
|
|
802
818
|
key: z.string(),
|
|
803
819
|
label: z.string(),
|
|
804
820
|
required: z.boolean(),
|
|
@@ -807,120 +823,135 @@ export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
|
807
823
|
type: z.literal("date"),
|
|
808
824
|
});
|
|
809
825
|
|
|
810
|
-
export function
|
|
826
|
+
export function fields5FromJSON(
|
|
811
827
|
jsonString: string,
|
|
812
|
-
): SafeParseResult<
|
|
828
|
+
): SafeParseResult<Fields5, SDKValidationError> {
|
|
813
829
|
return safeParse(
|
|
814
830
|
jsonString,
|
|
815
|
-
(x) =>
|
|
816
|
-
`Failed to parse '
|
|
831
|
+
(x) => Fields5$inboundSchema.parse(JSON.parse(x)),
|
|
832
|
+
`Failed to parse 'Fields5' from JSON`,
|
|
817
833
|
);
|
|
818
834
|
}
|
|
819
835
|
|
|
820
836
|
/** @internal */
|
|
821
|
-
export const
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
837
|
+
export const CreatePartnerFields4$inboundSchema: z.ZodType<
|
|
838
|
+
CreatePartnerFields4,
|
|
839
|
+
z.ZodTypeDef,
|
|
840
|
+
unknown
|
|
841
|
+
> = z.object({
|
|
842
|
+
key: z.string(),
|
|
843
|
+
label: z.string(),
|
|
844
|
+
required: z.boolean(),
|
|
845
|
+
locked: z.boolean(),
|
|
846
|
+
position: z.number().int(),
|
|
847
|
+
type: z.literal("country"),
|
|
848
|
+
});
|
|
830
849
|
|
|
831
|
-
export function
|
|
850
|
+
export function createPartnerFields4FromJSON(
|
|
832
851
|
jsonString: string,
|
|
833
|
-
): SafeParseResult<
|
|
852
|
+
): SafeParseResult<CreatePartnerFields4, SDKValidationError> {
|
|
834
853
|
return safeParse(
|
|
835
854
|
jsonString,
|
|
836
|
-
(x) =>
|
|
837
|
-
`Failed to parse '
|
|
855
|
+
(x) => CreatePartnerFields4$inboundSchema.parse(JSON.parse(x)),
|
|
856
|
+
`Failed to parse 'CreatePartnerFields4' from JSON`,
|
|
838
857
|
);
|
|
839
858
|
}
|
|
840
859
|
|
|
841
860
|
/** @internal */
|
|
842
|
-
export const
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
861
|
+
export const CreatePartnerFieldsOptions$inboundSchema: z.ZodType<
|
|
862
|
+
CreatePartnerFieldsOptions,
|
|
863
|
+
z.ZodTypeDef,
|
|
864
|
+
unknown
|
|
865
|
+
> = z.object({
|
|
866
|
+
label: z.string(),
|
|
867
|
+
value: z.string(),
|
|
868
|
+
});
|
|
847
869
|
|
|
848
|
-
export function
|
|
870
|
+
export function createPartnerFieldsOptionsFromJSON(
|
|
849
871
|
jsonString: string,
|
|
850
|
-
): SafeParseResult<
|
|
872
|
+
): SafeParseResult<CreatePartnerFieldsOptions, SDKValidationError> {
|
|
851
873
|
return safeParse(
|
|
852
874
|
jsonString,
|
|
853
|
-
(x) =>
|
|
854
|
-
`Failed to parse '
|
|
875
|
+
(x) => CreatePartnerFieldsOptions$inboundSchema.parse(JSON.parse(x)),
|
|
876
|
+
`Failed to parse 'CreatePartnerFieldsOptions' from JSON`,
|
|
855
877
|
);
|
|
856
878
|
}
|
|
857
879
|
|
|
858
880
|
/** @internal */
|
|
859
|
-
export const
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
881
|
+
export const CreatePartnerFields3$inboundSchema: z.ZodType<
|
|
882
|
+
CreatePartnerFields3,
|
|
883
|
+
z.ZodTypeDef,
|
|
884
|
+
unknown
|
|
885
|
+
> = z.object({
|
|
886
|
+
key: z.string(),
|
|
887
|
+
label: z.string(),
|
|
888
|
+
required: z.boolean(),
|
|
889
|
+
locked: z.boolean(),
|
|
890
|
+
position: z.number().int(),
|
|
891
|
+
type: z.literal("select"),
|
|
892
|
+
options: z.array(z.lazy(() => CreatePartnerFieldsOptions$inboundSchema)),
|
|
893
|
+
});
|
|
869
894
|
|
|
870
|
-
export function
|
|
895
|
+
export function createPartnerFields3FromJSON(
|
|
871
896
|
jsonString: string,
|
|
872
|
-
): SafeParseResult<
|
|
897
|
+
): SafeParseResult<CreatePartnerFields3, SDKValidationError> {
|
|
873
898
|
return safeParse(
|
|
874
899
|
jsonString,
|
|
875
|
-
(x) =>
|
|
876
|
-
`Failed to parse '
|
|
900
|
+
(x) => CreatePartnerFields3$inboundSchema.parse(JSON.parse(x)),
|
|
901
|
+
`Failed to parse 'CreatePartnerFields3' from JSON`,
|
|
877
902
|
);
|
|
878
903
|
}
|
|
879
904
|
|
|
880
905
|
/** @internal */
|
|
881
|
-
export const
|
|
882
|
-
|
|
906
|
+
export const CreatePartnerFieldsPartnersConstraints$inboundSchema: z.ZodType<
|
|
907
|
+
CreatePartnerFieldsPartnersConstraints,
|
|
883
908
|
z.ZodTypeDef,
|
|
884
909
|
unknown
|
|
885
910
|
> = z.object({
|
|
886
911
|
maxLength: z.number().int().optional(),
|
|
887
912
|
});
|
|
888
913
|
|
|
889
|
-
export function
|
|
914
|
+
export function createPartnerFieldsPartnersConstraintsFromJSON(
|
|
890
915
|
jsonString: string,
|
|
891
|
-
): SafeParseResult<
|
|
916
|
+
): SafeParseResult<CreatePartnerFieldsPartnersConstraints, SDKValidationError> {
|
|
892
917
|
return safeParse(
|
|
893
918
|
jsonString,
|
|
894
|
-
(x) =>
|
|
895
|
-
|
|
919
|
+
(x) =>
|
|
920
|
+
CreatePartnerFieldsPartnersConstraints$inboundSchema.parse(JSON.parse(x)),
|
|
921
|
+
`Failed to parse 'CreatePartnerFieldsPartnersConstraints' from JSON`,
|
|
896
922
|
);
|
|
897
923
|
}
|
|
898
924
|
|
|
899
925
|
/** @internal */
|
|
900
|
-
export const
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
926
|
+
export const CreatePartnerFields2$inboundSchema: z.ZodType<
|
|
927
|
+
CreatePartnerFields2,
|
|
928
|
+
z.ZodTypeDef,
|
|
929
|
+
unknown
|
|
930
|
+
> = z.object({
|
|
931
|
+
key: z.string(),
|
|
932
|
+
label: z.string(),
|
|
933
|
+
required: z.boolean(),
|
|
934
|
+
locked: z.boolean(),
|
|
935
|
+
position: z.number().int(),
|
|
936
|
+
type: z.literal("textarea"),
|
|
937
|
+
constraints: z.lazy(() =>
|
|
938
|
+
CreatePartnerFieldsPartnersConstraints$inboundSchema
|
|
939
|
+
).optional(),
|
|
940
|
+
});
|
|
910
941
|
|
|
911
|
-
export function
|
|
942
|
+
export function createPartnerFields2FromJSON(
|
|
912
943
|
jsonString: string,
|
|
913
|
-
): SafeParseResult<
|
|
944
|
+
): SafeParseResult<CreatePartnerFields2, SDKValidationError> {
|
|
914
945
|
return safeParse(
|
|
915
946
|
jsonString,
|
|
916
|
-
(x) =>
|
|
917
|
-
`Failed to parse '
|
|
947
|
+
(x) => CreatePartnerFields2$inboundSchema.parse(JSON.parse(x)),
|
|
948
|
+
`Failed to parse 'CreatePartnerFields2' from JSON`,
|
|
918
949
|
);
|
|
919
950
|
}
|
|
920
951
|
|
|
921
952
|
/** @internal */
|
|
922
|
-
export const
|
|
923
|
-
|
|
953
|
+
export const CreatePartnerFieldsConstraints$inboundSchema: z.ZodType<
|
|
954
|
+
CreatePartnerFieldsConstraints,
|
|
924
955
|
z.ZodTypeDef,
|
|
925
956
|
unknown
|
|
926
957
|
> = z.object({
|
|
@@ -928,88 +959,95 @@ export const Constraints$inboundSchema: z.ZodType<
|
|
|
928
959
|
pattern: z.string().optional(),
|
|
929
960
|
});
|
|
930
961
|
|
|
931
|
-
export function
|
|
962
|
+
export function createPartnerFieldsConstraintsFromJSON(
|
|
932
963
|
jsonString: string,
|
|
933
|
-
): SafeParseResult<
|
|
964
|
+
): SafeParseResult<CreatePartnerFieldsConstraints, SDKValidationError> {
|
|
934
965
|
return safeParse(
|
|
935
966
|
jsonString,
|
|
936
|
-
(x) =>
|
|
937
|
-
`Failed to parse '
|
|
967
|
+
(x) => CreatePartnerFieldsConstraints$inboundSchema.parse(JSON.parse(x)),
|
|
968
|
+
`Failed to parse 'CreatePartnerFieldsConstraints' from JSON`,
|
|
938
969
|
);
|
|
939
970
|
}
|
|
940
971
|
|
|
941
972
|
/** @internal */
|
|
942
|
-
export const
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
973
|
+
export const CreatePartnerFields1$inboundSchema: z.ZodType<
|
|
974
|
+
CreatePartnerFields1,
|
|
975
|
+
z.ZodTypeDef,
|
|
976
|
+
unknown
|
|
977
|
+
> = z.object({
|
|
978
|
+
key: z.string(),
|
|
979
|
+
label: z.string(),
|
|
980
|
+
required: z.boolean(),
|
|
981
|
+
locked: z.boolean(),
|
|
982
|
+
position: z.number().int(),
|
|
983
|
+
type: z.literal("text"),
|
|
984
|
+
constraints: z.lazy(() => CreatePartnerFieldsConstraints$inboundSchema)
|
|
985
|
+
.optional(),
|
|
986
|
+
});
|
|
952
987
|
|
|
953
|
-
export function
|
|
988
|
+
export function createPartnerFields1FromJSON(
|
|
954
989
|
jsonString: string,
|
|
955
|
-
): SafeParseResult<
|
|
990
|
+
): SafeParseResult<CreatePartnerFields1, SDKValidationError> {
|
|
956
991
|
return safeParse(
|
|
957
992
|
jsonString,
|
|
958
|
-
(x) =>
|
|
959
|
-
`Failed to parse '
|
|
993
|
+
(x) => CreatePartnerFields1$inboundSchema.parse(JSON.parse(x)),
|
|
994
|
+
`Failed to parse 'CreatePartnerFields1' from JSON`,
|
|
960
995
|
);
|
|
961
996
|
}
|
|
962
997
|
|
|
963
998
|
/** @internal */
|
|
964
|
-
export const
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
999
|
+
export const CreatePartnerFields$inboundSchema: z.ZodType<
|
|
1000
|
+
CreatePartnerFields,
|
|
1001
|
+
z.ZodTypeDef,
|
|
1002
|
+
unknown
|
|
1003
|
+
> = z.union([
|
|
1004
|
+
z.lazy(() => CreatePartnerFields1$inboundSchema),
|
|
1005
|
+
z.lazy(() => CreatePartnerFields2$inboundSchema),
|
|
1006
|
+
z.lazy(() => CreatePartnerFields3$inboundSchema),
|
|
1007
|
+
z.lazy(() => CreatePartnerFields4$inboundSchema),
|
|
1008
|
+
z.lazy(() => Fields5$inboundSchema),
|
|
1009
|
+
z.lazy(() => Fields6$inboundSchema),
|
|
1010
|
+
z.lazy(() => Fields7$inboundSchema),
|
|
1011
|
+
z.lazy(() => Fields8$inboundSchema),
|
|
1012
|
+
]);
|
|
1013
|
+
|
|
1014
|
+
export function createPartnerFieldsFromJSON(
|
|
977
1015
|
jsonString: string,
|
|
978
|
-
): SafeParseResult<
|
|
1016
|
+
): SafeParseResult<CreatePartnerFields, SDKValidationError> {
|
|
979
1017
|
return safeParse(
|
|
980
1018
|
jsonString,
|
|
981
|
-
(x) =>
|
|
982
|
-
`Failed to parse '
|
|
1019
|
+
(x) => CreatePartnerFields$inboundSchema.parse(JSON.parse(x)),
|
|
1020
|
+
`Failed to parse 'CreatePartnerFields' from JSON`,
|
|
983
1021
|
);
|
|
984
1022
|
}
|
|
985
1023
|
|
|
986
1024
|
/** @internal */
|
|
987
|
-
export const
|
|
988
|
-
|
|
1025
|
+
export const CreatePartnerReferralFormData$inboundSchema: z.ZodType<
|
|
1026
|
+
CreatePartnerReferralFormData,
|
|
989
1027
|
z.ZodTypeDef,
|
|
990
1028
|
unknown
|
|
991
1029
|
> = z.object({
|
|
992
1030
|
fields: z.array(
|
|
993
1031
|
z.union([
|
|
994
|
-
z.lazy(() =>
|
|
995
|
-
z.lazy(() =>
|
|
996
|
-
z.lazy(() =>
|
|
997
|
-
z.lazy(() =>
|
|
998
|
-
z.lazy(() =>
|
|
999
|
-
z.lazy(() =>
|
|
1000
|
-
z.lazy(() =>
|
|
1001
|
-
z.lazy(() =>
|
|
1032
|
+
z.lazy(() => CreatePartnerFields1$inboundSchema),
|
|
1033
|
+
z.lazy(() => CreatePartnerFields2$inboundSchema),
|
|
1034
|
+
z.lazy(() => CreatePartnerFields3$inboundSchema),
|
|
1035
|
+
z.lazy(() => CreatePartnerFields4$inboundSchema),
|
|
1036
|
+
z.lazy(() => Fields5$inboundSchema),
|
|
1037
|
+
z.lazy(() => Fields6$inboundSchema),
|
|
1038
|
+
z.lazy(() => Fields7$inboundSchema),
|
|
1039
|
+
z.lazy(() => Fields8$inboundSchema),
|
|
1002
1040
|
]),
|
|
1003
1041
|
),
|
|
1004
1042
|
});
|
|
1005
1043
|
|
|
1006
|
-
export function
|
|
1044
|
+
export function createPartnerReferralFormDataFromJSON(
|
|
1007
1045
|
jsonString: string,
|
|
1008
|
-
): SafeParseResult<
|
|
1046
|
+
): SafeParseResult<CreatePartnerReferralFormData, SDKValidationError> {
|
|
1009
1047
|
return safeParse(
|
|
1010
1048
|
jsonString,
|
|
1011
|
-
(x) =>
|
|
1012
|
-
`Failed to parse '
|
|
1049
|
+
(x) => CreatePartnerReferralFormData$inboundSchema.parse(JSON.parse(x)),
|
|
1050
|
+
`Failed to parse 'CreatePartnerReferralFormData' from JSON`,
|
|
1013
1051
|
);
|
|
1014
1052
|
}
|
|
1015
1053
|
|
|
@@ -1036,7 +1074,7 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1036
1074
|
tenantId: z.nullable(z.string()),
|
|
1037
1075
|
createdAt: z.string(),
|
|
1038
1076
|
status: CreatePartnerStatus$inboundSchema,
|
|
1039
|
-
links: z.nullable(z.array(z.lazy(() =>
|
|
1077
|
+
links: z.nullable(z.array(z.lazy(() => CreatePartnerLinks$inboundSchema))),
|
|
1040
1078
|
totalCommissions: z.number().default(0),
|
|
1041
1079
|
clickRewardId: z.nullable(z.string()).optional(),
|
|
1042
1080
|
leadRewardId: z.nullable(z.string()).optional(),
|
|
@@ -1044,9 +1082,10 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1044
1082
|
discountId: z.nullable(z.string()).optional(),
|
|
1045
1083
|
applicationId: z.nullable(z.string()).optional(),
|
|
1046
1084
|
bannedAt: z.nullable(z.string()).optional(),
|
|
1047
|
-
bannedReason: z.nullable(
|
|
1048
|
-
referralFormData: z.nullable(
|
|
1049
|
-
.
|
|
1085
|
+
bannedReason: z.nullable(CreatePartnerBannedReason$inboundSchema).optional(),
|
|
1086
|
+
referralFormData: z.nullable(
|
|
1087
|
+
z.lazy(() => CreatePartnerReferralFormData$inboundSchema),
|
|
1088
|
+
).optional(),
|
|
1050
1089
|
totalClicks: z.number().default(0),
|
|
1051
1090
|
totalLeads: z.number().default(0),
|
|
1052
1091
|
totalConversions: z.number().default(0),
|