dub 0.26.11__py3-none-any.whl → 0.26.12__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.
@@ -8,270 +8,15 @@ from typing import Optional
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
- class AnalyticsRegionsCountry(str, Enum):
12
- r"""The 2-letter country code of the region: https://d.to/geo"""
13
-
14
- AF = "AF"
15
- AL = "AL"
16
- DZ = "DZ"
17
- AS = "AS"
18
- AD = "AD"
19
- AO = "AO"
20
- AI = "AI"
21
- AQ = "AQ"
22
- AG = "AG"
23
- AR = "AR"
24
- AM = "AM"
25
- AW = "AW"
26
- AU = "AU"
27
- AT = "AT"
28
- AZ = "AZ"
29
- BS = "BS"
30
- BH = "BH"
31
- BD = "BD"
32
- BB = "BB"
33
- BY = "BY"
34
- BE = "BE"
35
- BZ = "BZ"
36
- BJ = "BJ"
37
- BM = "BM"
38
- BT = "BT"
39
- BO = "BO"
40
- BA = "BA"
41
- BW = "BW"
42
- BV = "BV"
43
- BR = "BR"
44
- IO = "IO"
45
- BN = "BN"
46
- BG = "BG"
47
- BF = "BF"
48
- BI = "BI"
49
- KH = "KH"
50
- CM = "CM"
51
- CA = "CA"
52
- CV = "CV"
53
- KY = "KY"
54
- CF = "CF"
55
- TD = "TD"
56
- CL = "CL"
57
- CN = "CN"
58
- CX = "CX"
59
- CC = "CC"
60
- CO = "CO"
61
- KM = "KM"
62
- CG = "CG"
63
- CD = "CD"
64
- CK = "CK"
65
- CR = "CR"
66
- CI = "CI"
67
- HR = "HR"
68
- CU = "CU"
69
- CY = "CY"
70
- CZ = "CZ"
71
- DK = "DK"
72
- DJ = "DJ"
73
- DM = "DM"
74
- DO = "DO"
75
- EC = "EC"
76
- EG = "EG"
77
- SV = "SV"
78
- GQ = "GQ"
79
- ER = "ER"
80
- EE = "EE"
81
- ET = "ET"
82
- FK = "FK"
83
- FO = "FO"
84
- FJ = "FJ"
85
- FI = "FI"
86
- FR = "FR"
87
- GF = "GF"
88
- PF = "PF"
89
- TF = "TF"
90
- GA = "GA"
91
- GM = "GM"
92
- GE = "GE"
93
- DE = "DE"
94
- GH = "GH"
95
- GI = "GI"
96
- GR = "GR"
97
- GL = "GL"
98
- GD = "GD"
99
- GP = "GP"
100
- GU = "GU"
101
- GT = "GT"
102
- GN = "GN"
103
- GW = "GW"
104
- GY = "GY"
105
- HT = "HT"
106
- HM = "HM"
107
- VA = "VA"
108
- HN = "HN"
109
- HK = "HK"
110
- HU = "HU"
111
- IS = "IS"
112
- IN = "IN"
113
- ID = "ID"
114
- IR = "IR"
115
- IQ = "IQ"
116
- IE = "IE"
117
- IL = "IL"
118
- IT = "IT"
119
- JM = "JM"
120
- JP = "JP"
121
- JO = "JO"
122
- KZ = "KZ"
123
- KE = "KE"
124
- KI = "KI"
125
- KP = "KP"
126
- KR = "KR"
127
- KW = "KW"
128
- KG = "KG"
129
- LA = "LA"
130
- LV = "LV"
131
- LB = "LB"
132
- LS = "LS"
133
- LR = "LR"
134
- LY = "LY"
135
- LI = "LI"
136
- LT = "LT"
137
- LU = "LU"
138
- MO = "MO"
139
- MG = "MG"
140
- MW = "MW"
141
- MY = "MY"
142
- MV = "MV"
143
- ML = "ML"
144
- MT = "MT"
145
- MH = "MH"
146
- MQ = "MQ"
147
- MR = "MR"
148
- MU = "MU"
149
- YT = "YT"
150
- MX = "MX"
151
- FM = "FM"
152
- MD = "MD"
153
- MC = "MC"
154
- MN = "MN"
155
- MS = "MS"
156
- MA = "MA"
157
- MZ = "MZ"
158
- MM = "MM"
159
- NA = "NA"
160
- NR = "NR"
161
- NP = "NP"
162
- NL = "NL"
163
- NC = "NC"
164
- NZ = "NZ"
165
- NI = "NI"
166
- NE = "NE"
167
- NG = "NG"
168
- NU = "NU"
169
- NF = "NF"
170
- MK = "MK"
171
- MP = "MP"
172
- NO = "NO"
173
- OM = "OM"
174
- PK = "PK"
175
- PW = "PW"
176
- PS = "PS"
177
- PA = "PA"
178
- PG = "PG"
179
- PY = "PY"
180
- PE = "PE"
181
- PH = "PH"
182
- PN = "PN"
183
- PL = "PL"
184
- PT = "PT"
185
- PR = "PR"
186
- QA = "QA"
187
- RE = "RE"
188
- RO = "RO"
189
- RU = "RU"
190
- RW = "RW"
191
- SH = "SH"
192
- KN = "KN"
193
- LC = "LC"
194
- PM = "PM"
195
- VC = "VC"
196
- WS = "WS"
197
- SM = "SM"
198
- ST = "ST"
199
- SA = "SA"
200
- SN = "SN"
201
- SC = "SC"
202
- SL = "SL"
203
- SG = "SG"
204
- SK = "SK"
205
- SI = "SI"
206
- SB = "SB"
207
- SO = "SO"
208
- ZA = "ZA"
209
- GS = "GS"
210
- ES = "ES"
211
- LK = "LK"
212
- SD = "SD"
213
- SR = "SR"
214
- SJ = "SJ"
215
- SZ = "SZ"
216
- SE = "SE"
217
- CH = "CH"
218
- SY = "SY"
219
- TW = "TW"
220
- TJ = "TJ"
221
- TZ = "TZ"
222
- TH = "TH"
223
- TL = "TL"
224
- TG = "TG"
225
- TK = "TK"
226
- TO = "TO"
227
- TT = "TT"
228
- TN = "TN"
229
- TR = "TR"
230
- TM = "TM"
231
- TC = "TC"
232
- TV = "TV"
233
- UG = "UG"
234
- UA = "UA"
235
- AE = "AE"
236
- GB = "GB"
237
- US = "US"
238
- UM = "UM"
239
- UY = "UY"
240
- UZ = "UZ"
241
- VU = "VU"
242
- VE = "VE"
243
- VN = "VN"
244
- VG = "VG"
245
- VI = "VI"
246
- WF = "WF"
247
- EH = "EH"
248
- YE = "YE"
249
- ZM = "ZM"
250
- ZW = "ZW"
251
- AX = "AX"
252
- BQ = "BQ"
253
- CW = "CW"
254
- GG = "GG"
255
- IM = "IM"
256
- JE = "JE"
257
- ME = "ME"
258
- BL = "BL"
259
- MF = "MF"
260
- RS = "RS"
261
- SX = "SX"
262
- SS = "SS"
263
- XK = "XK"
264
-
265
-
266
11
  class AnalyticsRegionsCity(str, Enum):
