dub 0.27.1__py3-none-any.whl → 0.27.2__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.
@@ -704,6 +704,17 @@ class CreatePartnerLink(BaseModel):
704
704
  r"""The total dollar amount of sales the short links has generated (in cents)."""
705
705
 
706
706
 
707
+ class BannedReason(str, Enum):
708
+ r"""If the partner was banned from the program, this is the reason for the ban."""
709
+
710
+ TOS_VIOLATION = "tos_violation"
711
+ INAPPROPRIATE_CONTENT = "inappropriate_content"
712
+ FAKE_TRAFFIC = "fake_traffic"
713
+ FRAUD = "fraud"
714
+ SPAM = "spam"
715
+ BRAND_ABUSE = "brand_abuse"
716
+
717
+
707
718
  class CreatePartnerResponseBodyTypedDict(TypedDict):
708
719
  r"""The created partner"""
709
720
 
@@ -717,50 +728,68 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
717
728
  r"""The partner's avatar image."""
718
729
  country: Nullable[str]
719
730
  r"""The partner's country (required for tax purposes)."""
720
- website: Nullable[str]
721
- r"""The partner's website URL (including the https protocol)."""
722
- youtube: Nullable[str]
723
- r"""The partner's YouTube channel username (e.g. `johndoe`)."""
724
- twitter: Nullable[str]
725
- r"""The partner's Twitter username (e.g. `johndoe`)."""
726
- linkedin: Nullable[str]
727
- r"""The partner's LinkedIn username (e.g. `johndoe`)."""
728
- instagram: Nullable[str]
729
- r"""The partner's Instagram username (e.g. `johndoe`)."""
730
- tiktok: Nullable[str]
731
- r"""The partner's TikTok username (e.g. `johndoe`)."""
732
731
  paypal_email: Nullable[str]
733
732
  r"""The partner's PayPal email (for receiving payouts via PayPal)."""
734
733
  stripe_connect_id: Nullable[str]
735
734
  r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
736
735
  payouts_enabled_at: Nullable[str]
737
736
  r"""The date when the partner enabled payouts."""
737
+ partner_id: str
738
+ r"""The partner's unique ID on Dub."""
739
+ tenant_id: Nullable[str]
740
+ r"""The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future."""
741
+ program_id: str
742
+ r"""The program's unique ID on Dub."""
738
743
  created_at: str
739
- r"""The date when the partner was created on Dub."""
740
744
  status: CreatePartnerStatus
741
745
  r"""The status of the partner's enrollment in the program."""
742
- program_id: str
743
- r"""The program's unique ID on Dub."""
744
- tenant_id: Nullable[str]
745
- r"""The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future."""
746
746
  links: Nullable[List[CreatePartnerLinkTypedDict]]
747
747
  r"""The partner's referral links in this program."""
748
748
  description: NotRequired[Nullable[str]]
749
749
  r"""A brief description of the partner and their background."""
750
+ total_commissions: NotRequired[float]
751
+ r"""The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false."""
752
+ click_reward_id: NotRequired[Nullable[str]]
753
+ lead_reward_id: NotRequired[Nullable[str]]
754
+ sale_reward_id: NotRequired[Nullable[str]]
755
+ discount_id: NotRequired[Nullable[str]]
756
+ application_id: NotRequired[Nullable[str]]
757
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
758
+ banned_at: NotRequired[Nullable[str]]
759
+ r"""If the partner was banned from the program, this is the date of the ban."""
760
+ banned_reason: NotRequired[Nullable[BannedReason]]
761
+ r"""If the partner was banned from the program, this is the reason for the ban."""
750
762
  clicks: NotRequired[float]
