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.
Files changed (84) hide show
  1. package/RUNTIMES.md +26 -0
  2. package/dist/commonjs/lib/config.d.ts +3 -3
  3. package/dist/commonjs/lib/config.js +3 -3
  4. package/dist/commonjs/lib/security.js +1 -1
  5. package/dist/commonjs/lib/security.js.map +1 -1
  6. package/dist/commonjs/models/components/leadcreatedevent.d.ts +122 -0
  7. package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
  8. package/dist/commonjs/models/components/leadcreatedevent.js +120 -1
  9. package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
  10. package/dist/commonjs/models/components/leadevent.d.ts +122 -0
  11. package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/leadevent.js +117 -1
  13. package/dist/commonjs/models/components/leadevent.js.map +1 -1
  14. package/dist/commonjs/models/components/salecreatedevent.d.ts +122 -0
  15. package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/salecreatedevent.js +120 -1
  17. package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
  18. package/dist/commonjs/models/components/saleevent.d.ts +122 -0
  19. package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/saleevent.js +118 -1
  21. package/dist/commonjs/models/components/saleevent.js.map +1 -1
  22. package/dist/commonjs/models/operations/createcustomer.d.ts +123 -0
  23. package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
  24. package/dist/commonjs/models/operations/createcustomer.js +119 -1
  25. package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
  26. package/dist/commonjs/models/operations/getcustomer.d.ts +123 -0
  27. package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
  28. package/dist/commonjs/models/operations/getcustomer.js +119 -1
  29. package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
  30. package/dist/commonjs/models/operations/getcustomers.d.ts +123 -0
  31. package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
  32. package/dist/commonjs/models/operations/getcustomers.js +115 -1
  33. package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
  34. package/dist/commonjs/models/operations/updatecustomer.d.ts +123 -0
  35. package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/updatecustomer.js +119 -1
  37. package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
  38. package/dist/esm/lib/config.d.ts +3 -3
  39. package/dist/esm/lib/config.js +3 -3
  40. package/dist/esm/lib/security.js +1 -1
  41. package/dist/esm/lib/security.js.map +1 -1
  42. package/dist/esm/models/components/leadcreatedevent.d.ts +122 -0
  43. package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
  44. package/dist/esm/models/components/leadcreatedevent.js +114 -0
  45. package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
  46. package/dist/esm/models/components/leadevent.d.ts +122 -0
  47. package/dist/esm/models/components/leadevent.d.ts.map +1 -1
  48. package/dist/esm/models/components/leadevent.js +111 -0
  49. package/dist/esm/models/components/leadevent.js.map +1 -1
  50. package/dist/esm/models/components/salecreatedevent.d.ts +122 -0
  51. package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
  52. package/dist/esm/models/components/salecreatedevent.js +114 -0
  53. package/dist/esm/models/components/salecreatedevent.js.map +1 -1
  54. package/dist/esm/models/components/saleevent.d.ts +122 -0
  55. package/dist/esm/models/components/saleevent.d.ts.map +1 -1
  56. package/dist/esm/models/components/saleevent.js +112 -0
  57. package/dist/esm/models/components/saleevent.js.map +1 -1
  58. package/dist/esm/models/operations/createcustomer.d.ts +123 -0
  59. package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
  60. package/dist/esm/models/operations/createcustomer.js +114 -0
  61. package/dist/esm/models/operations/createcustomer.js.map +1 -1
  62. package/dist/esm/models/operations/getcustomer.d.ts +123 -0
  63. package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
  64. package/dist/esm/models/operations/getcustomer.js +114 -0
  65. package/dist/esm/models/operations/getcustomer.js.map +1 -1
  66. package/dist/esm/models/operations/getcustomers.d.ts +123 -0
  67. package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
  68. package/dist/esm/models/operations/getcustomers.js +110 -0
  69. package/dist/esm/models/operations/getcustomers.js.map +1 -1
  70. package/dist/esm/models/operations/updatecustomer.d.ts +123 -0
  71. package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
  72. package/dist/esm/models/operations/updatecustomer.js +114 -0
  73. package/dist/esm/models/operations/updatecustomer.js.map +1 -1
  74. package/package.json +1 -1
  75. package/src/lib/config.ts +3 -3
  76. package/src/lib/security.ts +1 -1
  77. package/src/models/components/leadcreatedevent.ts +220 -0
  78. package/src/models/components/leadevent.ts +200 -0
  79. package/src/models/components/salecreatedevent.ts +220 -0
  80. package/src/models/components/saleevent.ts +216 -0
  81. package/src/models/operations/createcustomer.ts +219 -0
  82. package/src/models/operations/getcustomer.ts +219 -0
  83. package/src/models/operations/getcustomers.ts +203 -0
  84. package/src/models/operations/updatecustomer.ts +219 -0
