dub 0.64.0 → 0.64.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 (196) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +887 -158
  3. package/bin/mcp-server.js.map +25 -21
  4. package/dist/commonjs/funcs/analyticsRetrieve.js +1 -0
  5. package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
  6. package/dist/commonjs/funcs/eventsList.js +1 -0
  7. package/dist/commonjs/funcs/eventsList.js.map +1 -1
  8. package/dist/commonjs/funcs/partnersList.d.ts +18 -0
  9. package/dist/commonjs/funcs/partnersList.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/partnersList.js +133 -0
  11. package/dist/commonjs/funcs/partnersList.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/partnersList.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/partnersList.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/partnersList.js +54 -0
  21. package/dist/commonjs/mcp-server/tools/partnersList.js.map +1 -0
  22. package/dist/commonjs/models/components/analyticstriggers.d.ts +6 -0
  23. package/dist/commonjs/models/components/analyticstriggers.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/analyticstriggers.js +2 -0
  25. package/dist/commonjs/models/components/analyticstriggers.js.map +1 -1
  26. package/dist/commonjs/models/components/commissioncreatedevent.d.ts +310 -0
  27. package/dist/commonjs/models/components/commissioncreatedevent.d.ts.map +1 -0
  28. package/dist/commonjs/models/components/commissioncreatedevent.js +261 -0
  29. package/dist/commonjs/models/components/commissioncreatedevent.js.map +1 -0
  30. package/dist/commonjs/models/components/index.d.ts +1 -0
  31. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/index.js +1 -0
  33. package/dist/commonjs/models/components/index.js.map +1 -1
  34. package/dist/commonjs/models/components/partnerenrolledevent.d.ts +131 -52
  35. package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/partnerenrolledevent.js +79 -21
  37. package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
  38. package/dist/commonjs/models/components/saleevent.d.ts +3 -0
  39. package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/saleevent.js +1 -0
  41. package/dist/commonjs/models/components/saleevent.js.map +1 -1
  42. package/dist/commonjs/models/components/webhookevent.d.ts +3 -2
  43. package/dist/commonjs/models/components/webhookevent.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/webhookevent.js +3 -0
  45. package/dist/commonjs/models/components/webhookevent.js.map +1 -1
  46. package/dist/commonjs/models/operations/createpartner.d.ts +131 -52
  47. package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/createpartner.js +79 -21
  49. package/dist/commonjs/models/operations/createpartner.js.map +1 -1
  50. package/dist/commonjs/models/operations/index.d.ts +1 -0
  51. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/index.js +1 -0
  53. package/dist/commonjs/models/operations/index.js.map +1 -1
  54. package/dist/commonjs/models/operations/listcommissions.d.ts +136 -4
  55. package/dist/commonjs/models/operations/listcommissions.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/listcommissions.js +95 -5
  57. package/dist/commonjs/models/operations/listcommissions.js.map +1 -1
  58. package/dist/commonjs/models/operations/listevents.d.ts +42 -0
  59. package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
  60. package/dist/commonjs/models/operations/listevents.js +27 -1
  61. package/dist/commonjs/models/operations/listevents.js.map +1 -1
  62. package/dist/commonjs/models/operations/listpartners.d.ts +549 -0
  63. package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -0
  64. package/dist/commonjs/models/operations/listpartners.js +358 -0
  65. package/dist/commonjs/models/operations/listpartners.js.map +1 -0
  66. package/dist/commonjs/models/operations/retrieveanalytics.d.ts +42 -0
  67. package/dist/commonjs/models/operations/retrieveanalytics.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/retrieveanalytics.js +28 -1
  69. package/dist/commonjs/models/operations/retrieveanalytics.js.map +1 -1
  70. package/dist/commonjs/models/operations/tracklead.d.ts +2 -2
  71. package/dist/commonjs/models/operations/tracklead.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/tracklead.js +2 -2
  73. package/dist/commonjs/models/operations/tracklead.js.map +1 -1
  74. package/dist/commonjs/models/operations/tracksale.d.ts +5 -2
  75. package/dist/commonjs/models/operations/tracksale.d.ts.map +1 -1
  76. package/dist/commonjs/models/operations/tracksale.js +3 -2
  77. package/dist/commonjs/models/operations/tracksale.js.map +1 -1
  78. package/dist/commonjs/models/operations/updatecommission.d.ts +136 -4
  79. package/dist/commonjs/models/operations/updatecommission.d.ts.map +1 -1
  80. package/dist/commonjs/models/operations/updatecommission.js +95 -5
  81. package/dist/commonjs/models/operations/updatecommission.js.map +1 -1
  82. package/dist/commonjs/sdk/partners.d.ts +7 -0
  83. package/dist/commonjs/sdk/partners.d.ts.map +1 -1
  84. package/dist/commonjs/sdk/partners.js +10 -0
  85. package/dist/commonjs/sdk/partners.js.map +1 -1
  86. package/dist/esm/funcs/analyticsRetrieve.js +1 -0
  87. package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
  88. package/dist/esm/funcs/eventsList.js +1 -0
  89. package/dist/esm/funcs/eventsList.js.map +1 -1
  90. package/dist/esm/funcs/partnersList.d.ts +18 -0
  91. package/dist/esm/funcs/partnersList.d.ts.map +1 -0
  92. package/dist/esm/funcs/partnersList.js +106 -0
  93. package/dist/esm/funcs/partnersList.js.map +1 -0
  94. package/dist/esm/lib/config.d.ts +3 -3
  95. package/dist/esm/lib/config.js +3 -3
  96. package/dist/esm/mcp-server/mcp-server.js +1 -1
  97. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  98. package/dist/esm/mcp-server/server.js +3 -1
  99. package/dist/esm/mcp-server/server.js.map +1 -1
  100. package/dist/esm/mcp-server/tools/partnersList.d.ts +8 -0
  101. package/dist/esm/mcp-server/tools/partnersList.d.ts.map +1 -0
  102. package/dist/esm/mcp-server/tools/partnersList.js +28 -0
  103. package/dist/esm/mcp-server/tools/partnersList.js.map +1 -0
  104. package/dist/esm/models/components/analyticstriggers.d.ts +6 -0
  105. package/dist/esm/models/components/analyticstriggers.d.ts.map +1 -1
  106. package/dist/esm/models/components/analyticstriggers.js +2 -0
  107. package/dist/esm/models/components/analyticstriggers.js.map +1 -1
  108. package/dist/esm/models/components/commissioncreatedevent.d.ts +310 -0
  109. package/dist/esm/models/components/commissioncreatedevent.d.ts.map +1 -0
  110. package/dist/esm/models/components/commissioncreatedevent.js +227 -0
  111. package/dist/esm/models/components/commissioncreatedevent.js.map +1 -0
  112. package/dist/esm/models/components/index.d.ts +1 -0
  113. package/dist/esm/models/components/index.d.ts.map +1 -1
  114. package/dist/esm/models/components/index.js +1 -0
  115. package/dist/esm/models/components/index.js.map +1 -1
  116. package/dist/esm/models/components/partnerenrolledevent.d.ts +131 -52
  117. package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
  118. package/dist/esm/models/components/partnerenrolledevent.js +78 -20
  119. package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
  120. package/dist/esm/models/components/saleevent.d.ts +3 -0
  121. package/dist/esm/models/components/saleevent.d.ts.map +1 -1
  122. package/dist/esm/models/components/saleevent.js +1 -0
  123. package/dist/esm/models/components/saleevent.js.map +1 -1
  124. package/dist/esm/models/components/webhookevent.d.ts +3 -2
  125. package/dist/esm/models/components/webhookevent.d.ts.map +1 -1
  126. package/dist/esm/models/components/webhookevent.js +3 -0
  127. package/dist/esm/models/components/webhookevent.js.map +1 -1
  128. package/dist/esm/models/operations/createpartner.d.ts +131 -52
  129. package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
  130. package/dist/esm/models/operations/createpartner.js +78 -20
  131. package/dist/esm/models/operations/createpartner.js.map +1 -1
  132. package/dist/esm/models/operations/index.d.ts +1 -0
  133. package/dist/esm/models/operations/index.d.ts.map +1 -1
  134. package/dist/esm/models/operations/index.js +1 -0
  135. package/dist/esm/models/operations/index.js.map +1 -1
  136. package/dist/esm/models/operations/listcommissions.d.ts +136 -4
  137. package/dist/esm/models/operations/listcommissions.d.ts.map +1 -1
  138. package/dist/esm/models/operations/listcommissions.js +90 -4
  139. package/dist/esm/models/operations/listcommissions.js.map +1 -1
  140. package/dist/esm/models/operations/listevents.d.ts +42 -0
  141. package/dist/esm/models/operations/listevents.d.ts.map +1 -1
  142. package/dist/esm/models/operations/listevents.js +26 -0
  143. package/dist/esm/models/operations/listevents.js.map +1 -1
  144. package/dist/esm/models/operations/listpartners.d.ts +549 -0
  145. package/dist/esm/models/operations/listpartners.d.ts.map +1 -0
  146. package/dist/esm/models/operations/listpartners.js +326 -0
  147. package/dist/esm/models/operations/listpartners.js.map +1 -0
  148. package/dist/esm/models/operations/retrieveanalytics.d.ts +42 -0
  149. package/dist/esm/models/operations/retrieveanalytics.d.ts.map +1 -1
  150. package/dist/esm/models/operations/retrieveanalytics.js +27 -0
  151. package/dist/esm/models/operations/retrieveanalytics.js.map +1 -1
  152. package/dist/esm/models/operations/tracklead.d.ts +2 -2
  153. package/dist/esm/models/operations/tracklead.d.ts.map +1 -1
  154. package/dist/esm/models/operations/tracklead.js +2 -2
  155. package/dist/esm/models/operations/tracklead.js.map +1 -1
  156. package/dist/esm/models/operations/tracksale.d.ts +5 -2
  157. package/dist/esm/models/operations/tracksale.d.ts.map +1 -1
  158. package/dist/esm/models/operations/tracksale.js +3 -2
  159. package/dist/esm/models/operations/tracksale.js.map +1 -1
  160. package/dist/esm/models/operations/updatecommission.d.ts +136 -4
  161. package/dist/esm/models/operations/updatecommission.d.ts.map +1 -1
  162. package/dist/esm/models/operations/updatecommission.js +90 -4
  163. package/dist/esm/models/operations/updatecommission.js.map +1 -1
  164. package/dist/esm/sdk/partners.d.ts +7 -0
  165. package/dist/esm/sdk/partners.d.ts.map +1 -1
  166. package/dist/esm/sdk/partners.js +10 -0
  167. package/dist/esm/sdk/partners.js.map +1 -1
  168. package/docs/sdks/partners/README.md +78 -0
  169. package/examples/README.md +5 -0
  170. package/examples/linksCreate.example.ts +2 -0
  171. package/examples/package-lock.json +2 -2
  172. package/jsr.json +1 -1
  173. package/package.json +2 -2
  174. package/src/funcs/analyticsRetrieve.ts +1 -0
  175. package/src/funcs/eventsList.ts +1 -0
  176. package/src/funcs/partnersList.ts +227 -0
  177. package/src/lib/config.ts +3 -3
  178. package/src/mcp-server/mcp-server.ts +1 -1
  179. package/src/mcp-server/server.ts +3 -1
  180. package/src/mcp-server/tools/partnersList.ts +37 -0
  181. package/src/models/components/analyticstriggers.ts +2 -0
  182. package/src/models/components/commissioncreatedevent.ts +503 -0
  183. package/src/models/components/index.ts +1 -0
  184. package/src/models/components/partnerenrolledevent.ts +175 -72
  185. package/src/models/components/saleevent.ts +1 -0
  186. package/src/models/components/webhookevent.ts +12 -2
  187. package/src/models/operations/createpartner.ts +175 -72
  188. package/src/models/operations/index.ts +1 -0
  189. package/src/models/operations/listcommissions.ts +242 -8
  190. package/src/models/operations/listevents.ts +42 -0
  191. package/src/models/operations/listpartners.ts +748 -0
  192. package/src/models/operations/retrieveanalytics.ts +40 -0
  193. package/src/models/operations/tracklead.ts +4 -4
  194. package/src/models/operations/tracksale.ts +5 -4
  195. package/src/models/operations/updatecommission.ts +242 -8
  196. package/src/sdk/partners.ts +18 -0
