dub 0.26.11__tar.gz → 0.26.12__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.
Files changed (144) hide show
  1. {dub-0.26.11 → dub-0.26.12}/PKG-INFO +1 -1
  2. {dub-0.26.11 → dub-0.26.12}/pyproject.toml +1 -1
  3. {dub-0.26.11 → dub-0.26.12}/src/dub/_version.py +3 -3
  4. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/__init__.py +1 -13
  5. dub-0.26.12/src/dub/models/components/analyticscities.py +47 -0
  6. dub-0.26.12/src/dub/models/components/analyticscountries.py +52 -0
  7. dub-0.26.12/src/dub/models/components/analyticsregions.py +50 -0
  8. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/countrycode.py +1 -1
  9. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/saleevent.py +2 -2
  10. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/workspaceschema.py +5 -0
  11. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createpartner.py +24 -23
  12. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createreferralsembedtoken.py +24 -23
  13. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/listevents.py +2 -2
  14. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/retrieveanalytics.py +2 -2
  15. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/retrievelinks.py +0 -7
  16. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/tracksale.py +14 -14
  17. dub-0.26.11/src/dub/models/components/analyticscities.py +0 -303
  18. dub-0.26.11/src/dub/models/components/analyticscountries.py +0 -307
  19. dub-0.26.11/src/dub/models/components/analyticsregions.py +0 -305
  20. {dub-0.26.11 → dub-0.26.12}/LICENSE +0 -0
  21. {dub-0.26.11 → dub-0.26.12}/README-PYPI.md +0 -0
  22. {dub-0.26.11 → dub-0.26.12}/py.typed +0 -0
  23. {dub-0.26.11 → dub-0.26.12}/src/dub/__init__.py +0 -0
  24. {dub-0.26.11 → dub-0.26.12}/src/dub/_hooks/__init__.py +0 -0
  25. {dub-0.26.11 → dub-0.26.12}/src/dub/_hooks/registration.py +0 -0
  26. {dub-0.26.11 → dub-0.26.12}/src/dub/_hooks/sdkhooks.py +0 -0
  27. {dub-0.26.11 → dub-0.26.12}/src/dub/_hooks/types.py +0 -0
  28. {dub-0.26.11 → dub-0.26.12}/src/dub/analytics.py +0 -0
  29. {dub-0.26.11 → dub-0.26.12}/src/dub/basesdk.py +0 -0
  30. {dub-0.26.11 → dub-0.26.12}/src/dub/commissions.py +0 -0
  31. {dub-0.26.11 → dub-0.26.12}/src/dub/customers.py +0 -0
  32. {dub-0.26.11 → dub-0.26.12}/src/dub/domains.py +0 -0
  33. {dub-0.26.11 → dub-0.26.12}/src/dub/embed_tokens.py +0 -0
  34. {dub-0.26.11 → dub-0.26.12}/src/dub/events.py +0 -0
  35. {dub-0.26.11 → dub-0.26.12}/src/dub/folders.py +0 -0
  36. {dub-0.26.11 → dub-0.26.12}/src/dub/httpclient.py +0 -0
  37. {dub-0.26.11 → dub-0.26.12}/src/dub/links.py +0 -0
  38. {dub-0.26.11 → dub-0.26.12}/src/dub/models/__init__.py +0 -0
  39. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticsbrowsers.py +0 -0
  40. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticscontinents.py +0 -0
  41. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticscount.py +0 -0
  42. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticsdevices.py +0 -0
  43. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticsos.py +0 -0
  44. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticsreferers.py +0 -0
  45. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticsrefererurls.py +0 -0
  46. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticstimeseries.py +0 -0
  47. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticstoplinks.py +0 -0
  48. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticstopurls.py +0 -0
  49. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/analyticstriggers.py +0 -0
  50. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/clickevent.py +0 -0
  51. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/continentcode.py +0 -0
  52. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/domainschema.py +0 -0
  53. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/folderschema.py +0 -0
  54. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/leadcreatedevent.py +0 -0
  55. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/leadevent.py +0 -0
  56. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/linkclickedevent.py +0 -0
  57. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/linkerrorschema.py +0 -0
  58. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/linkgeotargeting.py +0 -0
  59. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/linkschema.py +0 -0
  60. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/linkwebhookevent.py +0 -0
  61. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/partneranalyticscount.py +0 -0
  62. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/partneranalyticstimeseries.py +0 -0
  63. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/partneranalyticstoplinks.py +0 -0
  64. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/partnerenrolledevent.py +0 -0
  65. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/salecreatedevent.py +0 -0
  66. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/security.py +0 -0
  67. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/tagschema.py +0 -0
  68. {dub-0.26.11 → dub-0.26.12}/src/dub/models/components/webhookevent.py +0 -0
  69. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/__init__.py +0 -0
  70. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/badrequest.py +0 -0
  71. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/conflict.py +0 -0
  72. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/forbidden.py +0 -0
  73. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/internalservererror.py +0 -0
  74. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/inviteexpired.py +0 -0
  75. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/notfound.py +0 -0
  76. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/ratelimitexceeded.py +0 -0
  77. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/sdkerror.py +0 -0
  78. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/unauthorized.py +0 -0
  79. {dub-0.26.11 → dub-0.26.12}/src/dub/models/errors/unprocessableentity.py +0 -0
  80. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/__init__.py +0 -0
  81. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/bulkcreatelinks.py +0 -0
  82. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/bulkdeletelinks.py +0 -0
  83. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/bulkupdatelinks.py +0 -0
  84. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/checkdomainstatus.py +0 -0
  85. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createcustomer.py +0 -0
  86. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createdomain.py +0 -0
  87. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createfolder.py +0 -0
  88. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createlink.py +0 -0
  89. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createpartnerlink.py +0 -0
  90. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/createtag.py +0 -0
  91. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/deletecustomer.py +0 -0
  92. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/deletedomain.py +0 -0
  93. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/deletefolder.py +0 -0
  94. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/deletelink.py +0 -0
  95. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/deletetag.py +0 -0
  96. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getcustomer.py +0 -0
  97. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getcustomers.py +0 -0
  98. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getlinkinfo.py +0 -0
  99. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getlinks.py +0 -0
  100. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getlinkscount.py +0 -0
  101. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getqrcode.py +0 -0
  102. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/gettags.py +0 -0
  103. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/getworkspace.py +0 -0
  104. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/listcommissions.py +0 -0
  105. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/listdomains.py +0 -0
  106. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/listfolders.py +0 -0
  107. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/registerdomain.py +0 -0
  108. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/retrievepartneranalytics.py +0 -0
  109. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/tracklead.py +9 -9
  110. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatecommission.py +0 -0
  111. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatecustomer.py +0 -0
  112. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatedomain.py +0 -0
  113. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatefolder.py +0 -0
  114. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatelink.py +0 -0
  115. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updatetag.py +0 -0
  116. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/updateworkspace.py +0 -0
  117. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/upsertlink.py +0 -0
  118. {dub-0.26.11 → dub-0.26.12}/src/dub/models/operations/upsertpartnerlink.py +0 -0
  119. {dub-0.26.11 → dub-0.26.12}/src/dub/partners.py +0 -0
  120. {dub-0.26.11 → dub-0.26.12}/src/dub/py.typed +0 -0
  121. {dub-0.26.11 → dub-0.26.12}/src/dub/qr_codes.py +0 -0
  122. {dub-0.26.11 → dub-0.26.12}/src/dub/sdk.py +0 -0
  123. {dub-0.26.11 → dub-0.26.12}/src/dub/sdkconfiguration.py +0 -0
  124. {dub-0.26.11 → dub-0.26.12}/src/dub/tags.py +0 -0
  125. {dub-0.26.11 → dub-0.26.12}/src/dub/track.py +0 -0
  126. {dub-0.26.11 → dub-0.26.12}/src/dub/types/__init__.py +0 -0
  127. {dub-0.26.11 → dub-0.26.12}/src/dub/types/basemodel.py +0 -0
  128. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/__init__.py +0 -0
  129. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/annotations.py +0 -0
  130. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/datetimes.py +0 -0
  131. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/enums.py +0 -0
  132. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/eventstreaming.py +0 -0
  133. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/forms.py +0 -0
  134. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/headers.py +0 -0
  135. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/logger.py +0 -0
  136. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/metadata.py +0 -0
  137. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/queryparams.py +0 -0
  138. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/requestbodies.py +0 -0
  139. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/retries.py +0 -0
  140. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/security.py +0 -0
  141. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/serializers.py +0 -0
  142. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/url.py +0 -0
  143. {dub-0.26.11 → dub-0.26.12}/src/dub/utils/values.py +0 -0
  144. {dub-0.26.11 → dub-0.26.12}/src/dub/workspaces.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dub
