dub 0.27.4__py3-none-any.whl → 0.28.1__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 (40) hide show
  1. dub/_version.py +3 -3
  2. dub/models/components/__init__.py +0 -56
  3. dub/models/components/clickevent.py +5 -764
  4. dub/models/components/leadcreatedevent.py +5 -764
  5. dub/models/components/leadevent.py +5 -764
  6. dub/models/components/linkclickedevent.py +5 -764
  7. dub/models/components/linkschema.py +5 -764
  8. dub/models/components/linkwebhookevent.py +5 -764
  9. dub/models/components/partnerenrolledevent.py +20 -7
  10. dub/models/components/salecreatedevent.py +5 -764
  11. dub/models/components/saleevent.py +13 -772
  12. dub/models/components/tagschema.py +1 -1
  13. dub/models/components/workspaceschema.py +5 -5
  14. dub/models/operations/__init__.py +0 -6
  15. dub/models/operations/bulkcreatelinks.py +5 -6
  16. dub/models/operations/bulkupdatelinks.py +5 -6
  17. dub/models/operations/createcustomer.py +0 -3
  18. dub/models/operations/createlink.py +5 -6
  19. dub/models/operations/createpartner.py +30 -266
  20. dub/models/operations/createreferralsembedtoken.py +10 -260
  21. dub/models/operations/createtag.py +4 -4
  22. dub/models/operations/getcustomer.py +0 -3
  23. dub/models/operations/getcustomers.py +0 -3
  24. dub/models/operations/listcommissions.py +9 -0
  25. dub/models/operations/listevents.py +4 -5
  26. dub/models/operations/listpartners.py +23 -9
  27. dub/models/operations/retrieveanalytics.py +4 -5
  28. dub/models/operations/retrievepartneranalytics.py +8 -0
  29. dub/models/operations/tracksale.py +8 -7
  30. dub/models/operations/updatecustomer.py +0 -3
  31. dub/models/operations/updatelink.py +5 -6
  32. dub/models/operations/updatetag.py +4 -4
  33. dub/models/operations/updateworkspace.py +2 -13
  34. dub/models/operations/upsertlink.py +5 -6
  35. {dub-0.27.4.dist-info → dub-0.28.1.dist-info}/METADATA +12 -4
  36. {dub-0.27.4.dist-info → dub-0.28.1.dist-info}/RECORD +38 -40
  37. dub/models/components/countrycode.py +0 -259
  38. dub/models/components/linkgeotargeting.py +0 -766
  39. {dub-0.27.4.dist-info → dub-0.28.1.dist-info}/LICENSE +0 -0
  40. {dub-0.27.4.dist-info → dub-0.28.1.dist-info}/WHEEL +0 -0
@@ -14,8 +14,8 @@ class Color(str, Enum):
14
14
  GREEN = "green"
15
15
  BLUE = "blue"
16
16
  PURPLE = "purple"
17
- PINK = "pink"
18
17
  BROWN = "brown"
18
+ PINK = "pink"
19
19
 
20
20
 
21
21
  class TagSchemaTypedDict(TypedDict):
@@ -137,6 +137,8 @@ class WorkspaceSchemaTypedDict(TypedDict):
137
137
  r"""The folders usage of the workspace."""
138
138
  folders_limit: float
139
139
  r"""The folders limit of the workspace."""
140
+ groups_limit: float
141
+ r"""The groups limit of the workspace."""
140
142
  users_limit: float
141
143
  r"""The users limit of the workspace."""
142
144
  ai_usage: float
@@ -147,8 +149,6 @@ class WorkspaceSchemaTypedDict(TypedDict):
147
149
  r"""Whether the workspace has conversion tracking enabled automatically for new links (d.to/conversions)."""
148
150
  dot_link_claimed: bool
149
151
  r"""Whether the workspace has claimed a free .link domain. (dub.link/free)"""
