dub 0.32.0__py3-none-any.whl → 0.34.0__py3-none-any.whl

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 (70) hide show
  1. dub/_version.py +3 -3
  2. dub/analytics.py +6 -4
  3. dub/basesdk.py +6 -0
  4. dub/commissions.py +12 -8
  5. dub/customers.py +24 -313
  6. dub/domains.py +34 -26
  7. dub/embed_tokens.py +6 -4
  8. dub/events.py +6 -4
  9. dub/folders.py +24 -20
  10. dub/links.py +58 -54
  11. dub/models/components/__init__.py +81 -149
  12. dub/models/components/analyticstopurls.py +2 -2
  13. dub/models/components/leadcreatedevent.py +15 -14
  14. dub/models/components/linkclickedevent.py +19 -18
  15. dub/models/components/linkerrorschema.py +12 -12
  16. dub/models/components/linkschema.py +9 -3
  17. dub/models/components/linktagschema.py +3 -3
  18. dub/models/components/linktagschemaoutput.py +38 -0
  19. dub/models/components/linkwebhookevent.py +15 -16
  20. dub/models/components/partnerapplicationsubmittedevent.py +269 -0
  21. dub/models/components/partnerenrolledevent.py +68 -8
  22. dub/models/components/salecreatedevent.py +15 -14
  23. dub/models/components/webhookevent.py +6 -0
  24. dub/models/components/workspaceschema.py +6 -0
  25. dub/models/operations/__init__.py +147 -57
  26. dub/models/operations/banpartner.py +83 -0
  27. dub/models/operations/createpartner.py +68 -59
  28. dub/models/operations/createpartnerlink.py +0 -51
  29. dub/models/operations/createreferralsembedtoken.py +0 -51
  30. dub/models/operations/getcustomers.py +18 -0
  31. dub/models/operations/getlinkinfo.py +0 -2
  32. dub/models/operations/getlinks.py +2 -2
  33. dub/models/operations/getlinkscount.py +2 -2
  34. dub/models/operations/getqrcode.py +1 -1
  35. dub/models/operations/listcommissions.py +13 -2
  36. dub/models/operations/listdomains.py +1 -1
  37. dub/models/operations/listevents.py +2026 -21
  38. dub/models/operations/listpartners.py +75 -8
  39. dub/models/operations/retrieveanalytics.py +28 -5
  40. dub/models/operations/retrievelinks.py +44 -9
  41. dub/models/operations/retrievepartneranalytics.py +51 -11
  42. dub/models/operations/tracklead.py +4 -4
  43. dub/models/operations/updatecommission.py +7 -2
  44. dub/models/operations/updatecustomer.py +23 -11
  45. dub/models/operations/updatelink.py +0 -2
  46. dub/models/operations/updateworkspace.py +3 -3
  47. dub/models/operations/upsertpartnerlink.py +0 -51
  48. dub/partners.py +316 -24
  49. dub/qr_codes.py +4 -2
  50. dub/tags.py +24 -20
  51. dub/track.py +12 -16
  52. dub/types/basemodel.py +41 -3
  53. dub/utils/__init__.py +0 -3
  54. dub/utils/enums.py +60 -0
  55. dub/utils/forms.py +21 -10
  56. dub/utils/queryparams.py +14 -2
  57. dub/utils/requestbodies.py +3 -3
  58. dub/utils/retries.py +69 -5
  59. dub/utils/serializers.py +0 -20
  60. dub/utils/unmarshal_json_response.py +15 -1
  61. dub/workspaces.py +12 -16
  62. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/METADATA +15 -33
  63. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/RECORD +65 -67
  64. dub/models/components/clickevent.py +0 -556
  65. dub/models/components/continentcode.py +0 -16
  66. dub/models/components/leadevent.py +0 -680
  67. dub/models/components/saleevent.py +0 -779
  68. dub/models/operations/createcustomer.py +0 -382
  69. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/WHEEL +0 -0
  70. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/licenses/LICENSE +0 -0
@@ -57,8 +57,6 @@ class LinkPropsTypedDict(TypedDict):
57
57
  r"""The unique IDs of the tags assigned to the short link."""
58
58
  tag_names: NotRequired[CreatePartnerTagNamesTypedDict]