@@ -501,6 +501,22 @@ export type CreatePartnerLink = {
501
501
  saleAmount?: number | undefined;
502
502
  };
503
503
 
504
+ /**
505
+ * If the partner was banned from the program, this is the reason for the ban.
506
+ */
507
+ export const BannedReason = {
508
+ TosViolation: "tos_violation",
509
+ InappropriateContent: "inappropriate_content",
510
+ FakeTraffic: "fake_traffic",
511
+ Fraud: "fraud",
512
+ Spam: "spam",
513
+ BrandAbuse: "brand_abuse",
514
+ } as const;
515
+ /**
516
+ * If the partner was banned from the program, this is the reason for the ban.
517
+ */
518
+ export type BannedReason = ClosedEnum<typeof BannedReason>;
519
+
504
520
  /**
505
521
  * The created partner
506
522
  */
@@ -529,30 +545,6 @@ export type CreatePartnerResponseBody = {
529
545
  * The partner's country (required for tax purposes).
530
546
  */
531
547
  country: string | null;
532
- /**
533
- * The partner's website URL (including the https protocol).
534
- */
535
- website: string | null;
536
- /**
537
- * The partner's YouTube channel username (e.g. `johndoe`).
538
- */
539
- youtube: string | null;
540
- /**
541
- * The partner's Twitter username (e.g. `johndoe`).
542
- */
543
- twitter: string | null;
544
- /**
545
- * The partner's LinkedIn username (e.g. `johndoe`).
546
- */
547
- linkedin: string | null;
548
- /**
549
- * The partner's Instagram username (e.g. `johndoe`).
550
- */
551
- instagram: string | null;
552
- /**
553
- * The partner's TikTok username (e.g. `johndoe`).
554
- */
555
- tiktok: string | null;
556
548
  /**
557
549
  * The partner's PayPal email (for receiving payouts via PayPal).
558
550
  */
@@ -566,55 +558,99 @@ export type CreatePartnerResponseBody = {
566
558
  */
567
559
  payoutsEnabledAt: string | null;
568
560
  /**
569
- * The date when the partner was created on Dub.
561
+ * The partner's unique ID on Dub.
570
562
  */
571
- createdAt: string;
563
+ partnerId: string;
572
564
  /**
573
- * The status of the partner's enrollment in the program.
565
+ * The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.
574
566
  */
575
- status: CreatePartnerStatus;
567
+ tenantId: string | null;
576
568
  /**
577
569
  * The program's unique ID on Dub.
578
570
  */
579
571
  programId: string;
572
+ createdAt: string;
580
573
  /**
581
- * The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.
574
+ * The status of the partner's enrollment in the program.
582
575
  */
583
- tenantId: string | null;
576
+ status: CreatePartnerStatus;
584
577
  /**
585
578
  * The partner's referral links in this program.
586
579
  */
587
580
  links: Array<CreatePartnerLink> | null;
588
581
  /**
589
- * The total number of clicks on the partner's links.
582
+ * The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false.
583
+ */
584
+ totalCommissions?: number | undefined;
585
+ clickRewardId?: string | null | undefined;
586
+ leadRewardId?: string | null | undefined;
587
+ saleRewardId?: string | null | undefined;
588
+ discountId?: string | null | undefined;
589
+ /**
590
+ * If the partner submitted an application to join the program, this is the ID of the application.
591
+ */
592
+ applicationId?: string | null | undefined;
593
+ /**
594
+ * If the partner was banned from the program, this is the date of the ban.
595
+ */
596
+ bannedAt?: string | null | undefined;
597
+ /**
598
+ * If the partner was banned from the program, this is the reason for the ban.
599
+ */
600
+ bannedReason?: BannedReason | null | undefined;
601
+ /**
602
+ * The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false.
590
603
  */
591
604
  clicks?: number | undefined;
592
605
  /**
593
- * The total number of leads generated by the partner's links.
606
+ * The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
594
607
  */
595
608
  leads?: number | undefined;
596
609
  /**
597
- * The total number of sales generated by the partner's links.
610
+ * The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
598
611
  */
599
612
  sales?: number | undefined;
600
613
  /**
601
- * The total amount of sales (in cents) generated by the partner's links.
614
+ * The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
602
615
  */
603
616
  saleAmount?: number | undefined;
604
617
  /**
605
- * The total commissions paid to the partner for their referrals.
618
+ * The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false.
606
619
  */
607
- totalCommissions?: number | undefined;
620
+ netRevenue?: number | undefined;
608
621
  /**
609
- * The total net revenue generated by the partner.
622
+ * The partner's website URL (including the https protocol).
610
623
  */
611
- netRevenue?: number | undefined;
624
+ website?: string | null | undefined;
625
+ websiteTxtRecord?: string | null | undefined;
626
+ websiteVerifiedAt?: string | null | undefined;
627
+ /**
628
+ * The partner's YouTube channel username (e.g. `johndoe`).
629
+ */
630
+ youtube?: string | null | undefined;
631
+ youtubeVerifiedAt?: string | null | undefined;
632
+ youtubeSubscriberCount?: number | null | undefined;
633
+ youtubeViewCount?: number | null | undefined;
634
+ /**
635
+ * The partner's Twitter username (e.g. `johndoe`).
636
+ */
637
+ twitter?: string | null | undefined;
638
+ twitterVerifiedAt?: string | null | undefined;
639
+ /**
640
+ * The partner's LinkedIn username (e.g. `johndoe`).
641
+ */
642
+ linkedin?: string | null | undefined;
643
+ linkedinVerifiedAt?: string | null | undefined;
644
+ /**
645
+ * The partner's Instagram username (e.g. `johndoe`).
646
+ */
647
+ instagram?: string | null | undefined;
648
+ instagramVerifiedAt?: string | null | undefined;
612
649
  /**
613
- * DEPRECATED: The total earnings/commissions accrued by the partner's links.
614
- *
615
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
650
+ * The partner's TikTok username (e.g. `johndoe`).
616
651
  */
617
- earnings?: number | undefined;
652
+ tiktok?: string | null | undefined;
653
+ tiktokVerifiedAt?: string | null | undefined;
618
654
  };
619
655
 
620
656
  /** @internal */
@@ -1120,6 +1156,25 @@ export function createPartnerLinkFromJSON(
1120
1156
  );
1121
1157
  }