@@ -43,6 +43,37 @@ export type SaleCreatedEventDataLink = {
43
43
  programId: string | null;
44
44
  };
45
45
 
46
+ export type SaleCreatedEventPartner = {
47
+ id: string;
48
+ name: string;
49
+ email: string;
50
+ image?: string | null | undefined;
51
+ };
52
+
53
+ export const SaleCreatedEventType = {
54
+ Percentage: "percentage",
55
+ Flat: "flat",
56
+ } as const;
57
+ export type SaleCreatedEventType = ClosedEnum<typeof SaleCreatedEventType>;
58
+
59
+ export const SaleCreatedEventInterval = {
60
+ Month: "month",
61
+ Year: "year",
62
+ } as const;
63
+ export type SaleCreatedEventInterval = ClosedEnum<
64
+ typeof SaleCreatedEventInterval
65
+ >;
66
+
67
+ export type SaleCreatedEventDiscount = {
68
+ id: string;
69
+ couponId: string | null;
70
+ couponTestId: string | null;
71
+ amount: number;
72
+ type: SaleCreatedEventType;
73
+ duration: number | null;
74
+ interval: SaleCreatedEventInterval | null;
75
+ };
76
+
46
77
  export type SaleCreatedEventCustomer = {
47
78
  /**
48
79
  * The unique identifier of the customer in Dub.
@@ -73,6 +104,8 @@ export type SaleCreatedEventCustomer = {
73
104
  */
74
105
  createdAt: string;
75
106
  link?: SaleCreatedEventDataLink | null | undefined;
107
+ partner?: SaleCreatedEventPartner | null | undefined;
108
+ discount?: SaleCreatedEventDiscount | null | undefined;
76
109
  };
77
110
 
78
111
  export type SaleCreatedEventClick = {
@@ -599,6 +632,183 @@ export function saleCreatedEventDataLinkFromJSON(
599
632
  );
600
633
  }
601
634
 
