dub 0.33.0__py3-none-any.whl → 0.34.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.
- dub/_version.py +3 -3
- dub/analytics.py +2 -0
- dub/basesdk.py +6 -0
- dub/bounties.py +841 -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 +55 -149
- dub/models/components/commissioncreatedevent.py +29 -1
- 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 +223 -22
- dub/models/operations/approvebountysubmission.py +185 -0
- 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/listbountysubmissions.py +212 -0
- dub/models/operations/listdomains.py +1 -1
- dub/models/operations/listevents.py +2016 -21
- dub/models/operations/listpartners.py +4 -4
- dub/models/operations/rejectbountysubmission.py +174 -0
- 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 +7 -65
- dub/partners.py +22 -4
- dub/qr_codes.py +2 -0
- dub/sdk.py +3 -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.1.dist-info}/METADATA +20 -14
- {dub-0.33.0.dist-info → dub-0.34.1.dist-info}/RECORD +61 -60
- 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.1.dist-info}/WHEEL +0 -0
- {dub-0.33.0.dist-info → dub-0.34.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
|
+
from dub.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic import model_serializer
|
|
9
|
+
from typing import List, Optional
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ApproveBountySubmissionRequestBodyTypedDict(TypedDict):
|
|
14
|
+
reward_amount: NotRequired[Nullable[float]]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ApproveBountySubmissionRequestBody(BaseModel):
|
|
18
|
+
reward_amount: Annotated[
|
|
19
|
+
OptionalNullable[float], pydantic.Field(alias="rewardAmount")
|
|
20
|
+
] = UNSET
|
|
21
|
+
|
|
22
|
+
@model_serializer(mode="wrap")
|
|
23
|
+
def serialize_model(self, handler):
|
|
24
|
+
optional_fields = ["rewardAmount"]
|
|
25
|
+
nullable_fields = ["rewardAmount"]
|
|
26
|
+
null_default_fields = []
|
|
27
|
+
|
|
28
|
+
serialized = handler(self)
|
|
29
|
+
|
|
30
|
+
m = {}
|
|
31
|
+
|
|
32
|
+
for n, f in type(self).model_fields.items():
|
|
33
|
+
k = f.alias or n
|
|
34
|
+
val = serialized.get(k)
|
|
35
|
+
serialized.pop(k, None)
|
|
36
|
+
|
|
37
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
38
|
+
is_set = (
|
|
39
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
40
|
+
or k in null_default_fields
|
|
41
|
+
) # pylint: disable=no-member
|
|
42
|
+
|
|
43
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
44
|
+
m[k] = val
|
|
45
|
+
elif val != UNSET_SENTINEL and (
|
|
46
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
47
|
+
):
|
|
48
|
+
m[k] = val
|
|
49
|
+
|
|
50
|
+
return m
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ApproveBountySubmissionRequestTypedDict(TypedDict):
|
|
54
|
+
bounty_id: str
|
|
55
|
+
submission_id: str
|
|
56
|
+
request_body: NotRequired[ApproveBountySubmissionRequestBodyTypedDict]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class ApproveBountySubmissionRequest(BaseModel):
|
|
60
|
+
bounty_id: Annotated[
|
|
61
|
+
str,
|
|
62
|
+
pydantic.Field(alias="bountyId"),
|
|
63
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
submission_id: Annotated[
|
|
67
|
+
str,
|
|
68
|
+
pydantic.Field(alias="submissionId"),
|
|
69
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
request_body: Annotated[
|
|
73
|
+
Optional[ApproveBountySubmissionRequestBody],
|
|
74
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
75
|
+
] = None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class ApproveBountySubmissionFilesTypedDict(TypedDict):
|
|
79
|
+
url: str
|
|
80
|
+
file_name: str
|
|
81
|
+
size: float
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class ApproveBountySubmissionFiles(BaseModel):
|
|
85
|
+
url: str
|
|
86
|
+
|
|
87
|
+
file_name: Annotated[str, pydantic.Field(alias="fileName")]
|
|
88
|
+
|
|
89
|
+
size: float
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class ApproveBountySubmissionStatus(str, Enum):
|
|
93
|
+
DRAFT = "draft"
|
|
94
|
+
SUBMITTED = "submitted"
|
|
95
|
+
APPROVED = "approved"
|
|
96
|
+
REJECTED = "rejected"
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class ApproveBountySubmissionResponseBodyTypedDict(TypedDict):
|
|
100
|
+
r"""The approved bounty submission."""
|
|
101
|
+
|
|
102
|
+
id: str
|
|
103
|
+
bounty_id: str
|
|
104
|
+
partner_id: str
|
|
105
|
+
description: Nullable[str]
|
|
106
|
+
urls: Nullable[List[str]]
|
|
107
|
+
files: Nullable[List[ApproveBountySubmissionFilesTypedDict]]
|
|
108
|
+
status: ApproveBountySubmissionStatus
|
|
109
|
+
performance_count: Nullable[float]
|
|
110
|
+
created_at: str
|
|
111
|
+
completed_at: Nullable[str]
|
|
112
|
+
reviewed_at: Nullable[str]
|
|
113
|
+
rejection_reason: Nullable[str]
|
|
114
|
+
rejection_note: Nullable[str]
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class ApproveBountySubmissionResponseBody(BaseModel):
|
|
118
|
+
r"""The approved bounty submission."""
|
|
119
|
+
|
|
120
|
+
id: str
|
|
121
|
+
|
|
122
|
+
bounty_id: Annotated[str, pydantic.Field(alias="bountyId")]
|
|
123
|
+
|
|
124
|
+
partner_id: Annotated[str, pydantic.Field(alias="partnerId")]
|
|
125
|
+
|
|
126
|
+
description: Nullable[str]
|
|
127
|
+
|
|
128
|
+
urls: Nullable[List[str]]
|
|
129
|
+
|
|
130
|
+
files: Nullable[List[ApproveBountySubmissionFiles]]
|
|
131
|
+
|
|
132
|
+
status: ApproveBountySubmissionStatus
|
|
133
|
+
|
|
134
|
+
performance_count: Annotated[
|
|
135
|
+
Nullable[float], pydantic.Field(alias="performanceCount")
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
created_at: Annotated[str, pydantic.Field(alias="createdAt")]
|
|
139
|
+
|
|
140
|
+
completed_at: Annotated[Nullable[str], pydantic.Field(alias="completedAt")]
|
|
141
|
+
|
|
142
|
+
reviewed_at: Annotated[Nullable[str], pydantic.Field(alias="reviewedAt")]
|
|
143
|
+
|
|
144
|
+
rejection_reason: Annotated[Nullable[str], pydantic.Field(alias="rejectionReason")]
|
|
145
|
+
|
|
146
|
+
rejection_note: Annotated[Nullable[str], pydantic.Field(alias="rejectionNote")]
|
|
147
|
+
|
|
148
|
+
@model_serializer(mode="wrap")
|
|
149
|
+
def serialize_model(self, handler):
|
|
150
|
+
optional_fields = []
|
|
151
|
+
nullable_fields = [
|
|
152
|
+
"description",
|
|
153
|
+
"urls",
|
|
154
|
+
"files",
|
|
155
|
+
"performanceCount",
|
|
156
|
+
"completedAt",
|
|
157
|
+
"reviewedAt",
|
|
158
|
+
"rejectionReason",
|
|
159
|
+
"rejectionNote",
|
|
160
|
+
]
|
|
161
|
+
null_default_fields = []
|
|
162
|
+
|
|
163
|
+
serialized = handler(self)
|
|
164
|
+
|
|
165
|
+
m = {}
|
|
166
|
+
|
|
167
|
+
for n, f in type(self).model_fields.items():
|
|
168
|
+
k = f.alias or n
|
|
169
|
+
val = serialized.get(k)
|
|
170
|
+
serialized.pop(k, None)
|
|
171
|
+
|
|
172
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
173
|
+
is_set = (
|
|
174
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
175
|
+
or k in null_default_fields
|
|
176
|
+
) # pylint: disable=no-member
|
|
177
|
+
|
|
178
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
179
|
+
m[k] = val
|
|
180
|
+
elif val != UNSET_SENTINEL and (
|
|
181
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
182
|
+
):
|
|
183
|
+
m[k] = val
|
|
184
|
+
|
|
185
|
+
return m
|
|
@@ -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
|
|
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
|
|
381
|
+
class Links(BaseModel):
|
|
433
382
|
id: str
|
|
434
383
|
r"""The unique ID of the short link."""
|
|
435
384
|
|
|
@@ -504,7 +453,7 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
|
|
|
504
453
|
created_at: str
|
|
505
454
|
status: CreatePartnerStatus
|
|
506
455
|
r"""The status of the partner's enrollment in the program."""
|
|
507
|
-
links: Nullable[List[
|
|
456
|
+
links: Nullable[List[LinksTypedDict]]
|
|
508
457
|
r"""The partner's referral links in this program."""
|
|
509
458
|
description: NotRequired[Nullable[str]]
|
|
510
459
|
r"""A brief description of the partner and their background."""
|
|
@@ -609,7 +558,7 @@ class CreatePartnerResponseBody(BaseModel):
|
|
|
609
558
|
status: CreatePartnerStatus
|
|
610
559
|
r"""The status of the partner's enrollment in the program."""
|
|
611
560
|
|
|
612
|
-
links: Nullable[List[
|
|
561
|
+
links: Nullable[List[Links]]
|
|
613
562
|
r"""The partner's referral links in this program."""
|
|
614
563
|
|
|
615
564
|
description: OptionalNullable[str] = UNSET
|
|
@@ -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[
|