751
- r"""The total number of clicks on the partner's links."""
763
+ r"""The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
752
764
  leads: NotRequired[float]
753
- r"""The total number of leads generated by the partner's links."""
765
+ r"""The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
754
766
  sales: NotRequired[float]
755
- r"""The total number of sales generated by the partner's links."""
767
+ r"""The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
756
768
  sale_amount: NotRequired[float]
757
- r"""The total amount of sales (in cents) generated by the partner's links."""
758
- total_commissions: NotRequired[float]
759
- r"""The total commissions paid to the partner for their referrals."""
769
+ r"""The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
760
770
  net_revenue: NotRequired[float]
761
- r"""The total net revenue generated by the partner."""
762
- earnings: NotRequired[float]
763
- r"""DEPRECATED: The total earnings/commissions accrued by the partner's links."""
771
+ r"""The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false."""
772
+ website: NotRequired[Nullable[str]]
773
+ r"""The partner's website URL (including the https protocol)."""
774
+ website_txt_record: NotRequired[Nullable[str]]
775
+ website_verified_at: NotRequired[Nullable[str]]
776
+ youtube: NotRequired[Nullable[str]]
777
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
778
+ youtube_verified_at: NotRequired[Nullable[str]]
779
+ youtube_subscriber_count: NotRequired[Nullable[float]]
780
+ youtube_view_count: NotRequired[Nullable[float]]
781
+ twitter: NotRequired[Nullable[str]]
782
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
783
+ twitter_verified_at: NotRequired[Nullable[str]]
784
+ linkedin: NotRequired[Nullable[str]]
785
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
786
+ linkedin_verified_at: NotRequired[Nullable[str]]
787
+ instagram: NotRequired[Nullable[str]]
788
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
789
+ instagram_verified_at: NotRequired[Nullable[str]]
790
+ tiktok: NotRequired[Nullable[str]]
791
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
792
+ tiktok_verified_at: NotRequired[Nullable[str]]
764
793
 
765
794
 
766
795
  class CreatePartnerResponseBody(BaseModel):
@@ -781,24 +810,6 @@ class CreatePartnerResponseBody(BaseModel):
781
810
  country: Nullable[str]
782
811
  r"""The partner's country (required for tax purposes)."""
783
812
 
784
- website: Nullable[str]
785
- r"""The partner's website URL (including the https protocol)."""
786
-
787
- youtube: Nullable[str]
788
- r"""The partner's YouTube channel username (e.g. `johndoe`)."""
789
-
790
- twitter: Nullable[str]
791
- r"""The partner's Twitter username (e.g. `johndoe`)."""
792
-
793
- linkedin: Nullable[str]
794
- r"""The partner's LinkedIn username (e.g. `johndoe`)."""
795
-
796
- instagram: Nullable[str]
797
- r"""The partner's Instagram username (e.g. `johndoe`)."""
798
-
799
- tiktok: Nullable[str]
800
- r"""The partner's TikTok username (e.g. `johndoe`)."""
801
-
802
813
  paypal_email: Annotated[Nullable[str], pydantic.Field(alias="paypalEmail")]
803
814
  r"""The partner's PayPal email (for receiving payouts via PayPal)."""
804
815
 
@@ -810,17 +821,19 @@ class CreatePartnerResponseBody(BaseModel):
810
821
  ]
811
822
  r"""The date when the partner enabled payouts."""
812
823
 
813
- created_at: Annotated[str, pydantic.Field(alias="createdAt")]
814
- r"""The date when the partner was created on Dub."""
824
+ partner_id: Annotated[str, pydantic.Field(alias="partnerId")]
825
+ r"""The partner's unique ID on Dub."""
815
826
 
816
- status: CreatePartnerStatus
817
- r"""The status of the partner's enrollment in the program."""
827
+ tenant_id: Annotated[Nullable[str], pydantic.Field(alias="tenantId")]
828
+ r"""The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future."""
818
829
 
819
830
  program_id: Annotated[str, pydantic.Field(alias="programId")]
820
831
  r"""The program's unique ID on Dub."""
821
832
 
822
- tenant_id: Annotated[Nullable[str], pydantic.Field(alias="tenantId")]
823
- r"""The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future."""
833
+ created_at: Annotated[str, pydantic.Field(alias="createdAt")]
834
+
835
+ status: CreatePartnerStatus
836
+ r"""The status of the partner's enrollment in the program."""
824
837
 
825
838
  links: Nullable[List[CreatePartnerLink]]
826
839
  r"""The partner's referral links in this program."""
@@ -828,62 +841,176 @@ class CreatePartnerResponseBody(BaseModel):
828
841
  description: OptionalNullable[str] = UNSET
829
842
  r"""A brief description of the partner and their background."""
830
843
 