635
+ /** @internal */
636
+ export const SaleCreatedEventPartner$inboundSchema: z.ZodType<
637
+ SaleCreatedEventPartner,
638
+ z.ZodTypeDef,
639
+ unknown
640
+ > = z.object({
641
+ id: z.string(),
642
+ name: z.string(),
643
+ email: z.string(),
644
+ image: z.nullable(z.string()).optional(),
645
+ });
646
+
647
+ /** @internal */
648
+ export type SaleCreatedEventPartner$Outbound = {
649
+ id: string;
650
+ name: string;
651
+ email: string;
652
+ image?: string | null | undefined;
653
+ };
654
+
655
+ /** @internal */
656
+ export const SaleCreatedEventPartner$outboundSchema: z.ZodType<
657
+ SaleCreatedEventPartner$Outbound,
658
+ z.ZodTypeDef,
659
+ SaleCreatedEventPartner
660
+ > = z.object({
661
+ id: z.string(),
662
+ name: z.string(),
663
+ email: z.string(),
664
+ image: z.nullable(z.string()).optional(),
665
+ });
666
+
667
+ /**
668
+ * @internal
669
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
670
+ */
671
+ export namespace SaleCreatedEventPartner$ {
672
+ /** @deprecated use `SaleCreatedEventPartner$inboundSchema` instead. */
673
+ export const inboundSchema = SaleCreatedEventPartner$inboundSchema;
674
+ /** @deprecated use `SaleCreatedEventPartner$outboundSchema` instead. */
675
+ export const outboundSchema = SaleCreatedEventPartner$outboundSchema;
676
+ /** @deprecated use `SaleCreatedEventPartner$Outbound` instead. */
677
+ export type Outbound = SaleCreatedEventPartner$Outbound;
678
+ }
679
+
680
+ export function saleCreatedEventPartnerToJSON(
681
+ saleCreatedEventPartner: SaleCreatedEventPartner,
682
+ ): string {
683
+ return JSON.stringify(
684
+ SaleCreatedEventPartner$outboundSchema.parse(saleCreatedEventPartner),
685
+ );
686
+ }
687
+
688
+ export function saleCreatedEventPartnerFromJSON(
689
+ jsonString: string,
690
+ ): SafeParseResult<SaleCreatedEventPartner, SDKValidationError> {
691
+ return safeParse(
692
+ jsonString,
693
+ (x) => SaleCreatedEventPartner$inboundSchema.parse(JSON.parse(x)),
694
+ `Failed to parse 'SaleCreatedEventPartner' from JSON`,
695
+ );
696
+ }
697
+
698
+ /** @internal */
699
+ export const SaleCreatedEventType$inboundSchema: z.ZodNativeEnum<
700
+ typeof SaleCreatedEventType
701
+ > = z.nativeEnum(SaleCreatedEventType);
702
+
703
+ /** @internal */
704
+ export const SaleCreatedEventType$outboundSchema: z.ZodNativeEnum<
705
+ typeof SaleCreatedEventType
706
+ > = SaleCreatedEventType$inboundSchema;
707
+
708
+ /**
709
+ * @internal
710
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
711
+ */
712
+ export namespace SaleCreatedEventType$ {
713
+ /** @deprecated use `SaleCreatedEventType$inboundSchema` instead. */
714
+ export const inboundSchema = SaleCreatedEventType$inboundSchema;
715
+ /** @deprecated use `SaleCreatedEventType$outboundSchema` instead. */
716
+ export const outboundSchema = SaleCreatedEventType$outboundSchema;
717
+ }
718
+
719
+ /** @internal */
720
+ export const SaleCreatedEventInterval$inboundSchema: z.ZodNativeEnum<
721
+ typeof SaleCreatedEventInterval
722
+ > = z.nativeEnum(SaleCreatedEventInterval);
723
+
724
+ /** @internal */
725
+ export const SaleCreatedEventInterval$outboundSchema: z.ZodNativeEnum<
726
+ typeof SaleCreatedEventInterval
727
+ > = SaleCreatedEventInterval$inboundSchema;
728
+
729
+ /**
730
+ * @internal
731
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
732
+ */
733
+ export namespace SaleCreatedEventInterval$ {
734
+ /** @deprecated use `SaleCreatedEventInterval$inboundSchema` instead. */
735
+ export const inboundSchema = SaleCreatedEventInterval$inboundSchema;
736
+ /** @deprecated use `SaleCreatedEventInterval$outboundSchema` instead. */
737
+ export const outboundSchema = SaleCreatedEventInterval$outboundSchema;
738
+ }
739
+
740
+ /** @internal */
741
+ export const SaleCreatedEventDiscount$inboundSchema: z.ZodType<
742
+ SaleCreatedEventDiscount,
743
+ z.ZodTypeDef,
744
+ unknown
745
+ > = z.object({
746
+ id: z.string(),
747
+ couponId: z.nullable(z.string()),
748
+ couponTestId: z.nullable(z.string()),
749
+ amount: z.number(),
750
+ type: SaleCreatedEventType$inboundSchema,
751
+ duration: z.nullable(z.number()),
752
+ interval: z.nullable(SaleCreatedEventInterval$inboundSchema),
753
+ });
754
+
755
+ /** @internal */
756
+ export type SaleCreatedEventDiscount$Outbound = {
757
+ id: string;
758
+ couponId: string | null;
759
+ couponTestId: string | null;
760
+ amount: number;
761
+ type: string;
762
+ duration: number | null;
763
+ interval: string | null;
764
+ };
765
+
766
+ /** @internal */
767
+ export const SaleCreatedEventDiscount$outboundSchema: z.ZodType<
768
+ SaleCreatedEventDiscount$Outbound,
769
+ z.ZodTypeDef,
770
+ SaleCreatedEventDiscount
771
+ > = z.object({
772
+ id: z.string(),
773
+ couponId: z.nullable(z.string()),
774
+ couponTestId: z.nullable(z.string()),
775
+ amount: z.number(),
776
+ type: SaleCreatedEventType$outboundSchema,
777
+ duration: z.nullable(z.number()),
778
+ interval: z.nullable(SaleCreatedEventInterval$outboundSchema),
779
+ });
780
+
781
+ /**
782
+ * @internal
783
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
784
+ */
785
+ export namespace SaleCreatedEventDiscount$ {
786
+ /** @deprecated use `SaleCreatedEventDiscount$inboundSchema` instead. */
787
+ export const inboundSchema = SaleCreatedEventDiscount$inboundSchema;
788
+ /** @deprecated use `SaleCreatedEventDiscount$outboundSchema` instead. */
789
+ export const outboundSchema = SaleCreatedEventDiscount$outboundSchema;
790
+ /** @deprecated use `SaleCreatedEventDiscount$Outbound` instead. */
791
+ export type Outbound = SaleCreatedEventDiscount$Outbound;
792
+ }
793
+
794
+ export function saleCreatedEventDiscountToJSON(
795
+ saleCreatedEventDiscount: SaleCreatedEventDiscount,
796
+ ): string {
797
+ return JSON.stringify(
798
+ SaleCreatedEventDiscount$outboundSchema.parse(saleCreatedEventDiscount),
799
+ );
800
+ }
801
+
802
+ export function saleCreatedEventDiscountFromJSON(
803
+ jsonString: string,
804
+ ): SafeParseResult<SaleCreatedEventDiscount, SDKValidationError> {
805
+ return safeParse(
806
+ jsonString,
807
+ (x) => SaleCreatedEventDiscount$inboundSchema.parse(JSON.parse(x)),
808
+ `Failed to parse 'SaleCreatedEventDiscount' from JSON`,
809
+ );
810
+ }
811
+
602
812
  /** @internal */
