dub 0.27.2__tar.gz → 0.27.4__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 (147) hide show
  1. {dub-0.27.2 → dub-0.27.4}/PKG-INFO +2 -2
  2. {dub-0.27.2 → dub-0.27.4}/README-PYPI.md +1 -1
  3. {dub-0.27.2 → dub-0.27.4}/pyproject.toml +1 -1
  4. {dub-0.27.2 → dub-0.27.4}/src/dub/_version.py +3 -3
  5. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/__init__.py +3 -2
  6. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/clickevent.py +92 -47
  7. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/domainschema.py +42 -0
  8. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/leadcreatedevent.py +66 -21
  9. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/leadevent.py +126 -48
  10. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/linkclickedevent.py +66 -21
  11. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/linkschema.py +26 -20
  12. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/linkwebhookevent.py +33 -21
  13. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/partnerenrolledevent.py +6 -6
  14. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/salecreatedevent.py +66 -21
  15. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/saleevent.py +206 -123
  16. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/__init__.py +3 -2
  17. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/__init__.py +3 -2
  18. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/bulkcreatelinks.py +25 -25
  19. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/bulkupdatelinks.py +25 -25
  20. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createlink.py +25 -25
  21. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createpartner.py +6 -6
  22. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getlinks.py +2 -2
  23. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getlinkscount.py +2 -2
  24. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/listevents.py +31 -22
  25. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/listpartners.py +6 -6
  26. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/retrieveanalytics.py +31 -22
  27. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/retrievelinks.py +6 -6
  28. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatelink.py +25 -25
  29. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/upsertlink.py +25 -25
  30. {dub-0.27.2 → dub-0.27.4}/src/dub/sdk.py +1 -1
  31. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/__init__.py +3 -2
  32. {dub-0.27.2 → dub-0.27.4}/LICENSE +0 -0
  33. {dub-0.27.2 → dub-0.27.4}/py.typed +0 -0
  34. {dub-0.27.2 → dub-0.27.4}/src/dub/__init__.py +0 -0
  35. {dub-0.27.2 → dub-0.27.4}/src/dub/_hooks/__init__.py +0 -0
  36. {dub-0.27.2 → dub-0.27.4}/src/dub/_hooks/registration.py +0 -0
  37. {dub-0.27.2 → dub-0.27.4}/src/dub/_hooks/sdkhooks.py +0 -0
  38. {dub-0.27.2 → dub-0.27.4}/src/dub/_hooks/types.py +0 -0
  39. {dub-0.27.2 → dub-0.27.4}/src/dub/analytics.py +0 -0
  40. {dub-0.27.2 → dub-0.27.4}/src/dub/basesdk.py +0 -0
  41. {dub-0.27.2 → dub-0.27.4}/src/dub/commissions.py +0 -0
  42. {dub-0.27.2 → dub-0.27.4}/src/dub/customers.py +0 -0
  43. {dub-0.27.2 → dub-0.27.4}/src/dub/domains.py +0 -0
  44. {dub-0.27.2 → dub-0.27.4}/src/dub/embed_tokens.py +0 -0
  45. {dub-0.27.2 → dub-0.27.4}/src/dub/events.py +0 -0
  46. {dub-0.27.2 → dub-0.27.4}/src/dub/folders.py +0 -0
  47. {dub-0.27.2 → dub-0.27.4}/src/dub/httpclient.py +0 -0
  48. {dub-0.27.2 → dub-0.27.4}/src/dub/links.py +0 -0
  49. {dub-0.27.2 → dub-0.27.4}/src/dub/models/__init__.py +0 -0
  50. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsbrowsers.py +0 -0
  51. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticscities.py +0 -0
  52. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticscontinents.py +0 -0
  53. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticscount.py +0 -0
  54. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticscountries.py +0 -0
  55. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsdevices.py +0 -0
  56. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsos.py +0 -0
  57. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsreferers.py +0 -0
  58. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsrefererurls.py +0 -0
  59. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticsregions.py +0 -0
  60. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticstimeseries.py +0 -0
  61. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticstoplinks.py +0 -0
  62. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticstopurls.py +0 -0
  63. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/analyticstriggers.py +0 -0
  64. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/commissioncreatedevent.py +0 -0
  65. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/continentcode.py +0 -0
  66. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/countrycode.py +0 -0
  67. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/folderschema.py +0 -0
  68. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/linkerrorschema.py +0 -0
  69. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/linkgeotargeting.py +0 -0
  70. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/partneranalyticscount.py +0 -0
  71. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/partneranalyticstimeseries.py +0 -0
  72. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/partneranalyticstoplinks.py +0 -0
  73. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/security.py +0 -0
  74. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/tagschema.py +0 -0
  75. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/webhookevent.py +0 -0
  76. {dub-0.27.2 → dub-0.27.4}/src/dub/models/components/workspaceschema.py +0 -0
  77. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/badrequest.py +0 -0
  78. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/conflict.py +0 -0
  79. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/duberror.py +0 -0
  80. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/forbidden.py +0 -0
  81. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/internalservererror.py +0 -0
  82. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/inviteexpired.py +0 -0
  83. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/no_response_error.py +0 -0
  84. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/notfound.py +0 -0
  85. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/ratelimitexceeded.py +0 -0
  86. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/responsevalidationerror.py +0 -0
  87. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/sdkerror.py +0 -0
  88. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/unauthorized.py +0 -0
  89. {dub-0.27.2 → dub-0.27.4}/src/dub/models/errors/unprocessableentity.py +0 -0
  90. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/bulkdeletelinks.py +0 -0
  91. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/checkdomainstatus.py +0 -0
  92. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createcustomer.py +0 -0
  93. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createdomain.py +0 -0
  94. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createfolder.py +0 -0
  95. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createpartnerlink.py +0 -0
  96. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createreferralsembedtoken.py +0 -0
  97. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/createtag.py +0 -0
  98. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/deletecustomer.py +0 -0
  99. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/deletedomain.py +0 -0
  100. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/deletefolder.py +0 -0
  101. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/deletelink.py +0 -0
  102. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/deletetag.py +0 -0
  103. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getcustomer.py +0 -0
  104. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getcustomers.py +0 -0
  105. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getlinkinfo.py +0 -0
  106. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getqrcode.py +0 -0
  107. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/gettags.py +0 -0
  108. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/getworkspace.py +0 -0
  109. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/listcommissions.py +0 -0
  110. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/listdomains.py +0 -0
  111. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/listfolders.py +0 -0
  112. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/registerdomain.py +0 -0
  113. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/retrievepartneranalytics.py +0 -0
  114. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/tracklead.py +0 -0
  115. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/tracksale.py +0 -0
  116. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatecommission.py +0 -0
  117. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatecustomer.py +0 -0
  118. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatedomain.py +0 -0
  119. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatefolder.py +0 -0
  120. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updatetag.py +0 -0
  121. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/updateworkspace.py +0 -0
  122. {dub-0.27.2 → dub-0.27.4}/src/dub/models/operations/upsertpartnerlink.py +0 -0
  123. {dub-0.27.2 → dub-0.27.4}/src/dub/partners.py +0 -0
  124. {dub-0.27.2 → dub-0.27.4}/src/dub/py.typed +0 -0
  125. {dub-0.27.2 → dub-0.27.4}/src/dub/qr_codes.py +0 -0
  126. {dub-0.27.2 → dub-0.27.4}/src/dub/sdkconfiguration.py +0 -0
  127. {dub-0.27.2 → dub-0.27.4}/src/dub/tags.py +0 -0
  128. {dub-0.27.2 → dub-0.27.4}/src/dub/track.py +0 -0
  129. {dub-0.27.2 → dub-0.27.4}/src/dub/types/__init__.py +0 -0
  130. {dub-0.27.2 → dub-0.27.4}/src/dub/types/basemodel.py +0 -0
  131. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/annotations.py +0 -0
  132. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/datetimes.py +0 -0
  133. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/enums.py +0 -0
  134. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/eventstreaming.py +0 -0
  135. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/forms.py +0 -0
  136. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/headers.py +0 -0
  137. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/logger.py +0 -0
  138. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/metadata.py +0 -0
  139. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/queryparams.py +0 -0
  140. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/requestbodies.py +0 -0
  141. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/retries.py +0 -0
  142. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/security.py +0 -0
  143. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/serializers.py +0 -0
  144. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/unmarshal_json_response.py +0 -0
  145. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/url.py +0 -0
  146. {dub-0.27.2 → dub-0.27.4}/src/dub/utils/values.py +0 -0
  147. {dub-0.27.2 → dub-0.27.4}/src/dub/workspaces.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dub
