dub 0.58.0 → 0.58.2

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 (114) hide show
  1. package/bin/mcp-server.js +67 -393
  2. package/bin/mcp-server.js.map +16 -16
  3. package/dist/commonjs/lib/config.d.ts +3 -3
  4. package/dist/commonjs/lib/config.js +3 -3
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/leadcreatedevent.d.ts +0 -172
  8. package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/leadcreatedevent.js +1 -159
  10. package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
  11. package/dist/commonjs/models/components/leadevent.d.ts +0 -172
  12. package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/leadevent.js +1 -156
  14. package/dist/commonjs/models/components/leadevent.js.map +1 -1
  15. package/dist/commonjs/models/components/salecreatedevent.d.ts +0 -172
  16. package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/salecreatedevent.js +1 -159
  18. package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
  19. package/dist/commonjs/models/components/saleevent.d.ts +0 -172
  20. package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/saleevent.js +1 -157
  22. package/dist/commonjs/models/components/saleevent.js.map +1 -1
  23. package/dist/commonjs/models/operations/createcustomer.d.ts +4 -4
  24. package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
  25. package/dist/commonjs/models/operations/createcustomer.js +4 -4
  26. package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
  27. package/dist/commonjs/models/operations/getcustomer.d.ts +4 -4
  28. package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
  29. package/dist/commonjs/models/operations/getcustomer.js +4 -4
  30. package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
  31. package/dist/commonjs/models/operations/getcustomers.d.ts +4 -4
  32. package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
  33. package/dist/commonjs/models/operations/getcustomers.js +4 -4
  34. package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
  35. package/dist/commonjs/models/operations/retrieveanalytics.d.ts +0 -3
  36. package/dist/commonjs/models/operations/retrieveanalytics.d.ts.map +1 -1
  37. package/dist/commonjs/models/operations/retrieveanalytics.js +0 -1
  38. package/dist/commonjs/models/operations/retrieveanalytics.js.map +1 -1
  39. package/dist/commonjs/models/operations/retrievepartneranalytics.d.ts +0 -3
  40. package/dist/commonjs/models/operations/retrievepartneranalytics.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/retrievepartneranalytics.js +0 -1
  42. package/dist/commonjs/models/operations/retrievepartneranalytics.js.map +1 -1
  43. package/dist/commonjs/models/operations/updatecustomer.d.ts +4 -4
  44. package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/updatecustomer.js +4 -4
  46. package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
  47. package/dist/commonjs/models/operations/updatepartnersale.d.ts +10 -3
  48. package/dist/commonjs/models/operations/updatepartnersale.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/updatepartnersale.js +6 -2
  50. package/dist/commonjs/models/operations/updatepartnersale.js.map +1 -1
  51. package/dist/esm/lib/config.d.ts +3 -3
  52. package/dist/esm/lib/config.js +3 -3
  53. package/dist/esm/mcp-server/mcp-server.js +1 -1
  54. package/dist/esm/mcp-server/server.js +1 -1
  55. package/dist/esm/models/components/leadcreatedevent.d.ts +0 -172
  56. package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
  57. package/dist/esm/models/components/leadcreatedevent.js +0 -151
  58. package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
  59. package/dist/esm/models/components/leadevent.d.ts +0 -172
  60. package/dist/esm/models/components/leadevent.d.ts.map +1 -1
  61. package/dist/esm/models/components/leadevent.js +0 -148
  62. package/dist/esm/models/components/leadevent.js.map +1 -1
  63. package/dist/esm/models/components/salecreatedevent.d.ts +0 -172
  64. package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
  65. package/dist/esm/models/components/salecreatedevent.js +0 -151
  66. package/dist/esm/models/components/salecreatedevent.js.map +1 -1
  67. package/dist/esm/models/components/saleevent.d.ts +0 -172
  68. package/dist/esm/models/components/saleevent.d.ts.map +1 -1
  69. package/dist/esm/models/components/saleevent.js +0 -149
  70. package/dist/esm/models/components/saleevent.js.map +1 -1
  71. package/dist/esm/models/operations/createcustomer.d.ts +4 -4
  72. package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
  73. package/dist/esm/models/operations/createcustomer.js +4 -4
  74. package/dist/esm/models/operations/createcustomer.js.map +1 -1
  75. package/dist/esm/models/operations/getcustomer.d.ts +4 -4
  76. package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
  77. package/dist/esm/models/operations/getcustomer.js +4 -4
  78. package/dist/esm/models/operations/getcustomer.js.map +1 -1
  79. package/dist/esm/models/operations/getcustomers.d.ts +4 -4
  80. package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
  81. package/dist/esm/models/operations/getcustomers.js +4 -4
  82. package/dist/esm/models/operations/getcustomers.js.map +1 -1
  83. package/dist/esm/models/operations/retrieveanalytics.d.ts +0 -3
  84. package/dist/esm/models/operations/retrieveanalytics.d.ts.map +1 -1
  85. package/dist/esm/models/operations/retrieveanalytics.js +0 -1
  86. package/dist/esm/models/operations/retrieveanalytics.js.map +1 -1
  87. package/dist/esm/models/operations/retrievepartneranalytics.d.ts +0 -3
  88. package/dist/esm/models/operations/retrievepartneranalytics.d.ts.map +1 -1
  89. package/dist/esm/models/operations/retrievepartneranalytics.js +0 -1
  90. package/dist/esm/models/operations/retrievepartneranalytics.js.map +1 -1
  91. package/dist/esm/models/operations/updatecustomer.d.ts +4 -4
  92. package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
  93. package/dist/esm/models/operations/updatecustomer.js +4 -4
  94. package/dist/esm/models/operations/updatecustomer.js.map +1 -1
  95. package/dist/esm/models/operations/updatepartnersale.d.ts +10 -3
  96. package/dist/esm/models/operations/updatepartnersale.d.ts.map +1 -1
  97. package/dist/esm/models/operations/updatepartnersale.js +6 -2
  98. package/dist/esm/models/operations/updatepartnersale.js.map +1 -1
  99. package/jsr.json +1 -1
  100. package/package.json +1 -1
  101. package/src/lib/config.ts +3 -3
  102. package/src/mcp-server/mcp-server.ts +1 -1
  103. package/src/mcp-server/server.ts +1 -1
  104. package/src/models/components/leadcreatedevent.ts +0 -315
  105. package/src/models/components/leadevent.ts +0 -296
  106. package/src/models/components/salecreatedevent.ts +0 -315
  107. package/src/models/components/saleevent.ts +0 -311
  108. package/src/models/operations/createcustomer.ts +8 -8
  109. package/src/models/operations/getcustomer.ts +8 -8
  110. package/src/models/operations/getcustomers.ts +8 -8
  111. package/src/models/operations/retrieveanalytics.ts +0 -1
  112. package/src/models/operations/retrievepartneranalytics.ts +0 -1
  113. package/src/models/operations/updatecustomer.ts +8 -8
  114. package/src/models/operations/updatepartnersale.ts +16 -5
