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 LeadCreatedEventEvent = {
20
20
  } as const;
21
21
  export type LeadCreatedEventEvent = ClosedEnum<typeof LeadCreatedEventEvent>;
22
22
 
23
- export type LeadCreatedEventDataLink = {
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 LeadCreatedEventPartner = {
47
- id: string;
48
- name: string;
49
- email: string;
50
- image?: string | null | undefined;
51
- };
52
-
53
- export const LeadCreatedEventType = {
54
- Percentage: "percentage",
55
- Flat: "flat",
56
- } as const;
57
- export type LeadCreatedEventType = ClosedEnum<typeof LeadCreatedEventType>;
58
-
59
- export const LeadCreatedEventInterval = {
60
- Month: "month",
61
- Year: "year",
62
- } as const;
63
- export type LeadCreatedEventInterval = ClosedEnum<
64
- typeof LeadCreatedEventInterval
65
- >;
66
-
67
- export type LeadCreatedEventDiscount = {
68
- id: string;
69
- couponId: string | null;
70
- couponTestId: string | null;
71
- amount: number;
72
- type: LeadCreatedEventType;
73
- duration: number | null;
74
- interval: LeadCreatedEventInterval | null;
75
- };
76
-
77
23
  export type LeadCreatedEventCustomer = {
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 LeadCreatedEventCustomer = {
103
49
  * The date the customer was created.
104
50
  */
105
51
  createdAt: string;
106
- link?: LeadCreatedEventDataLink | null | undefined;
107
- partner?: LeadCreatedEventPartner | null | undefined;
108
- discount?: LeadCreatedEventDiscount | null | undefined;
109
52
  };
110
53
 
111
54
  export type LeadCreatedEventClick = {
@@ -571,249 +514,6 @@ export namespace LeadCreatedEventEvent$ {
571
514
  export const outboundSchema = LeadCreatedEventEvent$outboundSchema;
572
515
  }
573
516
 
574
- /** @internal */
575
- export const LeadCreatedEventDataLink$inboundSchema: z.ZodType<
576
- LeadCreatedEventDataLink,
577
- z.ZodTypeDef,
578
- unknown
579
- > = z.object({
580
- id: z.string(),
581
- domain: z.string(),
582
- key: z.string(),
583
- shortLink: z.string(),
584
- programId: z.nullable(z.string()),
585
- });
586
-
587
- /** @internal */
588
- export type LeadCreatedEventDataLink$Outbound = {
589
- id: string;
590
- domain: string;
591
- key: string;
592
- shortLink: string;
593
- programId: string | null;
594
- };
595
-
596
- /** @internal */
597
- export const LeadCreatedEventDataLink$outboundSchema: z.ZodType<
598
- LeadCreatedEventDataLink$Outbound,
599
- z.ZodTypeDef,
600
- LeadCreatedEventDataLink
601
- > = z.object({
602
- id: z.string(),
603
- domain: z.string(),
604
- key: z.string(),
605
- shortLink: z.string(),
606
- programId: z.nullable(z.string()),
607
- });
608
-
609
- /**
610
- * @internal
611
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
612
- */
613
- export namespace LeadCreatedEventDataLink$ {
614
- /** @deprecated use `LeadCreatedEventDataLink$inboundSchema` instead. */
615
- export const inboundSchema = LeadCreatedEventDataLink$inboundSchema;
616
- /** @deprecated use `LeadCreatedEventDataLink$outboundSchema` instead. */
617
- export const outboundSchema = LeadCreatedEventDataLink$outboundSchema;
618
- /** @deprecated use `LeadCreatedEventDataLink$Outbound` instead. */
619
- export type Outbound = LeadCreatedEventDataLink$Outbound;
620
- }
621
-
622
- export function leadCreatedEventDataLinkToJSON(
623
- leadCreatedEventDataLink: LeadCreatedEventDataLink,
624
- ): string {
625
- return JSON.stringify(
626
- LeadCreatedEventDataLink$outboundSchema.parse(leadCreatedEventDataLink),
627
- );
628
- }
629
-
630
- export function leadCreatedEventDataLinkFromJSON(
631
- jsonString: string,
632
- ): SafeParseResult<LeadCreatedEventDataLink, SDKValidationError> {
633
- return safeParse(
634
- jsonString,
635
- (x) => LeadCreatedEventDataLink$inboundSchema.parse(JSON.parse(x)),
636
- `Failed to parse 'LeadCreatedEventDataLink' from JSON`,
637
- );
638
- }
639
-
640
- /** @internal */
641
- export const LeadCreatedEventPartner$inboundSchema: z.ZodType<
642
- LeadCreatedEventPartner,
643
- z.ZodTypeDef,
644
- unknown
645
- > = z.object({
646
- id: z.string(),
647
- name: z.string(),
648
- email: z.string(),
649
- image: z.nullable(z.string()).optional(),
650
- });
651
-
652
- /** @internal */
653
- export type LeadCreatedEventPartner$Outbound = {
654
- id: string;
655
- name: string;
656
- email: string;
657
- image?: string | null | undefined;
658
- };
659
-
660
- /** @internal */
661
- export const LeadCreatedEventPartner$outboundSchema: z.ZodType<
662
- LeadCreatedEventPartner$Outbound,
663
- z.ZodTypeDef,
664
- LeadCreatedEventPartner
665
- > = z.object({
666
- id: z.string(),
667
- name: z.string(),
668
- email: z.string(),
669
- image: z.nullable(z.string()).optional(),
670
- });
671
-
672
- /**
673
- * @internal
674
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
675
- */
676
- export namespace LeadCreatedEventPartner$ {
677
- /** @deprecated use `LeadCreatedEventPartner$inboundSchema` instead. */
678
- export const inboundSchema = LeadCreatedEventPartner$inboundSchema;
679
- /** @deprecated use `LeadCreatedEventPartner$outboundSchema` instead. */
680
- export const outboundSchema = LeadCreatedEventPartner$outboundSchema;
681
- /** @deprecated use `LeadCreatedEventPartner$Outbound` instead. */
682
- export type Outbound = LeadCreatedEventPartner$Outbound;
683
- }
684
-
685
- export function leadCreatedEventPartnerToJSON(
686
- leadCreatedEventPartner: LeadCreatedEventPartner,
687
- ): string {
688
- return JSON.stringify(
689
- LeadCreatedEventPartner$outboundSchema.parse(leadCreatedEventPartner),
690
- );
691
- }
692
-
693
- export function leadCreatedEventPartnerFromJSON(
694
- jsonString: string,
695
- ): SafeParseResult<LeadCreatedEventPartner, SDKValidationError> {
696
- return safeParse(
697
- jsonString,
698
- (x) => LeadCreatedEventPartner$inboundSchema.parse(JSON.parse(x)),
699
- `Failed to parse 'LeadCreatedEventPartner' from JSON`,
700
- );
701
- }
702
-
703
- /** @internal */
704
- export const LeadCreatedEventType$inboundSchema: z.ZodNativeEnum<
705
- typeof LeadCreatedEventType
706
- > = z.nativeEnum(LeadCreatedEventType);
707
-
708
- /** @internal */
709
- export const LeadCreatedEventType$outboundSchema: z.ZodNativeEnum<
710
- typeof LeadCreatedEventType
711
- > = LeadCreatedEventType$inboundSchema;
712
-
713
- /**
714
- * @internal
715
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
716
- */
717
- export namespace LeadCreatedEventType$ {
718
- /** @deprecated use `LeadCreatedEventType$inboundSchema` instead. */
719
- export const inboundSchema = LeadCreatedEventType$inboundSchema;
720
- /** @deprecated use `LeadCreatedEventType$outboundSchema` instead. */
721
- export const outboundSchema = LeadCreatedEventType$outboundSchema;
722
- }
723
-
724
- /** @internal */
725
- export const LeadCreatedEventInterval$inboundSchema: z.ZodNativeEnum<
726
- typeof LeadCreatedEventInterval
727
- > = z.nativeEnum(LeadCreatedEventInterval);
728
-
729
- /** @internal */
730
- export const LeadCreatedEventInterval$outboundSchema: z.ZodNativeEnum<
731
- typeof LeadCreatedEventInterval
732
- > = LeadCreatedEventInterval$inboundSchema;
733
-
734
- /**
735
- * @internal
736
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
737
- */
738
- export namespace LeadCreatedEventInterval$ {
739
- /** @deprecated use `LeadCreatedEventInterval$inboundSchema` instead. */
740
- export const inboundSchema = LeadCreatedEventInterval$inboundSchema;
741
- /** @deprecated use `LeadCreatedEventInterval$outboundSchema` instead. */
742
- export const outboundSchema = LeadCreatedEventInterval$outboundSchema;
743
- }
744
-
745
- /** @internal */
746
- export const LeadCreatedEventDiscount$inboundSchema: z.ZodType<
747
- LeadCreatedEventDiscount,
748
- z.ZodTypeDef,
749
- unknown
750
- > = z.object({
751
- id: z.string(),
752
- couponId: z.nullable(z.string()),
753
- couponTestId: z.nullable(z.string()),
754
- amount: z.number(),
755
- type: LeadCreatedEventType$inboundSchema,
756
- duration: z.nullable(z.number()),
757
- interval: z.nullable(LeadCreatedEventInterval$inboundSchema),
758
- });
759
-
760
- /** @internal */
761
- export type LeadCreatedEventDiscount$Outbound = {
762
- id: string;
763
- couponId: string | null;
764
- couponTestId: string | null;
765
- amount: number;
766
- type: string;
767
- duration: number | null;
768
- interval: string | null;
769
- };
770
-
771
- /** @internal */
772
- export const LeadCreatedEventDiscount$outboundSchema: z.ZodType<
773
- LeadCreatedEventDiscount$Outbound,
774
- z.ZodTypeDef,
775
- LeadCreatedEventDiscount
776
- > = z.object({
777
- id: z.string(),
778
- couponId: z.nullable(z.string()),
779
- couponTestId: z.nullable(z.string()),
780
- amount: z.number(),
781
- type: LeadCreatedEventType$outboundSchema,
782
- duration: z.nullable(z.number()),
783
- interval: z.nullable(LeadCreatedEventInterval$outboundSchema),
784
- });
785
-
786
- /**
787
- * @internal
788
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
789
- */
790
- export namespace LeadCreatedEventDiscount$ {
791
- /** @deprecated use `LeadCreatedEventDiscount$inboundSchema` instead. */
792
- export const inboundSchema = LeadCreatedEventDiscount$inboundSchema;
793
- /** @deprecated use `LeadCreatedEventDiscount$outboundSchema` instead. */
794
- export const outboundSchema = LeadCreatedEventDiscount$outboundSchema;
795
- /** @deprecated use `LeadCreatedEventDiscount$Outbound` instead. */
796
- export type Outbound = LeadCreatedEventDiscount$Outbound;
797
- }
798
-
799
- export function leadCreatedEventDiscountToJSON(
800
- leadCreatedEventDiscount: LeadCreatedEventDiscount,
801
- ): string {
802
- return JSON.stringify(
803
- LeadCreatedEventDiscount$outboundSchema.parse(leadCreatedEventDiscount),
804
- );
805
- }
806
-
807
- export function leadCreatedEventDiscountFromJSON(
808
- jsonString: string,
809
- ): SafeParseResult<LeadCreatedEventDiscount, SDKValidationError> {
810
- return safeParse(
811
- jsonString,
812
- (x) => LeadCreatedEventDiscount$inboundSchema.parse(JSON.parse(x)),
813
- `Failed to parse 'LeadCreatedEventDiscount' from JSON`,
814
- );
815
- }
816
-
817
517
  /** @internal */
818
518
  export const LeadCreatedEventCustomer$inboundSchema: z.ZodType<
819
519
  LeadCreatedEventCustomer,
@@ -827,12 +527,6 @@ export const LeadCreatedEventCustomer$inboundSchema: z.ZodType<
827
527
  avatar: z.nullable(z.string()).optional(),
828
528
  country: z.nullable(z.string()).optional(),
829
529
  createdAt: z.string(),
830
- link: z.nullable(z.lazy(() => LeadCreatedEventDataLink$inboundSchema))
831
- .optional(),
832
- partner: z.nullable(z.lazy(() => LeadCreatedEventPartner$inboundSchema))
833
- .optional(),
834
- discount: z.nullable(z.lazy(() => LeadCreatedEventDiscount$inboundSchema))
835
- .optional(),
836
530
  });
837
531
 
838
532
  /** @internal */
@@ -844,9 +538,6 @@ export type LeadCreatedEventCustomer$Outbound = {
844
538
  avatar?: string | null | undefined;
845
539
  country?: string | null | undefined;
846
540
  createdAt: string;
847
- link?: LeadCreatedEventDataLink$Outbound | null | undefined;
848
- partner?: LeadCreatedEventPartner$Outbound | null | undefined;
849
- discount?: LeadCreatedEventDiscount$Outbound | null | undefined;
850
541
  };
851
542
 
852
543
  /** @internal */
@@ -862,12 +553,6 @@ export const LeadCreatedEventCustomer$outboundSchema: z.ZodType<
862
553
  avatar: z.nullable(z.string()).optional(),
863
554
  country: z.nullable(z.string()).optional(),
864
555
  createdAt: z.string(),
865
- link: z.nullable(z.lazy(() => LeadCreatedEventDataLink$outboundSchema))
866
- .optional(),
867
- partner: z.nullable(z.lazy(() => LeadCreatedEventPartner$outboundSchema))
868
- .optional(),
869
- discount: z.nullable(z.lazy(() => LeadCreatedEventDiscount$outboundSchema))
870
- .optional(),
871
556
  });