3
- Version: 0.27.2
3
+ Version: 0.27.4
4
4
  Summary: Python Client SDK Generated by Speakeasy
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -32,7 +32,7 @@ Learn more about the Dub.co Python SDK in the [official documentation](https://d
32
32
  <!-- Start Summary [summary] -->
33
33
  ## Summary
34
34
 
35
- Dub API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.
35
+ Dub API: Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs.
36
36
  <!-- End Summary [summary] -->
37
37
 
38
38
  <!-- Start Table of Contents [toc] -->
@@ -14,7 +14,7 @@ Learn more about the Dub.co Python SDK in the [official documentation](https://d
14
14
  <!-- Start Summary [summary] -->
15
15
  ## Summary
16
16
 
17
- Dub API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.
17
+ Dub API: Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs.
18
18
  <!-- End Summary [summary] -->
19
19
 
20
20
  <!-- Start Table of Contents [toc] -->
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dub"
3
- version = "0.27.2"
3
+ version = "0.27.4"
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.27.2"
6
+ __version__: str = "0.27.4"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
- __gen_version__: str = "2.662.0"
9
- __user_agent__: str = "speakeasy-sdk/python 0.27.2 2.662.0 0.0.1 dub"
8
+ __gen_version__: str = "2.674.3"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.27.4 2.674.3 0.0.1 dub"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
5
6
 
6
7
  if TYPE_CHECKING:
7
8
  from .analyticsbrowsers import AnalyticsBrowsers, AnalyticsBrowsersTypedDict
@@ -634,5 +635,5 @@ def __getattr__(attr_name: str) -> object:
634
635
 
635
636
 
636
637
  def __dir__():
637
- lazy_attrs = list(_dynamic_imports.keys())
638
- return sorted(lazy_attrs)
638
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
639
+ return builtins.sorted(lazy_attrs)
@@ -29,6 +29,7 @@ class ClickTypedDict(TypedDict):
29
29
  referer_url: str
30
30
  qr: bool
31
31
  ip: str
32
+ trigger: NotRequired[Nullable[str]]
32
33
 
33
34
 
34
35
  class Click(BaseModel):
@@ -60,6 +61,38 @@ class Click(BaseModel):
60
61
 
61
62
  ip: str
62
63
 
64
+ trigger: OptionalNullable[str] = UNSET
65
+
66
+ @model_serializer(mode="wrap")
67
+ def serialize_model(self, handler):
68
+ optional_fields = ["trigger"]
69
+ nullable_fields = ["trigger"]
70
+ null_default_fields = []
71
+
72
+ serialized = handler(self)
73
+
74
+ m = {}
75
+
76
+ for n, f in type(self).model_fields.items():
77
+ k = f.alias or n
78
+ val = serialized.get(k)
79
+ serialized.pop(k, None)
80
+
81
+ optional_nullable = k in optional_fields and k in nullable_fields
82
+ is_set = (
83
+ self.__pydantic_fields_set__.intersection({n})
84
+ or k in null_default_fields
85
+ ) # pylint: disable=no-member
86
+
87
+ if val is not None and val != UNSET_SENTINEL:
88
+ m[k] = val
89
+ elif val != UNSET_SENTINEL and (
90
+ not k in optional_fields or (optional_nullable and is_set)
91
+ ):
92
+ m[k] = val
93
+
94
+ return m
95
+
63
96
 
64
97
  class ClickEventGeoTypedDict(TypedDict):
65
98
  r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"""
@@ -871,8 +904,6 @@ class LinkTypedDict(TypedDict):
871
904
  geo: Nullable[ClickEventGeoTypedDict]
872
905
  r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"""
873
906
  public_stats: bool
874
- tag_id: Nullable[str]
875
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
876
907
  tags: Nullable[List[TagSchemaTypedDict]]
877
908
  r"""The tags assigned to the short link."""
878
909
  folder_id: Nullable[str]
@@ -903,18 +934,22 @@ class LinkTypedDict(TypedDict):
903
934
  last_clicked: str
904
935
  created_at: str
905
936
  updated_at: str
937
+ tag_id: Nullable[str]
938
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
906
939
  project_id: str
907
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
940
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
908
941
  test_variants: NotRequired[Nullable[List[ClickEventTestVariantsTypedDict]]]
909
942
  r"""An array of A/B test URLs and the percentage of traffic to send to each URL."""
910
943
  clicks: NotRequired[float]
911
944
  r"""The number of clicks on the short link."""
912
945
  leads: NotRequired[float]
913
- r"""The number of leads the short links has generated."""
946
+ r"""The number of leads the short link has generated."""
947
+ conversions: NotRequired[float]
948
+ r"""The number of leads that converted to paying customers."""
914
949
  sales: NotRequired[float]
915
- r"""The number of sales the short links has generated."""
950
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
916
951
  sale_amount: NotRequired[float]
917
- r"""The total dollar amount of sales the short links has generated (in cents)."""
952
+ r"""The total dollar value of sales (in cents) generated by the short link."""
918
953
 
919
954
 
920
955
  class Link(BaseModel):
@@ -981,15 +1016,6 @@ class Link(BaseModel):
981
1016
 
982
1017
  public_stats: Annotated[bool, pydantic.Field(alias="publicStats")]
983
1018
 
984
- tag_id: Annotated[
985
- Nullable[str],
986
- pydantic.Field(
987
- deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
988
- alias="tagId",
989
- ),
990
- ]
991
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
992
-
993
1019
  tags: Nullable[List[TagSchema]]
994
1020
  r"""The tags assigned to the short link."""
995
1021
 
@@ -1038,6 +1064,15 @@ class Link(BaseModel):
1038
1064
 
1039
1065
  updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
1040
1066
 
1067
+ tag_id: Annotated[
1068
+ Nullable[str],
1069
+ pydantic.Field(
1070
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
1071
+ alias="tagId",
1072
+ ),
1073
+ ]
1074
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
1075
+
1041
1076
  project_id: Annotated[
1042
1077
  str,
1043
1078
  pydantic.Field(
@@ -1045,7 +1080,7 @@ class Link(BaseModel):
1045
1080
  alias="projectId",
1046
1081
  ),
1047
1082
  ]
1048
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
1083
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
1049
1084
 
1050
1085
  test_variants: Annotated[
1051
1086
  OptionalNullable[List[ClickEventTestVariants]],
@@ -1057,17 +1092,27 @@ class Link(BaseModel):
1057
1092
  r"""The number of clicks on the short link."""
1058
1093
 
1059
1094
  leads: Optional[float] = 0
1060
- r"""The number of leads the short links has generated."""
1095
+ r"""The number of leads the short link has generated."""
1096
+
1097
+ conversions: Optional[float] = 0
1098
+ r"""The number of leads that converted to paying customers."""
1061
1099
 
1062
1100
  sales: Optional[float] = 0
1063
- r"""The number of sales the short links has generated."""
1101
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
1064
1102
 
1065
1103
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
1066
- r"""The total dollar amount of sales the short links has generated (in cents)."""
1104
+ r"""The total dollar value of sales (in cents) generated by the short link."""
1067
1105
 
1068
1106
  @model_serializer(mode="wrap")
1069
1107
  def serialize_model(self, handler):
1070
- optional_fields = ["testVariants", "clicks", "leads", "sales", "saleAmount"]
1108
+ optional_fields = [
1109
+ "testVariants",
1110
+ "clicks",
1111
+ "leads",
1112
+ "conversions",
1113
+ "sales",
1114
+ "saleAmount",
1115
+ ]
1071
1116
  nullable_fields = [
1072
1117
  "externalId",
1073
1118
  "tenantId",
@@ -1082,7 +1127,6 @@ class Link(BaseModel):
1082
1127
  "ios",
1083
1128
  "android",
1084
1129
  "geo",
1085
- "tagId",
1086
1130
  "tags",
1087
1131
  "folderId",
1088
1132
  "comments",
@@ -1095,6 +1139,7 @@ class Link(BaseModel):
1095
1139
  "testStartedAt",
1096
1140
  "testCompletedAt",
1097
1141
  "userId",
1142
+ "tagId",
1098
1143
  ]
1099
1144
  null_default_fields = []
1100
1145
 
@@ -1129,31 +1174,31 @@ class ClickEventTypedDict(TypedDict):
1129
1174
  click: ClickTypedDict
1130
1175
  link: LinkTypedDict
1131
1176
  click_id: str
1132
- r"""Deprecated. Use `click.id` instead."""
1177
+ r"""Deprecated: Use `click.id` instead."""
1133
1178
  link_id: str
1134
- r"""Deprecated. Use `link.id` instead."""
1179
+ r"""Deprecated: Use `link.id` instead."""
1135
1180
  domain: str
1136
- r"""Deprecated. Use `link.domain` instead."""
1181
+ r"""Deprecated: Use `link.domain` instead."""
1137
1182
  key: str
1138
- r"""Deprecated. Use `link.key` instead."""
1183
+ r"""Deprecated: Use `link.key` instead."""
1139
1184
  url: str
1140
- r"""Deprecated. Use `click.url` instead."""
1185
+ r"""Deprecated: Use `click.url` instead."""
1141
1186
  continent: str
1142
- r"""Deprecated. Use `click.continent` instead."""
1187
+ r"""Deprecated: Use `click.continent` instead."""
1143
1188
  country: str
1144
- r"""Deprecated. Use `click.country` instead."""
1189
+ r"""Deprecated: Use `click.country` instead."""
1145
1190
  city: str
1146
- r"""Deprecated. Use `click.city` instead."""
1191
+ r"""Deprecated: Use `click.city` instead."""
1147
1192
  device: str
1148
- r"""Deprecated. Use `click.device` instead."""
1193
+ r"""Deprecated: Use `click.device` instead."""
1149
1194
  browser: str
1150
- r"""Deprecated. Use `click.browser` instead."""
1195
+ r"""Deprecated: Use `click.browser` instead."""
1151
1196
  os: str
1152
- r"""Deprecated. Use `click.os` instead."""
1197
+ r"""Deprecated: Use `click.os` instead."""
1153
1198
  qr: float
1154
- r"""Deprecated. Use `click.qr` instead."""
1199
+ r"""Deprecated: Use `click.qr` instead."""
1155
1200
  ip: str
1156
- r"""Deprecated. Use `click.ip` instead."""
1201
+ r"""Deprecated: Use `click.ip` instead."""
1157
1202
 
1158
1203
 
1159
1204
  class ClickEvent(BaseModel):
@@ -1171,7 +1216,7 @@ class ClickEvent(BaseModel):
1171
1216
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1172
1217
  ),
1173
1218
  ]
1174
- r"""Deprecated. Use `click.id` instead."""
1219
+ r"""Deprecated: Use `click.id` instead."""
1175
1220
 
1176
1221
  link_id: Annotated[
1177
1222
  str,
@@ -1179,7 +1224,7 @@ class ClickEvent(BaseModel):
1179
1224
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1180
1225
  ),
1181
1226
  ]
