dub 0.29.2__tar.gz → 0.31.0__tar.gz
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-0.29.2 → dub-0.31.0}/PKG-INFO +7 -3
- {dub-0.29.2 → dub-0.31.0}/README-PYPI.md +3 -1
- {dub-0.29.2 → dub-0.31.0}/pyproject.toml +1 -2
- {dub-0.29.2 → dub-0.31.0}/src/dub/_version.py +3 -3
- {dub-0.29.2 → dub-0.31.0}/src/dub/httpclient.py +0 -1
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/__init__.py +16 -4
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/commissioncreatedevent.py +4 -4
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/leadcreatedevent.py +122 -1
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/partnerenrolledevent.py +12 -63
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/salecreatedevent.py +122 -1
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/workspaceschema.py +8 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createcustomer.py +10 -3
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createpartner.py +14 -65
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/listcommissions.py +11 -2
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/listevents.py +10 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/listpartners.py +32 -74
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/retrieveanalytics.py +10 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/retrievelinks.py +5 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatecustomer.py +10 -3
- {dub-0.29.2 → dub-0.31.0}/src/dub/partners.py +4 -4
- {dub-0.29.2 → dub-0.31.0}/src/dub/sdk.py +2 -2
- dub-0.31.0/src/dub/utils/annotations.py +79 -0
- dub-0.29.2/src/dub/utils/annotations.py +0 -55
- {dub-0.29.2 → dub-0.31.0}/LICENSE +0 -0
- {dub-0.29.2 → dub-0.31.0}/py.typed +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/_hooks/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/_hooks/registration.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/_hooks/sdkhooks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/_hooks/types.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/analytics.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/basesdk.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/commissions.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/customers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/domains.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/embed_tokens.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/events.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/folders.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/links.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsbrowsers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticscities.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticscontinents.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticscount.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticscountries.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsdevices.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsos.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsreferers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsrefererurls.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticsregions.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticstimeseries.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticstoplinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticstopurls.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/analyticstriggers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/clickevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/continentcode.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/domainschema.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/folderschema.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/leadevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/linkclickedevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/linkerrorschema.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/linkschema.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/linkwebhookevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/partneranalyticscount.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/partneranalyticstimeseries.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/partneranalyticstoplinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/saleevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/security.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/tagschema.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/components/webhookevent.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/badrequest.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/conflict.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/duberror.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/forbidden.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/internalservererror.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/inviteexpired.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/no_response_error.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/notfound.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/ratelimitexceeded.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/responsevalidationerror.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/sdkerror.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/unauthorized.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/errors/unprocessableentity.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/bulkcreatelinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/bulkdeletelinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/bulkupdatelinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/checkdomainstatus.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createdomain.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createfolder.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createlink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createpartnerlink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createreferralsembedtoken.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/createtag.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/deletecustomer.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/deletedomain.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/deletefolder.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/deletelink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/deletetag.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getcustomer.py +1 -1
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getcustomers.py +1 -1
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getlinkinfo.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getlinks.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getlinkscount.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getqrcode.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/gettags.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/getworkspace.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/listdomains.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/listfolders.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/registerdomain.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/retrievepartneranalytics.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/tracklead.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/tracksale.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatecommission.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatedomain.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatefolder.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatelink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updatetag.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/updateworkspace.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/upsertlink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/models/operations/upsertpartnerlink.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/py.typed +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/qr_codes.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/sdkconfiguration.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/tags.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/track.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/types/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/types/basemodel.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/__init__.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/datetimes.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/enums.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/eventstreaming.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/forms.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/headers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/logger.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/metadata.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/queryparams.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/requestbodies.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/retries.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/security.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/serializers.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/unmarshal_json_response.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/url.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/utils/values.py +0 -0
- {dub-0.29.2 → dub-0.31.0}/src/dub/workspaces.py +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dub
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.31.0
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy
|
|
5
|
+
License-File: LICENSE
|
|
5
6
|
Author: Speakeasy
|
|
6
7
|
Requires-Python: >=3.9.2
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,6 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
9
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
14
|
Requires-Dist: httpcore (>=1.0.9)
|
|
13
15
|
Requires-Dist: httpx (>=0.28.1)
|
|
14
16
|
Requires-Dist: jsonpath-python (>=1.0.6)
|
|
@@ -162,6 +164,7 @@ with Dub(
|
|
|
162
164
|
</br>
|
|
163
165
|
|
|
164
166
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
167
|
+
|
|
165
168
|
```python
|
|
166
169
|
# Asynchronous Example
|
|
167
170
|
import asyncio
|
|
@@ -237,6 +240,7 @@ with Dub(
|
|
|
237
240
|
</br>
|
|
238
241
|
|
|
239
242
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
243
|
+
|
|
240
244
|
```python
|
|
241
245
|
# Asynchronous Example
|
|
242
246
|
import asyncio
|
|
@@ -338,7 +342,7 @@ asyncio.run(main())
|
|
|
338
342
|
|
|
339
343
|
### [partners](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md)
|
|
340
344
|
|
|
341
|
-
* [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create) - Create a partner
|
|
345
|
+
* [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create) - Create or update a partner
|
|
342
346
|
* [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#list) - List all partners
|
|
343
347
|
* [create_link](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create_link) - Create a link for a partner
|
|
344
348
|
* [retrieve_links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#retrieve_links) - Retrieve a partner's links.
|
|
@@ -144,6 +144,7 @@ with Dub(
|
|
|
144
144
|
</br>
|
|
145
145
|
|
|
146
146
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
147
|
+
|
|
147
148
|
```python
|
|
148
149
|
# Asynchronous Example
|
|
149
150
|
import asyncio
|
|
@@ -219,6 +220,7 @@ with Dub(
|
|
|
219
220
|
</br>
|
|
220
221
|
|
|
221
222
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
223
|
+
|
|
222
224
|
```python
|
|
223
225
|
# Asynchronous Example
|
|
224
226
|
import asyncio
|
|
@@ -320,7 +322,7 @@ asyncio.run(main())
|
|
|
320
322
|
|
|
321
323
|
### [partners](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md)
|
|
322
324
|
|
|
323
|
-
* [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create) - Create a partner
|
|
325
|
+
* [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create) - Create or update a partner
|
|
324
326
|
* [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#list) - List all partners
|
|
325
327
|
* [create_link](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create_link) - Create a link for a partner
|
|
326
328
|
* [retrieve_links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#retrieve_links) - Retrieve a partner's links.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
[project]
|
|
3
3
|
name = "dub"
|
|
4
|
-
version = "0.
|
|
4
|
+
version = "0.31.0"
|
|
5
5
|
description = "Python Client SDK Generated by Speakeasy"
|
|
6
6
|
authors = [{ name = "Speakeasy" },]
|
|
7
7
|
readme = "README-PYPI.md"
|
|
@@ -36,7 +36,6 @@ build-backend = "poetry.core.masonry.api"
|
|
|
36
36
|
|
|
37
37
|
[tool.pytest.ini_options]
|
|
38
38
|
asyncio_default_fixture_loop_scope = "function"
|
|
39
|
-
asyncio_mode = "auto"
|
|
40
39
|
pythonpath = ["src"]
|
|
41
40
|
|
|
42
41
|
[tool.mypy]
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "dub"
|
|
6
|
-
__version__: str = "0.
|
|
6
|
+
__version__: str = "0.31.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.722.2"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.31.0 2.722.2 0.0.1 dub"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -58,11 +58,11 @@ if TYPE_CHECKING:
|
|
|
58
58
|
CommissionCreatedEventData,
|
|
59
59
|
CommissionCreatedEventDataTypedDict,
|
|
60
60
|
CommissionCreatedEventEvent,
|
|
61
|
+
CommissionCreatedEventPartner,
|
|
62
|
+
CommissionCreatedEventPartnerTypedDict,
|
|
61
63
|
CommissionCreatedEventStatus,
|
|
62
64
|
CommissionCreatedEventType,
|
|
63
65
|
CommissionCreatedEventTypedDict,
|
|
64
|
-
Partner,
|
|
65
|
-
PartnerTypedDict,
|
|
66
66
|
)
|
|
67
67
|
from .continentcode import ContinentCode
|
|
68
68
|
from .domainschema import (
|
|
@@ -86,6 +86,8 @@ if TYPE_CHECKING:
|
|
|
86
86
|
LeadCreatedEventTestVariants,
|
|
87
87
|
LeadCreatedEventTestVariantsTypedDict,
|
|
88
88
|
LeadCreatedEventTypedDict,
|
|
89
|
+
Partner,
|
|
90
|
+
PartnerTypedDict,
|
|
89
91
|
)
|
|
90
92
|
from .leadevent import (
|
|
91
93
|
Customer,
|
|
@@ -167,6 +169,8 @@ if TYPE_CHECKING:
|
|
|
167
169
|
SaleCreatedEventEvent,
|
|
168
170
|
SaleCreatedEventLink,
|
|
169
171
|
SaleCreatedEventLinkTypedDict,
|
|
172
|
+
SaleCreatedEventPartner,
|
|
173
|
+
SaleCreatedEventPartnerTypedDict,
|
|
170
174
|
SaleCreatedEventSale,
|
|
171
175
|
SaleCreatedEventSaleTypedDict,
|
|
172
176
|
SaleCreatedEventTestVariants,
|
|
@@ -250,6 +254,8 @@ __all__ = [
|
|
|
250
254
|
"CommissionCreatedEventData",
|
|
251
255
|
"CommissionCreatedEventDataTypedDict",
|
|
252
256
|
"CommissionCreatedEventEvent",
|
|
257
|
+
"CommissionCreatedEventPartner",
|
|
258
|
+
"CommissionCreatedEventPartnerTypedDict",
|
|
253
259
|
"CommissionCreatedEventStatus",
|
|
254
260
|
"CommissionCreatedEventType",
|
|
255
261
|
"CommissionCreatedEventTypedDict",
|
|
@@ -344,6 +350,8 @@ __all__ = [
|
|
|
344
350
|
"SaleCreatedEventEvent",
|
|
345
351
|
"SaleCreatedEventLink",
|
|
346
352
|
"SaleCreatedEventLinkTypedDict",
|
|
353
|
+
"SaleCreatedEventPartner",
|
|
354
|
+
"SaleCreatedEventPartnerTypedDict",
|
|
347
355
|
"SaleCreatedEventSale",
|
|
348
356
|
"SaleCreatedEventSaleTypedDict",
|
|
349
357
|
"SaleCreatedEventTestVariants",
|
|
@@ -429,11 +437,11 @@ _dynamic_imports: dict[str, str] = {
|
|
|
429
437
|
"CommissionCreatedEventData": ".commissioncreatedevent",
|
|
430
438
|
"CommissionCreatedEventDataTypedDict": ".commissioncreatedevent",
|
|
431
439
|
"CommissionCreatedEventEvent": ".commissioncreatedevent",
|
|
440
|
+
"CommissionCreatedEventPartner": ".commissioncreatedevent",
|
|
441
|
+
"CommissionCreatedEventPartnerTypedDict": ".commissioncreatedevent",
|
|
432
442
|
"CommissionCreatedEventStatus": ".commissioncreatedevent",
|
|
433
443
|
"CommissionCreatedEventType": ".commissioncreatedevent",
|
|
434
444
|
"CommissionCreatedEventTypedDict": ".commissioncreatedevent",
|
|
435
|
-
"Partner": ".commissioncreatedevent",
|
|
436
|
-
"PartnerTypedDict": ".commissioncreatedevent",
|
|
437
445
|
"ContinentCode": ".continentcode",
|
|
438
446
|
"DomainSchema": ".domainschema",
|
|
439
447
|
"DomainSchemaTypedDict": ".domainschema",
|
|
@@ -456,6 +464,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
456
464
|
"LeadCreatedEventTestVariants": ".leadcreatedevent",
|
|
457
465
|
"LeadCreatedEventTestVariantsTypedDict": ".leadcreatedevent",
|
|
458
466
|
"LeadCreatedEventTypedDict": ".leadcreatedevent",
|
|
467
|
+
"Partner": ".leadcreatedevent",
|
|
468
|
+
"PartnerTypedDict": ".leadcreatedevent",
|
|
459
469
|
"Customer": ".leadevent",
|
|
460
470
|
"CustomerTypedDict": ".leadevent",
|
|
461
471
|
"LeadEvent": ".leadevent",
|
|
@@ -521,6 +531,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
521
531
|
"SaleCreatedEventEvent": ".salecreatedevent",
|
|
522
532
|
"SaleCreatedEventLink": ".salecreatedevent",
|
|
523
533
|
"SaleCreatedEventLinkTypedDict": ".salecreatedevent",
|
|
534
|
+
"SaleCreatedEventPartner": ".salecreatedevent",
|
|
535
|
+
"SaleCreatedEventPartnerTypedDict": ".salecreatedevent",
|
|
524
536
|
"SaleCreatedEventSale": ".salecreatedevent",
|
|
525
537
|
"SaleCreatedEventSaleTypedDict": ".salecreatedevent",
|
|
526
538
|
"SaleCreatedEventTestVariants": ".salecreatedevent",
|
|
@@ -30,7 +30,7 @@ class CommissionCreatedEventStatus(str, Enum):
|
|
|
30
30
|
CANCELED = "canceled"
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class CommissionCreatedEventPartnerTypedDict(TypedDict):
|
|
34
34
|
id: str
|
|
35
35
|
r"""The partner's unique ID on Dub."""
|
|
36
36
|
name: str
|
|
@@ -51,7 +51,7 @@ class PartnerTypedDict(TypedDict):
|
|
|
51
51
|
total_commissions: float
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
class
|
|
54
|
+
class CommissionCreatedEventPartner(BaseModel):
|
|
55
55
|
id: str
|
|
56
56
|
r"""The partner's unique ID on Dub."""
|
|
57
57
|
|
|
@@ -209,7 +209,7 @@ class CommissionCreatedEventDataTypedDict(TypedDict):
|
|
|
209
209
|
quantity: float
|
|
210
210
|
created_at: str
|
|
211
211
|
updated_at: str
|
|
212
|
-
partner:
|
|
212
|
+
partner: CommissionCreatedEventPartnerTypedDict
|
|
213
213
|
type: NotRequired[CommissionCreatedEventType]
|
|
214
214
|
user_id: NotRequired[Nullable[str]]
|
|
215
215
|
r"""The user who created the manual commission."""
|
|
@@ -238,7 +238,7 @@ class CommissionCreatedEventData(BaseModel):
|
|
|
238
238
|
|
|
239
239
|
updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
|
|
240
240
|
|
|
241
|
-
partner:
|
|
241
|
+
partner: CommissionCreatedEventPartner
|
|
242
242
|
|
|
243
243
|
type: Optional[CommissionCreatedEventType] = None
|
|
244
244
|
|
|
@@ -6,7 +6,7 @@ from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTIN
|
|
|
6
6
|
from enum import Enum
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic import model_serializer
|
|
9
|
-
from typing import Dict, List, Optional
|
|
9
|
+
from typing import Any, Dict, List, Optional
|
|
10
10
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
@@ -491,11 +491,98 @@ class LeadCreatedEventLink(BaseModel):
|
|
|
491
491
|
return m
|
|
492
492
|
|
|
493
493
|
|
|
494
|
+
class PartnerTypedDict(TypedDict):
|
|
495
|
+
id: str
|
|
496
|
+
r"""The partner's unique ID on Dub."""
|
|
497
|
+
name: str
|
|
498
|
+
r"""The partner's full legal name."""
|
|
499
|
+
email: Nullable[str]
|
|
500
|
+
r"""The partner's email address. Should be a unique value across Dub."""
|
|
501
|
+
image: Nullable[str]
|
|
502
|
+
r"""The partner's avatar image."""
|
|
503
|
+
payouts_enabled_at: Nullable[str]
|
|
504
|
+
r"""The date when the partner enabled payouts."""
|
|
505
|
+
country: Nullable[str]
|
|
506
|
+
r"""The partner's country (required for tax purposes)."""
|
|
507
|
+
total_clicks: float
|
|
508
|
+
total_leads: float
|
|
509
|
+
total_conversions: float
|
|
510
|
+
total_sales: float
|
|
511
|
+
total_sale_amount: float
|
|
512
|
+
total_commissions: float
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
class Partner(BaseModel):
|
|
516
|
+
id: str
|
|
517
|
+
r"""The partner's unique ID on Dub."""
|
|
518
|
+
|
|
519
|
+
name: str
|
|
520
|
+
r"""The partner's full legal name."""
|
|
521
|
+
|
|
522
|
+
email: Nullable[str]
|
|
523
|
+
r"""The partner's email address. Should be a unique value across Dub."""
|
|
524
|
+
|
|
525
|
+
image: Nullable[str]
|
|
526
|
+
r"""The partner's avatar image."""
|
|
527
|
+
|
|
528
|
+
payouts_enabled_at: Annotated[
|
|
529
|
+
Nullable[str], pydantic.Field(alias="payoutsEnabledAt")
|
|
530
|
+
]
|
|
531
|
+
r"""The date when the partner enabled payouts."""
|
|
532
|
+
|
|
533
|
+
country: Nullable[str]
|
|
534
|
+
r"""The partner's country (required for tax purposes)."""
|
|
535
|
+
|
|
536
|
+
total_clicks: Annotated[float, pydantic.Field(alias="totalClicks")]
|
|
537
|
+
|
|
538
|
+
total_leads: Annotated[float, pydantic.Field(alias="totalLeads")]
|
|
539
|
+
|
|
540
|
+
total_conversions: Annotated[float, pydantic.Field(alias="totalConversions")]
|
|
541
|
+
|
|
542
|
+
total_sales: Annotated[float, pydantic.Field(alias="totalSales")]
|
|
543
|
+
|
|
544
|
+
total_sale_amount: Annotated[float, pydantic.Field(alias="totalSaleAmount")]
|
|
545
|
+
|
|
546
|
+
total_commissions: Annotated[float, pydantic.Field(alias="totalCommissions")]
|
|
547
|
+
|
|
548
|
+
@model_serializer(mode="wrap")
|
|
549
|
+
def serialize_model(self, handler):
|
|
550
|
+
optional_fields = []
|
|
551
|
+
nullable_fields = ["email", "image", "payoutsEnabledAt", "country"]
|
|
552
|
+
null_default_fields = []
|
|
553
|
+
|
|
554
|
+
serialized = handler(self)
|
|
555
|
+
|
|
556
|
+
m = {}
|
|
557
|
+
|
|
558
|
+
for n, f in type(self).model_fields.items():
|
|
559
|
+
k = f.alias or n
|
|
560
|
+
val = serialized.get(k)
|
|
561
|
+
serialized.pop(k, None)
|
|
562
|
+
|
|
563
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
564
|
+
is_set = (
|
|
565
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
566
|
+
or k in null_default_fields
|
|
567
|
+
) # pylint: disable=no-member
|
|
568
|
+
|
|
569
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
570
|
+
m[k] = val
|
|
571
|
+
elif val != UNSET_SENTINEL and (
|
|
572
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
573
|
+
):
|
|
574
|
+
m[k] = val
|
|
575
|
+
|
|
576
|
+
return m
|
|
577
|
+
|
|
578
|
+
|
|
494
579
|
class LeadCreatedEventDataTypedDict(TypedDict):
|
|
495
580
|
event_name: str
|
|
496
581
|
customer: LeadCreatedEventCustomerTypedDict
|
|
497
582
|
click: LeadCreatedEventClickTypedDict
|
|
498
583
|
link: LeadCreatedEventLinkTypedDict
|
|
584
|
+
metadata: Nullable[Dict[str, Any]]
|
|
585
|
+
partner: NotRequired[Nullable[PartnerTypedDict]]
|
|
499
586
|
|
|
500
587
|
|
|
501
588
|
class LeadCreatedEventData(BaseModel):
|
|
@@ -507,6 +594,40 @@ class LeadCreatedEventData(BaseModel):
|
|
|
507
594
|
|
|
508
595
|
link: LeadCreatedEventLink
|
|
509
596
|
|
|
597
|
+
metadata: Nullable[Dict[str, Any]]
|
|
598
|
+
|
|
599
|
+
partner: OptionalNullable[Partner] = UNSET
|
|
600
|
+
|
|
601
|
+
@model_serializer(mode="wrap")
|
|
602
|
+
def serialize_model(self, handler):
|
|
603
|
+
optional_fields = ["partner"]
|
|
604
|
+
nullable_fields = ["partner", "metadata"]
|
|
605
|
+
null_default_fields = []
|
|
606
|
+
|
|
607
|
+
serialized = handler(self)
|
|
608
|
+
|
|
609
|
+
m = {}
|
|
610
|
+
|
|
611
|
+
for n, f in type(self).model_fields.items():
|
|
612
|
+
k = f.alias or n
|
|
613
|
+
val = serialized.get(k)
|
|
614
|
+
serialized.pop(k, None)
|
|
615
|
+
|
|
616
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
617
|
+
is_set = (
|
|
618
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
619
|
+
or k in null_default_fields
|
|
620
|
+
) # pylint: disable=no-member
|
|
621
|
+
|
|
622
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
623
|
+
m[k] = val
|
|
624
|
+
elif val != UNSET_SENTINEL and (
|
|
625
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
626
|
+
):
|
|
627
|
+
m[k] = val
|
|
628
|
+
|
|
629
|
+
return m
|
|
630
|
+
|
|
510
631
|
|
|
511
632
|
class LeadCreatedEventTypedDict(TypedDict):
|
|
512
633
|
r"""Triggered when a lead is created."""
|
|
@@ -21,6 +21,7 @@ class Status(str, Enum):
|
|
|
21
21
|
REJECTED = "rejected"
|
|
22
22
|
INVITED = "invited"
|
|
23
23
|
DECLINED = "declined"
|
|
24
|
+
DEACTIVATED = "deactivated"
|
|
24
25
|
BANNED = "banned"
|
|
25
26
|
ARCHIVED = "archived"
|
|
26
27
|
|
|
@@ -40,6 +41,8 @@ class PartnerEnrolledEventLinkTypedDict(TypedDict):
|
|
|
40
41
|
r"""The number of clicks on the short link."""
|
|
41
42
|
leads: NotRequired[float]
|
|
42
43
|
r"""The number of leads the short link has generated."""
|
|
44
|
+
conversions: NotRequired[float]
|
|
45
|
+
r"""The number of leads that converted to paying customers."""
|
|
43
46
|
sales: NotRequired[float]
|
|
44
47
|
r"""The total number of sales (includes recurring sales) generated by the short link."""
|
|
45
48
|
sale_amount: NotRequired[float]
|
|
@@ -68,6 +71,9 @@ class PartnerEnrolledEventLink(BaseModel):
|
|
|
68
71
|
leads: Optional[float] = 0
|
|
69
72
|
r"""The number of leads the short link has generated."""
|
|
70
73
|
|
|
74
|
+
conversions: Optional[float] = 0
|
|
75
|
+
r"""The number of leads that converted to paying customers."""
|
|
76
|
+
|
|
71
77
|
sales: Optional[float] = 0
|
|
72
78
|
r"""The total number of sales (includes recurring sales) generated by the short link."""
|
|
73
79
|
|
|
@@ -91,6 +97,8 @@ class PartnerEnrolledEventDataTypedDict(TypedDict):
|
|
|
91
97
|
r"""The partner's unique ID on Dub."""
|
|
92
98
|
name: str
|
|
93
99
|
r"""The partner's full legal name."""
|
|
100
|
+
company_name: Nullable[str]
|
|
101
|
+
r"""If the partner profile type is a company, this is the partner's legal company name."""
|
|
94
102
|
email: Nullable[str]
|
|
95
103
|
r"""The partner's email address. Should be a unique value across Dub."""
|
|
96
104
|
image: Nullable[str]
|
|
@@ -144,25 +152,16 @@ class PartnerEnrolledEventDataTypedDict(TypedDict):
|
|
|
144
152
|
r"""The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false."""
|
|
145
153
|
website: NotRequired[Nullable[str]]
|
|
146
154
|
r"""The partner's website URL (including the https protocol)."""
|
|
147
|
-
website_txt_record: NotRequired[Nullable[str]]
|
|
148
|
-
website_verified_at: NotRequired[Nullable[str]]
|
|
149
155
|
youtube: NotRequired[Nullable[str]]
|
|
150
156
|
r"""The partner's YouTube channel username (e.g. `johndoe`)."""
|
|
151
|
-
youtube_verified_at: NotRequired[Nullable[str]]
|
|
152
|
-
youtube_subscriber_count: NotRequired[Nullable[float]]
|
|
153
|
-
youtube_view_count: NotRequired[Nullable[float]]
|
|
154
157
|
twitter: NotRequired[Nullable[str]]
|
|
155
158
|
r"""The partner's Twitter username (e.g. `johndoe`)."""
|
|
156
|
-
twitter_verified_at: NotRequired[Nullable[str]]
|
|
157
159
|
linkedin: NotRequired[Nullable[str]]
|
|
158
160
|
r"""The partner's LinkedIn username (e.g. `johndoe`)."""
|
|
159
|
-
linkedin_verified_at: NotRequired[Nullable[str]]
|
|
160
161
|
instagram: NotRequired[Nullable[str]]
|
|
161
162
|
r"""The partner's Instagram username (e.g. `johndoe`)."""
|
|
162
|
-
instagram_verified_at: NotRequired[Nullable[str]]
|
|
163
163
|
tiktok: NotRequired[Nullable[str]]
|
|
164
164
|
r"""The partner's TikTok username (e.g. `johndoe`)."""
|
|
165
|
-
tiktok_verified_at: NotRequired[Nullable[str]]
|
|
166
165
|
|
|
167
166
|
|
|
168
167
|
class PartnerEnrolledEventData(BaseModel):
|
|
@@ -172,6 +171,9 @@ class PartnerEnrolledEventData(BaseModel):
|
|
|
172
171
|
name: str
|
|
173
172
|
r"""The partner's full legal name."""
|
|
174
173
|
|
|
174
|
+
company_name: Annotated[Nullable[str], pydantic.Field(alias="companyName")]
|
|
175
|
+
r"""If the partner profile type is a company, this is the partner's legal company name."""
|
|
176
|
+
|
|
175
177
|
email: Nullable[str]
|
|
176
178
|
r"""The partner's email address. Should be a unique value across Dub."""
|
|
177
179
|
|
|
@@ -272,57 +274,21 @@ class PartnerEnrolledEventData(BaseModel):
|
|
|
272
274
|
website: OptionalNullable[str] = UNSET
|
|
273
275
|
r"""The partner's website URL (including the https protocol)."""
|
|
274
276
|
|
|
275
|
-
website_txt_record: Annotated[
|
|
276
|
-
OptionalNullable[str], pydantic.Field(alias="websiteTxtRecord")
|
|
277
|
-
] = UNSET
|
|
278
|
-
|
|
279
|
-
website_verified_at: Annotated[
|
|
280
|
-
OptionalNullable[str], pydantic.Field(alias="websiteVerifiedAt")
|
|
281
|
-
] = UNSET
|
|
282
|
-
|
|
283
277
|
youtube: OptionalNullable[str] = UNSET
|
|
284
278
|
r"""The partner's YouTube channel username (e.g. `johndoe`)."""
|
|
285
279
|
|
|
286
|
-
youtube_verified_at: Annotated[
|
|
287
|
-
OptionalNullable[str], pydantic.Field(alias="youtubeVerifiedAt")
|
|
288
|
-
] = UNSET
|
|
289
|
-
|
|
290
|
-
youtube_subscriber_count: Annotated[
|
|
291
|
-
OptionalNullable[float], pydantic.Field(alias="youtubeSubscriberCount")
|
|
292
|
-
] = UNSET
|
|
293
|
-
|
|
294
|
-
youtube_view_count: Annotated[
|
|
295
|
-
OptionalNullable[float], pydantic.Field(alias="youtubeViewCount")
|
|
296
|
-
] = UNSET
|
|
297
|
-
|
|
298
280
|
twitter: OptionalNullable[str] = UNSET
|
|
299
281
|
r"""The partner's Twitter username (e.g. `johndoe`)."""
|
|
300
282
|
|
|
301
|
-
twitter_verified_at: Annotated[
|
|
302
|
-
OptionalNullable[str], pydantic.Field(alias="twitterVerifiedAt")
|
|
303
|
-
] = UNSET
|
|
304
|
-
|
|
305
283
|
linkedin: OptionalNullable[str] = UNSET
|
|
306
284
|
r"""The partner's LinkedIn username (e.g. `johndoe`)."""
|
|
307
285
|
|
|
308
|
-
linkedin_verified_at: Annotated[
|
|
309
|
-
OptionalNullable[str], pydantic.Field(alias="linkedinVerifiedAt")
|
|
310
|
-
] = UNSET
|
|
311
|
-
|
|
312
286
|
instagram: OptionalNullable[str] = UNSET
|
|
313
287
|
r"""The partner's Instagram username (e.g. `johndoe`)."""
|
|
314
288
|
|
|
315
|
-
instagram_verified_at: Annotated[
|
|
316
|
-
OptionalNullable[str], pydantic.Field(alias="instagramVerifiedAt")
|
|
317
|
-
] = UNSET
|
|
318
|
-
|
|
319
289
|
tiktok: OptionalNullable[str] = UNSET
|
|
320
290
|
r"""The partner's TikTok username (e.g. `johndoe`)."""
|
|
321
291
|
|
|
322
|
-
tiktok_verified_at: Annotated[
|
|
323
|
-
OptionalNullable[str], pydantic.Field(alias="tiktokVerifiedAt")
|
|
324
|
-
] = UNSET
|
|
325
|
-
|
|
326
292
|
@model_serializer(mode="wrap")
|
|
327
293
|
def serialize_model(self, handler):
|
|
328
294
|
optional_fields = [
|
|
@@ -343,22 +309,14 @@ class PartnerEnrolledEventData(BaseModel):
|
|
|
343
309
|
"saleAmount",
|
|
344
310
|
"netRevenue",
|
|
345
311
|
"website",
|
|
346
|
-
"websiteTxtRecord",
|
|
347
|
-
"websiteVerifiedAt",
|
|
348
312
|
"youtube",
|
|
349
|
-
"youtubeVerifiedAt",
|
|
350
|
-
"youtubeSubscriberCount",
|
|
351
|
-
"youtubeViewCount",
|
|
352
313
|
"twitter",
|
|
353
|
-
"twitterVerifiedAt",
|
|
354
314
|
"linkedin",
|
|
355
|
-
"linkedinVerifiedAt",
|
|
356
315
|
"instagram",
|
|
357
|
-
"instagramVerifiedAt",
|
|
358
316
|
"tiktok",
|
|
359
|
-
"tiktokVerifiedAt",
|
|
360
317
|
]
|
|
361
318
|
nullable_fields = [
|
|
319
|
+
"companyName",
|
|
362
320
|
"email",
|
|
363
321
|
"image",
|
|
364
322
|
"description",
|
|
@@ -377,20 +335,11 @@ class PartnerEnrolledEventData(BaseModel):
|
|
|
377
335
|
"bannedAt",
|
|
378
336
|
"bannedReason",
|
|
379
337
|
"website",
|
|
380
|
-
"websiteTxtRecord",
|
|
381
|
-
"websiteVerifiedAt",
|
|
382
338
|
"youtube",
|
|
383
|
-
"youtubeVerifiedAt",
|
|
384
|
-
"youtubeSubscriberCount",
|
|
385
|
-
"youtubeViewCount",
|
|
386
339
|
"twitter",
|
|
387
|
-
"twitterVerifiedAt",
|
|
388
340
|
"linkedin",
|
|
389
|
-
"linkedinVerifiedAt",
|
|
390
341
|
"instagram",
|
|
391
|
-
"instagramVerifiedAt",
|
|
392
342
|
"tiktok",
|
|
393
|
-
"tiktokVerifiedAt",
|
|
394
343
|
]
|
|
395
344
|
null_default_fields = []
|
|
396
345
|
|