@@ -20,60 +20,6 @@ export const SaleCreatedEventEvent = {
20
20
  } as const;
21
21
  export type SaleCreatedEventEvent = ClosedEnum<typeof SaleCreatedEventEvent>;
22
22
 
23
- export type SaleCreatedEventDataLink = {
24
- /**
25
- * The unique ID of the short link.
26
- */
27
- id: string;
28
- /**
29
- * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
30
- */
31
- domain: string;
32
- /**
33
- * The short link slug. If not provided, a random 7-character slug will be generated.
34
- */
35
- key: string;
36
- /**
37
- * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
38
- */
39
- shortLink: string;
40
- /**
41
- * The ID of the program the short link is associated with.
42
- */
43
- programId: string | null;
44
- };
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
-
77
23
  export type SaleCreatedEventCustomer = {
78
24
  /**
79
25
  * The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
@@ -103,9 +49,6 @@ export type SaleCreatedEventCustomer = {
103
49
  * The date the customer was created.
104
50
  */
105
51
  createdAt: string;
106
- link?: SaleCreatedEventDataLink | null | undefined;
107
- partner?: SaleCreatedEventPartner | null | undefined;
108
- discount?: SaleCreatedEventDiscount | null | undefined;
109
52
  };
110
53
 
111
54
  export type SaleCreatedEventClick = {
@@ -579,249 +522,6 @@ export namespace SaleCreatedEventEvent$ {
579
522
  export const outboundSchema = SaleCreatedEventEvent$outboundSchema;
580
523
  }
581
524
 
582
- /** @internal */
583
- export const SaleCreatedEventDataLink$inboundSchema: z.ZodType<
584
- SaleCreatedEventDataLink,
585
- z.ZodTypeDef,
586
- unknown
587
- > = z.object({
588
- id: z.string(),
589
- domain: z.string(),
590
- key: z.string(),
591
- shortLink: z.string(),
592
- programId: z.nullable(z.string()),
593
- });
594
-
595
- /** @internal */
596
- export type SaleCreatedEventDataLink$Outbound = {
597
- id: string;
598
- domain: string;
599
- key: string;
600
- shortLink: string;
601
- programId: string | null;
602
- };
603
-
604
- /** @internal */
605
- export const SaleCreatedEventDataLink$outboundSchema: z.ZodType<
606
- SaleCreatedEventDataLink$Outbound,
607
- z.ZodTypeDef,
608
- SaleCreatedEventDataLink
609
- > = z.object({
610
- id: z.string(),
611
- domain: z.string(),
612
- key: z.string(),
613
- shortLink: z.string(),
614
- programId: z.nullable(z.string()),
615
- });
616
-
617
- /**
618
- * @internal
619
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
620
- */
621
- export namespace SaleCreatedEventDataLink$ {
622
- /** @deprecated use `SaleCreatedEventDataLink$inboundSchema` instead. */
623
- export const inboundSchema = SaleCreatedEventDataLink$inboundSchema;
624
- /** @deprecated use `SaleCreatedEventDataLink$outboundSchema` instead. */
625
- export const outboundSchema = SaleCreatedEventDataLink$outboundSchema;
626
- /** @deprecated use `SaleCreatedEventDataLink$Outbound` instead. */
627
- export type Outbound = SaleCreatedEventDataLink$Outbound;
628
- }
629
-
630
- export function saleCreatedEventDataLinkToJSON(
631
- saleCreatedEventDataLink: SaleCreatedEventDataLink,
632
- ): string {
633
- return JSON.stringify(
634
- SaleCreatedEventDataLink$outboundSchema.parse(saleCreatedEventDataLink),
635
- );
636
- }
637
-
638
- export function saleCreatedEventDataLinkFromJSON(
639
- jsonString: string,
640
- ): SafeParseResult<SaleCreatedEventDataLink, SDKValidationError> {
641
- return safeParse(
642
- jsonString,
643
- (x) => SaleCreatedEventDataLink$inboundSchema.parse(JSON.parse(x)),
644
- `Failed to parse 'SaleCreatedEventDataLink' from JSON`,
645
- );
646
- }
647
-
648
- /** @internal */
649
- export const SaleCreatedEventPartner$inboundSchema: z.ZodType<
650
- SaleCreatedEventPartner,
651
- z.ZodTypeDef,
652
- unknown
653
- > = z.object({
654
- id: z.string(),
655
- name: z.string(),
656
- email: z.string(),
657
- image: z.nullable(z.string()).optional(),
658
- });
659
-
660
- /** @internal */
661
- export type SaleCreatedEventPartner$Outbound = {
662
- id: string;
663
- name: string;
664
- email: string;
665
- image?: string | null | undefined;
666
- };
667
-
668
- /** @internal */
669
- export const SaleCreatedEventPartner$outboundSchema: z.ZodType<
670
- SaleCreatedEventPartner$Outbound,
671
- z.ZodTypeDef,
672
- SaleCreatedEventPartner
673
- > = z.object({
674
- id: z.string(),
675
- name: z.string(),
676
- email: z.string(),
677
- image: z.nullable(z.string()).optional(),
678
- });
679
-
680
- /**
681
- * @internal
682
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
683
- */
684
- export namespace SaleCreatedEventPartner$ {
685
- /** @deprecated use `SaleCreatedEventPartner$inboundSchema` instead. */
686
- export const inboundSchema = SaleCreatedEventPartner$inboundSchema;
687
- /** @deprecated use `SaleCreatedEventPartner$outboundSchema` instead. */
688
- export const outboundSchema = SaleCreatedEventPartner$outboundSchema;
689
- /** @deprecated use `SaleCreatedEventPartner$Outbound` instead. */
690
- export type Outbound = SaleCreatedEventPartner$Outbound;
691
- }
692
-
693
- export function saleCreatedEventPartnerToJSON(
694
- saleCreatedEventPartner: SaleCreatedEventPartner,
695
- ): string {
696
- return JSON.stringify(
697
- SaleCreatedEventPartner$outboundSchema.parse(saleCreatedEventPartner),
698
- );
699
- }
700
-
701
- export function saleCreatedEventPartnerFromJSON(
702
- jsonString: string,
703
- ): SafeParseResult<SaleCreatedEventPartner, SDKValidationError> {
704
- return safeParse(
705
- jsonString,
706
- (x) => SaleCreatedEventPartner$inboundSchema.parse(JSON.parse(x)),
707
- `Failed to parse 'SaleCreatedEventPartner' from JSON`,
708
- );
709
- }
710
-
711
- /** @internal */
712
- export const SaleCreatedEventType$inboundSchema: z.ZodNativeEnum<
713
- typeof SaleCreatedEventType
714
- > = z.nativeEnum(SaleCreatedEventType);
715
-
716
- /** @internal */
717
- export const SaleCreatedEventType$outboundSchema: z.ZodNativeEnum<
718
- typeof SaleCreatedEventType
719
- > = SaleCreatedEventType$inboundSchema;
720
-
721
- /**
722
- * @internal
723
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
724
- */
725
- export namespace SaleCreatedEventType$ {
726
- /** @deprecated use `SaleCreatedEventType$inboundSchema` instead. */
727
- export const inboundSchema = SaleCreatedEventType$inboundSchema;
728
- /** @deprecated use `SaleCreatedEventType$outboundSchema` instead. */
729
- export const outboundSchema = SaleCreatedEventType$outboundSchema;
730
- }
731
-
732
- /** @internal */
733
- export const SaleCreatedEventInterval$inboundSchema: z.ZodNativeEnum<
734
- typeof SaleCreatedEventInterval
735
- > = z.nativeEnum(SaleCreatedEventInterval);
736
-
737
- /** @internal */
738
- export const SaleCreatedEventInterval$outboundSchema: z.ZodNativeEnum<
739
- typeof SaleCreatedEventInterval
740
- > = SaleCreatedEventInterval$inboundSchema;
741
-
742
- /**
743
- * @internal
744
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
745
- */
746
- export namespace SaleCreatedEventInterval$ {
747
- /** @deprecated use `SaleCreatedEventInterval$inboundSchema` instead. */
748
- export const inboundSchema = SaleCreatedEventInterval$inboundSchema;
749
- /** @deprecated use `SaleCreatedEventInterval$outboundSchema` instead. */
750
- export const outboundSchema = SaleCreatedEventInterval$outboundSchema;
751
- }
752
-
753
- /** @internal */
754
- export const SaleCreatedEventDiscount$inboundSchema: z.ZodType<
755
- SaleCreatedEventDiscount,
756
- z.ZodTypeDef,
757
- unknown
758
- > = z.object({
759
- id: z.string(),
760
- couponId: z.nullable(z.string()),
761
- couponTestId: z.nullable(z.string()),
762
- amount: z.number(),
763
- type: SaleCreatedEventType$inboundSchema,
764
- duration: z.nullable(z.number()),
765
- interval: z.nullable(SaleCreatedEventInterval$inboundSchema),
766
- });
767
-
768
- /** @internal */
769
- export type SaleCreatedEventDiscount$Outbound = {
770
- id: string;
771
- couponId: string | null;
772
- couponTestId: string | null;
773
- amount: number;
774
- type: string;
775
- duration: number | null;
776
- interval: string | null;
777
- };
778
-
779
- /** @internal */
780
- export const SaleCreatedEventDiscount$outboundSchema: z.ZodType<
781
- SaleCreatedEventDiscount$Outbound,
782
- z.ZodTypeDef,
783
- SaleCreatedEventDiscount
784
- > = z.object({
785
- id: z.string(),
786
- couponId: z.nullable(z.string()),
787
- couponTestId: z.nullable(z.string()),
788
- amount: z.number(),
789
- type: SaleCreatedEventType$outboundSchema,
790
- duration: z.nullable(z.number()),
791
- interval: z.nullable(SaleCreatedEventInterval$outboundSchema),
792
- });
793
-
794
- /**
795
- * @internal
796
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
797
- */
798
- export namespace SaleCreatedEventDiscount$ {
799
- /** @deprecated use `SaleCreatedEventDiscount$inboundSchema` instead. */
800
- export const inboundSchema = SaleCreatedEventDiscount$inboundSchema;
801
- /** @deprecated use `SaleCreatedEventDiscount$outboundSchema` instead. */
802
- export const outboundSchema = SaleCreatedEventDiscount$outboundSchema;
803
- /** @deprecated use `SaleCreatedEventDiscount$Outbound` instead. */
804
- export type Outbound = SaleCreatedEventDiscount$Outbound;
805
- }
806
-
807
- export function saleCreatedEventDiscountToJSON(
808
- saleCreatedEventDiscount: SaleCreatedEventDiscount,
809
- ): string {
810
- return JSON.stringify(
811
- SaleCreatedEventDiscount$outboundSchema.parse(saleCreatedEventDiscount),
812
- );
813
- }
814
-
815
- export function saleCreatedEventDiscountFromJSON(
816
- jsonString: string,
817
- ): SafeParseResult<SaleCreatedEventDiscount, SDKValidationError> {
818
- return safeParse(
819
- jsonString,
820
- (x) => SaleCreatedEventDiscount$inboundSchema.parse(JSON.parse(x)),
821
- `Failed to parse 'SaleCreatedEventDiscount' from JSON`,
822
- );
823
- }
824
-
825
525
  /** @internal */
826
526
  export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
827
527
  SaleCreatedEventCustomer,
@@ -835,12 +535,6 @@ export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
835
535
  avatar: z.nullable(z.string()).optional(),
836
536
  country: z.nullable(z.string()).optional(),
837
537
  createdAt: z.string(),
838
- link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$inboundSchema))
839
- .optional(),
840
- partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$inboundSchema))
841
- .optional(),
842
- discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$inboundSchema))
843
- .optional(),
844
538
  });
