dub 0.33.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.
- dub/_version.py +3 -3
- dub/analytics.py +2 -0
- dub/basesdk.py +6 -0
- dub/commissions.py +4 -0
- dub/customers.py +8 -0
- dub/domains.py +12 -0
- dub/embed_tokens.py +2 -0
- dub/events.py +2 -0
- dub/folders.py +8 -0
- dub/links.py +20 -0
- dub/models/components/__init__.py +49 -149
- dub/models/components/leadcreatedevent.py +8 -8
- dub/models/components/linkclickedevent.py +12 -12
- dub/models/components/linkerrorschema.py +12 -12
- dub/models/components/linkschema.py +3 -3
- dub/models/components/linktagschema.py +3 -3
- dub/models/components/linktagschemaoutput.py +38 -0
- dub/models/components/linkwebhookevent.py +8 -10
- dub/models/components/partnerenrolledevent.py +4 -4
- dub/models/components/salecreatedevent.py +8 -8
- dub/models/operations/__init__.py +130 -22
- dub/models/operations/createpartner.py +4 -55
- dub/models/operations/createpartnerlink.py +0 -51
- dub/models/operations/createreferralsembedtoken.py +0 -51
- dub/models/operations/getcustomers.py +18 -0
- dub/models/operations/getlinkinfo.py +0 -2
- dub/models/operations/getlinks.py +2 -2
- dub/models/operations/getlinkscount.py +2 -2
- dub/models/operations/getqrcode.py +1 -1
- dub/models/operations/listdomains.py +1 -1
- dub/models/operations/listevents.py +2016 -21
- dub/models/operations/listpartners.py +4 -4
- dub/models/operations/retrieveanalytics.py +16 -5
- dub/models/operations/retrievelinks.py +2 -2
- dub/models/operations/tracklead.py +4 -4
- dub/models/operations/updatecustomer.py +23 -11
- dub/models/operations/updatelink.py +0 -2
- dub/models/operations/updateworkspace.py +3 -3
- dub/models/operations/upsertpartnerlink.py +0 -51
- dub/partners.py +22 -4
- dub/qr_codes.py +2 -0
- dub/tags.py +24 -12
- dub/track.py +4 -0
- dub/types/basemodel.py +41 -3
- dub/utils/__init__.py +0 -3
- dub/utils/enums.py +60 -0
- dub/utils/forms.py +21 -10
- dub/utils/queryparams.py +14 -2
- dub/utils/requestbodies.py +3 -3
- dub/utils/serializers.py +0 -20
- dub/workspaces.py +4 -0
- {dub-0.33.0.dist-info → dub-0.34.0.dist-info}/METADATA +14 -14
- {dub-0.33.0.dist-info → dub-0.34.0.dist-info}/RECORD +55 -58
- dub/models/components/clickevent.py +0 -557
- dub/models/components/continentcode.py +0 -16
- dub/models/components/leadevent.py +0 -681
- dub/models/components/saleevent.py +0 -780
- {dub-0.33.0.dist-info → dub-0.34.0.dist-info}/WHEEL +0 -0
- {dub-0.33.0.dist-info → dub-0.34.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
-
] =
|
|
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
|
-
] =
|
|
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
|
-
] =
|
|
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
|
-
] =
|
|
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
|
-
] =
|
|
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[
|
|
@@ -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
|
-
] =
|
|
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[
|