1182
- r"""Deprecated. Use `link.id` instead."""
1227
+ r"""Deprecated: Use `link.id` instead."""
1183
1228
 
1184
1229
  domain: Annotated[
1185
1230
  str,
@@ -1187,7 +1232,7 @@ class ClickEvent(BaseModel):
1187
1232
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1188
1233
  ),
1189
1234
  ]
1190
- r"""Deprecated. Use `link.domain` instead."""
1235
+ r"""Deprecated: Use `link.domain` instead."""
1191
1236
 
1192
1237
  key: Annotated[
1193
1238
  str,
@@ -1195,7 +1240,7 @@ class ClickEvent(BaseModel):
1195
1240
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1196
1241
  ),
1197
1242
  ]
1198
- r"""Deprecated. Use `link.key` instead."""
1243
+ r"""Deprecated: Use `link.key` instead."""
1199
1244
 
1200
1245
  url: Annotated[
1201
1246
  str,
@@ -1203,7 +1248,7 @@ class ClickEvent(BaseModel):
1203
1248
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1204
1249
  ),
1205
1250
  ]
1206
- r"""Deprecated. Use `click.url` instead."""
1251
+ r"""Deprecated: Use `click.url` instead."""
1207
1252
 
1208
1253
  continent: Annotated[
1209
1254
  str,
@@ -1211,7 +1256,7 @@ class ClickEvent(BaseModel):
1211
1256
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1212
1257
  ),