1122
1158
 
1159
+ /** @internal */
1160
+ export const BannedReason$inboundSchema: z.ZodNativeEnum<typeof BannedReason> =
1161
+ z.nativeEnum(BannedReason);
1162
+
1163
+ /** @internal */
1164
+ export const BannedReason$outboundSchema: z.ZodNativeEnum<typeof BannedReason> =
1165
+ BannedReason$inboundSchema;
1166
+
1167
+ /**
1168
+ * @internal
1169
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1170
+ */
1171
+ export namespace BannedReason$ {
1172
+ /** @deprecated use `BannedReason$inboundSchema` instead. */
1173
+ export const inboundSchema = BannedReason$inboundSchema;
1174
+ /** @deprecated use `BannedReason$outboundSchema` instead. */
1175
+ export const outboundSchema = BannedReason$outboundSchema;
1176
+ }
1177
+
1123
1178
  /** @internal */
1124
1179
  export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
1125
1180
  CreatePartnerResponseBody,
@@ -1132,27 +1187,43 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
1132
1187
  image: z.nullable(z.string()),
1133
1188
  description: z.nullable(z.string()).optional(),
1134
1189
  country: z.nullable(z.string()),
1135
- website: z.nullable(z.string()),
1136
- youtube: z.nullable(z.string()),
1137
- twitter: z.nullable(z.string()),
1138
- linkedin: z.nullable(z.string()),
1139
- instagram: z.nullable(z.string()),
1140
- tiktok: z.nullable(z.string()),
1141
1190
  paypalEmail: z.nullable(z.string()),