59
59
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
60
- folder_id: NotRequired[Nullable[str]]
61
- r"""The unique ID existing folder to assign the short link to."""
62
60
  comments: NotRequired[Nullable[str]]
63
61
  r"""The comments for the short link."""
64
62
  expires_at: NotRequired[Nullable[str]]
@@ -85,18 +83,6 @@ class LinkPropsTypedDict(TypedDict):
85
83
  r"""The Android destination URL for the short link for Android device targeting."""
86
84
  do_index: NotRequired[bool]
87
85
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
88
- utm_source: NotRequired[Nullable[str]]
89
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
90
- utm_medium: NotRequired[Nullable[str]]
91
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
92
- utm_campaign: NotRequired[Nullable[str]]
93
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
94
- utm_term: NotRequired[Nullable[str]]
95
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
96
- utm_content: NotRequired[Nullable[str]]
97
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
98
- ref: NotRequired[Nullable[str]]
99
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
100
86
  test_variants: NotRequired[Nullable[List[CreatePartnerTestVariantsTypedDict]]]
101
87
  r"""An array of A/B test URLs and the percentage of traffic to send to each URL."""
102
88
  test_started_at: NotRequired[Nullable[str]]
@@ -137,11 +123,6 @@ class LinkProps(BaseModel):
137
123
  ] = None
138
124
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
139
125
 
140
- folder_id: Annotated[OptionalNullable[str], pydantic.Field(alias="folderId")] = (
141
- UNSET
142
- )
143
- r"""The unique ID existing folder to assign the short link to."""
144
-
145
126
  comments: OptionalNullable[str] = UNSET
146
127
  r"""The comments for the short link."""
147
128
 
@@ -185,24 +166,6 @@ class LinkProps(BaseModel):
185
166
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
186
167
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
187
168
 