1213
1258
  ]
1214
- r"""Deprecated. Use `click.continent` instead."""
1259
+ r"""Deprecated: Use `click.continent` instead."""
1215
1260
 
1216
1261
  country: Annotated[
1217
1262
  str,
@@ -1219,7 +1264,7 @@ class ClickEvent(BaseModel):
1219
1264
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1220
1265
  ),
1221
1266
  ]
1222
- r"""Deprecated. Use `click.country` instead."""
1267
+ r"""Deprecated: Use `click.country` instead."""
1223
1268
 
1224
1269
  city: Annotated[
1225
1270
  str,
@@ -1227,7 +1272,7 @@ class ClickEvent(BaseModel):
1227
1272
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1228
1273
  ),
1229
1274
  ]
1230
- r"""Deprecated. Use `click.city` instead."""
1275
+ r"""Deprecated: Use `click.city` instead."""
1231
1276
 
1232
1277
  device: Annotated[
1233
1278
  str,
@@ -1235,7 +1280,7 @@ class ClickEvent(BaseModel):
1235
1280
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1236
1281
  ),
1237
1282
  ]
1238
- r"""Deprecated. Use `click.device` instead."""
1283
+ r"""Deprecated: Use `click.device` instead."""
1239
1284
 
1240
1285
  browser: Annotated[
1241
1286
  str,
@@ -1243,7 +1288,7 @@ class ClickEvent(BaseModel):
1243
1288
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1244
1289
  ),