603
813
  export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
604
814
  SaleCreatedEventCustomer,
@@ -614,6 +824,10 @@ export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
614
824
  createdAt: z.string(),
615
825
  link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$inboundSchema))
616
826
  .optional(),
827
+ partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$inboundSchema))
828
+ .optional(),
829
+ discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$inboundSchema))
830
+ .optional(),
617
831
  });
618
832
 
619
833
  /** @internal */
@@ -626,6 +840,8 @@ export type SaleCreatedEventCustomer$Outbound = {
626
840
  country?: string | null | undefined;
627
841
  createdAt: string;
628
842
  link?: SaleCreatedEventDataLink$Outbound | null | undefined;
843
+ partner?: SaleCreatedEventPartner$Outbound | null | undefined;
844
+ discount?: SaleCreatedEventDiscount$Outbound | null | undefined;
629
845
  };
630
846
 
631
847
  /** @internal */
@@ -643,6 +859,10 @@ export const SaleCreatedEventCustomer$outboundSchema: z.ZodType<
643
859
  createdAt: z.string(),
644
860
  link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$outboundSchema))
645
861
  .optional(),
862
+ partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$outboundSchema))
863
+ .optional(),
864
+ discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$outboundSchema))
865
+ .optional(),
646
866
  });
647
867
 
648
868
  /**
@@ -455,6 +455,35 @@ export type SaleEventCustomerLink = {
455
455
  programId: string | null;
456
456
  };
457
457
 
458
+ export type SaleEventPartner = {
459
+ id: string;
460
+ name: string;
461
+ email: string;
462
+ image?: string | null | undefined;
463
+ };
464
+
465
+ export const SaleEventType = {
466
+ Percentage: "percentage",
467
+ Flat: "flat",
468
+ } as const;
469
+ export type SaleEventType = ClosedEnum<typeof SaleEventType>;
470
+
471
+ export const SaleEventInterval = {
472
+ Month: "month",
473
+ Year: "year",
474
+ } as const;
475
+ export type SaleEventInterval = ClosedEnum<typeof SaleEventInterval>;
476
+
477
+ export type SaleEventDiscount = {
478
+ id: string;
479
+ couponId: string | null;
480
+ couponTestId: string | null;
481
+ amount: number;
482
+ type: SaleEventType;
483
+ duration: number | null;
484
+ interval: SaleEventInterval | null;
485
+ };
486
+
458
487
  export type SaleEventCustomer = {
459
488
  /**
460
489
  * The unique identifier of the customer in Dub.
@@ -485,6 +514,8 @@ export type SaleEventCustomer = {
485
514
  */
486
515
  createdAt: string;
487
516
  link?: SaleEventCustomerLink | null | undefined;
517
+ partner?: SaleEventPartner | null | undefined;
518
+ discount?: SaleEventDiscount | null | undefined;
488
519
  };
489
520
 