3
- Version: 0.26.11
3
+ Version: 0.26.12
4
4
  Summary: Python Client SDK Generated by Speakeasy
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dub"
3
- version = "0.26.11"
3
+ version = "0.26.12"
4
4
  description = "Python Client SDK Generated by Speakeasy"
5
5
  authors = [{ name = "Speakeasy" },]
6
6
  readme = "README-PYPI.md"
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "dub"
6
- __version__: str = "0.26.11"
6
+ __version__: str = "0.26.12"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
- __gen_version__: str = "2.634.2"
9
- __user_agent__: str = "speakeasy-sdk/python 0.26.11 2.634.2 0.0.1 dub"
8
+ __gen_version__: str = "2.644.1"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.26.12 2.644.1 0.0.1 dub"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -5,11 +5,7 @@ from importlib import import_module
5
5
 
6
6
  if TYPE_CHECKING:
7
7
  from .analyticsbrowsers import AnalyticsBrowsers, AnalyticsBrowsersTypedDict
8
- from .analyticscities import (
9
- AnalyticsCities,
10
- AnalyticsCitiesCountry,
11
- AnalyticsCitiesTypedDict,
12
- )
8
+ from .analyticscities import AnalyticsCities, AnalyticsCitiesTypedDict
13
9
  from .analyticscontinents import (
14
10
  AnalyticsContinents,
15
11
  AnalyticsContinentsTypedDict,
@@ -20,7 +16,6 @@ if TYPE_CHECKING:
20
16
  AnalyticsCountries,
21
17
  AnalyticsCountriesTypedDict,
22
18
  City,
23
- Country,
24
19
  Region,
25
20
  )