267
12
  WILDCARD_ = "*"
268
13
 
269
14
 
270
15
  class AnalyticsRegionsTypedDict(TypedDict):
271
- country: AnalyticsRegionsCountry
272
- r"""The 2-letter country code of the region: https://d.to/geo"""
16
+ country: str
17
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
273
18
  region: str
274
- r"""The 2-letter ISO 3166-2 region code representing the region associated with the location of the user."""
19
+ r"""The 2-letter ISO 3166-2 region code of the region."""
275
20
  city: NotRequired[AnalyticsRegionsCity]
276
21
  clicks: NotRequired[float]
277
22
  r"""The number of clicks from this region"""
@@ -284,11 +29,11 @@ class AnalyticsRegionsTypedDict(TypedDict):
284
29
 
285
30
 
286
31
  class AnalyticsRegions(BaseModel):
287
- country: AnalyticsRegionsCountry
288
- r"""The 2-letter country code of the region: https://d.to/geo"""
32
+ country: str
33
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
289
34
 
290
35
  region: str
291
- r"""The 2-letter ISO 3166-2 region code representing the region associated with the location of the user."""
36
+ r"""The 2-letter ISO 3166-2 region code of the region."""
292
37
 
293
38
  city: Optional[AnalyticsRegionsCity] = AnalyticsRegionsCity.WILDCARD_
294
39
 