490
521
  /**
@@ -2288,6 +2319,183 @@ export function saleEventCustomerLinkFromJSON(
2288
2319
  );
2289
2320
  }
2290
2321
 
2322
+ /** @internal */
2323
+ export const SaleEventPartner$inboundSchema: z.ZodType<
2324
+ SaleEventPartner,
2325
+ z.ZodTypeDef,
2326
+ unknown
2327
+ > = z.object({
2328
+ id: z.string(),
2329
+ name: z.string(),
2330
+ email: z.string(),
2331
+ image: z.nullable(z.string()).optional(),
2332
+ });
2333
+
2334
+ /** @internal */
2335
+ export type SaleEventPartner$Outbound = {
2336
+ id: string;
2337
+ name: string;
2338
+ email: string;
2339
+ image?: string | null | undefined;
2340
+ };
2341
+
2342
+ /** @internal */
2343
+ export const SaleEventPartner$outboundSchema: z.ZodType<
2344
+ SaleEventPartner$Outbound,
2345
+ z.ZodTypeDef,
2346
+ SaleEventPartner
2347
+ > = z.object({
2348
+ id: z.string(),
2349
+ name: z.string(),
2350
+ email: z.string(),
2351
+ image: z.nullable(z.string()).optional(),
2352
+ });
2353
+
2354
+ /**
2355
+ * @internal
2356
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2357
+ */
2358
+ export namespace SaleEventPartner$ {
2359
+ /** @deprecated use `SaleEventPartner$inboundSchema` instead. */
2360
+ export const inboundSchema = SaleEventPartner$inboundSchema;
2361
+ /** @deprecated use `SaleEventPartner$outboundSchema` instead. */
2362
+ export const outboundSchema = SaleEventPartner$outboundSchema;
2363
+ /** @deprecated use `SaleEventPartner$Outbound` instead. */
2364
+ export type Outbound = SaleEventPartner$Outbound;
2365
+ }
2366
+
2367
+ export function saleEventPartnerToJSON(
2368
+ saleEventPartner: SaleEventPartner,
2369
+ ): string {
2370
+ return JSON.stringify(
2371
+ SaleEventPartner$outboundSchema.parse(saleEventPartner),
2372
+ );
2373
+ }
2374
+
2375
+ export function saleEventPartnerFromJSON(
2376
+ jsonString: string,
2377
+ ): SafeParseResult<SaleEventPartner, SDKValidationError> {
2378
+ return safeParse(
2379
+ jsonString,
2380
+ (x) => SaleEventPartner$inboundSchema.parse(JSON.parse(x)),
2381
+ `Failed to parse 'SaleEventPartner' from JSON`,
2382
+ );
2383
+ }
2384
+
2385
+ /** @internal */
2386
+ export const SaleEventType$inboundSchema: z.ZodNativeEnum<
2387
+ typeof SaleEventType
2388
+ > = z.nativeEnum(SaleEventType);
2389
+
2390
+ /** @internal */
2391
+ export const SaleEventType$outboundSchema: z.ZodNativeEnum<
2392
+ typeof SaleEventType
2393
+ > = SaleEventType$inboundSchema;
2394
+
2395
+ /**
2396
+ * @internal
2397
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2398
+ */
2399
+ export namespace SaleEventType$ {
2400
+ /** @deprecated use `SaleEventType$inboundSchema` instead. */
2401
+ export const inboundSchema = SaleEventType$inboundSchema;
2402
+ /** @deprecated use `SaleEventType$outboundSchema` instead. */
2403
+ export const outboundSchema = SaleEventType$outboundSchema;
2404
+ }
2405
+
2406
+ /** @internal */
2407
+ export const SaleEventInterval$inboundSchema: z.ZodNativeEnum<
2408
+ typeof SaleEventInterval
2409
+ > = z.nativeEnum(SaleEventInterval);
2410
+
2411
+ /** @internal */
2412
+ export const SaleEventInterval$outboundSchema: z.ZodNativeEnum<
2413
+ typeof SaleEventInterval
2414
+ > = SaleEventInterval$inboundSchema;
2415
+
2416
+ /**
2417
+ * @internal
2418
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2419
+ */
2420
+ export namespace SaleEventInterval$ {
2421
+ /** @deprecated use `SaleEventInterval$inboundSchema` instead. */
2422
+ export const inboundSchema = SaleEventInterval$inboundSchema;
2423
+ /** @deprecated use `SaleEventInterval$outboundSchema` instead. */
2424
+ export const outboundSchema = SaleEventInterval$outboundSchema;
2425
+ }
2426
+
2427
+ /** @internal */
2428
+ export const SaleEventDiscount$inboundSchema: z.ZodType<
2429
+ SaleEventDiscount,
2430
+ z.ZodTypeDef,
2431
+ unknown
2432
+ > = z.object({
2433
+ id: z.string(),
2434
+ couponId: z.nullable(z.string()),
2435
+ couponTestId: z.nullable(z.string()),
2436
+ amount: z.number(),
2437
+ type: SaleEventType$inboundSchema,
2438
+ duration: z.nullable(z.number()),
2439
+ interval: z.nullable(SaleEventInterval$inboundSchema),
2440
+ });
2441
+
2442
+ /** @internal */
2443
+ export type SaleEventDiscount$Outbound = {
2444
+ id: string;
2445
+ couponId: string | null;
2446
+ couponTestId: string | null;
2447
+ amount: number;
2448
+ type: string;
2449
+ duration: number | null;
2450
+ interval: string | null;
2451
+ };
2452
+
2453
+ /** @internal */
2454
+ export const SaleEventDiscount$outboundSchema: z.ZodType<
2455
+ SaleEventDiscount$Outbound,
2456
+ z.ZodTypeDef,
2457
+ SaleEventDiscount
2458
+ > = z.object({
2459
+ id: z.string(),
2460
+ couponId: z.nullable(z.string()),
2461
+ couponTestId: z.nullable(z.string()),
2462
+ amount: z.number(),
2463
+ type: SaleEventType$outboundSchema,
2464
+ duration: z.nullable(z.number()),
2465
+ interval: z.nullable(SaleEventInterval$outboundSchema),
2466
+ });
2467
+
2468
+ /**
2469
+ * @internal
2470
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2471
+ */
2472
+ export namespace SaleEventDiscount$ {
2473
+ /** @deprecated use `SaleEventDiscount$inboundSchema` instead. */
2474
+ export const inboundSchema = SaleEventDiscount$inboundSchema;
2475
+ /** @deprecated use `SaleEventDiscount$outboundSchema` instead. */
2476
+ export const outboundSchema = SaleEventDiscount$outboundSchema;
2477
+ /** @deprecated use `SaleEventDiscount$Outbound` instead. */
2478
+ export type Outbound = SaleEventDiscount$Outbound;
2479
+ }
2480
+
2481
+ export function saleEventDiscountToJSON(
2482
+ saleEventDiscount: SaleEventDiscount,
2483
+ ): string {
2484
+ return JSON.stringify(
2485
+ SaleEventDiscount$outboundSchema.parse(saleEventDiscount),
2486
+ );
2487
+ }
2488
+
2489
+ export function saleEventDiscountFromJSON(
2490
+ jsonString: string,
2491
+ ): SafeParseResult<SaleEventDiscount, SDKValidationError> {
2492
+ return safeParse(
2493
+ jsonString,
2494
+ (x) => SaleEventDiscount$inboundSchema.parse(JSON.parse(x)),
2495
+ `Failed to parse 'SaleEventDiscount' from JSON`,
2496
+ );
2497
+ }
2498
+
2291
2499
  /** @internal */