844
+ total_commissions: Annotated[
845
+ Optional[float], pydantic.Field(alias="totalCommissions")
846
+ ] = 0
847
+ r"""The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false."""
848
+
849
+ click_reward_id: Annotated[
850
+ OptionalNullable[str], pydantic.Field(alias="clickRewardId")
851
+ ] = UNSET
852
+
853
+ lead_reward_id: Annotated[
854
+ OptionalNullable[str], pydantic.Field(alias="leadRewardId")
855
+ ] = UNSET
856
+
857
+ sale_reward_id: Annotated[
858
+ OptionalNullable[str], pydantic.Field(alias="saleRewardId")
859
+ ] = UNSET
860
+
861
+ discount_id: Annotated[
862
+ OptionalNullable[str], pydantic.Field(alias="discountId")
863
+ ] = UNSET
864
+
865
+ application_id: Annotated[
866
+ OptionalNullable[str], pydantic.Field(alias="applicationId")
867
+ ] = UNSET
868
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
869
+
870
+ banned_at: Annotated[OptionalNullable[str], pydantic.Field(alias="bannedAt")] = (
871
+ UNSET
872
+ )
873
+ r"""If the partner was banned from the program, this is the date of the ban."""
874
+
875
+ banned_reason: Annotated[
876
+ OptionalNullable[BannedReason], pydantic.Field(alias="bannedReason")
877
+ ] = UNSET
878
+ r"""If the partner was banned from the program, this is the reason for the ban."""
879
+
831
880
  clicks: Optional[float] = 0
832
- r"""The total number of clicks on the partner's links."""
881
+ r"""The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
833
882
 
834
883
  leads: Optional[float] = 0
835
- r"""The total number of leads generated by the partner's links."""
884
+ r"""The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
836
885
 
837
886
  sales: Optional[float] = 0
838
- r"""The total number of sales generated by the partner's links."""
887
+ r"""The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
839
888
 
840
889
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
841
- r"""The total amount of sales (in cents) generated by the partner's links."""
842
-
843
- total_commissions: Annotated[
844
- Optional[float], pydantic.Field(alias="totalCommissions")
845
- ] = 0
846
- r"""The total commissions paid to the partner for their referrals."""
890
+ r"""The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false."""
847
891
 
848
892
  net_revenue: Annotated[Optional[float], pydantic.Field(alias="netRevenue")] = 0
849
- r"""The total net revenue generated by the partner."""
893
+ r"""The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false."""
850
894
 
851
- earnings: Annotated[
852
- Optional[float],
853
- pydantic.Field(
854
- deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
855
- ),
856
- ] = 0
857
- r"""DEPRECATED: The total earnings/commissions accrued by the partner's links."""
895
+ website: OptionalNullable[str] = UNSET
896
+ r"""The partner's website URL (including the https protocol)."""
897
+
898
+ website_txt_record: Annotated[
899
+ OptionalNullable[str], pydantic.Field(alias="websiteTxtRecord")
900
+ ] = UNSET
901
+
902
+ website_verified_at: Annotated[
903
+ OptionalNullable[str], pydantic.Field(alias="websiteVerifiedAt")
904
+ ] = UNSET
905
+
906
+ youtube: OptionalNullable[str] = UNSET
907
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
908
+
909
+ youtube_verified_at: Annotated[
910
+ OptionalNullable[str], pydantic.Field(alias="youtubeVerifiedAt")
911
+ ] = UNSET
912
+
913
+ youtube_subscriber_count: Annotated[
914
+ OptionalNullable[float], pydantic.Field(alias="youtubeSubscriberCount")
915
+ ] = UNSET
916
+
917
+ youtube_view_count: Annotated[
918
+ OptionalNullable[float], pydantic.Field(alias="youtubeViewCount")
919
+ ] = UNSET
920
+
921
+ twitter: OptionalNullable[str] = UNSET
922
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
923
+
924
+ twitter_verified_at: Annotated[
925
+ OptionalNullable[str], pydantic.Field(alias="twitterVerifiedAt")
926
+ ] = UNSET
927
+
928
+ linkedin: OptionalNullable[str] = UNSET
929
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
930
+
931
+ linkedin_verified_at: Annotated[
932
+ OptionalNullable[str], pydantic.Field(alias="linkedinVerifiedAt")
933
+ ] = UNSET
934
+
935
+ instagram: OptionalNullable[str] = UNSET
936
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
937
+
938
+ instagram_verified_at: Annotated[
939
+ OptionalNullable[str], pydantic.Field(alias="instagramVerifiedAt")
940
+ ] = UNSET
941
+
942
+ tiktok: OptionalNullable[str] = UNSET
943
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
944
+
945
+ tiktok_verified_at: Annotated[
946
+ OptionalNullable[str], pydantic.Field(alias="tiktokVerifiedAt")
947
+ ] = UNSET
858
948
 