1142
1191
  stripeConnectId: z.nullable(z.string()),
1143
1192
  payoutsEnabledAt: z.nullable(z.string()),
1193
+ partnerId: z.string(),
1194
+ tenantId: z.nullable(z.string()),
1195
+ programId: z.string(),
1144
1196
  createdAt: z.string(),
1145
1197
  status: CreatePartnerStatus$inboundSchema,
1146
- programId: z.string(),
1147
- tenantId: z.nullable(z.string()),
1148
1198
  links: z.nullable(z.array(z.lazy(() => CreatePartnerLink$inboundSchema))),
1199
+ totalCommissions: z.number().default(0),
1200
+ clickRewardId: z.nullable(z.string()).optional(),
1201
+ leadRewardId: z.nullable(z.string()).optional(),
1202
+ saleRewardId: z.nullable(z.string()).optional(),
1203
+ discountId: z.nullable(z.string()).optional(),
1204
+ applicationId: z.nullable(z.string()).optional(),
1205
+ bannedAt: z.nullable(z.string()).optional(),
1206
+ bannedReason: z.nullable(BannedReason$inboundSchema).optional(),
1149
1207
  clicks: z.number().default(0),
1150
1208
  leads: z.number().default(0),
1151
1209
  sales: z.number().default(0),
1152
1210
  saleAmount: z.number().default(0),