26
21
  from .analyticsdevices import AnalyticsDevices, AnalyticsDevicesTypedDict
@@ -33,7 +28,6 @@ if TYPE_CHECKING:
33
28
  from .analyticsregions import (
34
29
  AnalyticsRegions,
35
30
  AnalyticsRegionsCity,
36
- AnalyticsRegionsCountry,
37
31
  AnalyticsRegionsTypedDict,
38
32
  )
39
33
  from .analyticstimeseries import AnalyticsTimeseries, AnalyticsTimeseriesTypedDict
@@ -216,7 +210,6 @@ __all__ = [
216
210
  "AnalyticsBrowsers",
217
211
  "AnalyticsBrowsersTypedDict",
218
212
  "AnalyticsCities",
219
- "AnalyticsCitiesCountry",
220
213
  "AnalyticsCitiesTypedDict",
221
214
  "AnalyticsContinents",
222
215
  "AnalyticsContinentsTypedDict",
@@ -234,7 +227,6 @@ __all__ = [
234
227
  "AnalyticsReferersTypedDict",
235
228
  "AnalyticsRegions",
236
229
  "AnalyticsRegionsCity",
237
- "AnalyticsRegionsCountry",
238
230
  "AnalyticsRegionsTypedDict",
239
231
  "AnalyticsTimeseries",
240
232
  "AnalyticsTimeseriesTypedDict",
@@ -257,7 +249,6 @@ __all__ = [
257
249
  "Color",
258
250
  "Continent",
259
251
  "ContinentCode",
260
- "Country",
261
252
  "CountryCode",
262
253
  "Customer",
263
254
  "CustomerTypedDict",
@@ -402,7 +393,6 @@ _dynamic_imports: dict[str, str] = {
402
393
  "AnalyticsBrowsers": ".analyticsbrowsers",
403
394
  "AnalyticsBrowsersTypedDict": ".analyticsbrowsers",
404
395
  "AnalyticsCities": ".analyticscities",
405
- "AnalyticsCitiesCountry": ".analyticscities",
406
396
  "AnalyticsCitiesTypedDict": ".analyticscities",
407
397
  "AnalyticsContinents": ".analyticscontinents",
408
398
  "AnalyticsContinentsTypedDict": ".analyticscontinents",
@@ -412,7 +402,6 @@ _dynamic_imports: dict[str, str] = {
412
402
  "AnalyticsCountries": ".analyticscountries",
413
403
  "AnalyticsCountriesTypedDict": ".analyticscountries",
414
404
  "City": ".analyticscountries",
415
- "Country": ".analyticscountries",
416
405
  "Region": ".analyticscountries",
417
406
  "AnalyticsDevices": ".analyticsdevices",
418
407
  "AnalyticsDevicesTypedDict": ".analyticsdevices",
@@ -424,7 +413,6 @@ _dynamic_imports: dict[str, str] = {
424
413
  "AnalyticsRefererUrlsTypedDict": ".analyticsrefererurls",
425
414
  "AnalyticsRegions": ".analyticsregions",
426
415
  "AnalyticsRegionsCity": ".analyticsregions",
427
- "AnalyticsRegionsCountry": ".analyticsregions",
428
416
  "AnalyticsRegionsTypedDict": ".analyticsregions",
429
417
  "AnalyticsTimeseries": ".analyticstimeseries",
430
418
  "AnalyticsTimeseriesTypedDict": ".analyticstimeseries",
@@ -0,0 +1,47 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from dub.types import BaseModel
5
+ import pydantic
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class AnalyticsCitiesTypedDict(TypedDict):
11
+ country: str
12
+ r"""The 2-letter ISO 3166-1 country code of the country where this city is located. Learn more: https://d.to/geo"""
13
+ region: str
14
+ r"""The 2-letter ISO 3166-2 region code representing the region associated with the location of the user."""
15
+ city: str
16
+ r"""The name of the city"""
17
+ clicks: NotRequired[float]
18
+ r"""The number of clicks from this city"""
19
+ leads: NotRequired[float]
20
+ r"""The number of leads from this city"""
21
+ sales: NotRequired[float]
22
+ r"""The number of sales from this city"""
23
+ sale_amount: NotRequired[float]
24
+ r"""The total amount of sales from this city, in cents"""
25
+
26
+
27
+ class AnalyticsCities(BaseModel):
28
+ country: str
29
+ r"""The 2-letter ISO 3166-1 country code of the country where this city is located. Learn more: https://d.to/geo"""
30
+
31
+ region: str
32
+ r"""The 2-letter ISO 3166-2 region code representing the region associated with the location of the user."""
33
+
34
+ city: str
35
+ r"""The name of the city"""
36
+
37
+ clicks: Optional[float] = 0
38
+ r"""The number of clicks from this city"""
39
+
40
+ leads: Optional[float] = 0
41
+ r"""The number of leads from this city"""
42
+
43
+ sales: Optional[float] = 0
44
+ r"""The number of sales from this city"""
45
+
46
+ sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
47
+ r"""The total amount of sales from this city, in cents"""
@@ -0,0 +1,52 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from dub.types import BaseModel
5
+ from enum import Enum
6
+ import pydantic
7
+ from typing import Optional
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class Region(str, Enum):
12
+ WILDCARD_ = "*"
13
+
14
+
15
+ class City(str, Enum):
16
+ WILDCARD_ = "*"
17
+
18
+
19
+ class AnalyticsCountriesTypedDict(TypedDict):
20
+ country: str
21
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
22
+ region: NotRequired[Region]
23
+ city: NotRequired[City]
24
+ clicks: NotRequired[float]
25
+ r"""The number of clicks from this country"""
26
+ leads: NotRequired[float]
27
+ r"""The number of leads from this country"""
28
+ sales: NotRequired[float]
29
+ r"""The number of sales from this country"""
30
+ sale_amount: NotRequired[float]
31
+ r"""The total amount of sales from this country, in cents"""
32
+
33
+
34
+ class AnalyticsCountries(BaseModel):
35
+ country: str
36
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
37
+
38
+ region: Optional[Region] = Region.WILDCARD_
39
+
40
+ city: Optional[City] = City.WILDCARD_
41
+
42
+ clicks: Optional[float] = 0
43
+ r"""The number of clicks from this country"""
44
+
45
+ leads: Optional[float] = 0
46
+ r"""The number of leads from this country"""
47
+
48
+ sales: Optional[float] = 0
49
+ r"""The number of sales from this country"""
50
+
51
+ sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
52
+ r"""The total amount of sales from this country, in cents"""
@@ -0,0 +1,50 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from dub.types import BaseModel
5
+ from enum import Enum
6
+ import pydantic
7
+ from typing import Optional
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class AnalyticsRegionsCity(str, Enum):
12
+ WILDCARD_ = "*"
13
+
14
+
15
+ class AnalyticsRegionsTypedDict(TypedDict):
16
+ country: str
17
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
18
+ region: str
19
+ r"""The 2-letter ISO 3166-2 region code of the region."""
20
+ city: NotRequired[AnalyticsRegionsCity]
21
+ clicks: NotRequired[float]
22
+ r"""The number of clicks from this region"""
23
+ leads: NotRequired[float]
24
+ r"""The number of leads from this region"""
25
+ sales: NotRequired[float]
26
+ r"""The number of sales from this region"""
27
+ sale_amount: NotRequired[float]
28
+ r"""The total amount of sales from this region, in cents"""
29
+
30
+
31
+ class AnalyticsRegions(BaseModel):
32
+ country: str
33
+ r"""The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"""
34
+
35
+ region: str
36
+ r"""The 2-letter ISO 3166-2 region code of the region."""
37
+
38
+ city: Optional[AnalyticsRegionsCity] = AnalyticsRegionsCity.WILDCARD_
39
+
40
+ clicks: Optional[float] = 0
41
+ r"""The number of clicks from this region"""
42
+
43
+ leads: Optional[float] = 0
44
+ r"""The number of leads from this region"""
45
+
46
+ sales: Optional[float] = 0
47
+ r"""The number of sales from this region"""
48
+
49
+ sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
50
+ r"""The total amount of sales from this region, in cents"""
@@ -5,7 +5,7 @@ from enum import Enum
5
5
 
6
6
 
7
7
  class CountryCode(str, Enum):
8
- r"""The country to retrieve analytics for."""
8
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
9
9
 
10
10
  AF = "AF"
11
11
  AL = "AL"
@@ -1217,7 +1217,7 @@ class PaymentProcessor(str, Enum):
1217
1217
 
1218
1218
  class SaleTypedDict(TypedDict):
1219
1219
  amount: int
1220
- r"""The amount of the sale in cents."""
1220
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
1221
1221
  payment_processor: PaymentProcessor
1222
1222
  r"""The payment processor via which the sale was made."""
1223
1223
  invoice_id: NotRequired[Nullable[str]]
@@ -1226,7 +1226,7 @@ class SaleTypedDict(TypedDict):
1226
1226
 
1227
1227
  class Sale(BaseModel):
1228
1228
  amount: int
1229
- r"""The amount of the sale in cents."""
1229
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
1230
1230
 
1231
1231
  payment_processor: Annotated[
1232
1232
  PaymentProcessor, pydantic.Field(alias="paymentProcessor")
@@ -127,6 +127,8 @@ class WorkspaceSchemaTypedDict(TypedDict):
127
127
  r"""The dollar amount of partner payouts processed in the current billing cycle (in cents)."""
128
128
  payouts_limit: float
129
129
  r"""The max dollar amount of partner payouts that can be processed within a billing cycle (in cents)."""
130
+ payout_fee: float
131
+ r"""The processing fee (in decimals) for partner payouts. For card payments, an additional 0.03 is added to the fee. Learn more: https://d.to/payouts"""
130
132
  domains_limit: float
131
133
  r"""The domains limit of the workspace."""
132
134
  tags_limit: float
@@ -212,6 +214,9 @@ class WorkspaceSchema(BaseModel):
212
214
  payouts_limit: Annotated[float, pydantic.Field(alias="payoutsLimit")]
213
215
  r"""The max dollar amount of partner payouts that can be processed within a billing cycle (in cents)."""
214
216
 
217
+ payout_fee: Annotated[float, pydantic.Field(alias="payoutFee")]
218
+ r"""The processing fee (in decimals) for partner payouts. For card payments, an additional 0.03 is added to the fee. Learn more: https://d.to/payouts"""
219
+
215
220
  domains_limit: Annotated[float, pydantic.Field(alias="domainsLimit")]
216
221
  r"""The domains limit of the workspace."""
217
222
 
@@ -10,7 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
10
 
11
11
 
12
12
  class Country(str, Enum):
13
- r"""Country where the partner is based."""
13
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
14
14
 
15
15
  AF = "AF"
16
16
  AL = "AL"
@@ -560,45 +560,45 @@ class LinkProps(BaseModel):
560
560
 
561
561
 
562
562
  class CreatePartnerRequestBodyTypedDict(TypedDict):
563
- name: str
564
- r"""Full legal name of the partner."""
565
563
  email: str
566
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
564
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
565
+ name: NotRequired[Nullable[str]]
566
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
567
567
  username: NotRequired[Nullable[str]]
568
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
568
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
569
569
  image: NotRequired[Nullable[str]]
570
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
570
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
571
+ tenant_id: NotRequired[str]
572
+ r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
571
573
  country: NotRequired[Nullable[Country]]
572
- r"""Country where the partner is based."""
574
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
573
575
  description: NotRequired[Nullable[str]]
574
- r"""A brief description of the partner and their background."""
575
- tenant_id: NotRequired[str]
576
- r"""The ID of the partner in your system."""
576
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
577
577
  link_props: NotRequired[LinkPropsTypedDict]
578
578
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
579
579
 
580
580
 
581
581
  class CreatePartnerRequestBody(BaseModel):
582
- name: str
583
- r"""Full legal name of the partner."""
584
-
585
582
  email: str
586
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
583
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
584
+
585
+ name: OptionalNullable[str] = UNSET
586
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
587
587
 
588
588
  username: OptionalNullable[str] = UNSET
589
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
589
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
590
590
 
591
591
  image: OptionalNullable[str] = UNSET
592
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
592
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
593
+
594
+ tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
595
+ r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
593
596
 
594
597
  country: OptionalNullable[Country] = UNSET
595
- r"""Country where the partner is based."""
598
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
596
599
 
597
600
  description: OptionalNullable[str] = UNSET
598
- r"""A brief description of the partner and their background."""
599
-
600
- tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
601
- r"""The ID of the partner in your system."""
601
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
602
602
 
603
603
  link_props: Annotated[Optional[LinkProps], pydantic.Field(alias="linkProps")] = None
604
604
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
@@ -606,14 +606,15 @@ class CreatePartnerRequestBody(BaseModel):
606
606
  @model_serializer(mode="wrap")
607
607
  def serialize_model(self, handler):
608
608
  optional_fields = [
609
+ "name",
609
610
  "username",
610
611
  "image",
612
+ "tenantId",
611
613
  "country",
612
614
  "description",
613
- "tenantId",
614
615
  "linkProps",
615
616
  ]
616
- nullable_fields = ["username", "image", "country", "description"]
617
+ nullable_fields = ["name", "username", "image", "country", "description"]
617
618
  null_default_fields = []
618
619
 
619
620
  serialized = handler(self)
@@ -10,7 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
10
10
 
11
11
 
12
12
  class CreateReferralsEmbedTokenCountry(str, Enum):
13
- r"""Country where the partner is based."""
13
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
14
14
 
15
15
  AF = "AF"
16
16
  AL = "AL"
@@ -566,45 +566,45 @@ class CreateReferralsEmbedTokenLinkProps(BaseModel):
566
566
 
567
567
 
568
568
  class PartnerTypedDict(TypedDict):
569
- name: str
570
- r"""Full legal name of the partner."""
571
569
  email: str
572
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
570
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
571
+ name: NotRequired[Nullable[str]]
572
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
573
573
  username: NotRequired[Nullable[str]]
574
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
574
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
575
575
  image: NotRequired[Nullable[str]]
576
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
576
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
577
+ tenant_id: NotRequired[str]
578
+ r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
577
579
  country: NotRequired[Nullable[CreateReferralsEmbedTokenCountry]]
578
- r"""Country where the partner is based."""
580
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
579
581
  description: NotRequired[Nullable[str]]
580
- r"""A brief description of the partner and their background."""
581
- tenant_id: NotRequired[str]
582
- r"""The ID of the partner in your system."""
582
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
583
583
  link_props: NotRequired[CreateReferralsEmbedTokenLinkPropsTypedDict]
584
584
  r"""Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner."""
585
585
 
586
586
 
587
587
  class Partner(BaseModel):
588
- name: str
589
- r"""Full legal name of the partner."""
590
-
591
588
  email: str
592
- r"""Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email."""
589
+ r"""The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email."""
590
+
591
+ name: OptionalNullable[str] = UNSET
592
+ r"""The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)"""
593
593
 
594
594
  username: OptionalNullable[str] = UNSET
595
- r"""A unique username for the partner in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
595
+ r"""The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email."""
596
596
 
597
597
  image: OptionalNullable[str] = UNSET
598
- r"""Avatar image for the partner – if not provided, a default avatar will be used."""
598
+ r"""The partner's avatar image. If not provided, a default avatar will be used."""
599
+
600
+ tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
601
+ r"""The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner."""
599
602
 
600
603
  country: OptionalNullable[CreateReferralsEmbedTokenCountry] = UNSET
601
- r"""Country where the partner is based."""
604
+ r"""The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
602
605
 
603
606
  description: OptionalNullable[str] = UNSET
604
- r"""A brief description of the partner and their background."""
605
-
606
- tenant_id: Annotated[Optional[str], pydantic.Field(alias="tenantId")] = None
607
- r"""The ID of the partner in your system."""
607
+ r"""A brief description of the partner and their background. Max 5,000 characters."""
608
608
 
609
609
  link_props: Annotated[
610
610
  Optional[CreateReferralsEmbedTokenLinkProps], pydantic.Field(alias="linkProps")
@@ -614,14 +614,15 @@ class Partner(BaseModel):
614
614
  @model_serializer(mode="wrap")
615
615
  def serialize_model(self, handler):
616
616
  optional_fields = [
617
+ "name",
617
618
  "username",
618
619
  "image",
620
+ "tenantId",
619
621
  "country",
620
622
  "description",
621
- "tenantId",
622
623
  "linkProps",
623
624
  ]
624
- nullable_fields = ["username", "image", "country", "description"]
625
+ nullable_fields = ["name", "username", "image", "country", "description"]
625
626
  null_default_fields = []
626
627
 
627
628
  serialized = handler(self)
@@ -115,7 +115,7 @@ class ListEventsRequestTypedDict(TypedDict):
115
115
  timezone: NotRequired[str]
116
116
  r"""The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."""
117
117
  country: NotRequired[components_countrycode.CountryCode]
118
- r"""The country to retrieve analytics for."""
118
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
119
119
  city: NotRequired[str]
120
120
  r"""The city to retrieve analytics for."""
121
121
  region: NotRequired[str]
@@ -255,7 +255,7 @@ class ListEventsRequest(BaseModel):
255
255
  Optional[components_countrycode.CountryCode],
256
256
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
257
257
  ] = None
258
- r"""The country to retrieve analytics for."""
258
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
259
259
 
260
260
  city: Annotated[
261
261
  Optional[str],
@@ -126,7 +126,7 @@ class RetrieveAnalyticsRequestTypedDict(TypedDict):
126
126
  timezone: NotRequired[str]
127
127
  r"""The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."""
128
128
  country: NotRequired[components_countrycode.CountryCode]
129
- r"""The country to retrieve analytics for."""
129
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
130
130
  city: NotRequired[str]
131
131
  r"""The city to retrieve analytics for."""
132
132
  region: NotRequired[str]
@@ -265,7 +265,7 @@ class RetrieveAnalyticsRequest(BaseModel):
265
265
  Optional[components_countrycode.CountryCode],
266
266
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
267
267
  ] = None
268
- r"""The country to retrieve analytics for."""
268
+ r"""The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. Learn more: https://d.to/geo"""
269
269
 
270
270
  city: Annotated[
271
271
  Optional[str],
@@ -9,18 +9,11 @@ from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
11
  class RetrieveLinksRequestTypedDict(TypedDict):
12
- program_id: str
13
12
  partner_id: NotRequired[str]
14
13
  tenant_id: NotRequired[str]
15
14
 
16
15
 
17
16
  class RetrieveLinksRequest(BaseModel):
18
- program_id: Annotated[
19
- str,
20
- pydantic.Field(alias="programId"),
21
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
22
- ]
23
-
24
17
  partner_id: Annotated[
25
18
  Optional[str],
26
19
  pydantic.Field(alias="partnerId"),
@@ -23,19 +23,19 @@ class TrackSaleRequestBodyTypedDict(TypedDict):
23
23
  external_id: str
24
24
  r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
25
25
  amount: int
26
- r"""The amount of the sale in cents."""
26
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
27
27
  payment_processor: PaymentProcessor
28
28
  r"""The payment processor via which the sale was made."""
29
+ currency: NotRequired[str]
30
+ r"""The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency"""
29
31
  event_name: NotRequired[str]
30
- r"""The name of the sale event."""
32
+ r"""The name of the sale event. Recommended format: `Invoice paid` or `Subscription created`."""
31
33
  invoice_id: NotRequired[Nullable[str]]
32
34
  r"""The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID."""
33
- currency: NotRequired[str]
34
- r"""The currency of the sale. Accepts ISO 4217 currency codes."""
35
35
  lead_event_name: NotRequired[Nullable[str]]
36
- r"""The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event, which is the default behavior)."""
36
+ r"""The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior)."""
37
37
  metadata: NotRequired[Nullable[Dict[str, Any]]]
38
- r"""Additional metadata to be stored with the sale event. Max 10,000 characters."""
38
+ r"""Additional metadata to be stored with the sale event. Max 10,000 characters when stringified."""
39
39
 
40
40
 
41
41
  class TrackSaleRequestBody(BaseModel):
@@ -43,38 +43,38 @@ class TrackSaleRequestBody(BaseModel):
43
43
  r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
44
44
 
45
45
  amount: int
46
- r"""The amount of the sale in cents."""
46
+ r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
47
47
 
48
48
  payment_processor: Annotated[
49
49
  PaymentProcessor, pydantic.Field(alias="paymentProcessor")
50
50
  ]
51
51
  r"""The payment processor via which the sale was made."""
52
52
 
53
+ currency: Optional[str] = "usd"
54
+ r"""The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency"""
55
+
53
56
  event_name: Annotated[Optional[str], pydantic.Field(alias="eventName")] = "Purchase"
54
- r"""The name of the sale event."""
57
+ r"""The name of the sale event. Recommended format: `Invoice paid` or `Subscription created`."""
55
58
 
56
59
  invoice_id: Annotated[OptionalNullable[str], pydantic.Field(alias="invoiceId")] = (
57
60
  None
58
61
  )
59
62
  r"""The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID."""
60
63
 
61
- currency: Optional[str] = "usd"
62
- r"""The currency of the sale. Accepts ISO 4217 currency codes."""
63
-
64
64
  lead_event_name: Annotated[
65
65
  OptionalNullable[str], pydantic.Field(alias="leadEventName")
66
66
  ] = None
67
- r"""The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event, which is the default behavior)."""
67
+ r"""The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior)."""
68
68
 
69
69
  metadata: OptionalNullable[Dict[str, Any]] = UNSET
70
- r"""Additional metadata to be stored with the sale event. Max 10,000 characters."""
70
+ r"""Additional metadata to be stored with the sale event. Max 10,000 characters when stringified."""
71
71
 
72
72
  @model_serializer(mode="wrap")
73
73
  def serialize_model(self, handler):
74
74
  optional_fields = [
75
+ "currency",
75
76
  "eventName",
76
77
  "invoiceId",
77
- "currency",
78
78
  "leadEventName",
79
79
  "metadata",
80
80
  ]