@@ -5,7 +5,7 @@ from enum import Enum
5
5
 
6
6
 
7
7
  class CountryCode(str, Enum):
8
- r"""The country to retrieve analytics for."""
8
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
9
9
 
10
10
  AF = "AF"
11
11
  AL = "AL"
@@ -1217,7 +1217,7 @@ class PaymentProcessor(str, Enum):
1217
1217
 
1218
1218
  class SaleTypedDict(TypedDict):
1219
1219
  amount: int
1220
- r"""The amount of the sale in cents."""
1220
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
1221
1221
  payment_processor: PaymentProcessor
1222
1222
  r"""The payment processor via which the sale was made."""
1223
1223
  invoice_id: NotRequired[Nullable[str]]
@@ -1226,7 +1226,7 @@ class SaleTypedDict(TypedDict):
1226
1226
 
1227
1227
  class Sale(BaseModel):
1228
1228
  amount: int
1229
- r"""The amount of the sale in cents."""
1229
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
1230
1230
 
1231
1231
  payment_processor: Annotated[
1232
1232
  PaymentProcessor, pydantic.Field(alias="paymentProcessor")
@@ -127,6 +127,8 @@ class WorkspaceSchemaTypedDict(TypedDict):
127
127
  r"""The dollar amount of partner payouts processed in the current billing cycle (in cents)."""
128
128
  payouts_limit: float
129
129
  r"""The max dollar amount of partner payouts that can be processed within a billing cycle (in cents)."""
130
+ payout_fee: float
131
+ r"""The processing fee (in decimals) for partner payouts. For card payments, an additional 0.03 is added to the fee. Learn more: https://d.to/payouts"""
130
132
  domains_limit: float
131
133
  r"""The domains limit of the workspace."""
132
134
  tags_limit: float
@@ -212,6 +214,9 @@ class WorkspaceSchema(BaseModel):
212
214
  payouts_limit: Annotated[float, pydantic.Field(alias="payoutsLimit")]
213
215
  r"""The max dollar amount of partner payouts that can be processed within a billing cycle (in cents)."""
214
216
 
217
+ payout_fee: Annotated[float, pydantic.Field(alias="payoutFee")]
218
+ r"""The processing fee (in decimals) for partner payouts. For card payments, an additional 0.03 is added to the fee. Learn more: https://d.to/payouts"""
219
+
215
220
  domains_limit: Annotated[float, pydantic.Field(alias="domainsLimit")]
216
221
  r"""The domains limit of the workspace."""
217
222
 
@@ -10,7 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
10
 
11
11
 
12
12
  class Country(str, Enum):
13
- r"""Country where the partner is based."""
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
14
 
15
15
  AF = "AF"
16
16
  AL = "AL"
@@ -560,45 +560,45 @@ class LinkProps(BaseModel):
560
560
 
561
561
 
562
562
  class CreatePartnerRequestBodyTypedDict(TypedDict):
563
- name: str
564
- r"""Full legal name of the partner."""
565
563
  email: str
566
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
564
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
565
+ name: NotRequired[Nullable[str]]
566
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
567
567
  username: NotRequired[Nullable[str]]
568
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
568
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
569
569
  image: NotRequired[Nullable[str]]
570
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
570
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
571
+ tenant_id: NotRequired[str]
572
+ 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."""
571
573
  country: NotRequired[Nullable[Country]]
572
- r"""Country where the partner is based."""
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"""
573
575
  description: NotRequired[Nullable[str]]
574
- r"""A brief description of the partner and their background."""
575
- tenant_id: NotRequired[str]
576
- r"""The ID of the partner in your system."""
576
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
577
577
  link_props: NotRequired[LinkPropsTypedDict]
578
578
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
579
579
 
580
580
 
581
581
  class CreatePartnerRequestBody(BaseModel):
582
- name: str
583
- r"""Full legal name of the partner."""
584
-
585
582
  email: str
586
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
583
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
584
+
585
+ name: OptionalNullable[str] = UNSET
586
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
587
587
 
588
588
  username: OptionalNullable[str] = UNSET
589
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
589
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
590
590
 
591
591
  image: OptionalNullable[str] = UNSET
592
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
592
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
593
+
594
+ tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
595
+ 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."""
593
596
 
594
597
  country: OptionalNullable[Country] = UNSET
595
- r"""Country where the partner is based."""
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"""
596
599
 
597
600
  description: OptionalNullable[str] = UNSET
598
- r"""A brief description of the partner and their background."""
599
-
600
- tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
601
- r"""The ID of the partner in your system."""
601
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
602
602
 
603
603
  link_props: Annotated[Optional[LinkProps], pydantic.Field(alias="linkProps")] = None
604
604
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
@@ -606,14 +606,15 @@ class CreatePartnerRequestBody(BaseModel):
606
606
  @model_serializer(mode="wrap")
607
607
  def serialize_model(self, handler):
608
608
  optional_fields = [
609
+ "name",
609
610
  "username",
610
611
  "image",
612
+ "tenantId",
611
613
  "country",
612
614
  "description",
613
- "tenantId",
614
615
  "linkProps",
615
616
  ]
616
- nullable_fields = ["username", "image", "country", "description"]
617
+ nullable_fields = ["name", "username", "image", "country", "description"]
617
618
  null_default_fields = []
618
619
 
619
620
  serialized = handler(self)
@@ -10,7 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
10
 
11
11
 
12
12
  class CreateReferralsEmbedTokenCountry(str, Enum):
13
- r"""Country where the partner is based."""
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
14
 
15
15
  AF = "AF"
16
16
  AL = "AL"
@@ -566,45 +566,45 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
566
566
 
567
567
 
568
568
  class PartnerTypedDict(TypedDict):
569
- name: str
570
- r"""Full legal name of the partner."""
571
569
  email: str
572
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
570
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
571
+ name: NotRequired[Nullable[str]]
572
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
573
573
  username: NotRequired[Nullable[str]]
574
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
574
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
575
575
  image: NotRequired[Nullable[str]]
576
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
576
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
577
+ tenant_id: NotRequired[str]
578
+ 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."""
577
579
  country: NotRequired[Nullable[CreateReferralsEmbedTokenCountry]]
578
- r"""Country where the partner is based."""
580
+ 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"""
579
581
  description: NotRequired[Nullable[str]]
580
- r"""A brief description of the partner and their background."""
581
- tenant_id: NotRequired[str]
582
- r"""The ID of the partner in your system."""
582
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
583
583
  link_props: NotRequired[CreateReferralsEmbedTokenLinkPropsTypedDict]
584
584
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
585
585
 
586
586
 
587
587
  class Partner(BaseModel):
588
- name: str
589
- r"""Full legal name of the partner."""
590
-
591
588
  email: str
592
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
589
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
590
+
591
+ name: OptionalNullable[str] = UNSET
592
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
593
593
 
594
594
  username: OptionalNullable[str] = UNSET
595
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
595
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
596
596
 
597
597
  image: OptionalNullable[str] = UNSET
598
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
598
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
599
+
600
+ tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
601
+ 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."""
599
602
 
600
603
  country: OptionalNullable[CreateReferralsEmbedTokenCountry] = UNSET
601
- r"""Country where the partner is based."""
604
+ 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"""
602
605
 
603
606
  description: OptionalNullable[str] = UNSET
604
- r"""A brief description of the partner and their background."""
605
-
606
- tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
607
- r"""The ID of the partner in your system."""
607
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
608
608
 
609
609
  link_props: Annotated[
610
610
  Optional[CreateReferralsEmbedTokenLinkProps], pydantic.Field(alias="linkProps")
@@ -614,14 +614,15 @@ class Partner(BaseModel):
614
614
  @model_serializer(mode="wrap")
615
615
  def serialize_model(self, handler):
616
616
  optional_fields = [
617
+ "name",
617
618
  "username",
618
619
  "image",
620
+ "tenantId",
619
621
  "country",
620
622
  "description",
621
- "tenantId",
622
623
  "linkProps",
623
624
  ]
624
- nullable_fields = ["username", "image", "country", "description"]
625
+ nullable_fields = ["name", "username", "image", "country", "description"]
625
626
  null_default_fields = []
626
627
 
627
628
  serialized = handler(self)
@@ -115,7 +115,7 @@ class ListEventsRequestTypedDict(TypedDict):
115
115
  timezone: NotRequired[str]
116
116
  r"""The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."""
117
117
  country: NotRequired[components_countrycode.CountryCode]
118
- r"""The country to retrieve analytics for."""
118
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
119
119
  city: NotRequired[str]
120
120
  r"""The city to retrieve analytics for."""
121
121
  region: NotRequired[str]
@@ -255,7 +255,7 @@ class ListEventsRequest(BaseModel):
255
255
  Optional[components_countrycode.CountryCode],
256
256
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
257
257
  ] = None
258
- r"""The country to retrieve analytics for."""
258
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
259
259
 
260
260
  city: Annotated[
261
261
  Optional[str],
@@ -126,7 +126,7 @@ class RetrieveAnalyticsRequestTypedDict(TypedDict):
126
126
  timezone: NotRequired[str]
127
127
  r"""The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."""
128
128
  country: NotRequired[components_countrycode.CountryCode]
129
- r"""The country to retrieve analytics for."""
129
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
130
130
  city: NotRequired[str]
131
131
  r"""The city to retrieve analytics for."""
132
132
  region: NotRequired[str]
@@ -265,7 +265,7 @@ class RetrieveAnalyticsRequest(BaseModel):
265
265
  Optional[components_countrycode.CountryCode],
266
266
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
267
267
  ] = None
268
- r"""The country to retrieve analytics for."""
268
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
269
269
 
270
270
  city: Annotated[
271
271
  Optional[str],
@@ -9,18 +9,11 @@ from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
11
  class RetrieveLinksRequestTypedDict(TypedDict):
12
- program_id: str
13
12
  partner_id: NotRequired[str]
14
13
  tenant_id: NotRequired[str]
15
14
 
16
15
 
17
16
  class RetrieveLinksRequest(BaseModel):
18
- program_id: Annotated[
19
- str,
20
- pydantic.Field(alias="programId"),
21
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
22
- ]
23
-
24
17
  partner_id: Annotated[
25
18
  Optional[str],
26
19
  pydantic.Field(alias="partnerId"),
@@ -23,14 +23,14 @@ class TrackLeadRequestBodyTypedDict(TypedDict):
23
23
  r"""The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`)."""
24
24
  external_id: str
25
25
  r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
26
- event_quantity: NotRequired[Nullable[float]]
27
- r"""The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times."""
28
26
  customer_name: NotRequired[Nullable[str]]
29
27
  r"""The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”)."""
30
28
  customer_email: NotRequired[Nullable[str]]
31
29
  r"""The email address of the customer."""
32
30
  customer_avatar: NotRequired[Nullable[str]]
33
31
  r"""The avatar URL of the customer."""
32
+ event_quantity: NotRequired[Nullable[float]]
33
+ r"""The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times."""
34
34
  mode: NotRequired[Mode]
35
35
  r"""The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub."""
36
36
  metadata: NotRequired[Nullable[Dict[str, Any]]]
@@ -47,11 +47,6 @@ class TrackLeadRequestBody(BaseModel):
47
47
  external_id: Annotated[str, pydantic.Field(alias="externalId")]
48
48
  r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
49
49
 
50
- event_quantity: Annotated[
51
- OptionalNullable[float], pydantic.Field(alias="eventQuantity")
52
- ] = UNSET
53
- r"""The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times."""
54
-
55
50
  customer_name: Annotated[
56
51
  OptionalNullable[str], pydantic.Field(alias="customerName")
57
52
  ] = None
@@ -67,6 +62,11 @@ class TrackLeadRequestBody(BaseModel):
67
62
  ] = None
68
63
  r"""The avatar URL of the customer."""
69
64
 
65
+ event_quantity: Annotated[
66
+ OptionalNullable[float], pydantic.Field(alias="eventQuantity")
67
+ ] = UNSET
68
+ r"""The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times."""
69
+
70
70
  mode: Optional[Mode] = Mode.ASYNC
71
71
  r"""The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub."""
72
72
 
@@ -76,18 +76,18 @@ class TrackLeadRequestBody(BaseModel):
76
76
  @model_serializer(mode="wrap")
77
77
  def serialize_model(self, handler):
78
78
  optional_fields = [
79
- "eventQuantity",
80
79
  "customerName",
81
80
  "customerEmail",
82
81
  "customerAvatar",
82
+ "eventQuantity",
83
83
  "mode",
84
84
  "metadata",
85
85
  ]
86
86
  nullable_fields = [
87
- "eventQuantity",
88
87
  "customerName",
89
88
  "customerEmail",
90
89
  "customerAvatar",
90
+ "eventQuantity",
91
91
  "metadata",
92
92
  ]
93
93
  null_default_fields = ["customerName", "customerEmail", "customerAvatar"]