859
949
  @model_serializer(mode="wrap")
860
950
  def serialize_model(self, handler):
861
951
  optional_fields = [
862
952
  "description",
953
+ "totalCommissions",
954
+ "clickRewardId",
955
+ "leadRewardId",
956
+ "saleRewardId",
957
+ "discountId",
958
+ "applicationId",
959
+ "bannedAt",
960
+ "bannedReason",
863
961
  "clicks",
864
962
  "leads",
865
963
  "sales",
866
964
  "saleAmount",
867
- "totalCommissions",
868
965
  "netRevenue",
869
- "earnings",
966
+ "website",
967
+ "websiteTxtRecord",
968
+ "websiteVerifiedAt",
969
+ "youtube",
970
+ "youtubeVerifiedAt",
971
+ "youtubeSubscriberCount",
972
+ "youtubeViewCount",
973
+ "twitter",
974
+ "twitterVerifiedAt",
975
+ "linkedin",
976
+ "linkedinVerifiedAt",
977
+ "instagram",
978
+ "instagramVerifiedAt",
979
+ "tiktok",
980
+ "tiktokVerifiedAt",
870
981
  ]
871
982
  nullable_fields = [
872
983
  "email",
873
984
  "image",
874
985
  "description",
875
986
  "country",
987
+ "paypalEmail",
988
+ "stripeConnectId",
989
+ "payoutsEnabledAt",
990
+ "tenantId",
991
+ "links",
992
+ "clickRewardId",
993
+ "leadRewardId",
994
+ "saleRewardId",
995
+ "discountId",
996
+ "applicationId",
997
+ "bannedAt",
998
+ "bannedReason",
876
999
  "website",
1000
+ "websiteTxtRecord",
1001
+ "websiteVerifiedAt",
877
1002
  "youtube",
1003
+ "youtubeVerifiedAt",
1004
+ "youtubeSubscriberCount",
1005
+ "youtubeViewCount",
878
1006
  "twitter",
1007
+ "twitterVerifiedAt",
879
1008
  "linkedin",
1009
+ "linkedinVerifiedAt",
880
1010
  "instagram",
1011
+ "instagramVerifiedAt",
881
1012
  "tiktok",
882
- "paypalEmail",
883
- "stripeConnectId",
884
- "payoutsEnabledAt",
885
- "tenantId",
886
- "links",
1013
+ "tiktokVerifiedAt",
887
1014
  ]
888
1015
  null_default_fields = []
889
1016
 
@@ -188,6 +188,155 @@ class ListCommissionsStatus(str, Enum):
188
188
  CANCELED = "canceled"
189
189
 
190
190
 