1245
1290
  ]
1246
- r"""Deprecated. Use `click.browser` instead."""
1291
+ r"""Deprecated: Use `click.browser` instead."""
1247
1292
 
1248
1293
  os: Annotated[
1249
1294
  str,
@@ -1251,7 +1296,7 @@ class ClickEvent(BaseModel):
1251
1296
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1252
1297
  ),
1253
1298
  ]
1254
- r"""Deprecated. Use `click.os` instead."""
1299
+ r"""Deprecated: Use `click.os` instead."""
1255
1300
 
1256
1301
  qr: Annotated[
1257
1302
  float,
@@ -1259,7 +1304,7 @@ class ClickEvent(BaseModel):
1259
1304
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1260
1305
  ),
1261
1306
  ]
1262
- r"""Deprecated. Use `click.qr` instead."""
1307
+ r"""Deprecated: Use `click.qr` instead."""
1263
1308
 
1264
1309
  ip: Annotated[
1265
1310
  str,
@@ -1267,4 +1312,4 @@ class ClickEvent(BaseModel):
1267
1312
  deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
1268
1313
  ),
1269
1314
  ]
1270
- r"""Deprecated. Use `click.ip` instead."""
1315
+ r"""Deprecated: Use `click.ip` instead."""
@@ -13,10 +13,14 @@ class RegisteredDomainTypedDict(TypedDict):
13
13
 