1153
- totalCommissions: z.number().default(0),
1154
1211
  netRevenue: z.number().default(0),
1155
- earnings: z.number().default(0),
1212
+ website: z.nullable(z.string()).optional(),
1213
+ websiteTxtRecord: z.nullable(z.string()).optional(),
1214
+ websiteVerifiedAt: z.nullable(z.string()).optional(),
1215
+ youtube: z.nullable(z.string()).optional(),
1216
+ youtubeVerifiedAt: z.nullable(z.string()).optional(),
1217
+ youtubeSubscriberCount: z.nullable(z.number()).optional(),
1218
+ youtubeViewCount: z.nullable(z.number()).optional(),
1219
+ twitter: z.nullable(z.string()).optional(),
1220
+ twitterVerifiedAt: z.nullable(z.string()).optional(),
1221
+ linkedin: z.nullable(z.string()).optional(),
1222
+ linkedinVerifiedAt: z.nullable(z.string()).optional(),
1223
+ instagram: z.nullable(z.string()).optional(),
1224
+ instagramVerifiedAt: z.nullable(z.string()).optional(),
1225
+ tiktok: z.nullable(z.string()).optional(),
1226
+ tiktokVerifiedAt: z.nullable(z.string()).optional(),
1156
1227
  });
1157
1228
 
1158
1229
  /** @internal */
@@ -1163,27 +1234,43 @@ export type CreatePartnerResponseBody$Outbound = {
1163
1234
  image: string | null;
1164
1235
  description?: string | null | undefined;
1165
1236
  country: string | null;
1166
- website: string | null;
1167
- youtube: string | null;
1168
- twitter: string | null;
1169
- linkedin: string | null;
1170
- instagram: string | null;
1171
- tiktok: string | null;
1172
1237
  paypalEmail: string | null;
1173
1238
  stripeConnectId: string | null;
1174
1239
  payoutsEnabledAt: string | null;
1240
+ partnerId: string;
1241
+ tenantId: string | null;
1242
+ programId: string;
1175
1243
  createdAt: string;
1176
1244
  status: string;
1177
- programId: string;
1178
- tenantId: string | null;
1179
1245
  links: Array<CreatePartnerLink$Outbound> | null;
1246
+ totalCommissions: number;
1247
+ clickRewardId?: string | null | undefined;
1248
+ leadRewardId?: string | null | undefined;
1249
+ saleRewardId?: string | null | undefined;
1250
+ discountId?: string | null | undefined;
1251
+ applicationId?: string | null | undefined;
1252
+ bannedAt?: string | null | undefined;
1253
+ bannedReason?: string | null | undefined;
1180
1254
  clicks: number;
1181
1255
  leads: number;
1182
1256
  sales: number;
1183
1257
  saleAmount: number;
1184
- totalCommissions: number;
1185
1258
  netRevenue: number;
1186
- earnings: number;
1259
+ website?: string | null | undefined;
1260
+ websiteTxtRecord?: string | null | undefined;
1261
+ websiteVerifiedAt?: string | null | undefined;
1262
+ youtube?: string | null | undefined;
1263
+ youtubeVerifiedAt?: string | null | undefined;
1264
+ youtubeSubscriberCount?: number | null | undefined;
1265
+ youtubeViewCount?: number | null | undefined;
1266
+ twitter?: string | null | undefined;
1267
+ twitterVerifiedAt?: string | null | undefined;
1268
+ linkedin?: string | null | undefined;
1269
+ linkedinVerifiedAt?: string | null | undefined;
1270
+ instagram?: string | null | undefined;
1271
+ instagramVerifiedAt?: string | null | undefined;
1272
+ tiktok?: string | null | undefined;
1273
+ tiktokVerifiedAt?: string | null | undefined;
1187
1274
  };
1188
1275
 
1189
1276
  /** @internal */