191
+ class ListCommissionsPartnerTypedDict(TypedDict):
192
+ id: str
193
+ r"""The partner's unique ID on Dub."""
194
+ name: str
195
+ r"""The partner's full legal name."""
196
+ email: Nullable[str]
197
+ r"""The partner's email address. Should be a unique value across Dub."""
198
+ image: Nullable[str]
199
+ r"""The partner's avatar image."""
200
+ payouts_enabled_at: Nullable[str]
201
+ r"""The date when the partner enabled payouts."""
202
+ country: Nullable[str]
203
+ r"""The partner's country (required for tax purposes)."""
204
+
205
+
206
+ class ListCommissionsPartner(BaseModel):
207
+ id: str
208
+ r"""The partner's unique ID on Dub."""
209
+
210
+ name: str
211
+ r"""The partner's full legal name."""
212
+
213
+ email: Nullable[str]
214
+ r"""The partner's email address. Should be a unique value across Dub."""
215
+
216
+ image: Nullable[str]
217
+ r"""The partner's avatar image."""
218
+
219
+ payouts_enabled_at: Annotated[
220
+ Nullable[str], pydantic.Field(alias="payoutsEnabledAt")
221
+ ]
222
+ r"""The date when the partner enabled payouts."""
223
+
224
+ country: Nullable[str]
225
+ r"""The partner's country (required for tax purposes)."""
226
+
227
+ @model_serializer(mode="wrap")
228
+ def serialize_model(self, handler):
229
+ optional_fields = []
230
+ nullable_fields = ["email", "image", "payoutsEnabledAt", "country"]
231
+ null_default_fields = []
232
+
233
+ serialized = handler(self)
234
+
235
+ m = {}
236
+
237
+ for n, f in type(self).model_fields.items():
238
+ k = f.alias or n
239
+ val = serialized.get(k)
240
+ serialized.pop(k, None)
241
+
242
+ optional_nullable = k in optional_fields and k in nullable_fields
243
+ is_set = (
244
+ self.__pydantic_fields_set__.intersection({n})
245
+ or k in null_default_fields
246
+ ) # pylint: disable=no-member
247
+
248
+ if val is not None and val != UNSET_SENTINEL:
249
+ m[k] = val
250
+ elif val != UNSET_SENTINEL and (
251
+ not k in optional_fields or (optional_nullable and is_set)
252
+ ):
253
+ m[k] = val
254
+
255
+ return m
256
+
257
+
258
+ class ListCommissionsCustomerTypedDict(TypedDict):
259
+ id: str
260
+ r"""The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."""
261
+ external_id: str
262
+ r"""Unique identifier for the customer in the client's app."""
263
+ name: str
264
+ r"""Name of the customer."""
265
+ created_at: str
266
+ r"""The date the customer was created."""
267
+ email: NotRequired[Nullable[str]]
268
+ r"""Email of the customer."""
269
+ avatar: NotRequired[Nullable[str]]
270
+ r"""Avatar URL of the customer."""
271
+ country: NotRequired[Nullable[str]]
272
+ r"""Country of the customer."""
273
+ sales: NotRequired[Nullable[float]]
274
+ r"""Total number of sales for the customer."""
275
+ sale_amount: NotRequired[Nullable[float]]
276
+ r"""Total amount of sales for the customer."""
277
+
278
+
279
+ class ListCommissionsCustomer(BaseModel):
280
+ id: str
281
+ r"""The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."""
282
+
283
+ external_id: Annotated[str, pydantic.Field(alias="externalId")]
284
+ r"""Unique identifier for the customer in the client's app."""
285
+
286
+ name: str
287
+ r"""Name of the customer."""
288
+
289
+ created_at: Annotated[str, pydantic.Field(alias="createdAt")]
290
+ r"""The date the customer was created."""
291
+
292
+ email: OptionalNullable[str] = UNSET
293
+ r"""Email of the customer."""
294
+
295
+ avatar: OptionalNullable[str] = UNSET
296
+ r"""Avatar URL of the customer."""
297
+
298
+ country: OptionalNullable[str] = UNSET
299
+ r"""Country of the customer."""
300
+
301
+ sales: OptionalNullable[float] = UNSET
302
+ r"""Total number of sales for the customer."""
303
+
304
+ sale_amount: Annotated[
305
+ OptionalNullable[float], pydantic.Field(alias="saleAmount")
306
+ ] = UNSET
307
+ r"""Total amount of sales for the customer."""
308
+
309
+ @model_serializer(mode="wrap")
310
+ def serialize_model(self, handler):
311
+ optional_fields = ["email", "avatar", "country", "sales", "saleAmount"]
312
+ nullable_fields = ["email", "avatar", "country", "sales", "saleAmount"]
313
+ null_default_fields = []
314
+
315
+ serialized = handler(self)
316
+
317
+ m = {}
318
+
319
+ for n, f in type(self).model_fields.items():
320
+ k = f.alias or n
321
+ val = serialized.get(k)
322
+ serialized.pop(k, None)
323
+
324
+ optional_nullable = k in optional_fields and k in nullable_fields
325
+ is_set = (
326
+ self.__pydantic_fields_set__.intersection({n})
327
+ or k in null_default_fields
328
+ ) # pylint: disable=no-member
329
+
330
+ if val is not None and val != UNSET_SENTINEL:
331
+ m[k] = val
332
+ elif val != UNSET_SENTINEL and (
333
+ not k in optional_fields or (optional_nullable and is_set)
334
+ ):
335
+ m[k] = val
336
+
337
+ return m
338
+
339
+
191
340
  class ListCommissionsResponseBodyTypedDict(TypedDict):
192
341
  id: str
193
342
  r"""The commission's unique ID on Dub."""
@@ -195,11 +344,16 @@ class ListCommissionsResponseBodyTypedDict(TypedDict):
195
344
  earnings: float