14
14
  id: str
15
15
  r"""The ID of the registered domain record."""
16
+ auto_renewal_disabled_at: Nullable[str]
17
+ r"""The date the domain auto-renew is disabled."""
16
18
  created_at: str
17
19
  r"""The date the domain was created."""
18
20
  expires_at: str
19
21
  r"""The date the domain expires."""
22
+ renewal_fee: float
23
+ r"""The fee to renew the domain."""
20
24
 
21
25
 
22
26
  class RegisteredDomain(BaseModel):
@@ -25,12 +29,50 @@ class RegisteredDomain(BaseModel):
25
29
  id: str
26
30
  r"""The ID of the registered domain record."""
27
31
 
32
+ auto_renewal_disabled_at: Annotated[
33
+ Nullable[str], pydantic.Field(alias="autoRenewalDisabledAt")
34
+ ]
35
+ r"""The date the domain auto-renew is disabled."""
36
+
28
37
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
29
38
  r"""The date the domain was created."""
30
39
 
31
40
  expires_at: Annotated[str, pydantic.Field(alias="expiresAt")]
32
41
  r"""The date the domain expires."""
33
42
 
43
+ renewal_fee: Annotated[float, pydantic.Field(alias="renewalFee")]
44
+ r"""The fee to renew the domain."""
45
+
46
+ @model_serializer(mode="wrap")
47
+ def serialize_model(self, handler):
48
+ optional_fields = []
49
+ nullable_fields = ["autoRenewalDisabledAt"]
50
+ null_default_fields = []
51
+
52
+ serialized = handler(self)
53
+
54
+ m = {}
55
+
56
+ for n, f in type(self).model_fields.items():
57
+ k = f.alias or n
58
+ val = serialized.get(k)
59
+ serialized.pop(k, None)
60
+
61
+ optional_nullable = k in optional_fields and k in nullable_fields
62
+ is_set = (
63
+ self.__pydantic_fields_set__.intersection({n})
64
+ or k in null_default_fields
65
+ ) # pylint: disable=no-member
66
+
67
+ if val is not None and val != UNSET_SENTINEL:
68
+ m[k] = val
69
+ elif val != UNSET_SENTINEL and (
70
+ not k in optional_fields or (optional_nullable and is_set)
71
+ ):
72
+ m[k] = val
73
+
74
+ return m
75
+
34
76
 