188
- utm_source: OptionalNullable[str] = UNSET
189
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
190
-
191
- utm_medium: OptionalNullable[str] = UNSET
192
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
193
-
194
- utm_campaign: OptionalNullable[str] = UNSET
195
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
196
-
197
- utm_term: OptionalNullable[str] = UNSET
198
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
199
-
200
- utm_content: OptionalNullable[str] = UNSET
201
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
202
-
203
- ref: OptionalNullable[str] = UNSET
204
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
205
-
206
169
  test_variants: Annotated[
207
170
  OptionalNullable[List[CreatePartnerTestVariants]],
208
171
  pydantic.Field(alias="testVariants"),
@@ -229,7 +192,6 @@ class LinkProps(BaseModel):
229
192
  "archived",
230
193
  "tagIds",
231
194
  "tagNames",
232
- "folderId",
233
195
  "comments",
234
196
  "expiresAt",
235
197
  "expiredUrl",
@@ -243,12 +205,6 @@ class LinkProps(BaseModel):
243
205
  "ios",
244
206
  "android",
245
207
  "doIndex",
246
- "utm_source",
247
- "utm_medium",
248
- "utm_campaign",
249
- "utm_term",
250
- "utm_content",
251
- "ref",
252
208
  "testVariants",
253
209
  "testStartedAt",
254
210
  "testCompletedAt",
@@ -256,7 +212,6 @@ class LinkProps(BaseModel):
256
212
  nullable_fields = [
257
213
  "externalId",
258
214
  "tenantId",
259
- "folderId",
260
215
  "comments",
261
216
  "expiresAt",
262
217
  "expiredUrl",
@@ -267,12 +222,6 @@ class LinkProps(BaseModel):
267
222
  "video",
268
223
  "ios",
269
224
  "android",
270
- "utm_source",
271
- "utm_medium",
272
- "utm_campaign",
273
- "utm_term",
274
- "utm_content",
275
- "ref",
276
225
  "testVariants",
277
226
  "testStartedAt",
278
227
  "testCompletedAt",
@@ -406,7 +355,7 @@ class CreatePartnerStatus(str, Enum):
406
355
  ARCHIVED = "archived"
407
356
 
408
357
 
409
- class CreatePartnerLinkTypedDict(TypedDict):
358
+ class LinksTypedDict(TypedDict):
410
359
  id: str
411
360
  r"""The unique ID of the short link."""
412
361
  domain: str
@@ -429,7 +378,7 @@ class CreatePartnerLinkTypedDict(TypedDict):
429
378
  r"""The total dollar value of sales (in cents) generated by the short link."""
430
379
 
431
380
 
432
- class CreatePartnerLink(BaseModel):
381
+ class Links(BaseModel):
433
382
  id: str
434
383
  r"""The unique ID of the short link."""
435
384
 
@@ -493,6 +442,8 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
493
442
  r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
494
443
  payouts_enabled_at: Nullable[str]
495
444
  r"""The date when the partner enabled payouts."""
445
+ trusted_at: Nullable[str]
446
+ r"""The date when the partner received the trusted badge in the partner network."""
496
447
  program_id: str
497
448
  r"""The program's unique ID on Dub."""
498
449
  partner_id: str
@@ -502,7 +453,7 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
502
453
  created_at: str
503
454
  status: CreatePartnerStatus
504
455
  r"""The status of the partner's enrollment in the program."""
505
- links: Nullable[List[CreatePartnerLinkTypedDict]]
456
+ links: Nullable[List[LinksTypedDict]]
506
457
  r"""The partner's referral links in this program."""
507
458
  description: NotRequired[Nullable[str]]
508
459
  r"""A brief description of the partner and their background."""
@@ -529,9 +480,21 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
529
480
  total_sales: NotRequired[float]
530
481
  r"""The total number of sales generated by the partner's links (includes recurring sales)"""
531
482
  total_sale_amount: NotRequired[float]
532
- r"""The total amount of sales (in cents) generated by the partner's links"""
483
+ r"""Total revenue generated by the partner's links"""
533
484
  net_revenue: NotRequired[float]
534
- r"""The total net revenue generated by the partner"""
485
+ r"""Net revenue after commissions (`Total Revenue - Total Commissions`)"""
486
+ earnings_per_click: NotRequired[Nullable[float]]
487
+ r"""Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)"""
488
+ average_lifetime_value: NotRequired[Nullable[float]]
489
+ r"""Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)"""
490
+ click_to_lead_rate: NotRequired[Nullable[float]]
491
+ r"""Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)"""
492
+ click_to_conversion_rate: NotRequired[Nullable[float]]
493
+ r"""Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)"""
494
+ lead_to_conversion_rate: NotRequired[Nullable[float]]
495
+ r"""Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)"""
496
+ return_on_ad_spend: NotRequired[Nullable[float]]
497
+ r"""Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)"""
535
498
  website: NotRequired[Nullable[str]]
536
499
  r"""The partner's website URL (including the https protocol)."""
537
500
  youtube: NotRequired[Nullable[str]]
@@ -578,6 +541,9 @@ class CreatePartnerResponseBody(BaseModel):
578
541
  ]
579
542
  r"""The date when the partner enabled payouts."""
580
543
 
544
+ trusted_at: Annotated[Nullable[str], pydantic.Field(alias="trustedAt")]
545
+ r"""The date when the partner received the trusted badge in the partner network."""
546
+
581
547
  program_id: Annotated[str, pydantic.Field(alias="programId")]
582
548
  r"""The program's unique ID on Dub."""
583
549
 
@@ -592,7 +558,7 @@ class CreatePartnerResponseBody(BaseModel):
592
558
  status: CreatePartnerStatus
593
559
  r"""The status of the partner's enrollment in the program."""
594
560
 
595
- links: Nullable[List[CreatePartnerLink]]
561
+ links: Nullable[List[Links]]
596
562
  r"""The partner's referral links in this program."""
597
563
 
598
564
  description: OptionalNullable[str] = UNSET
@@ -654,10 +620,40 @@ class CreatePartnerResponseBody(BaseModel):
654
620
  total_sale_amount: Annotated[
655
621
  Optional[float], pydantic.Field(alias="totalSaleAmount")
656
622
  ] = 0
657
- r"""The total amount of sales (in cents) generated by the partner's links"""
623
+ r"""Total revenue generated by the partner's links"""
658
624
 
659
625
  net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0
660
- r"""The total net revenue generated by the partner"""
626
+ r"""Net revenue after commissions (`Total Revenue - Total Commissions`)"""
627
+
628
+ earnings_per_click: Annotated[
629
+ OptionalNullable[float], pydantic.Field(alias="earningsPerClick")
630
+ ] = UNSET
631
+ r"""Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)"""
632
+
633
+ average_lifetime_value: Annotated[
634
+ OptionalNullable[float], pydantic.Field(alias="averageLifetimeValue")
635
+ ] = UNSET
636
+ r"""Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)"""
637
+
638
+ click_to_lead_rate: Annotated[
639
+ OptionalNullable[float], pydantic.Field(alias="clickToLeadRate")
640
+ ] = UNSET
641
+ r"""Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)"""
642
+
643
+ click_to_conversion_rate: Annotated[
644
+ OptionalNullable[float], pydantic.Field(alias="clickToConversionRate")
645
+ ] = UNSET
646
+ r"""Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)"""
647
+
648
+ lead_to_conversion_rate: Annotated[
649
+ OptionalNullable[float], pydantic.Field(alias="leadToConversionRate")
650
+ ] = UNSET
651
+ r"""Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)"""
652
+
653
+ return_on_ad_spend: Annotated[
654
+ OptionalNullable[float], pydantic.Field(alias="returnOnAdSpend")
655
+ ] = UNSET
656
+ r"""Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)"""
661
657
 
662
658
  website: OptionalNullable[str] = UNSET
663
659
  r"""The partner's website URL (including the https protocol)."""
@@ -696,6 +692,12 @@ class CreatePartnerResponseBody(BaseModel):
696
692
  "totalSales",
697
693
  "totalSaleAmount",
698
694
  "netRevenue",
695
+ "earningsPerClick",
696
+ "averageLifetimeValue",
697
+ "clickToLeadRate",
698
+ "clickToConversionRate",
699
+ "leadToConversionRate",
700
+ "returnOnAdSpend",
699
701
  "website",
700
702
  "youtube",
701
703
  "twitter",
@@ -712,6 +714,7 @@ class CreatePartnerResponseBody(BaseModel):
712
714
  "paypalEmail",
713
715
  "stripeConnectId",
714
716
  "payoutsEnabledAt",
717
+ "trustedAt",
715
718
  "groupId",
716
719
  "tenantId",
717
720
  "links",
@@ -722,6 +725,12 @@ class CreatePartnerResponseBody(BaseModel):
722
725
  "applicationId",
723
726
  "bannedAt",
724
727
  "bannedReason",
728
+ "earningsPerClick",
729
+ "averageLifetimeValue",
730
+ "clickToLeadRate",
731
+ "clickToConversionRate",
732
+ "leadToConversionRate",
733
+ "returnOnAdSpend",
725
734
  "website",
726
735
  "youtube",
727
736
  "twitter",
@@ -60,8 +60,6 @@ class CreatePartnerLinkLinkPropsTypedDict(TypedDict):
60
60
  r"""The unique IDs of the tags assigned to the short link."""
61
61
  tag_names: NotRequired[CreatePartnerLinkTagNamesTypedDict]
62
62
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
63
- folder_id: NotRequired[Nullable[str]]
64
- r"""The unique ID existing folder to assign the short link to."""
65
63
  comments: NotRequired[Nullable[str]]
66
64
  r"""The comments for the short link."""
67
65
  expires_at: NotRequired[Nullable[str]]
@@ -88,18 +86,6 @@ class CreatePartnerLinkLinkPropsTypedDict(TypedDict):
88
86
  r"""The Android destination URL for the short link for Android device targeting."""
89
87
  do_index: NotRequired[bool]
90
88
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
91
- utm_source: NotRequired[Nullable[str]]
92
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
93
- utm_medium: NotRequired[Nullable[str]]
94
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
95
- utm_campaign: NotRequired[Nullable[str]]
96
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
97
- utm_term: NotRequired[Nullable[str]]
98
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
99
- utm_content: NotRequired[Nullable[str]]
100
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
101
- ref: NotRequired[Nullable[str]]
102
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
103
89
  test_variants: NotRequired[Nullable[List[CreatePartnerLinkTestVariantsTypedDict]]]
104
90
  r"""An array of A/B test URLs and the percentage of traffic to send to each URL."""
105
91
  test_started_at: NotRequired[Nullable[str]]
@@ -140,11 +126,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
140
126
  ] = None