196
345
  currency: str
197
346
  status: ListCommissionsStatus
347
+ invoice_id: Nullable[str]
348
+ description: Nullable[str]
349
+ quantity: float
198
350
  created_at: str
199
351
  updated_at: str
352
+ partner: ListCommissionsPartnerTypedDict
200
353
  type: NotRequired[ListCommissionsType]
201
- invoice_id: NotRequired[Nullable[str]]
202
- description: NotRequired[Nullable[str]]
354
+ user_id: NotRequired[Nullable[str]]
355
+ r"""The user who created the manual commission."""
356
+ customer: NotRequired[Nullable[ListCommissionsCustomerTypedDict]]
203
357
 
204
358
 
205
359
  class ListCommissionsResponseBody(BaseModel):
@@ -214,22 +368,29 @@ class ListCommissionsResponseBody(BaseModel):
214
368
 
215
369
  status: ListCommissionsStatus
216
370
 
371
+ invoice_id: Annotated[Nullable[str], pydantic.Field(alias="invoiceId")]
372
+
373
+ description: Nullable[str]
374
+
375
+ quantity: float
376
+
217
377
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
218
378
 
219
379
  updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
220
380
 
381
+ partner: ListCommissionsPartner
382
+
221
383
  type: Optional[ListCommissionsType] = None
222
384
 
223
- invoice_id: Annotated[OptionalNullable[str], pydantic.Field(alias="invoiceId")] = (
224
- UNSET
225
- )
385
+ user_id: Annotated[OptionalNullable[str], pydantic.Field(alias="userId")] = UNSET
386
+ r"""The user who created the manual commission."""
226
387
 
227
- description: OptionalNullable[str] = UNSET
388
+ customer: OptionalNullable[ListCommissionsCustomer] = UNSET
228
389
 
229
390
  @model_serializer(mode="wrap")
230
391
  def serialize_model(self, handler):
231
- optional_fields = ["type", "invoiceId", "description"]
232
- nullable_fields = ["invoiceId", "description"]
392
+ optional_fields = ["type", "userId", "customer"]
393
+ nullable_fields = ["invoiceId", "description", "userId", "customer"]
233
394
  null_default_fields = []
234
395
 
235
396
  serialized = handler(self)
@@ -50,6 +50,8 @@ class QueryParamTrigger(str, Enum):
50
50
 
51
51
  QR = "qr"
52
52
  LINK = "link"
53
+ PAGEVIEW = "pageview"
54
+ DEEPLINK = "deeplink"
53
55
 
54
56
 
55
57
  ListEventsQueryParamTagIdsTypedDict = TypeAliasType(
@@ -64,6 +66,13 @@ ListEventsQueryParamTagIds = TypeAliasType(
64
66
  r"""The tag IDs to retrieve analytics for."""
65
67
 
66
68
 
69
+ class QueryParamSaleType(str, Enum):
70
+ r"""Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both."""
71
+
72
+ NEW = "new"
73
+ RECURRING = "recurring"
74
+
75
+
67
76
  class QueryParamSortOrder(str, Enum):
68
77
  r"""The sort order. The default is `desc`."""
69
78
 
@@ -146,6 +155,8 @@ class ListEventsRequestTypedDict(TypedDict):
146
155
  r"""Deprecated. Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."""
147
156
  root: NotRequired[bool]
148
157
  r"""Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."""
158
+ sale_type: NotRequired[QueryParamSaleType]
159
+ r"""Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both."""
149
160
  utm_source: NotRequired[Nullable[str]]
150
161
  r"""The UTM source of the short link."""
151
162
  utm_medium: NotRequired[Nullable[str]]
@@ -351,6 +362,13 @@ class ListEventsRequest(BaseModel):
351
362
  ] = None
352
363
  r"""Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."""
353
364
 
365
+ sale_type: Annotated[
366
+ Optional[QueryParamSaleType],
367
+ pydantic.Field(alias="saleType"),
368
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
369
+ ] = None
370
+ r"""Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both."""
371
+
354
372
  utm_source: Annotated[
355
373
  OptionalNullable[str],
356
374
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -443,6 +461,7 @@ class ListEventsRequest(BaseModel):
443
461
  "folderId",
444
462
  "qr",
445
463
  "root",
464
+ "saleType",
446
465
  "utm_source",
447
466
  "utm_medium",
448
467
  "utm_campaign",