2292
2500
  export const SaleEventCustomer$inboundSchema: z.ZodType<
2293
2501
  SaleEventCustomer,
@@ -2303,6 +2511,9 @@ export const SaleEventCustomer$inboundSchema: z.ZodType<
2303
2511
  createdAt: z.string(),
2304
2512
  link: z.nullable(z.lazy(() => SaleEventCustomerLink$inboundSchema))
2305
2513
  .optional(),
2514
+ partner: z.nullable(z.lazy(() => SaleEventPartner$inboundSchema)).optional(),
2515
+ discount: z.nullable(z.lazy(() => SaleEventDiscount$inboundSchema))
2516
+ .optional(),
2306
2517
  });
2307
2518
 
2308
2519
  /** @internal */
@@ -2315,6 +2526,8 @@ export type SaleEventCustomer$Outbound = {
2315
2526
  country?: string | null | undefined;
2316
2527
  createdAt: string;
2317
2528
  link?: SaleEventCustomerLink$Outbound | null | undefined;
2529
+ partner?: SaleEventPartner$Outbound | null | undefined;
2530
+ discount?: SaleEventDiscount$Outbound | null | undefined;
2318
2531
  };
2319
2532
 
2320
2533
  /** @internal */
@@ -2332,6 +2545,9 @@ export const SaleEventCustomer$outboundSchema: z.ZodType<
2332
2545
  createdAt: z.string(),
2333
2546
  link: z.nullable(z.lazy(() => SaleEventCustomerLink$outboundSchema))
2334
2547
  .optional(),
2548
+ partner: z.nullable(z.lazy(() => SaleEventPartner$outboundSchema)).optional(),
2549
+ discount: z.nullable(z.lazy(() => SaleEventDiscount$outboundSchema))
2550
+ .optional(),
2335
2551
  });
2336
2552
 
2337
2553
  /**