150
- partners_enabled: bool
151
- r"""Whether the workspace has Dub Partners enabled."""
152
152
  created_at: str
153
153
  r"""The date and time when the workspace was created."""
154
154
  users: List[UsersTypedDict]
@@ -229,6 +229,9 @@ class WorkspaceSchema(BaseModel):
229
229
  folders_limit: Annotated[float, pydantic.Field(alias="foldersLimit")]
230
230
  r"""The folders limit of the workspace."""
231
231
 
232
+ groups_limit: Annotated[float, pydantic.Field(alias="groupsLimit")]
233
+ r"""The groups limit of the workspace."""
234
+
232
235
  users_limit: Annotated[float, pydantic.Field(alias="usersLimit")]
233
236
  r"""The users limit of the workspace."""
234
237
 
@@ -244,9 +247,6 @@ class WorkspaceSchema(BaseModel):
244
247
  dot_link_claimed: Annotated[bool, pydantic.Field(alias="dotLinkClaimed")]
245
248
  r"""Whether the workspace has claimed a free .link domain. (dub.link/free)"""
246
249
 
247
- partners_enabled: Annotated[bool, pydantic.Field(alias="partnersEnabled")]
248
- r"""Whether the workspace has Dub Partners enabled."""
249
-
250
250
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
251
251
  r"""The date and time when the workspace was created."""
252
252
 
@@ -74,7 +74,6 @@ if TYPE_CHECKING:
74
74
  )
75
75
  from .createpartner import (
76
76
  BannedReason,
77
- Country,
78
77
  CreatePartnerLink,
79
78
  CreatePartnerLinkTypedDict,
80
79
  CreatePartnerRequestBody,
@@ -104,7 +103,6 @@ if TYPE_CHECKING:
104
103
  CreatePartnerLinkTestVariantsTypedDict,
105
104
  )
