dub 0.32.0__py3-none-any.whl → 0.34.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dub/_version.py +3 -3
- dub/analytics.py +6 -4
- dub/basesdk.py +6 -0
- dub/commissions.py +12 -8
- dub/customers.py +24 -313
- dub/domains.py +34 -26
- dub/embed_tokens.py +6 -4
- dub/events.py +6 -4
- dub/folders.py +24 -20
- dub/links.py +58 -54
- dub/models/components/__init__.py +81 -149
- dub/models/components/analyticstopurls.py +2 -2
- dub/models/components/leadcreatedevent.py +15 -14
- dub/models/components/linkclickedevent.py +19 -18
- dub/models/components/linkerrorschema.py +12 -12
- dub/models/components/linkschema.py +9 -3
- dub/models/components/linktagschema.py +3 -3
- dub/models/components/linktagschemaoutput.py +38 -0
- dub/models/components/linkwebhookevent.py +15 -16
- dub/models/components/partnerapplicationsubmittedevent.py +269 -0
- dub/models/components/partnerenrolledevent.py +68 -8
- dub/models/components/salecreatedevent.py +15 -14
- dub/models/components/webhookevent.py +6 -0
- dub/models/components/workspaceschema.py +6 -0
- dub/models/operations/__init__.py +147 -57
- dub/models/operations/banpartner.py +83 -0
- dub/models/operations/createpartner.py +68 -59
- 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/listcommissions.py +13 -2
- dub/models/operations/listdomains.py +1 -1
- dub/models/operations/listevents.py +2026 -21
- dub/models/operations/listpartners.py +75 -8
- dub/models/operations/retrieveanalytics.py +28 -5
- dub/models/operations/retrievelinks.py +44 -9
- dub/models/operations/retrievepartneranalytics.py +51 -11
- dub/models/operations/tracklead.py +4 -4
- dub/models/operations/updatecommission.py +7 -2
- 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 +316 -24
- dub/qr_codes.py +4 -2
- dub/tags.py +24 -20
- dub/track.py +12 -16
- 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/retries.py +69 -5
- dub/utils/serializers.py +0 -20
- dub/utils/unmarshal_json_response.py +15 -1
- dub/workspaces.py +12 -16
- {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/METADATA +15 -33
- {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/RECORD +65 -67
- dub/models/components/clickevent.py +0 -556
- dub/models/components/continentcode.py +0 -16
- dub/models/components/leadevent.py +0 -680
- dub/models/components/saleevent.py +0 -779
- dub/models/operations/createcustomer.py +0 -382
- {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/WHEEL +0 -0
- {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/licenses/LICENSE +0 -0
dub/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "dub"
|
|
6
|
-
__version__: str = "0.
|
|
6
|
+
__version__: str = "0.34.0"
|
|
7
7
|
__openapi_doc_version__: str = "0.0.1"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.
|
|
8
|
+
__gen_version__: str = "2.793.2"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.34.0 2.793.2 0.0.1 dub"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
dub/analytics.py
CHANGED
|
@@ -21,7 +21,7 @@ class Analytics(BaseSDK):
|
|
|
21
21
|
server_url: Optional[str] = None,
|
|
22
22
|
timeout_ms: Optional[int] = None,
|
|
23
23
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
24
|
-
) ->
|
|
24
|
+
) -> operations.RetrieveAnalyticsResponseBody:
|
|
25
25
|
r"""Retrieve analytics for a link, a domain, or the authenticated workspace.
|
|
26
26
|
|
|
27
27
|
Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.
|
|
@@ -59,6 +59,7 @@ class Analytics(BaseSDK):
|
|
|
59
59
|
accept_header_value="application/json",
|
|
60
60
|
http_headers=http_headers,
|
|
61
61
|
security=self.sdk_configuration.security,
|
|
62
|
+
allow_empty_value=None,
|
|
62
63
|
timeout_ms=timeout_ms,
|
|
63
64
|
)
|
|
64
65
|
|
|
@@ -98,7 +99,7 @@ class Analytics(BaseSDK):
|
|
|
98
99
|
response_data: Any = None
|
|
99
100
|
if utils.match_response(http_res, "200", "application/json"):
|
|
100
101
|
return unmarshal_json_response(
|
|
101
|
-
|
|
102
|
+
operations.RetrieveAnalyticsResponseBody, http_res
|
|
102
103
|
)
|
|
103
104
|
if utils.match_response(http_res, "400", "application/json"):
|
|
104
105
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -153,7 +154,7 @@ class Analytics(BaseSDK):
|
|
|
153
154
|
server_url: Optional[str] = None,
|
|
154
155
|
timeout_ms: Optional[int] = None,
|
|
155
156
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
156
|
-
) ->
|
|
157
|
+
) -> operations.RetrieveAnalyticsResponseBody:
|
|
157
158
|
r"""Retrieve analytics for a link, a domain, or the authenticated workspace.
|
|
158
159
|
|
|
159
160
|
Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.
|
|
@@ -191,6 +192,7 @@ class Analytics(BaseSDK):
|
|
|
191
192
|
accept_header_value="application/json",
|
|
192
193
|
http_headers=http_headers,
|
|
193
194
|
security=self.sdk_configuration.security,
|
|
195
|
+
allow_empty_value=None,
|
|
194
196
|
timeout_ms=timeout_ms,
|
|
195
197
|
)
|
|
196
198
|
|
|
@@ -230,7 +232,7 @@ class Analytics(BaseSDK):
|
|
|
230
232
|
response_data: Any = None
|
|
231
233
|
if utils.match_response(http_res, "200", "application/json"):
|
|
232
234
|
return unmarshal_json_response(
|
|
233
|
-
|
|
235
|
+
operations.RetrieveAnalyticsResponseBody, http_res
|
|
234
236
|
)
|
|
235
237
|
if utils.match_response(http_res, "400", "application/json"):
|
|
236
238
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
dub/basesdk.py
CHANGED
|
@@ -57,6 +57,7 @@ class BaseSDK:
|
|
|
57
57
|
] = None,
|
|
58
58
|
url_override: Optional[str] = None,
|
|
59
59
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
60
|
+
allow_empty_value: Optional[List[str]] = None,
|
|
60
61
|
) -> httpx.Request:
|
|
61
62
|
client = self.sdk_configuration.async_client
|
|
62
63
|
return self._build_request_with_client(
|
|
@@ -77,6 +78,7 @@ class BaseSDK:
|
|
|
77
78
|
get_serialized_body,
|
|
78
79
|
url_override,
|
|
79
80
|
http_headers,
|
|
81
|
+
allow_empty_value,
|
|
80
82
|
)
|
|
81
83
|
|
|
82
84
|
def _build_request(
|
|
@@ -99,6 +101,7 @@ class BaseSDK:
|
|
|
99
101
|
] = None,
|
|
100
102
|
url_override: Optional[str] = None,
|
|
101
103
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
104
|
+
allow_empty_value: Optional[List[str]] = None,
|
|
102
105
|
) -> httpx.Request:
|
|
103
106
|
client = self.sdk_configuration.client
|
|
104
107
|
return self._build_request_with_client(
|
|
@@ -119,6 +122,7 @@ class BaseSDK:
|
|
|
119
122
|
get_serialized_body,
|
|
120
123
|
url_override,
|
|
121
124
|
http_headers,
|
|
125
|
+
allow_empty_value,
|
|
122
126
|
)
|
|
123
127
|
|
|
124
128
|
def _build_request_with_client(
|
|
@@ -142,6 +146,7 @@ class BaseSDK:
|
|
|
142
146
|
] = None,
|
|
143
147
|
url_override: Optional[str] = None,
|
|
144
148
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
149
|
+
allow_empty_value: Optional[List[str]] = None,
|
|
145
150
|
) -> httpx.Request:
|
|
146
151
|
query_params = {}
|
|
147
152
|
|
|
@@ -157,6 +162,7 @@ class BaseSDK:
|
|
|
157
162
|
query_params = utils.get_query_params(
|
|
158
163
|
request if request_has_query_params else None,
|
|
159
164
|
_globals if request_has_query_params else None,
|
|
165
|
+
allow_empty_value,
|
|
160
166
|
)
|
|
161
167
|
else:
|
|
162
168
|
# Pick up the query parameter from the override so they can be
|
dub/commissions.py
CHANGED
|
@@ -21,7 +21,7 @@ class Commissions(BaseSDK):
|
|
|
21
21
|
server_url: Optional[str] = None,
|
|
22
22
|
timeout_ms: Optional[int] = None,
|
|
23
23
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
24
|
-
) ->
|
|
24
|
+
) -> List[operations.ListCommissionsResponseBody]:
|
|
25
25
|
r"""Get commissions for a program.
|
|
26
26
|
|
|
27
27
|
Retrieve a list of commissions for a program.
|
|
@@ -59,6 +59,7 @@ class Commissions(BaseSDK):
|
|
|
59
59
|
accept_header_value="application/json",
|
|
60
60
|
http_headers=http_headers,
|
|
61
61
|
security=self.sdk_configuration.security,
|
|
62
|
+
allow_empty_value=None,
|
|
62
63
|
timeout_ms=timeout_ms,
|
|
63
64
|
)
|
|
64
65
|
|
|
@@ -98,7 +99,7 @@ class Commissions(BaseSDK):
|
|
|
98
99
|
response_data: Any = None
|
|
99
100
|
if utils.match_response(http_res, "200", "application/json"):
|
|
100
101
|
return unmarshal_json_response(
|
|
101
|
-
|
|
102
|
+
List[operations.ListCommissionsResponseBody], http_res
|
|
102
103
|
)
|
|
103
104
|
if utils.match_response(http_res, "400", "application/json"):
|
|
104
105
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -153,7 +154,7 @@ class Commissions(BaseSDK):
|
|
|
153
154
|
server_url: Optional[str] = None,
|
|
154
155
|
timeout_ms: Optional[int] = None,
|
|
155
156
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
156
|
-
) ->
|
|
157
|
+
) -> List[operations.ListCommissionsResponseBody]:
|
|
157
158
|
r"""Get commissions for a program.
|
|
158
159
|
|
|
159
160
|
Retrieve a list of commissions for a program.
|
|
@@ -191,6 +192,7 @@ class Commissions(BaseSDK):
|
|
|
191
192
|
accept_header_value="application/json",
|
|
192
193
|
http_headers=http_headers,
|
|
193
194
|
security=self.sdk_configuration.security,
|
|
195
|
+
allow_empty_value=None,
|
|
194
196
|
timeout_ms=timeout_ms,
|
|
195
197
|
)
|
|
196
198
|
|
|
@@ -230,7 +232,7 @@ class Commissions(BaseSDK):
|
|
|
230
232
|
response_data: Any = None
|
|
231
233
|
if utils.match_response(http_res, "200", "application/json"):
|
|
232
234
|
return unmarshal_json_response(
|
|
233
|
-
|
|
235
|
+
List[operations.ListCommissionsResponseBody], http_res
|
|
234
236
|
)
|
|
235
237
|
if utils.match_response(http_res, "400", "application/json"):
|
|
236
238
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -285,7 +287,7 @@ class Commissions(BaseSDK):
|
|
|
285
287
|
server_url: Optional[str] = None,
|
|
286
288
|
timeout_ms: Optional[int] = None,
|
|
287
289
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
288
|
-
) ->
|
|
290
|
+
) -> operations.UpdateCommissionResponseBody:
|
|
289
291
|
r"""Update a commission.
|
|
290
292
|
|
|
291
293
|
Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.
|
|
@@ -330,6 +332,7 @@ class Commissions(BaseSDK):
|
|
|
330
332
|
"json",
|
|
331
333
|
Optional[operations.UpdateCommissionRequestBody],
|
|
332
334
|
),
|
|
335
|
+
allow_empty_value=None,
|
|
333
336
|
timeout_ms=timeout_ms,
|
|
334
337
|
)
|
|
335
338
|
|
|
@@ -369,7 +372,7 @@ class Commissions(BaseSDK):
|
|
|
369
372
|
response_data: Any = None
|
|
370
373
|
if utils.match_response(http_res, "200", "application/json"):
|
|
371
374
|
return unmarshal_json_response(
|
|
372
|
-
|
|
375
|
+
operations.UpdateCommissionResponseBody, http_res
|
|
373
376
|
)
|
|
374
377
|
if utils.match_response(http_res, "400", "application/json"):
|
|
375
378
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -424,7 +427,7 @@ class Commissions(BaseSDK):
|
|
|
424
427
|
server_url: Optional[str] = None,
|
|
425
428
|
timeout_ms: Optional[int] = None,
|
|
426
429
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
427
|
-
) ->
|
|
430
|
+
) -> operations.UpdateCommissionResponseBody:
|
|
428
431
|
r"""Update a commission.
|
|
429
432
|
|
|
430
433
|
Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.
|
|
@@ -469,6 +472,7 @@ class Commissions(BaseSDK):
|
|
|
469
472
|
"json",
|
|
470
473
|
Optional[operations.UpdateCommissionRequestBody],
|
|
471
474
|
),
|
|
475
|
+
allow_empty_value=None,
|
|
472
476
|
timeout_ms=timeout_ms,
|
|
473
477
|
)
|
|
474
478
|
|
|
@@ -508,7 +512,7 @@ class Commissions(BaseSDK):
|
|
|
508
512
|
response_data: Any = None
|
|
509
513
|
if utils.match_response(http_res, "200", "application/json"):
|
|
510
514
|
return unmarshal_json_response(
|
|
511
|
-
|
|
515
|
+
operations.UpdateCommissionResponseBody, http_res
|
|
512
516
|
)
|
|
513
517
|
if utils.match_response(http_res, "400", "application/json"):
|
|
514
518
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|