141
127
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
142
128
 
143
- folder_id: Annotated[OptionalNullable[str], pydantic.Field(alias="folderId")] = (
144
- UNSET
145
- )
146
- r"""The unique ID existing folder to assign the short link to."""
147
-
148
129
  comments: OptionalNullable[str] = UNSET
149
130
  r"""The comments for the short link."""
150
131
 
@@ -188,24 +169,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
188
169
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
189
170
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
190
171
 
191
- utm_source: OptionalNullable[str] = UNSET
192
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
193
-
194
- utm_medium: OptionalNullable[str] = UNSET
195
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
196
-
197
- utm_campaign: OptionalNullable[str] = UNSET
198
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
199
-
200
- utm_term: OptionalNullable[str] = UNSET
201
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
202
-
203
- utm_content: OptionalNullable[str] = UNSET
204
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
205
-
206
- ref: OptionalNullable[str] = UNSET
207
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
208
-
209
172
  test_variants: Annotated[
210
173
  OptionalNullable[List[CreatePartnerLinkTestVariants]],
211
174
  pydantic.Field(alias="testVariants"),
@@ -232,7 +195,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
232
195
  "archived",
233
196
  "tagIds",
234
197
  "tagNames",
235
- "folderId",
236
198
  "comments",
237
199
  "expiresAt",
238
200
  "expiredUrl",
@@ -246,12 +208,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
246
208
  "ios",
247
209
  "android",
248
210
  "doIndex",
249
- "utm_source",
250
- "utm_medium",
251
- "utm_campaign",
252
- "utm_term",
253
- "utm_content",
254
- "ref",
255
211
  "testVariants",
256
212
  "testStartedAt",
257
213
  "testCompletedAt",
@@ -259,7 +215,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
259
215
  nullable_fields = [
260
216
  "externalId",
261
217
  "tenantId",
262
- "folderId",
263
218
  "comments",
264
219
  "expiresAt",
265
220
  "expiredUrl",
@@ -270,12 +225,6 @@ class CreatePartnerLinkLinkProps(BaseModel):
270
225
  "video",
271
226
  "ios",
272
227
  "android",
273
- "utm_source",
274
- "utm_medium",
275
- "utm_campaign",
276
- "utm_term",
277
- "utm_content",
278
- "ref",
279
228
  "testVariants",
280
229
  "testStartedAt",
281
230
  "testCompletedAt",
@@ -60,8 +60,6 @@ class CreateReferralsEmbedTokenLinkPropsTypedDict(TypedDict):
60
60
  r"""The unique IDs of the tags assigned to the short link."""
61
61
  tag_names: NotRequired[CreateReferralsEmbedTokenTagNamesTypedDict]
62
62
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
63
- folder_id: NotRequired[Nullable[str]]
64
- r"""The unique ID existing folder to assign the short link to."""
65
63
  comments: NotRequired[Nullable[str]]
66
64
  r"""The comments for the short link."""
67
65
  expires_at: NotRequired[Nullable[str]]
@@ -88,18 +86,6 @@ class CreateReferralsEmbedTokenLinkPropsTypedDict(TypedDict):
88
86
  r"""The Android destination URL for the short link for Android device targeting."""
89
87
  do_index: NotRequired[bool]
90
88
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
91
- utm_source: NotRequired[Nullable[str]]
92
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
93
- utm_medium: NotRequired[Nullable[str]]
94
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
95
- utm_campaign: NotRequired[Nullable[str]]
96
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
97
- utm_term: NotRequired[Nullable[str]]
98
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
99
- utm_content: NotRequired[Nullable[str]]
100
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
101
- ref: NotRequired[Nullable[str]]
102
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
103
89
  test_variants: NotRequired[
104
90
  Nullable[List[CreateReferralsEmbedTokenTestVariantsTypedDict]]
105
91
  ]
@@ -142,11 +128,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
142
128
  ] = None
143
129
  r"""The unique name of the tags assigned to the short link (case insensitive)."""
144
130
 
145
- folder_id: Annotated[OptionalNullable[str], pydantic.Field(alias="folderId")] = (
146
- UNSET
147
- )
148
- r"""The unique ID existing folder to assign the short link to."""
149
-
150
131
  comments: OptionalNullable[str] = UNSET
151
132
  r"""The comments for the short link."""
152
133
 
@@ -190,24 +171,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
190
171
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
191
172
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
192
173
 
193
- utm_source: OptionalNullable[str] = UNSET
194
- r"""The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL."""
195
-
196
- utm_medium: OptionalNullable[str] = UNSET
197
- r"""The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL."""
198
-
199
- utm_campaign: OptionalNullable[str] = UNSET
200
- r"""The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL."""
201
-
202
- utm_term: OptionalNullable[str] = UNSET
203
- r"""The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL."""
204
-
205
- utm_content: OptionalNullable[str] = UNSET
206
- r"""The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL."""
207
-
208
- ref: OptionalNullable[str] = UNSET
209
- r"""The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL."""
210
-
211
174
  test_variants: Annotated[
212
175
  OptionalNullable[List[CreateReferralsEmbedTokenTestVariants]],
213
176
  pydantic.Field(alias="testVariants"),
@@ -234,7 +197,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
234
197
  "archived",
235
198
  "tagIds",
236
199
  "tagNames",
237
- "folderId",
238
200
  "comments",
239
201
  "expiresAt",
240
202
  "expiredUrl",
@@ -248,12 +210,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
248
210
  "ios",
249
211
  "android",
250
212
  "doIndex",
251
- "utm_source",
252
- "utm_medium",
253
- "utm_campaign",
254
- "utm_term",
255
- "utm_content",
256
- "ref",
257
213
  "testVariants",
258
214
  "testStartedAt",
259
215
  "testCompletedAt",
@@ -261,7 +217,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
261
217
  nullable_fields = [
262
218
  "externalId",
263
219
  "tenantId",
264
- "folderId",
265
220
  "comments",
266
221
  "expiresAt",
267
222
  "expiredUrl",
@@ -272,12 +227,6 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
272
227
  "video",
273
228
  "ios",
274
229
  "android",
275
- "utm_source",
276
- "utm_medium",
277
- "utm_campaign",
278
- "utm_term",
279
- "utm_content",
280
- "ref",
281
230
  "testVariants",
282
231
  "testStartedAt",
283
232
  "testCompletedAt",
@@ -35,6 +35,10 @@ class GetCustomersRequestTypedDict(TypedDict):
35
35
  r"""A filter on the list based on the customer's `country` field."""
36
36
  link_id: NotRequired[str]
37
37
  r"""A filter on the list based on the customer's `linkId` field (the referral link ID)."""
38
+ program_id: NotRequired[str]
39
+ r"""Program ID to filter by."""
40
+ partner_id: NotRequired[str]
41
+ r"""Partner ID to filter by."""
38
42
  include_expanded_fields: NotRequired[bool]
39
43
  r"""Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."""
40
44
  sort_by: NotRequired[GetCustomersQueryParamSortBy]
@@ -80,6 +84,20 @@ class GetCustomersRequest(BaseModel):
80
84
  ] = None
81
85
  r"""A filter on the list based on the customer's `linkId` field (the referral link ID)."""
82
86
 
87
+ program_id: Annotated[
88
+ Optional[str],
89
+ pydantic.Field(alias="programId"),
90
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
91
+ ] = None
92
+ r"""Program ID to filter by."""
93
+
94
+ partner_id: Annotated[
95
+ Optional[str],
96
+ pydantic.Field(alias="partnerId"),
97
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
98
+ ] = None
99
+ r"""Partner ID to filter by."""
100
+
83
101
  include_expanded_fields: Annotated[
84
102
  Optional[bool],
85
103
  pydantic.Field(alias="includeExpandedFields"),
@@ -11,7 +11,6 @@ from typing_extensions import Annotated, NotRequired, TypedDict
11
11
  class GetLinkInfoRequestTypedDict(TypedDict):
12
12
  domain: NotRequired[str]
13
13
  key: NotRequired[str]
14
- r"""The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`."""
15
14
  link_id: NotRequired[str]
16
15
  r"""The unique ID of the short link."""
17
16
  external_id: NotRequired[str]
@@ -28,7 +27,6 @@ class GetLinkInfoRequest(BaseModel):
28
27
  Optional[str],
29
28
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
30
29
  ] = None
31
- r"""The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`."""
32
30
 
33
31
  link_id: Annotated[
34
32
  Optional[str],
@@ -156,14 +156,14 @@ class GetLinksRequest(BaseModel):
156
156
  Optional[bool],
157
157
  pydantic.Field(alias="showArchived"),
158
158
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
159
- ] = True
159
+ ] = False
160
160
  r"""Whether to include archived links in the response. Defaults to `false` if not provided."""
161
161
 
162
162
  with_tags: Annotated[
163
163
  Optional[bool],
164
164
  pydantic.Field(alias="withTags"),
165
165
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
166
- ] = True
166
+ ] = False
167
167
  r"""DEPRECATED. Filter for links that have at least one tag assigned to them."""