106
105
  from .createreferralsembedtoken import (
107
- CreateReferralsEmbedTokenCountry,
108
106
  CreateReferralsEmbedTokenLinkProps,
109
107
  CreateReferralsEmbedTokenLinkPropsTypedDict,
110
108
  CreateReferralsEmbedTokenRequestBody,
@@ -443,7 +441,6 @@ __all__ = [
443
441
  "Click",
444
442
  "ClickTypedDict",
445
443
  "Color",
446
- "Country",
447
444
  "CreateCustomerDiscount",
448
445
  "CreateCustomerDiscountTypedDict",
449
446
  "CreateCustomerLink",
@@ -484,7 +481,6 @@ __all__ = [
484
481
  "CreatePartnerTagNamesTypedDict",
485
482
  "CreatePartnerTestVariants",
486
483
  "CreatePartnerTestVariantsTypedDict",
487
- "CreateReferralsEmbedTokenCountry",
488
484
  "CreateReferralsEmbedTokenLinkProps",
489
485
  "CreateReferralsEmbedTokenLinkPropsTypedDict",
490
486
  "CreateReferralsEmbedTokenRequestBody",
@@ -813,7 +809,6 @@ _dynamic_imports: dict[str, str] = {
813
809
  "TestVariants": ".createlink",
814
810
  "TestVariantsTypedDict": ".createlink",
815
811
  "BannedReason": ".createpartner",
816
- "Country": ".createpartner",
817
812
  "CreatePartnerLink": ".createpartner",
818
813
  "CreatePartnerLinkTypedDict": ".createpartner",
819
814
  "CreatePartnerRequestBody": ".createpartner",
@@ -839,7 +834,6 @@ _dynamic_imports: dict[str, str] = {
839
834
  "CreatePartnerLinkTagNamesTypedDict": ".createpartnerlink",
840
835
  "CreatePartnerLinkTestVariants": ".createpartnerlink",
841
836
  "CreatePartnerLinkTestVariantsTypedDict": ".createpartnerlink",
842
- "CreateReferralsEmbedTokenCountry": ".createreferralsembedtoken",
843
837
  "CreateReferralsEmbedTokenLinkProps": ".createreferralsembedtoken",
844
838
  "CreateReferralsEmbedTokenLinkPropsTypedDict": ".createreferralsembedtoken",
845
839
  "CreateReferralsEmbedTokenRequestBody": ".createreferralsembedtoken",
@@ -3,13 +3,12 @@
3
3
  from __future__ import annotations
4
4
  from dub.models.components import (
5
5
  linkerrorschema as components_linkerrorschema,
6
- linkgeotargeting as components_linkgeotargeting,
7
6
  linkschema as components_linkschema,
8
7
  )
9
8
  from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
10
9
  import pydantic
11
10
  from pydantic import model_serializer
12
- from typing import List, Optional, Union
11
+ from typing import Dict, List, Optional, Union
13
12
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
14
13
 
15
14
 
@@ -99,8 +98,8 @@ class RequestBodyTypedDict(TypedDict):
99
98
  r"""The iOS destination URL for the short link for iOS device targeting."""
100
99
  android: NotRequired[Nullable[str]]
101
100
  r"""The Android destination URL for the short link for Android device targeting."""
102
- geo: NotRequired[Nullable[components_linkgeotargeting.LinkGeoTargetingTypedDict]]
103
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
101
+ geo: NotRequired[Nullable[Dict[str, str]]]
102
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
104
103
  do_index: NotRequired[bool]
105
104
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
106
105
  utm_source: NotRequired[Nullable[str]]
@@ -228,8 +227,8 @@ class RequestBody(BaseModel):
228
227
  android: OptionalNullable[str] = UNSET
229
228
  r"""The Android destination URL for the short link for Android device targeting."""
230
229
 
231
- geo: OptionalNullable[components_linkgeotargeting.LinkGeoTargeting] = UNSET
232
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
230
+ geo: OptionalNullable[Dict[str, str]] = UNSET
231
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
233
232
 
234
233
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
235
234
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
@@ -1,11 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from dub.models.components import linkgeotargeting as components_linkgeotargeting
5
4
  from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
5
  import pydantic
7
6
  from pydantic import model_serializer
8
- from typing import List, Optional, Union
7
+ from typing import Dict, List, Optional, Union
9
8
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
9
 
11
10
 
@@ -85,8 +84,8 @@ class DataTypedDict(TypedDict):
85
84
  r"""The iOS destination URL for the short link for iOS device targeting."""
86
85
  android: NotRequired[Nullable[str]]
87
86
  r"""The Android destination URL for the short link for Android device targeting."""
88
- geo: NotRequired[Nullable[components_linkgeotargeting.LinkGeoTargetingTypedDict]]
89
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
87
+ geo: NotRequired[Nullable[Dict[str, str]]]
88
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
90
89
  do_index: NotRequired[bool]
91
90
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
92
91
  utm_source: NotRequired[Nullable[str]]
@@ -197,8 +196,8 @@ class Data(BaseModel):
197
196
  android: OptionalNullable[str] = UNSET
198
197
  r"""The Android destination URL for the short link for Android device targeting."""
199
198
 
200
- geo: OptionalNullable[components_linkgeotargeting.LinkGeoTargeting] = UNSET
201
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
199
+ geo: OptionalNullable[Dict[str, str]] = UNSET
200
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
202
201
 
203
202
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
204
203
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
@@ -195,7 +195,6 @@ class CreateCustomerDiscountTypedDict(TypedDict):
195
195
  max_duration: Nullable[float]
196
196
  coupon_id: Nullable[str]
197
197
  coupon_test_id: Nullable[str]
198
- default: bool
199
198
  description: NotRequired[Nullable[str]]
200
199
  partners_count: NotRequired[Nullable[float]]
201
200
 
@@ -213,8 +212,6 @@ class CreateCustomerDiscount(BaseModel):
213
212
 
214
213
  coupon_test_id: Annotated[Nullable[str], pydantic.Field(alias="couponTestId")]
215
214
 
216
- default: bool
217
-
218
215
  description: OptionalNullable[str] = UNSET
219
216
 
220
217
  partners_count: Annotated[
@@ -1,11 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from dub.models.components import linkgeotargeting as components_linkgeotargeting
5
4
  from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
5
  import pydantic
7
6
  from pydantic import model_serializer
8
- from typing import List, Optional, Union
7
+ from typing import Dict, List, Optional, Union
9
8
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
9
 
11
10
 
@@ -93,8 +92,8 @@ class CreateLinkRequestBodyTypedDict(TypedDict):
93
92
  r"""The iOS destination URL for the short link for iOS device targeting."""
94
93
  android: NotRequired[Nullable[str]]
95
94
  r"""The Android destination URL for the short link for Android device targeting."""
96
- geo: NotRequired[Nullable[components_linkgeotargeting.LinkGeoTargetingTypedDict]]
97
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
95
+ geo: NotRequired[Nullable[Dict[str, str]]]
96
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
98
97
  do_index: NotRequired[bool]
99
98
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
100
99
  utm_source: NotRequired[Nullable[str]]
@@ -218,8 +217,8 @@ class CreateLinkRequestBody(BaseModel):
218
217
  android: OptionalNullable[str] = UNSET
219
218
  r"""The Android destination URL for the short link for Android device targeting."""
220
219
 
221
- geo: OptionalNullable[components_linkgeotargeting.LinkGeoTargeting] = UNSET
222
- r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."""
220
+ geo: OptionalNullable[Dict[str, str]] = UNSET
221
+ r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information."""
223
222
 
224
223
  do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = None
225
224
  r"""Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"""
@@ -9,261 +9,6 @@ from typing import List, Optional, Union
9
9
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
10
 
11
11
 
12
- class Country(str, Enum):
13
- r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
14
-
15
- AF = "AF"
16
- AL = "AL"
17
- DZ = "DZ"
18
- AS = "AS"
19
- AD = "AD"
20
- AO = "AO"
21
- AI = "AI"
22
- AQ = "AQ"
23
- AG = "AG"
24
- AR = "AR"
25
- AM = "AM"
26
- AW = "AW"
27
- AU = "AU"
28
- AT = "AT"
29
- AZ = "AZ"
30
- BS = "BS"
31
- BH = "BH"
32
- BD = "BD"
33
- BB = "BB"
34
- BY = "BY"
35
- BE = "BE"
36
- BZ = "BZ"
37
- BJ = "BJ"
38
- BM = "BM"
39
- BT = "BT"
40
- BO = "BO"
41
- BA = "BA"
42
- BW = "BW"
43
- BV = "BV"
44
- BR = "BR"
45
- IO = "IO"
46
- BN = "BN"
47
- BG = "BG"
48
- BF = "BF"
49
- BI = "BI"
50
- KH = "KH"
51
- CM = "CM"
52
- CA = "CA"
53
- CV = "CV"
54
- KY = "KY"
55
- CF = "CF"
56
- TD = "TD"
57
- CL = "CL"
58
- CN = "CN"
59
- CX = "CX"
60
- CC = "CC"
61
- CO = "CO"
62
- KM = "KM"
63
- CG = "CG"
64
- CD = "CD"
65
- CK = "CK"
66
- CR = "CR"
67
- CI = "CI"
68
- HR = "HR"
69
- CU = "CU"
70
- CY = "CY"
71
- CZ = "CZ"
72
- DK = "DK"
73
- DJ = "DJ"
74
- DM = "DM"
75
- DO = "DO"
76
- EC = "EC"
77
- EG = "EG"
78
- SV = "SV"
79
- GQ = "GQ"
80
- ER = "ER"
81
- EE = "EE"
82
- ET = "ET"
83
- FK = "FK"
84
- FO = "FO"
85
- FJ = "FJ"
86
- FI = "FI"
87
- FR = "FR"
88
- GF = "GF"
89
- PF = "PF"
90
- TF = "TF"
91
- GA = "GA"
92
- GM = "GM"
93
- GE = "GE"
94
- DE = "DE"
95
- GH = "GH"
96
- GI = "GI"
97
- GR = "GR"
98
- GL = "GL"
99
- GD = "GD"
100
- GP = "GP"
101
- GU = "GU"
102
- GT = "GT"
103
- GN = "GN"
104
- GW = "GW"
105
- GY = "GY"
106
- HT = "HT"
107
- HM = "HM"
108
- VA = "VA"
109
- HN = "HN"
110
- HK = "HK"
111
- HU = "HU"
112
- IS = "IS"
113
- IN = "IN"
114
- ID = "ID"
115
- IR = "IR"
116
- IQ = "IQ"
117
- IE = "IE"
118
- IL = "IL"
119
- IT = "IT"
120
- JM = "JM"
121
- JP = "JP"
122
- JO = "JO"
123
- KZ = "KZ"
124
- KE = "KE"
125
- KI = "KI"
126
- KP = "KP"
127
- KR = "KR"
128
- KW = "KW"
129
- KG = "KG"
130
- LA = "LA"
131
- LV = "LV"
132
- LB = "LB"
133
- LS = "LS"
134
- LR = "LR"
135
- LY = "LY"
136
- LI = "LI"
137
- LT = "LT"
138
- LU = "LU"
139
- MO = "MO"
140
- MG = "MG"
141
- MW = "MW"
142
- MY = "MY"
143
- MV = "MV"
144
- ML = "ML"
145
- MT = "MT"
146
- MH = "MH"
147
- MQ = "MQ"
148
- MR = "MR"
149
- MU = "MU"
150
- YT = "YT"
151
- MX = "MX"
152
- FM = "FM"
153
- MD = "MD"
154
- MC = "MC"
155
- MN = "MN"
156
- MS = "MS"
157
- MA = "MA"
158
- MZ = "MZ"
159
- MM = "MM"
160
- NA = "NA"
161
- NR = "NR"
162
- NP = "NP"
163
- NL = "NL"
164
- NC = "NC"
165
- NZ = "NZ"
166
- NI = "NI"
167
- NE = "NE"
168
- NG = "NG"
169
- NU = "NU"
170
- NF = "NF"
171
- MK = "MK"
172
- MP = "MP"
173
- NO = "NO"
174
- OM = "OM"
175
- PK = "PK"
176
- PW = "PW"
177
- PS = "PS"
178
- PA = "PA"
179
- PG = "PG"
180
- PY = "PY"
181
- PE = "PE"
182
- PH = "PH"
183
- PN = "PN"
184
- PL = "PL"
185
- PT = "PT"
186
- PR = "PR"
187
- QA = "QA"
188
- RE = "RE"
189
- RO = "RO"
190
- RU = "RU"
191
- RW = "RW"
192
- SH = "SH"
193
- KN = "KN"
194
- LC = "LC"
195
- PM = "PM"
196
- VC = "VC"
197
- WS = "WS"
198
- SM = "SM"
199
- ST = "ST"
200
- SA = "SA"
201
- SN = "SN"
202
- SC = "SC"
203
- SL = "SL"
204
- SG = "SG"
205
- SK = "SK"
206
- SI = "SI"
207
- SB = "SB"
208
- SO = "SO"
209
- ZA = "ZA"
210
- GS = "GS"
211
- ES = "ES"
212
- LK = "LK"
213
- SD = "SD"
214
- SR = "SR"
215
- SJ = "SJ"
216
- SZ = "SZ"
217
- SE = "SE"
218
- CH = "CH"
219
- SY = "SY"
220
- TW = "TW"
221
- TJ = "TJ"
222
- TZ = "TZ"
223
- TH = "TH"
224
- TL = "TL"
225
- TG = "TG"
226
- TK = "TK"
227
- TO = "TO"
228
- TT = "TT"
229
- TN = "TN"
230
- TR = "TR"
231
- TM = "TM"
232
- TC = "TC"
233
- TV = "TV"
234
- UG = "UG"
235
- UA = "UA"
236
- AE = "AE"
237
- GB = "GB"
238
- US = "US"
239
- UM = "UM"
240
- UY = "UY"
241
- UZ = "UZ"
242
- VU = "VU"
243
- VE = "VE"
244
- VN = "VN"
245
- VG = "VG"
246
- VI = "VI"
247
- WF = "WF"
248
- EH = "EH"
249
- YE = "YE"
250
- ZM = "ZM"
251
- ZW = "ZW"
252
- AX = "AX"
253
- BQ = "BQ"
254
- CW = "CW"
255
- GG = "GG"
256
- IM = "IM"
257
- JE = "JE"
258
- ME = "ME"
259
- BL = "BL"
260
- MF = "MF"
261
- RS = "RS"
262
- SX = "SX"
263
- SS = "SS"
264
- XK = "XK"
265
-
266
-
267
12
  CreatePartnerTagIdsTypedDict = TypeAliasType(
268
13
  "CreatePartnerTagIdsTypedDict", Union[str, List[str]]
269
14
  )
@@ -570,8 +315,10 @@ class CreatePartnerRequestBodyTypedDict(TypedDict):
570
315
  r"""The partner's avatar image. If not provided, a default avatar will be used."""
571
316
  tenant_id: NotRequired[str]
572
317
  r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
573
- country: NotRequired[Nullable[Country]]
574
- r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
318
+ group_id: NotRequired[str]
319
+ r"""The group ID to add the partner to. If not provided, the partner will be added to the default group."""
320
+ country: NotRequired[Nullable[str]]
321
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information."""
575
322
  description: NotRequired[Nullable[str]]
576
323
  r"""A brief description of the partner and their background. Max 5,000 characters."""
577
324
  link_props: NotRequired[LinkPropsTypedDict]
@@ -594,8 +341,11 @@ class CreatePartnerRequestBody(BaseModel):
594
341
  tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
595
342
  r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
596
343
 
597
- country: OptionalNullable[Country] = UNSET
598
- r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
344
+ group_id: Annotated[Optional[str], pydantic.Field(alias="groupId")] = None
345
+ r"""The group ID to add the partner to. If not provided, the partner will be added to the default group."""
346
+
347
+ country: OptionalNullable[str] = UNSET
348
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information."""
599
349
 
600
350
  description: OptionalNullable[str] = UNSET
601
351
  r"""A brief description of the partner and their background. Max 5,000 characters."""
@@ -610,6 +360,7 @@ class CreatePartnerRequestBody(BaseModel):
610
360
  "username",
611
361
  "image",
612
362
  "tenantId",
363
+ "groupId",
613
364
  "country",
614
365
  "description",
615
366
  "linkProps",
@@ -734,12 +485,12 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
734
485
  r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
735
486
  payouts_enabled_at: Nullable[str]
736
487
  r"""The date when the partner enabled payouts."""
488
+ program_id: str
489
+ r"""The program's unique ID on Dub."""
737
490
  partner_id: str
738
491
  r"""The partner's unique ID on Dub."""
739
492
  tenant_id: Nullable[str]
740
493
  r"""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."""
741
- program_id: str
742
- r"""The program's unique ID on Dub."""
743
494
  created_at: str
744
495
  status: CreatePartnerStatus
745
496
  r"""The status of the partner's enrollment in the program."""
@@ -747,6 +498,8 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
747
498
  r"""The partner's referral links in this program."""
748
499
  description: NotRequired[Nullable[str]]
749
500
  r"""A brief description of the partner and their background."""
501
+ group_id: NotRequired[Nullable[str]]
502
+ r"""The partner's group ID on Dub."""
750
503
  total_commissions: NotRequired[float]
751
504
  r"""The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false."""
752
505
  click_reward_id: NotRequired[Nullable[str]]
@@ -763,8 +516,10 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
763
516
  r"""The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
764
517
  leads: NotRequired[float]
765
518
  r"""The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
519
+ conversions: NotRequired[float]
520
+ r"""The total number of leads that converted to paying customers. Defaults to 0 if `includeExpandedFields` is false."""
766
521
  sales: NotRequired[float]
767
- r"""The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
522
+ r"""The total number of sales generated by the partner's links (includes recurring sales). Defaults to 0 if `includeExpandedFields` is false."""
768
523
  sale_amount: NotRequired[float]
769
524
  r"""The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
770
525
  net_revenue: NotRequired[float]
@@ -821,15 +576,15 @@ class CreatePartnerResponseBody(BaseModel):
821
576
  ]
822
577
  r"""The date when the partner enabled payouts."""
823
578
 
579
+ program_id: Annotated[str, pydantic.Field(alias="programId")]
580
+ r"""The program's unique ID on Dub."""
581
+
824
582
  partner_id: Annotated[str, pydantic.Field(alias="partnerId")]
825
583
  r"""The partner's unique ID on Dub."""
826
584
 
827
585
  tenant_id: Annotated[Nullable[str], pydantic.Field(alias="tenantId")]
828
586
  r"""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."""
829
587
 
830
- program_id: Annotated[str, pydantic.Field(alias="programId")]
831
- r"""The program's unique ID on Dub."""
832
-
833
588
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
834
589
 
835
590
  status: CreatePartnerStatus
@@ -841,6 +596,9 @@ class CreatePartnerResponseBody(BaseModel):
841
596
  description: OptionalNullable[str] = UNSET
842
597
  r"""A brief description of the partner and their background."""
843
598
 
599
+ group_id: Annotated[OptionalNullable[str], pydantic.Field(alias="groupId")] = UNSET
600
+ r"""The partner's group ID on Dub."""
601
+
844
602
  total_commissions: Annotated[
845
603
  Optional[float], pydantic.Field(alias="totalCommissions")
846
604
  ] = 0
@@ -883,8 +641,11 @@ class CreatePartnerResponseBody(BaseModel):
883
641
  leads: Optional[float] = 0
884
642
  r"""The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
885
643
 
644
+ conversions: Optional[float] = 0
645
+ r"""The total number of leads that converted to paying customers. Defaults to 0 if `includeExpandedFields` is false."""
646
+
886
647
  sales: Optional[float] = 0
887
- r"""The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
648
+ r"""The total number of sales generated by the partner's links (includes recurring sales). Defaults to 0 if `includeExpandedFields` is false."""
888
649
 
889
650
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
890
651
  r"""The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
@@ -950,6 +711,7 @@ class CreatePartnerResponseBody(BaseModel):
950
711
  def serialize_model(self, handler):
951
712
  optional_fields = [
952
713
  "description",
714
+ "groupId",
953
715
  "totalCommissions",
954
716
  "clickRewardId",
955
717
  "leadRewardId",
@@ -960,6 +722,7 @@ class CreatePartnerResponseBody(BaseModel):
960
722
  "bannedReason",
961
723
  "clicks",
962
724
  "leads",
725
+ "conversions",
963
726
  "sales",
964
727
  "saleAmount",
965
728
  "netRevenue",
@@ -987,6 +750,7 @@ class CreatePartnerResponseBody(BaseModel):
987
750
  "paypalEmail",
988
751
  "stripeConnectId",
989
752
  "payoutsEnabledAt",
753
+ "groupId",
990
754
  "tenantId",
991
755
  "links",
992
756
  "clickRewardId",