845
539
 
846
540
  /** @internal */
@@ -852,9 +546,6 @@ export type SaleCreatedEventCustomer$Outbound = {
852
546
  avatar?: string | null | undefined;
853
547
  country?: string | null | undefined;
854
548
  createdAt: string;
855
- link?: SaleCreatedEventDataLink$Outbound | null | undefined;
856
- partner?: SaleCreatedEventPartner$Outbound | null | undefined;
857
- discount?: SaleCreatedEventDiscount$Outbound | null | undefined;
858
549
  };
859
550
 
860
551
  /** @internal */
@@ -870,12 +561,6 @@ export const SaleCreatedEventCustomer$outboundSchema: z.ZodType<
870
561
  avatar: z.nullable(z.string()).optional(),
871
562
  country: z.nullable(z.string()).optional(),
872
563
  createdAt: z.string(),
873
- link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$outboundSchema))
874
- .optional(),
875
- partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$outboundSchema))
876
- .optional(),
877
- discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$outboundSchema))
878
- .optional(),
879
564
  });
880
565
 
881
566
  /**
@@ -445,58 +445,6 @@ export type SaleEventClick = {
445
445
  ip: string;
446
446
  };
447
447
 
448
- export type SaleEventCustomerLink = {
449
- /**
450
- * The unique ID of the short link.
451
- */
452
- id: string;
453
- /**
454
- * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
455
- */
456
- domain: string;
457
- /**
458
- * The short link slug. If not provided, a random 7-character slug will be generated.
459
- */
460
- key: string;
461
- /**
462
- * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
463
- */
464
- shortLink: string;
465
- /**
466
- * The ID of the program the short link is associated with.
467
- */
468
- programId: string | null;
469
- };
470
-
471
- export type SaleEventPartner = {
472
- id: string;
473
- name: string;
474
- email: string;
475
- image?: string | null | undefined;
476
- };
477
-
478
- export const SaleEventType = {
479
- Percentage: "percentage",
480
- Flat: "flat",
481
- } as const;
482
- export type SaleEventType = ClosedEnum<typeof SaleEventType>;
483
-
484
- export const SaleEventInterval = {
485
- Month: "month",
486
- Year: "year",
487
- } as const;
488
- export type SaleEventInterval = ClosedEnum<typeof SaleEventInterval>;
489
-
490
- export type SaleEventDiscount = {
491
- id: string;
492
- couponId: string | null;
493
- couponTestId: string | null;
494
- amount: number;
495
- type: SaleEventType;
496
- duration: number | null;
497
- interval: SaleEventInterval | null;
498
- };
499
-
500
448
  export type SaleEventCustomer = {
501
449
  /**
502
450
  * The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
@@ -526,9 +474,6 @@ export type SaleEventCustomer = {
526
474
  * The date the customer was created.
527
475
  */
528
476
  createdAt: string;
529
- link?: SaleEventCustomerLink | null | undefined;
530
- partner?: SaleEventPartner | null | undefined;
531
- discount?: SaleEventDiscount | null | undefined;
532
477
  };