@@ -1198,27 +1285,43 @@ export const CreatePartnerResponseBody$outboundSchema: z.ZodType<
1198
1285
  image: z.nullable(z.string()),
1199
1286
  description: z.nullable(z.string()).optional(),
1200
1287
  country: z.nullable(z.string()),
1201
- website: z.nullable(z.string()),
1202
- youtube: z.nullable(z.string()),
1203
- twitter: z.nullable(z.string()),
1204
- linkedin: z.nullable(z.string()),
1205
- instagram: z.nullable(z.string()),
1206
- tiktok: z.nullable(z.string()),
1207
1288
  paypalEmail: z.nullable(z.string()),
1208
1289
  stripeConnectId: z.nullable(z.string()),
1209
1290
  payoutsEnabledAt: z.nullable(z.string()),
1291
+ partnerId: z.string(),
1292
+ tenantId: z.nullable(z.string()),
1293
+ programId: z.string(),
1210
1294
  createdAt: z.string(),
1211
1295
  status: CreatePartnerStatus$outboundSchema,
1212
- programId: z.string(),
1213
- tenantId: z.nullable(z.string()),
1214
1296
  links: z.nullable(z.array(z.lazy(() => CreatePartnerLink$outboundSchema))),
1297
+ totalCommissions: z.number().default(0),
1298
+ clickRewardId: z.nullable(z.string()).optional(),
1299
+ leadRewardId: z.nullable(z.string()).optional(),
1300
+ saleRewardId: z.nullable(z.string()).optional(),
1301
+ discountId: z.nullable(z.string()).optional(),
1302
+ applicationId: z.nullable(z.string()).optional(),
1303
+ bannedAt: z.nullable(z.string()).optional(),
1304
+ bannedReason: z.nullable(BannedReason$outboundSchema).optional(),
1215
1305
  clicks: z.number().default(0),
1216
1306
  leads: z.number().default(0),
1217
1307
  sales: z.number().default(0),
1218
1308
  saleAmount: z.number().default(0),
1219
- totalCommissions: z.number().default(0),
1220
1309
  netRevenue: z.number().default(0),
1221
- earnings: z.number().default(0),
1310
+ website: z.nullable(z.string()).optional(),
1311
+ websiteTxtRecord: z.nullable(z.string()).optional(),
1312
+ websiteVerifiedAt: z.nullable(z.string()).optional(),
1313
+ youtube: z.nullable(z.string()).optional(),
1314
+ youtubeVerifiedAt: z.nullable(z.string()).optional(),
1315
+ youtubeSubscriberCount: z.nullable(z.number()).optional(),
1316
+ youtubeViewCount: z.nullable(z.number()).optional(),
1317
+ twitter: z.nullable(z.string()).optional(),
1318
+ twitterVerifiedAt: z.nullable(z.string()).optional(),
1319
+ linkedin: z.nullable(z.string()).optional(),
1320
+ linkedinVerifiedAt: z.nullable(z.string()).optional(),
1321
+ instagram: z.nullable(z.string()).optional(),
1322
+ instagramVerifiedAt: z.nullable(z.string()).optional(),
1323
+ tiktok: z.nullable(z.string()).optional(),
1324
+ tiktokVerifiedAt: z.nullable(z.string()).optional(),
1222
1325
  });
1223
1326
 
1224
1327
  /**
@@ -31,6 +31,7 @@ export * from "./listcommissions.js";
31
31
  export * from "./listdomains.js";
32
32
  export * from "./listevents.js";
33
33
  export * from "./listfolders.js";
34
+ export * from "./listpartners.js";
34
35
  export * from "./registerdomain.js";
35
36
  export * from "./retrieveanalytics.js";
36
37
  export * from "./retrievelinks.js";
@@ -153,6 +153,72 @@ export const ListCommissionsStatus = {
153
153
  } as const;
154
154
  export type ListCommissionsStatus = ClosedEnum<typeof ListCommissionsStatus>;
155
155
 
156
+ export type ListCommissionsPartner = {
157
+ /**
158
+ * The partner's unique ID on Dub.
159
+ */
160
+ id: string;
161
+ /**
162
+ * The partner's full legal name.
163
+ */
164
+ name: string;
165
+ /**
166
+ * The partner's email address. Should be a unique value across Dub.
167
+ */
168
+ email: string | null;
169
+ /**
170
+ * The partner's avatar image.
171
+ */
172
+ image: string | null;
173
+ /**
174
+ * The date when the partner enabled payouts.
175
+ */
176
+ payoutsEnabledAt: string | null;
177
+ /**
178
+ * The partner's country (required for tax purposes).
179
+ */
180
+ country: string | null;
181
+ };
182
+
183
+ export type ListCommissionsCustomer = {
184
+ /**
185
+ * 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`).
186
+ */
187
+ id: string;
188
+ /**
189
+ * Unique identifier for the customer in the client's app.
190
+ */
191
+ externalId: string;
192
+ /**
193
+ * Name of the customer.
194
+ */
195
+ name: string;
196
+ /**
197
+ * Email of the customer.
198
+ */
199
+ email?: string | null | undefined;
200
+ /**
201
+ * Avatar URL of the customer.
202
+ */
203
+ avatar?: string | null | undefined;
204
+ /**
205
+ * Country of the customer.
206
+ */
207
+ country?: string | null | undefined;
208
+ /**
209
+ * Total number of sales for the customer.
210
+ */
211
+ sales?: number | null | undefined;
212
+ /**
213
+ * Total amount of sales for the customer.
214
+ */
215
+ saleAmount?: number | null | undefined;
216
+ /**
217
+ * The date the customer was created.
218
+ */
219
+ createdAt: string;
220
+ };
221
+
156
222
  export type ListCommissionsResponseBody = {
157
223
  /**
158
224
  * The commission's unique ID on Dub.
@@ -163,10 +229,17 @@ export type ListCommissionsResponseBody = {
163
229
  earnings: number;
164
230
  currency: string;
165
231
  status: ListCommissionsStatus;
166
- invoiceId?: string | null | undefined;
167
- description?: string | null | undefined;
232
+ invoiceId: string | null;
233
+ description: string | null;
234
+ quantity: number;
235
+ /**
236
+ * The user who created the manual commission.
237
+ */
238
+ userId?: string | null | undefined;
168
239
  createdAt: string;
169
240
  updatedAt: string;
241
+ partner: ListCommissionsPartner;
242
+ customer?: ListCommissionsCustomer | null | undefined;
170
243
  };