168
168
 
169
169
  sort_by: Annotated[
@@ -141,14 +141,14 @@ class GetLinksCountRequest(BaseModel):
141
141
  Optional[bool],
142
142
  pydantic.Field(alias="showArchived"),
143
143
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
144
- ] = True
144
+ ] = False
145
145
  r"""Whether to include archived links in the response. Defaults to `false` if not provided."""
146
146
 
147
147
  with_tags: Annotated[
148
148
  Optional[bool],
149
149
  pydantic.Field(alias="withTags"),
150
150
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
151
- ] = True
151
+ ] = False
152
152
  r"""DEPRECATED. Filter for links that have at least one tag assigned to them."""
153
153
 
154
154
  group_by: Annotated[
@@ -81,7 +81,7 @@ class GetQRCodeRequest(BaseModel):
81
81
  Optional[bool],
82
82
  pydantic.Field(alias="hideLogo"),
83
83
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
84
- ] = True
84
+ ] = False
85
85
  r"""Whether to hide the logo in the QR code. Can only be used with a paid plan on Dub."""
86
86
 
87
87
  margin: Annotated[
@@ -83,6 +83,7 @@ class ListCommissionsRequestTypedDict(TypedDict):
83
83
  r"""The start date of the date range to filter the commissions by."""
84
84
  end: NotRequired[str]
85
85
  r"""The end date of the date range to filter the commissions by."""
86
+ timezone: NotRequired[str]
86
87
  page: NotRequired[float]
87
88
  r"""The page number for pagination."""
88
89
  page_size: NotRequired[float]
@@ -175,6 +176,11 @@ class ListCommissionsRequest(BaseModel):
175
176
  ] = None