35
77
  class DomainSchemaTypedDict(TypedDict):
36
78
  id: str
@@ -111,6 +111,7 @@ class LeadCreatedEventClickTypedDict(TypedDict):
111
111
  referer_url: str
112
112
  qr: bool
113
113
  ip: str
114
+ trigger: NotRequired[Nullable[str]]
114
115
 
115
116
 
116
117
  class LeadCreatedEventClick(BaseModel):
@@ -142,6 +143,38 @@ class LeadCreatedEventClick(BaseModel):
142
143
 
143
144
  ip: str
144
145
 
146
+ trigger: OptionalNullable[str] = UNSET
147
+
148
+ @model_serializer(mode="wrap")
149
+ def serialize_model(self, handler):
150
+ optional_fields = ["trigger"]
151
+ nullable_fields = ["trigger"]
152
+ null_default_fields = []
153
+
154
+ serialized = handler(self)
155
+
156
+ m = {}
157
+
158
+ for n, f in type(self).model_fields.items():
159
+ k = f.alias or n
160
+ val = serialized.get(k)
161
+ serialized.pop(k, None)
162
+
163
+ optional_nullable = k in optional_fields and k in nullable_fields
164
+ is_set = (
165
+ self.__pydantic_fields_set__.intersection({n})
166
+ or k in null_default_fields
167
+ ) # pylint: disable=no-member
168
+
169
+ if val is not None and val != UNSET_SENTINEL:
170
+ m[k] = val
171
+ elif val != UNSET_SENTINEL and (
172
+ not k in optional_fields or (optional_nullable and is_set)
173
+ ):
174
+ m[k] = val
175
+
176
+ return m
177
+
145
178
 
146
179
  class LeadCreatedEventGeoTypedDict(TypedDict):
147
180
  r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"""
@@ -953,8 +986,6 @@ class LeadCreatedEventLinkTypedDict(TypedDict):
953
986
  geo: Nullable[LeadCreatedEventGeoTypedDict]
954
987
  r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"""
955
988
  public_stats: bool
956
- tag_id: Nullable[str]
957
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
958
989
  tags: Nullable[List[TagSchemaTypedDict]]
959
990
  r"""The tags assigned to the short link."""
960
991
  folder_id: Nullable[str]
@@ -985,18 +1016,22 @@ class LeadCreatedEventLinkTypedDict(TypedDict):
985
1016
  last_clicked: str
986
1017
  created_at: str
987
1018
  updated_at: str
1019
+ tag_id: Nullable[str]
1020
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
988
1021
  project_id: str
989
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
1022
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
990
1023
  test_variants: NotRequired[Nullable[List[LeadCreatedEventTestVariantsTypedDict]]]
991
1024
  r"""An array of A/B test URLs and the percentage of traffic to send to each URL."""