171
244
 
172
245
  /** @internal */
@@ -407,6 +480,153 @@ export namespace ListCommissionsStatus$ {
407
480
  export const outboundSchema = ListCommissionsStatus$outboundSchema;
408
481
  }
409
482
 
483
+ /** @internal */
484
+ export const ListCommissionsPartner$inboundSchema: z.ZodType<
485
+ ListCommissionsPartner,
486
+ z.ZodTypeDef,
487
+ unknown
488
+ > = z.object({
489
+ id: z.string(),
490
+ name: z.string(),
491
+ email: z.nullable(z.string()),
492
+ image: z.nullable(z.string()),
493
+ payoutsEnabledAt: z.nullable(z.string()),
494
+ country: z.nullable(z.string()),
495
+ });
496
+
497
+ /** @internal */
498
+ export type ListCommissionsPartner$Outbound = {
499
+ id: string;
500
+ name: string;
501
+ email: string | null;
502
+ image: string | null;
503
+ payoutsEnabledAt: string | null;
504
+ country: string | null;
505
+ };
506
+
507
+ /** @internal */
508
+ export const ListCommissionsPartner$outboundSchema: z.ZodType<
509
+ ListCommissionsPartner$Outbound,
510
+ z.ZodTypeDef,
511
+ ListCommissionsPartner
512
+ > = z.object({
513
+ id: z.string(),
514
+ name: z.string(),
515
+ email: z.nullable(z.string()),
516
+ image: z.nullable(z.string()),
517
+ payoutsEnabledAt: z.nullable(z.string()),
518
+ country: z.nullable(z.string()),
519
+ });
520
+
521
+ /**
522
+ * @internal
523
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
524
+ */
525
+ export namespace ListCommissionsPartner$ {
526
+ /** @deprecated use `ListCommissionsPartner$inboundSchema` instead. */
527
+ export const inboundSchema = ListCommissionsPartner$inboundSchema;
528
+ /** @deprecated use `ListCommissionsPartner$outboundSchema` instead. */
529
+ export const outboundSchema = ListCommissionsPartner$outboundSchema;
530
+ /** @deprecated use `ListCommissionsPartner$Outbound` instead. */
531
+ export type Outbound = ListCommissionsPartner$Outbound;
532
+ }
533
+
534
+ export function listCommissionsPartnerToJSON(
535
+ listCommissionsPartner: ListCommissionsPartner,
536
+ ): string {
537
+ return JSON.stringify(
538
+ ListCommissionsPartner$outboundSchema.parse(listCommissionsPartner),
539
+ );
540
+ }
541
+
542
+ export function listCommissionsPartnerFromJSON(
543
+ jsonString: string,
544
+ ): SafeParseResult<ListCommissionsPartner, SDKValidationError> {
545
+ return safeParse(
546
+ jsonString,
547
+ (x) => ListCommissionsPartner$inboundSchema.parse(JSON.parse(x)),
548
+ `Failed to parse 'ListCommissionsPartner' from JSON`,
549
+ );
550
+ }
551
+
552
+ /** @internal */
553
+ export const ListCommissionsCustomer$inboundSchema: z.ZodType<
554
+ ListCommissionsCustomer,
555
+ z.ZodTypeDef,
556
+ unknown
557
+ > = z.object({
558
+ id: z.string(),
559
+ externalId: z.string(),
560
+ name: z.string(),
561
+ email: z.nullable(z.string()).optional(),
562
+ avatar: z.nullable(z.string()).optional(),
563
+ country: z.nullable(z.string()).optional(),
564
+ sales: z.nullable(z.number()).optional(),
565
+ saleAmount: z.nullable(z.number()).optional(),
566
+ createdAt: z.string(),
567
+ });
568
+
569
+ /** @internal */
570
+ export type ListCommissionsCustomer$Outbound = {
571
+ id: string;
572
+ externalId: string;
573
+ name: string;
574
+ email?: string | null | undefined;
575
+ avatar?: string | null | undefined;
576
+ country?: string | null | undefined;
577
+ sales?: number | null | undefined;
578
+ saleAmount?: number | null | undefined;
579
+ createdAt: string;
580
+ };
581
+
582
+ /** @internal */
583
+ export const ListCommissionsCustomer$outboundSchema: z.ZodType<
584
+ ListCommissionsCustomer$Outbound,
585
+ z.ZodTypeDef,
586
+ ListCommissionsCustomer
587
+ > = z.object({
588
+ id: z.string(),
589
+ externalId: z.string(),
590
+ name: z.string(),
591
+ email: z.nullable(z.string()).optional(),
592
+ avatar: z.nullable(z.string()).optional(),
593
+ country: z.nullable(z.string()).optional(),
594
+ sales: z.nullable(z.number()).optional(),
595
+ saleAmount: z.nullable(z.number()).optional(),
596
+ createdAt: z.string(),
597
+ });
598
+
599
+ /**
600
+ * @internal
601
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
602
+ */
603
+ export namespace ListCommissionsCustomer$ {
604
+ /** @deprecated use `ListCommissionsCustomer$inboundSchema` instead. */
605
+ export const inboundSchema = ListCommissionsCustomer$inboundSchema;
606
+ /** @deprecated use `ListCommissionsCustomer$outboundSchema` instead. */
607
+ export const outboundSchema = ListCommissionsCustomer$outboundSchema;
608
+ /** @deprecated use `ListCommissionsCustomer$Outbound` instead. */
609
+ export type Outbound = ListCommissionsCustomer$Outbound;
610
+ }
611
+
612
+ export function listCommissionsCustomerToJSON(
613
+ listCommissionsCustomer: ListCommissionsCustomer,
614
+ ): string {
615
+ return JSON.stringify(
616
+ ListCommissionsCustomer$outboundSchema.parse(listCommissionsCustomer),
617
+ );
618
+ }
619
+
620
+ export function listCommissionsCustomerFromJSON(
621
+ jsonString: string,
622
+ ): SafeParseResult<ListCommissionsCustomer, SDKValidationError> {
623
+ return safeParse(
624
+ jsonString,
625
+ (x) => ListCommissionsCustomer$inboundSchema.parse(JSON.parse(x)),
626
+ `Failed to parse 'ListCommissionsCustomer' from JSON`,
627
+ );
628
+ }
629
+
410
630
  /** @internal */