176
177
  r"""The end date of the date range to filter the commissions by."""
177
178
 
179
+ timezone: Annotated[
180
+ Optional[str],
181
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
182
+ ] = None
183
+
178
184
  page: Annotated[
179
185
  Optional[float],
180
186
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -219,6 +225,8 @@ class ListCommissionsPartnerTypedDict(TypedDict):
219
225
  r"""The date when the partner enabled payouts."""
220
226
  country: Nullable[str]
221
227
  r"""The partner's country (required for tax purposes)."""
228
+ group_id: NotRequired[Nullable[str]]
229
+ r"""The partner's group ID on Dub."""
222
230
 
223
231
 
224
232
  class ListCommissionsPartner(BaseModel):
@@ -242,10 +250,13 @@ class ListCommissionsPartner(BaseModel):
242
250
  country: Nullable[str]
243
251
  r"""The partner's country (required for tax purposes)."""
244
252
 
253
+ group_id: Annotated[OptionalNullable[str], pydantic.Field(alias="groupId")] = UNSET
254
+ r"""The partner's group ID on Dub."""
255
+
245
256
  @model_serializer(mode="wrap")
246
257
  def serialize_model(self, handler):
247
- optional_fields = []
248
- nullable_fields = ["email", "image", "payoutsEnabledAt", "country"]
258
+ optional_fields = ["groupId"]
259
+ nullable_fields = ["email", "image", "payoutsEnabledAt", "country", "groupId"]
249
260
  null_default_fields = []
250
261
 
251
262
  serialized = handler(self)
@@ -24,7 +24,7 @@ class ListDomainsRequest(BaseModel):
24
24
  archived: Annotated[
25
25
  Optional[bool],
26
26
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
27
- ] = True
27
+ ] = False
28
28
  r"""Whether to include archived domains in the response. Defaults to `false` if not provided."""
29
29
 
30
30
  search: Annotated[