dub 0.27.2__py3-none-any.whl → 0.27.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -840,8 +840,6 @@ class LinkWebhookEventLinkTypedDict(TypedDict):
840
840
  geo: Nullable[LinkWebhookEventGeoTypedDict]
841
841
  r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"""
842
842
  public_stats: bool
843
- tag_id: Nullable[str]
844
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
845
843
  tags: Nullable[List[TagSchemaTypedDict]]
846
844
  r"""The tags assigned to the short link."""
847
845
  folder_id: Nullable[str]
@@ -872,18 +870,22 @@ class LinkWebhookEventLinkTypedDict(TypedDict):
872
870
  last_clicked: str
873
871
  created_at: str
874
872
  updated_at: str
873
+ tag_id: Nullable[str]
874
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
875
875
  project_id: str
876
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
876
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
877
877
  test_variants: NotRequired[Nullable[List[LinkWebhookEventTestVariantsTypedDict]]]
878
878
  r"""An array of A/B test URLs and the percentage of traffic to send to each URL."""
879
879
  clicks: NotRequired[float]
880
880
  r"""The number of clicks on the short link."""
881
881
  leads: NotRequired[float]
882
- r"""The number of leads the short links has generated."""
882
+ r"""The number of leads the short link has generated."""
883
+ conversions: NotRequired[float]
884
+ r"""The number of leads that converted to paying customers."""
883
885
  sales: NotRequired[float]
884
- r"""The number of sales the short links has generated."""
886
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
885
887
  sale_amount: NotRequired[float]
886
- r"""The total dollar amount of sales the short links has generated (in cents)."""
888
+ r"""The total dollar value of sales (in cents) generated by the short link."""
887
889
 
888
890
 
889
891
  class LinkWebhookEventLink(BaseModel):
@@ -950,15 +952,6 @@ class LinkWebhookEventLink(BaseModel):
950
952
 
951
953
  public_stats: Annotated[bool, pydantic.Field(alias="publicStats")]
952
954
 
953
- tag_id: Annotated[
954
- Nullable[str],
955
- pydantic.Field(
956
- deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
957
- alias="tagId",
958
- ),
959
- ]
960
- r"""The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead."""
961
-
962
955
  tags: Nullable[List[TagSchema]]
963
956
  r"""The tags assigned to the short link."""
964
957
 
@@ -1007,6 +1000,15 @@ class LinkWebhookEventLink(BaseModel):
1007
1000
 
1008
1001
  updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
1009
1002
 
1003
+ tag_id: Annotated[
1004
+ Nullable[str],
1005
+ pydantic.Field(
1006
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
1007
+ alias="tagId",
1008
+ ),
1009
+ ]
1010
+ r"""Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link."""
1011
+
1010
1012
  project_id: Annotated[
1011
1013
  str,
1012
1014
  pydantic.Field(
@@ -1014,7 +1016,7 @@ class LinkWebhookEventLink(BaseModel):
1014
1016
  alias="projectId",
1015
1017
  ),
1016
1018
  ]
1017
- r"""The project ID of the short link. This field is deprecated – use `workspaceId` instead."""
1019
+ r"""Deprecated: Use `workspaceId` instead. The project ID of the short link."""
1018
1020
 
1019
1021
  test_variants: Annotated[
1020
1022
  OptionalNullable[List[LinkWebhookEventTestVariants]],
@@ -1026,17 +1028,27 @@ class LinkWebhookEventLink(BaseModel):
1026
1028
  r"""The number of clicks on the short link."""
1027
1029
 
1028
1030
  leads: Optional[float] = 0
1029
- r"""The number of leads the short links has generated."""
1031
+ r"""The number of leads the short link has generated."""
1032
+
1033
+ conversions: Optional[float] = 0
1034
+ r"""The number of leads that converted to paying customers."""
1030
1035
 
1031
1036
  sales: Optional[float] = 0
1032
- r"""The number of sales the short links has generated."""
1037
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
1033
1038
 
1034
1039
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
1035
- r"""The total dollar amount of sales the short links has generated (in cents)."""
1040
+ r"""The total dollar value of sales (in cents) generated by the short link."""
1036
1041
 
1037
1042
  @model_serializer(mode="wrap")
1038
1043
  def serialize_model(self, handler):
1039
- optional_fields = ["testVariants", "clicks", "leads", "sales", "saleAmount"]
1044
+ optional_fields = [
1045
+ "testVariants",
1046
+ "clicks",
1047
+ "leads",
1048
+ "conversions",
1049
+ "sales",
1050
+ "saleAmount",
1051
+ ]
1040
1052
  nullable_fields = [
1041
1053
  "externalId",
1042
1054
  "tenantId",
@@ -1051,7 +1063,6 @@ class LinkWebhookEventLink(BaseModel):
1051
1063
  "ios",
1052
1064
  "android",
1053
1065
  "geo",
1054
- "tagId",
1055
1066
  "tags",
1056
1067
  "folderId",
1057
1068
  "comments",
@@ -1064,6 +1075,7 @@ class LinkWebhookEventLink(BaseModel):
1064
1075
  "testStartedAt",
1065
1076
  "testCompletedAt",
1066
1077
  "userId",
1078
+ "tagId",
1067
1079
  ]
1068
1080
  null_default_fields = []
1069
1081
 
@@ -39,11 +39,11 @@ class PartnerEnrolledEventLinkTypedDict(TypedDict):
39
39
  clicks: NotRequired[float]
40
40
  r"""The number of clicks on the short link."""
41
41
  leads: NotRequired[float]
42
- r"""The number of leads the short links has generated."""
42
+ r"""The number of leads the short link has generated."""
43
43
  sales: NotRequired[float]
44
- r"""The number of sales the short links has generated."""
44
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
45
45
  sale_amount: NotRequired[float]
46
- r"""The total dollar amount of sales the short links has generated (in cents)."""
46
+ r"""The total dollar value of sales (in cents) generated by the short link."""
47
47
 
48
48
 
49
49
  class PartnerEnrolledEventLink(BaseModel):
@@ -66,13 +66,13 @@ class PartnerEnrolledEventLink(BaseModel):
66
66
  r"""The number of clicks on the short link."""
67
67
 
68
68
  leads: Optional[float] = 0
69
- r"""The number of leads the short links has generated."""
69
+ r"""The number of leads the short link has generated."""
70
70
 
71
71
  sales: Optional[float] = 0
72
- r"""The number of sales the short links has generated."""
72
+ r"""The total number of sales (includes recurring sales) generated by the short link."""
73
73
 
74
74
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
75
- r"""The total dollar amount of sales the short links has generated (in cents)."""
75
+ r"""The total dollar value of sales (in cents) generated by the short link."""
76
76
 
77
77
 
78
78
  class BannedReason(str, Enum):
@@ -111,6 +111,7 @@ class SaleCreatedEventClickTypedDict(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 SaleCreatedEventClick(BaseModel):
@@ -142,6 +143,38 @@ class SaleCreatedEventClick(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 SaleCreatedEventGeoTypedDict(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 SaleCreatedEventLinkTypedDict(TypedDict):
953
986
  geo: Nullable[SaleCreatedEventGeoTypedDict]
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 SaleCreatedEventLinkTypedDict(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[SaleCreatedEventTestVariantsTypedDict]]]
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 SaleCreatedEventLink(BaseModel):
@@ -1063,15 +1098,6 @@ class SaleCreatedEventLink(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 SaleCreatedEventLink(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 SaleCreatedEventLink(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[SaleCreatedEventTestVariants]],
@@ -1139,17 +1174,27 @@ class SaleCreatedEventLink(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 SaleCreatedEventLink(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 SaleCreatedEventLink(BaseModel):
1177
1221
  "testStartedAt",
1178
1222
  "testCompletedAt",
1179
1223
  "userId",
1224
+ "tagId",
1180
1225
  ]
1181
1226
  null_default_fields = []
1182
1227