872
557
 
873
558
  /**
@@ -445,58 +445,6 @@ export type LeadEventLink = {
445
445
  projectId: string;
446
446
  };
447
447
 
448
- export type LeadEventCustomerLink = {
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 Partner = {
472
- id: string;
473
- name: string;
474
- email: string;
475
- image?: string | null | undefined;
476
- };
477
-
478
- export const LeadEventType = {
479
- Percentage: "percentage",
480
- Flat: "flat",
481
- } as const;
482
- export type LeadEventType = ClosedEnum<typeof LeadEventType>;
483
-
484
- export const Interval = {
485
- Month: "month",
486
- Year: "year",
487
- } as const;
488
- export type Interval = ClosedEnum<typeof Interval>;
489
-
490
- export type Discount = {
491
- id: string;
492
- couponId: string | null;
493
- couponTestId: string | null;
494
- amount: number;
495
- type: LeadEventType;
496
- duration: number | null;
497
- interval: Interval | null;
498
- };
499
-
500
448
  export type Customer = {
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 Customer = {
526
474
  * The date the customer was created.
527
475
  */
528
476
  createdAt: string;
529
- link?: LeadEventCustomerLink | null | undefined;
530
- partner?: Partner | null | undefined;
531
- discount?: Discount | null | undefined;
532
477
  };