533
478
 
534
479
  /**
@@ -2280,249 +2225,6 @@ export function saleEventClickFromJSON(
2280
2225
  );
2281
2226
  }
2282
2227
 
2283
- /** @internal */
2284
- export const SaleEventCustomerLink$inboundSchema: z.ZodType<
2285
- SaleEventCustomerLink,
2286
- z.ZodTypeDef,
2287
- unknown
2288
- > = z.object({
2289
- id: z.string(),
2290
- domain: z.string(),
2291
- key: z.string(),
2292
- shortLink: z.string(),
2293
- programId: z.nullable(z.string()),
2294
- });
2295
-
2296
- /** @internal */
2297
- export type SaleEventCustomerLink$Outbound = {
2298
- id: string;
2299
- domain: string;
2300
- key: string;
2301
- shortLink: string;
2302
- programId: string | null;
2303
- };
2304
-
2305
- /** @internal */
2306
- export const SaleEventCustomerLink$outboundSchema: z.ZodType<
2307
- SaleEventCustomerLink$Outbound,
2308
- z.ZodTypeDef,
2309
- SaleEventCustomerLink
2310
- > = z.object({
2311
- id: z.string(),
2312
- domain: z.string(),
2313
- key: z.string(),
2314
- shortLink: z.string(),
2315
- programId: z.nullable(z.string()),
2316
- });
2317
-
2318
- /**
2319
- * @internal
2320
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2321
- */
2322
- export namespace SaleEventCustomerLink$ {
2323
- /** @deprecated use `SaleEventCustomerLink$inboundSchema` instead. */
2324
- export const inboundSchema = SaleEventCustomerLink$inboundSchema;
2325
- /** @deprecated use `SaleEventCustomerLink$outboundSchema` instead. */
2326
- export const outboundSchema = SaleEventCustomerLink$outboundSchema;
2327
- /** @deprecated use `SaleEventCustomerLink$Outbound` instead. */
2328
- export type Outbound = SaleEventCustomerLink$Outbound;
2329
- }
2330
-
2331
- export function saleEventCustomerLinkToJSON(
2332
- saleEventCustomerLink: SaleEventCustomerLink,
2333
- ): string {
2334
- return JSON.stringify(
2335
- SaleEventCustomerLink$outboundSchema.parse(saleEventCustomerLink),
2336
- );
2337
- }
2338
-
2339
- export function saleEventCustomerLinkFromJSON(
2340
- jsonString: string,
2341
- ): SafeParseResult<SaleEventCustomerLink, SDKValidationError> {
2342
- return safeParse(
2343
- jsonString,
2344
- (x) => SaleEventCustomerLink$inboundSchema.parse(JSON.parse(x)),
2345
- `Failed to parse 'SaleEventCustomerLink' from JSON`,
2346
- );
2347
- }
2348
-
2349
- /** @internal */
2350
- export const SaleEventPartner$inboundSchema: z.ZodType<
2351
- SaleEventPartner,
2352
- z.ZodTypeDef,
2353
- unknown
2354
- > = z.object({
2355
- id: z.string(),
2356
- name: z.string(),
2357
- email: z.string(),
2358
- image: z.nullable(z.string()).optional(),
2359
- });
2360
-
2361
- /** @internal */
2362
- export type SaleEventPartner$Outbound = {
2363
- id: string;
2364
- name: string;
2365
- email: string;
2366
- image?: string | null | undefined;
2367
- };
2368
-
2369
- /** @internal */
2370
- export const SaleEventPartner$outboundSchema: z.ZodType<
2371
- SaleEventPartner$Outbound,
2372
- z.ZodTypeDef,
2373
- SaleEventPartner
2374
- > = z.object({
2375
- id: z.string(),
2376
- name: z.string(),
2377
- email: z.string(),
2378
- image: z.nullable(z.string()).optional(),
2379
- });
2380
-
2381
- /**
2382
- * @internal
2383
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2384
- */
2385
- export namespace SaleEventPartner$ {
2386
- /** @deprecated use `SaleEventPartner$inboundSchema` instead. */
2387
- export const inboundSchema = SaleEventPartner$inboundSchema;
2388
- /** @deprecated use `SaleEventPartner$outboundSchema` instead. */
2389
- export const outboundSchema = SaleEventPartner$outboundSchema;
2390
- /** @deprecated use `SaleEventPartner$Outbound` instead. */
2391
- export type Outbound = SaleEventPartner$Outbound;
2392
- }
2393
-
2394
- export function saleEventPartnerToJSON(
2395
- saleEventPartner: SaleEventPartner,
2396
- ): string {
2397
- return JSON.stringify(
2398
- SaleEventPartner$outboundSchema.parse(saleEventPartner),
2399
- );
2400
- }
2401
-
2402
- export function saleEventPartnerFromJSON(
2403
- jsonString: string,
2404
- ): SafeParseResult<SaleEventPartner, SDKValidationError> {
2405
- return safeParse(
2406
- jsonString,
2407
- (x) => SaleEventPartner$inboundSchema.parse(JSON.parse(x)),
2408
- `Failed to parse 'SaleEventPartner' from JSON`,
2409
- );
2410
- }
2411
-
2412
- /** @internal */
2413
- export const SaleEventType$inboundSchema: z.ZodNativeEnum<
2414
- typeof SaleEventType
2415
- > = z.nativeEnum(SaleEventType);
2416
-
2417
- /** @internal */
2418
- export const SaleEventType$outboundSchema: z.ZodNativeEnum<
2419
- typeof SaleEventType
2420
- > = SaleEventType$inboundSchema;
2421
-
2422
- /**
2423
- * @internal
2424
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2425
- */
2426
- export namespace SaleEventType$ {
2427
- /** @deprecated use `SaleEventType$inboundSchema` instead. */
2428
- export const inboundSchema = SaleEventType$inboundSchema;
2429
- /** @deprecated use `SaleEventType$outboundSchema` instead. */
2430
- export const outboundSchema = SaleEventType$outboundSchema;
2431
- }
2432
-
2433
- /** @internal */
2434
- export const SaleEventInterval$inboundSchema: z.ZodNativeEnum<
2435
- typeof SaleEventInterval
2436
- > = z.nativeEnum(SaleEventInterval);
2437
-
2438
- /** @internal */
2439
- export const SaleEventInterval$outboundSchema: z.ZodNativeEnum<
2440
- typeof SaleEventInterval
2441
- > = SaleEventInterval$inboundSchema;
2442
-
2443
- /**
2444
- * @internal
2445
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2446
- */
2447
- export namespace SaleEventInterval$ {
2448
- /** @deprecated use `SaleEventInterval$inboundSchema` instead. */
2449
- export const inboundSchema = SaleEventInterval$inboundSchema;
2450
- /** @deprecated use `SaleEventInterval$outboundSchema` instead. */
2451
- export const outboundSchema = SaleEventInterval$outboundSchema;
2452
- }
2453
-
2454
- /** @internal */
2455
- export const SaleEventDiscount$inboundSchema: z.ZodType<
2456
- SaleEventDiscount,
2457
- z.ZodTypeDef,
2458
- unknown
2459
- > = z.object({
2460
- id: z.string(),
2461
- couponId: z.nullable(z.string()),
2462
- couponTestId: z.nullable(z.string()),
2463
- amount: z.number(),
2464
- type: SaleEventType$inboundSchema,
2465
- duration: z.nullable(z.number()),
2466
- interval: z.nullable(SaleEventInterval$inboundSchema),
2467
- });
2468
-
2469
- /** @internal */
2470
- export type SaleEventDiscount$Outbound = {
2471
- id: string;
2472
- couponId: string | null;
2473
- couponTestId: string | null;
2474
- amount: number;
2475
- type: string;
2476
- duration: number | null;
2477
- interval: string | null;
2478
- };
2479
-
2480
- /** @internal */
2481
- export const SaleEventDiscount$outboundSchema: z.ZodType<
2482
- SaleEventDiscount$Outbound,
2483
- z.ZodTypeDef,
2484
- SaleEventDiscount
2485
- > = z.object({
2486
- id: z.string(),
2487
- couponId: z.nullable(z.string()),
2488
- couponTestId: z.nullable(z.string()),
2489
- amount: z.number(),
2490
- type: SaleEventType$outboundSchema,
2491
- duration: z.nullable(z.number()),
2492
- interval: z.nullable(SaleEventInterval$outboundSchema),
2493
- });
2494
-
2495
- /**
2496
- * @internal
2497
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2498
- */
2499
- export namespace SaleEventDiscount$ {
2500
- /** @deprecated use `SaleEventDiscount$inboundSchema` instead. */
2501
- export const inboundSchema = SaleEventDiscount$inboundSchema;
2502
- /** @deprecated use `SaleEventDiscount$outboundSchema` instead. */
2503
- export const outboundSchema = SaleEventDiscount$outboundSchema;
2504
- /** @deprecated use `SaleEventDiscount$Outbound` instead. */
2505
- export type Outbound = SaleEventDiscount$Outbound;
2506
- }
2507
-
2508
- export function saleEventDiscountToJSON(
2509
- saleEventDiscount: SaleEventDiscount,
2510
- ): string {
2511
- return JSON.stringify(
2512
- SaleEventDiscount$outboundSchema.parse(saleEventDiscount),
2513
- );
2514
- }
2515
-
2516
- export function saleEventDiscountFromJSON(
2517
- jsonString: string,
2518
- ): SafeParseResult<SaleEventDiscount, SDKValidationError> {
2519
- return safeParse(
2520
- jsonString,
2521
- (x) => SaleEventDiscount$inboundSchema.parse(JSON.parse(x)),
2522
- `Failed to parse 'SaleEventDiscount' from JSON`,
2523
- );
2524
- }
2525
-
2526
2228
  /** @internal */