992
1025
  clicks: NotRequired[float]
993
1026
  r"""The number of clicks on the short link."""
994
1027
  leads: NotRequired[float]
995
- r"""The number of leads the short links has generated."""
1028
+ r"""The number of leads the short link has generated."""
1029
+ conversions: NotRequired[float]
1030
+ r"""The number of leads that converted to paying customers."""
996
1031
  sales: NotRequired[float]
997
- r"""The number of sales the short links has generated."""
1032
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
998
1033
  sale_amount: NotRequired[float]
999
- r"""The total dollar amount of sales the short links has generated (in cents)."""
1034
+ r"""The total dollar value of sales (in cents) generated by the short link."""
1000
1035
 
1001
1036
 
1002
1037
  class LeadCreatedEventLink(BaseModel):
@@ -1063,15 +1098,6 @@ class LeadCreatedEventLink(BaseModel):
1063
1098
 
1064
1099
  public_stats: Annotated[bool, pydantic.Field(alias="publicStats")]
1065
1100
 
1066
- tag_id: Annotated[
1067
- Nullable[str],
1068
- pydantic.Field(
1069
- deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
1070
- alias="tagId",
1071
- ),
1072
- ]
1073
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
1074
-
1075
1101
  tags: Nullable[List[TagSchema]]
1076
1102
  r"""The tags assigned to the short link."""
1077
1103
 
@@ -1120,6 +1146,15 @@ class LeadCreatedEventLink(BaseModel):
1120
1146
 
1121
1147
  updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
1122
1148
 
1149
+ tag_id: Annotated[
1150
+ Nullable[str],
1151
+ pydantic.Field(
1152
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
1153
+ alias="tagId",
1154
+ ),
1155
+ ]
1156
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
1157
+
1123
1158
  project_id: Annotated[
1124
1159
  str,
1125
1160
  pydantic.Field(
@@ -1127,7 +1162,7 @@ class LeadCreatedEventLink(BaseModel):
1127
1162
  alias="projectId",
1128
1163
  ),
1129
1164
  ]
1130
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
1165
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
1131
1166
 
1132
1167
  test_variants: Annotated[
1133
1168
  OptionalNullable[List[LeadCreatedEventTestVariants]],
@@ -1139,17 +1174,27 @@ class LeadCreatedEventLink(BaseModel):
1139
1174
  r"""The number of clicks on the short link."""
1140
1175
 
1141
1176
  leads: Optional[float] = 0
1142
- r"""The number of leads the short links has generated."""
1177
+ r"""The number of leads the short link has generated."""
1178
+
1179
+ conversions: Optional[float] = 0
1180
+ r"""The number of leads that converted to paying customers."""
1143
1181
 
1144
1182
  sales: Optional[float] = 0
1145
- r"""The number of sales the short links has generated."""
1183
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
1146
1184
 
1147
1185
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
1148
- r"""The total dollar amount of sales the short links has generated (in cents)."""
1186
+ r"""The total dollar value of sales (in cents) generated by the short link."""
1149
1187
 
1150
1188
  @model_serializer(mode="wrap")
1151
1189
  def serialize_model(self, handler):
1152
- optional_fields = ["testVariants", "clicks", "leads", "sales", "saleAmount"]
1190
+ optional_fields = [
1191
+ "testVariants",
1192
+ "clicks",
1193
+ "leads",
1194
+ "conversions",
1195
+ "sales",
1196
+ "saleAmount",
1197
+ ]
1153
1198
  nullable_fields = [
1154
1199
  "externalId",
1155
1200
  "tenantId",
@@ -1164,7 +1209,6 @@ class LeadCreatedEventLink(BaseModel):
1164
1209
  "ios",
1165
1210
  "android",
1166
1211
  "geo",
1167
- "tagId",
1168
1212
  "tags",
1169
1213
  "folderId",
1170
1214
  "comments",
@@ -1177,6 +1221,7 @@ class LeadCreatedEventLink(BaseModel):
1177
1221
  "testStartedAt",
1178
1222
  "testCompletedAt",
1179
1223
  "userId",
1224
+ "tagId",
1180
1225
  ]
1181
1226
  null_default_fields = []
1182
1227