533
478
 
534
479
  export type LeadEvent = {
@@ -2233,236 +2178,6 @@ export function leadEventLinkFromJSON(
2233
2178
  );
2234
2179
  }
2235
2180
 
2236
- /** @internal */
2237
- export const LeadEventCustomerLink$inboundSchema: z.ZodType<
2238
- LeadEventCustomerLink,
2239
- z.ZodTypeDef,
2240
- unknown
2241
- > = z.object({
2242
- id: z.string(),
2243
- domain: z.string(),
2244
- key: z.string(),
2245
- shortLink: z.string(),
2246
- programId: z.nullable(z.string()),
2247
- });
2248
-
2249
- /** @internal */
2250
- export type LeadEventCustomerLink$Outbound = {
2251
- id: string;
2252
- domain: string;
2253
- key: string;
2254
- shortLink: string;
2255
- programId: string | null;
2256
- };
2257
-
2258
- /** @internal */
2259
- export const LeadEventCustomerLink$outboundSchema: z.ZodType<
2260
- LeadEventCustomerLink$Outbound,
2261
- z.ZodTypeDef,
2262
- LeadEventCustomerLink
2263
- > = z.object({
2264
- id: z.string(),
2265
- domain: z.string(),
2266
- key: z.string(),
2267
- shortLink: z.string(),
2268
- programId: z.nullable(z.string()),
2269
- });
2270
-
2271
- /**
2272
- * @internal
2273
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2274
- */
2275
- export namespace LeadEventCustomerLink$ {
2276
- /** @deprecated use `LeadEventCustomerLink$inboundSchema` instead. */
2277
- export const inboundSchema = LeadEventCustomerLink$inboundSchema;
2278
- /** @deprecated use `LeadEventCustomerLink$outboundSchema` instead. */
2279
- export const outboundSchema = LeadEventCustomerLink$outboundSchema;
2280
- /** @deprecated use `LeadEventCustomerLink$Outbound` instead. */
2281
- export type Outbound = LeadEventCustomerLink$Outbound;
2282
- }
2283
-
2284
- export function leadEventCustomerLinkToJSON(
2285
- leadEventCustomerLink: LeadEventCustomerLink,
2286
- ): string {
2287
- return JSON.stringify(
2288
- LeadEventCustomerLink$outboundSchema.parse(leadEventCustomerLink),
2289
- );
2290
- }
2291
-
2292
- export function leadEventCustomerLinkFromJSON(
2293
- jsonString: string,
2294
- ): SafeParseResult<LeadEventCustomerLink, SDKValidationError> {
2295
- return safeParse(
2296
- jsonString,
2297
- (x) => LeadEventCustomerLink$inboundSchema.parse(JSON.parse(x)),
2298
- `Failed to parse 'LeadEventCustomerLink' from JSON`,
2299
- );
2300
- }
2301
-
2302
- /** @internal */
2303
- export const Partner$inboundSchema: z.ZodType<Partner, z.ZodTypeDef, unknown> =
2304
- z.object({
2305
- id: z.string(),
2306
- name: z.string(),
2307
- email: z.string(),
2308
- image: z.nullable(z.string()).optional(),
2309
- });
2310
-
2311
- /** @internal */
2312
- export type Partner$Outbound = {
2313
- id: string;
2314
- name: string;
2315
- email: string;
2316
- image?: string | null | undefined;
2317
- };
2318
-
2319
- /** @internal */
2320
- export const Partner$outboundSchema: z.ZodType<
2321
- Partner$Outbound,
2322
- z.ZodTypeDef,
2323
- Partner
2324
- > = z.object({
2325
- id: z.string(),
2326
- name: z.string(),
2327
- email: z.string(),
2328
- image: z.nullable(z.string()).optional(),
2329
- });
2330
-
2331
- /**
2332
- * @internal
2333
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2334
- */
2335
- export namespace Partner$ {
2336
- /** @deprecated use `Partner$inboundSchema` instead. */
2337
- export const inboundSchema = Partner$inboundSchema;
2338
- /** @deprecated use `Partner$outboundSchema` instead. */
2339
- export const outboundSchema = Partner$outboundSchema;
2340
- /** @deprecated use `Partner$Outbound` instead. */
2341
- export type Outbound = Partner$Outbound;
2342
- }
2343
-
2344
- export function partnerToJSON(partner: Partner): string {
2345
- return JSON.stringify(Partner$outboundSchema.parse(partner));
2346
- }
2347
-
2348
- export function partnerFromJSON(
2349
- jsonString: string,
2350
- ): SafeParseResult<Partner, SDKValidationError> {
2351
- return safeParse(
2352
- jsonString,
2353
- (x) => Partner$inboundSchema.parse(JSON.parse(x)),
2354
- `Failed to parse 'Partner' from JSON`,
2355
- );
2356
- }
2357
-
2358
- /** @internal */
2359
- export const LeadEventType$inboundSchema: z.ZodNativeEnum<
2360
- typeof LeadEventType
2361
- > = z.nativeEnum(LeadEventType);
2362
-
2363
- /** @internal */
2364
- export const LeadEventType$outboundSchema: z.ZodNativeEnum<
2365
- typeof LeadEventType
2366
- > = LeadEventType$inboundSchema;
2367
-
2368
- /**
2369
- * @internal
2370
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2371
- */
2372
- export namespace LeadEventType$ {
2373
- /** @deprecated use `LeadEventType$inboundSchema` instead. */
2374
- export const inboundSchema = LeadEventType$inboundSchema;
2375
- /** @deprecated use `LeadEventType$outboundSchema` instead. */
2376
- export const outboundSchema = LeadEventType$outboundSchema;
2377
- }
2378
-
2379
- /** @internal */
2380
- export const Interval$inboundSchema: z.ZodNativeEnum<typeof Interval> = z
2381
- .nativeEnum(Interval);
2382
-
2383
- /** @internal */
2384
- export const Interval$outboundSchema: z.ZodNativeEnum<typeof Interval> =
2385
- Interval$inboundSchema;
2386
-
2387
- /**
2388
- * @internal
2389
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2390
- */
2391
- export namespace Interval$ {
2392
- /** @deprecated use `Interval$inboundSchema` instead. */
2393
- export const inboundSchema = Interval$inboundSchema;
2394
- /** @deprecated use `Interval$outboundSchema` instead. */
2395
- export const outboundSchema = Interval$outboundSchema;
2396
- }
2397
-
2398
- /** @internal */
2399
- export const Discount$inboundSchema: z.ZodType<
2400
- Discount,
2401
- z.ZodTypeDef,
2402
- unknown
2403
- > = z.object({
2404
- id: z.string(),
2405
- couponId: z.nullable(z.string()),
2406
- couponTestId: z.nullable(z.string()),
2407
- amount: z.number(),
2408
- type: LeadEventType$inboundSchema,
2409
- duration: z.nullable(z.number()),
2410
- interval: z.nullable(Interval$inboundSchema),
2411
- });
2412
-
2413
- /** @internal */
2414
- export type Discount$Outbound = {
2415
- id: string;
2416
- couponId: string | null;
2417
- couponTestId: string | null;
2418
- amount: number;
2419
- type: string;
2420
- duration: number | null;
2421
- interval: string | null;
2422
- };
2423
-
2424
- /** @internal */
2425
- export const Discount$outboundSchema: z.ZodType<
2426
- Discount$Outbound,
2427
- z.ZodTypeDef,
2428
- Discount
2429
- > = z.object({
2430
- id: z.string(),
2431
- couponId: z.nullable(z.string()),
2432
- couponTestId: z.nullable(z.string()),
2433
- amount: z.number(),
2434
- type: LeadEventType$outboundSchema,
2435
- duration: z.nullable(z.number()),
2436
- interval: z.nullable(Interval$outboundSchema),
2437
- });
2438
-
2439
- /**
2440
- * @internal
2441
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2442
- */
2443
- export namespace Discount$ {
2444
- /** @deprecated use `Discount$inboundSchema` instead. */
2445
- export const inboundSchema = Discount$inboundSchema;
2446
- /** @deprecated use `Discount$outboundSchema` instead. */
2447
- export const outboundSchema = Discount$outboundSchema;
2448
- /** @deprecated use `Discount$Outbound` instead. */
2449
- export type Outbound = Discount$Outbound;
2450
- }
2451
-
2452
- export function discountToJSON(discount: Discount): string {
2453
- return JSON.stringify(Discount$outboundSchema.parse(discount));
2454
- }
2455
-
2456
- export function discountFromJSON(
2457
- jsonString: string,
2458
- ): SafeParseResult<Discount, SDKValidationError> {
2459
- return safeParse(
2460
- jsonString,
2461
- (x) => Discount$inboundSchema.parse(JSON.parse(x)),
2462
- `Failed to parse 'Discount' from JSON`,
2463
- );
2464
- }
2465
-
2466
2181
  /** @internal */