2527
2229
  export const SaleEventCustomer$inboundSchema: z.ZodType<
2528
2230
  SaleEventCustomer,
@@ -2536,11 +2238,6 @@ export const SaleEventCustomer$inboundSchema: z.ZodType<
2536
2238
  avatar: z.nullable(z.string()).optional(),
2537
2239
  country: z.nullable(z.string()).optional(),
2538
2240
  createdAt: z.string(),
2539
- link: z.nullable(z.lazy(() => SaleEventCustomerLink$inboundSchema))
2540
- .optional(),
2541
- partner: z.nullable(z.lazy(() => SaleEventPartner$inboundSchema)).optional(),
2542
- discount: z.nullable(z.lazy(() => SaleEventDiscount$inboundSchema))
2543
- .optional(),
2544
2241
  });
2545
2242
 
2546
2243
  /** @internal */
@@ -2552,9 +2249,6 @@ export type SaleEventCustomer$Outbound = {
2552
2249
  avatar?: string | null | undefined;
2553
2250
  country?: string | null | undefined;
2554
2251
  createdAt: string;
2555
- link?: SaleEventCustomerLink$Outbound | null | undefined;
2556
- partner?: SaleEventPartner$Outbound | null | undefined;
2557
- discount?: SaleEventDiscount$Outbound | null | undefined;
2558
2252
  };
2559
2253
 
2560
2254
  /** @internal */
@@ -2570,11 +2264,6 @@ export const SaleEventCustomer$outboundSchema: z.ZodType<
2570
2264
  avatar: z.nullable(z.string()).optional(),
2571
2265
  country: z.nullable(z.string()).optional(),
2572
2266
  createdAt: z.string(),
2573
- link: z.nullable(z.lazy(() => SaleEventCustomerLink$outboundSchema))
2574
- .optional(),
2575
- partner: z.nullable(z.lazy(() => SaleEventPartner$outboundSchema)).optional(),
2576
- discount: z.nullable(z.lazy(() => SaleEventDiscount$outboundSchema))
2577
- .optional(),
2578
2267
  });
2579
2268
 
2580
2269
  /**