411
631
  export const ListCommissionsResponseBody$inboundSchema: z.ZodType<
412
632
  ListCommissionsResponseBody,
@@ -419,10 +639,15 @@ export const ListCommissionsResponseBody$inboundSchema: z.ZodType<
419
639
  earnings: z.number(),
420
640
  currency: z.string(),
421
641
  status: ListCommissionsStatus$inboundSchema,
422
- invoiceId: z.nullable(z.string()).optional(),
423
- description: z.nullable(z.string()).optional(),
642
+ invoiceId: z.nullable(z.string()),
643
+ description: z.nullable(z.string()),
644
+ quantity: z.number(),
645
+ userId: z.nullable(z.string()).optional(),
424
646
  createdAt: z.string(),
425
647
  updatedAt: z.string(),
648
+ partner: z.lazy(() => ListCommissionsPartner$inboundSchema),
649
+ customer: z.nullable(z.lazy(() => ListCommissionsCustomer$inboundSchema))
650
+ .optional(),
426
651
  });
427
652
 
428
653
  /** @internal */
@@ -433,10 +658,14 @@ export type ListCommissionsResponseBody$Outbound = {
433
658
  earnings: number;
434
659
  currency: string;
435
660
  status: string;
436
- invoiceId?: string | null | undefined;
437
- description?: string | null | undefined;
661
+ invoiceId: string | null;
662
+ description: string | null;
663
+ quantity: number;
664
+ userId?: string | null | undefined;
438
665
  createdAt: string;
439
666
  updatedAt: string;
667
+ partner: ListCommissionsPartner$Outbound;
668
+ customer?: ListCommissionsCustomer$Outbound | null | undefined;
440
669
  };
441
670
 
442
671
  /** @internal */
@@ -451,10 +680,15 @@ export const ListCommissionsResponseBody$outboundSchema: z.ZodType<
451
680
  earnings: z.number(),
452
681
  currency: z.string(),
453
682
  status: ListCommissionsStatus$outboundSchema,
454
- invoiceId: z.nullable(z.string()).optional(),
455
- description: z.nullable(z.string()).optional(),
683
+ invoiceId: z.nullable(z.string()),
684
+ description: z.nullable(z.string()),
685
+ quantity: z.number(),
686
+ userId: z.nullable(z.string()).optional(),
456
687
  createdAt: z.string(),
457
688
  updatedAt: z.string(),
689
+ partner: z.lazy(() => ListCommissionsPartner$outboundSchema),
690
+ customer: z.nullable(z.lazy(() => ListCommissionsCustomer$outboundSchema))
691
+ .optional(),
458
692
  });
459
693
 
460
694
  /**