2467
2182
  export const Customer$inboundSchema: z.ZodType<
2468
2183
  Customer,
@@ -2476,10 +2191,6 @@ export const Customer$inboundSchema: z.ZodType<
2476
2191
  avatar: z.nullable(z.string()).optional(),
2477
2192
  country: z.nullable(z.string()).optional(),
2478
2193
  createdAt: z.string(),
2479
- link: z.nullable(z.lazy(() => LeadEventCustomerLink$inboundSchema))
2480
- .optional(),
2481
- partner: z.nullable(z.lazy(() => Partner$inboundSchema)).optional(),
2482
- discount: z.nullable(z.lazy(() => Discount$inboundSchema)).optional(),
2483
2194
  });
2484
2195
 
2485
2196
  /** @internal */
@@ -2491,9 +2202,6 @@ export type Customer$Outbound = {
2491
2202
  avatar?: string | null | undefined;
2492
2203
  country?: string | null | undefined;
2493
2204
  createdAt: string;
2494
- link?: LeadEventCustomerLink$Outbound | null | undefined;
2495
- partner?: Partner$Outbound | null | undefined;
2496
- discount?: Discount$Outbound | null | undefined;
2497
2205
  };
2498
2206
 
2499
2207
  /** @internal */
@@ -2509,10 +2217,6 @@ export const Customer$outboundSchema: z.ZodType<
2509
2217
  avatar: z.nullable(z.string()).optional(),
2510
2218
  country: z.nullable(z.string()).optional(),
2511
2219
  createdAt: z.string(),
2512
- link: z.nullable(z.lazy(() => LeadEventCustomerLink$outboundSchema))
2513
- .optional(),
2514
- partner: z.nullable(z.lazy(() => Partner$outboundSchema)).optional(),
2515
- discount: z.nullable(z.lazy(() => Discount$outboundSchema)).optional(),
2516
2220
  });
2517
2221
 
2518
2222
  /**