dub 0.23.1__py3-none-any.whl → 0.24.1__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.
@@ -14,6 +14,8 @@ class PartnerEnrolledEventEvent(str, Enum):
14
14
 
15
15
 
16
16
  class Status(str, Enum):
17
+ r"""The status of the partner's enrollment in the program."""
18
+
17
19
  PENDING = "pending"
18
20
  APPROVED = "approved"
19
21
  REJECTED = "rejected"
@@ -74,71 +76,141 @@ class PartnerEnrolledEventLink(BaseModel):
74
76
 
75
77
  class PartnerEnrolledEventDataTypedDict(TypedDict):
76
78
  id: str
79
+ r"""The partner's unique ID on Dub."""
77
80
  name: str
81
+ r"""The partner's full legal name."""
78
82
  email: Nullable[str]
83
+ r"""The partner's email address. Should be a unique value across Dub."""
79
84
  image: Nullable[str]
85
+ r"""The partner's avatar image."""
80
86
  country: Nullable[str]
87
+ r"""The partner's country (required for tax purposes)."""
88
+ website: Nullable[str]
89
+ r"""The partner's website URL (including the https protocol)."""
90
+ youtube: Nullable[str]
91
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
92
+ twitter: Nullable[str]
93
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
94
+ linkedin: Nullable[str]
95
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
96
+ instagram: Nullable[str]
97
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
98
+ tiktok: Nullable[str]
99
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
81
100
  paypal_email: Nullable[str]
101
+ r"""The partner's PayPal email (for receiving payouts via PayPal)."""
82
102
  stripe_connect_id: Nullable[str]
103
+ r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
83
104
  payouts_enabled_at: Nullable[str]
105
+ r"""The date when the partner enabled payouts."""
84
106
  created_at: str
107
+ r"""The date when the partner was created on Dub."""
85
108
  status: Status
109
+ r"""The status of the partner's enrollment in the program."""
86
110
  program_id: str
111
+ r"""The program's unique ID on Dub."""
87
112
  tenant_id: Nullable[str]
113
+ 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."""
88
114
  links: Nullable[List[PartnerEnrolledEventLinkTypedDict]]
115
+ r"""The partner's referral links in this program."""
89
116
  description: NotRequired[Nullable[str]]
117
+ r"""A brief description of the partner and their background."""
90
118
  clicks: NotRequired[float]
119
+ r"""The total number of clicks on the partner's links."""
91
120
  leads: NotRequired[float]
121
+ r"""The total number of leads generated by the partner's links."""
92
122
  sales: NotRequired[float]
123
+ r"""The total number of sales generated by the partner's links."""
93
124
  sale_amount: NotRequired[float]
125
+ r"""The total amount of sales (in cents) generated by the partner's links."""
94
126
  earnings: NotRequired[float]
127
+ r"""The total earnings/commissions accrued by the partner's links."""
95
128
  application_id: NotRequired[Nullable[str]]
129
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
96
130
 
97
131
 
98
132
  class PartnerEnrolledEventData(BaseModel):
99
133
  id: str
134
+ r"""The partner's unique ID on Dub."""
100
135
 
101
136
  name: str
137
+ r"""The partner's full legal name."""
102
138
 
103
139
  email: Nullable[str]
140
+ r"""The partner's email address. Should be a unique value across Dub."""
104
141
 
105
142
  image: Nullable[str]
143
+ r"""The partner's avatar image."""
106
144
 
107
145
  country: Nullable[str]
146
+ r"""The partner's country (required for tax purposes)."""
147
+
148
+ website: Nullable[str]
149
+ r"""The partner's website URL (including the https protocol)."""
150
+
151
+ youtube: Nullable[str]
152
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
153
+
154
+ twitter: Nullable[str]
155
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
156
+
157
+ linkedin: Nullable[str]
158
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
159
+
160
+ instagram: Nullable[str]
161
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
162
+
163
+ tiktok: Nullable[str]
164
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
108
165
 
109
166
  paypal_email: Annotated[Nullable[str], pydantic.Field(alias="paypalEmail")]
167
+ r"""The partner's PayPal email (for receiving payouts via PayPal)."""
110
168
 
111
169
  stripe_connect_id: Annotated[Nullable[str], pydantic.Field(alias="stripeConnectId")]
170
+ r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
112
171
 
113
172
  payouts_enabled_at: Annotated[
114
173
  Nullable[str], pydantic.Field(alias="payoutsEnabledAt")
115
174
  ]
175
+ r"""The date when the partner enabled payouts."""
116
176
 
117
177
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
178
+ r"""The date when the partner was created on Dub."""
118
179
 
119
180
  status: Status
181
+ r"""The status of the partner's enrollment in the program."""
120
182
 
121
183
  program_id: Annotated[str, pydantic.Field(alias="programId")]
184
+ r"""The program's unique ID on Dub."""
122
185
 
123
186
  tenant_id: Annotated[Nullable[str], pydantic.Field(alias="tenantId")]
187
+ 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."""
124
188
 
125
189
  links: Nullable[List[PartnerEnrolledEventLink]]
190
+ r"""The partner's referral links in this program."""
126
191
 
127
192
  description: OptionalNullable[str] = UNSET
193
+ r"""A brief description of the partner and their background."""
128
194
 
129
195
  clicks: Optional[float] = 0
196
+ r"""The total number of clicks on the partner's links."""
130
197
 
131
198
  leads: Optional[float] = 0
199
+ r"""The total number of leads generated by the partner's links."""
132
200
 
133
201
  sales: Optional[float] = 0
202
+ r"""The total number of sales generated by the partner's links."""
134
203
 
135
204
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
205
+ r"""The total amount of sales (in cents) generated by the partner's links."""
136
206
 
137
207
  earnings: Optional[float] = 0
208
+ r"""The total earnings/commissions accrued by the partner's links."""
138
209
 
139
210
  application_id: Annotated[
140
211
  OptionalNullable[str], pydantic.Field(alias="applicationId")
141
212
  ] = UNSET
213
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
142
214
 
143
215
  @model_serializer(mode="wrap")
144
216
  def serialize_model(self, handler):
@@ -156,6 +228,12 @@ class PartnerEnrolledEventData(BaseModel):
156
228
  "image",
157
229
  "description",
158
230
  "country",
231
+ "website",
232
+ "youtube",
233
+ "twitter",
234
+ "linkedin",
235
+ "instagram",
236
+ "tiktok",
159
237
  "paypalEmail",
160
238
  "stripeConnectId",
161
239
  "payoutsEnabledAt",
@@ -67,6 +67,7 @@ from .createpartner import (
67
67
  CreatePartnerRequestBodyTypedDict,
68
68
  CreatePartnerResponseBody,
69
69
  CreatePartnerResponseBodyTypedDict,
70
+ CreatePartnerStatus,
70
71
  CreatePartnerTagIds,
71
72
  CreatePartnerTagIdsTypedDict,
72
73
  CreatePartnerTagNames,
@@ -75,7 +76,6 @@ from .createpartner import (
75
76
  CreatePartnerTestVariantsTypedDict,
76
77
  LinkProps,
77
78
  LinkPropsTypedDict,
78
- Status,
79
79
  )
80
80
  from .createpartnerlink import (
81
81
  CreatePartnerLinkLinkProps,
@@ -203,6 +203,19 @@ from .gettags import (
203
203
  IdsTypedDict,
204
204
  )
205
205
  from .getworkspace import GetWorkspaceRequest, GetWorkspaceRequestTypedDict
206
+ from .listcommissions import (
207
+ ListCommissionsQueryParamInterval,
208
+ ListCommissionsQueryParamSortBy,
209
+ ListCommissionsQueryParamSortOrder,
210
+ ListCommissionsRequest,
211
+ ListCommissionsRequestTypedDict,
212
+ ListCommissionsResponseBody,
213
+ ListCommissionsResponseBodyTypedDict,
214
+ ListCommissionsStatus,
215
+ ListCommissionsType,
216
+ QueryParamStatus,
217
+ Type,
218
+ )
206
219
  from .listdomains import (
207
220
  ListDomainsRequest,
208
221
  ListDomainsRequestTypedDict,
@@ -272,6 +285,17 @@ from .tracksale import (
272
285
  TrackSaleResponseBody,
273
286
  TrackSaleResponseBodyTypedDict,
274
287
  )
288
+ from .updatecommission import (
289
+ Status,
290
+ UpdateCommissionRequest,
291
+ UpdateCommissionRequestBody,
292
+ UpdateCommissionRequestBodyTypedDict,
293
+ UpdateCommissionRequestTypedDict,
294
+ UpdateCommissionResponseBody,
295
+ UpdateCommissionResponseBodyTypedDict,
296
+ UpdateCommissionStatus,
297
+ UpdateCommissionType,
298
+ )
275
299
  from .updatecustomer import (
276
300
  UpdateCustomerDiscount,
277
301
  UpdateCustomerDiscountTypedDict,
@@ -312,14 +336,6 @@ from .updatelink import (
312
336
  UpdateLinkTestVariants,
313
337
  UpdateLinkTestVariantsTypedDict,
314
338
  )
315
- from .updatepartnersale import (
316
- Type,
317
- UpdatePartnerSaleRequestBody,
318
- UpdatePartnerSaleRequestBodyTypedDict,
319
- UpdatePartnerSaleResponseBody,
320
- UpdatePartnerSaleResponseBodyTypedDict,
321
- UpdatePartnerSaleStatus,
322
- )
323
339
  from .updatetag import (
324
340
  UpdateTagColor,
325
341
  UpdateTagRequest,
@@ -414,6 +430,7 @@ __all__ = [
414
430
  "CreatePartnerRequestBodyTypedDict",
415
431
  "CreatePartnerResponseBody",
416
432
  "CreatePartnerResponseBodyTypedDict",
433
+ "CreatePartnerStatus",
417
434
  "CreatePartnerTagIds",
418
435
  "CreatePartnerTagIdsTypedDict",
419
436
  "CreatePartnerTagNames",
@@ -515,6 +532,15 @@ __all__ = [
515
532
  "LinkProps",
516
533
  "LinkPropsTypedDict",
517
534
  "LinkTypedDict",
535
+ "ListCommissionsQueryParamInterval",
536
+ "ListCommissionsQueryParamSortBy",
537
+ "ListCommissionsQueryParamSortOrder",
538
+ "ListCommissionsRequest",
539
+ "ListCommissionsRequestTypedDict",
540
+ "ListCommissionsResponseBody",
541
+ "ListCommissionsResponseBodyTypedDict",
542
+ "ListCommissionsStatus",
543
+ "ListCommissionsType",
518
544
  "ListDomainsRequest",
519
545
  "ListDomainsRequestTypedDict",
520
546
  "ListDomainsResponse",
@@ -538,6 +564,7 @@ __all__ = [
538
564
  "QueryParamInterval",
539
565
  "QueryParamSortBy",
540
566
  "QueryParamSortOrder",
567
+ "QueryParamStatus",
541
568
  "QueryParamTagIds",
542
569
  "QueryParamTagIdsTypedDict",
543
570
  "QueryParamTagNames",
@@ -587,6 +614,14 @@ __all__ = [
587
614
  "Trigger",
588
615
  "Two",
589
616
  "Type",
617
+ "UpdateCommissionRequest",
618
+ "UpdateCommissionRequestBody",
619
+ "UpdateCommissionRequestBodyTypedDict",
620
+ "UpdateCommissionRequestTypedDict",
621
+ "UpdateCommissionResponseBody",
622
+ "UpdateCommissionResponseBodyTypedDict",
623
+ "UpdateCommissionStatus",
624
+ "UpdateCommissionType",
590
625
  "UpdateCustomerDiscount",
591
626
  "UpdateCustomerDiscountTypedDict",
592
627
  "UpdateCustomerLink",
@@ -619,11 +654,6 @@ __all__ = [
619
654
  "UpdateLinkTagNamesTypedDict",
620
655
  "UpdateLinkTestVariants",
621
656
  "UpdateLinkTestVariantsTypedDict",
622
- "UpdatePartnerSaleRequestBody",
623
- "UpdatePartnerSaleRequestBodyTypedDict",
624
- "UpdatePartnerSaleResponseBody",
625
- "UpdatePartnerSaleResponseBodyTypedDict",
626
- "UpdatePartnerSaleStatus",
627
657
  "UpdateTagColor",
628
658
  "UpdateTagRequest",
629
659
  "UpdateTagRequestBody",
@@ -130,19 +130,27 @@ class CreateCustomerLink(BaseModel):
130
130
 
131
131
  class CreateCustomerPartnerTypedDict(TypedDict):
132
132
  id: str
133
+ r"""The partner's unique ID on Dub."""
133
134
  name: str
135
+ r"""The partner's full legal name."""
134
136
  email: Nullable[str]
137
+ r"""The partner's email address. Should be a unique value across Dub."""
135
138
  image: Nullable[str]
139
+ r"""The partner's avatar image."""
136
140
 
137
141
 
138
142
  class CreateCustomerPartner(BaseModel):
139
143
  id: str
144
+ r"""The partner's unique ID on Dub."""
140
145
 
141
146
  name: str
147
+ r"""The partner's full legal name."""
142
148
 
143
149
  email: Nullable[str]
150
+ r"""The partner's email address. Should be a unique value across Dub."""
144
151
 
145
152
  image: Nullable[str]
153
+ r"""The partner's avatar image."""
146
154
 
147
155
  @model_serializer(mode="wrap")
148
156
  def serialize_model(self, handler):
@@ -640,7 +640,9 @@ class CreatePartnerRequestBody(BaseModel):
640
640
  return m
641
641
 
642
642
 
643
- class Status(str, Enum):
643
+ class CreatePartnerStatus(str, Enum):
644
+ r"""The status of the partner's enrollment in the program."""
645
+
644
646
  PENDING = "pending"
645
647
  APPROVED = "approved"
646
648
  REJECTED = "rejected"
@@ -703,73 +705,143 @@ class CreatePartnerResponseBodyTypedDict(TypedDict):
703
705
  r"""The created partner"""
704
706
 
705
707
  id: str
708
+ r"""The partner's unique ID on Dub."""
706
709
  name: str
710
+ r"""The partner's full legal name."""
707
711
  email: Nullable[str]
712
+ r"""The partner's email address. Should be a unique value across Dub."""
708
713
  image: Nullable[str]
714
+ r"""The partner's avatar image."""
709
715
  country: Nullable[str]
716
+ r"""The partner's country (required for tax purposes)."""
717
+ website: Nullable[str]
718
+ r"""The partner's website URL (including the https protocol)."""
719
+ youtube: Nullable[str]
720
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
721
+ twitter: Nullable[str]
722
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
723
+ linkedin: Nullable[str]
724
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
725
+ instagram: Nullable[str]
726
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
727
+ tiktok: Nullable[str]
728
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
710
729
  paypal_email: Nullable[str]
730
+ r"""The partner's PayPal email (for receiving payouts via PayPal)."""
711
731
  stripe_connect_id: Nullable[str]
732
+ r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
712
733
  payouts_enabled_at: Nullable[str]
734
+ r"""The date when the partner enabled payouts."""
713
735
  created_at: str
714
- status: Status
736
+ r"""The date when the partner was created on Dub."""
737
+ status: CreatePartnerStatus
738
+ r"""The status of the partner's enrollment in the program."""
715
739
  program_id: str
740
+ r"""The program's unique ID on Dub."""
716
741
  tenant_id: Nullable[str]
742
+ 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."""
717
743
  links: Nullable[List[CreatePartnerLinkTypedDict]]
744
+ r"""The partner's referral links in this program."""
718
745
  description: NotRequired[Nullable[str]]
746
+ r"""A brief description of the partner and their background."""
719
747
  clicks: NotRequired[float]
748
+ r"""The total number of clicks on the partner's links."""
720
749
  leads: NotRequired[float]
750
+ r"""The total number of leads generated by the partner's links."""
721
751
  sales: NotRequired[float]
752
+ r"""The total number of sales generated by the partner's links."""
722
753
  sale_amount: NotRequired[float]
754
+ r"""The total amount of sales (in cents) generated by the partner's links."""
723
755
  earnings: NotRequired[float]
756
+ r"""The total earnings/commissions accrued by the partner's links."""
724
757
  application_id: NotRequired[Nullable[str]]
758
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
725
759
 
726
760
 
727
761
  class CreatePartnerResponseBody(BaseModel):
728
762
  r"""The created partner"""
729
763
 
730
764
  id: str
765
+ r"""The partner's unique ID on Dub."""
731
766
 
732
767
  name: str
768
+ r"""The partner's full legal name."""
733
769
 
734
770
  email: Nullable[str]
771
+ r"""The partner's email address. Should be a unique value across Dub."""
735
772
 
736
773
  image: Nullable[str]
774
+ r"""The partner's avatar image."""
737
775
 
738
776
  country: Nullable[str]
777
+ r"""The partner's country (required for tax purposes)."""
778
+
779
+ website: Nullable[str]
780
+ r"""The partner's website URL (including the https protocol)."""
781
+
782
+ youtube: Nullable[str]
783
+ r"""The partner's YouTube channel username (e.g. `johndoe`)."""
784
+
785
+ twitter: Nullable[str]
786
+ r"""The partner's Twitter username (e.g. `johndoe`)."""
787
+
788
+ linkedin: Nullable[str]
789
+ r"""The partner's LinkedIn username (e.g. `johndoe`)."""
790
+
791
+ instagram: Nullable[str]
792
+ r"""The partner's Instagram username (e.g. `johndoe`)."""
793
+
794
+ tiktok: Nullable[str]
795
+ r"""The partner's TikTok username (e.g. `johndoe`)."""
739
796
 
740
797
  paypal_email: Annotated[Nullable[str], pydantic.Field(alias="paypalEmail")]
798
+ r"""The partner's PayPal email (for receiving payouts via PayPal)."""
741
799
 
742
800
  stripe_connect_id: Annotated[Nullable[str], pydantic.Field(alias="stripeConnectId")]
801
+ r"""The partner's Stripe Connect ID (for receiving payouts via Stripe)."""
743
802
 
744
803
  payouts_enabled_at: Annotated[
745
804
  Nullable[str], pydantic.Field(alias="payoutsEnabledAt")
746
805
  ]
806
+ r"""The date when the partner enabled payouts."""
747
807
 
748
808
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
809
+ r"""The date when the partner was created on Dub."""
749
810
 
750
- status: Status
811
+ status: CreatePartnerStatus
812
+ r"""The status of the partner's enrollment in the program."""
751
813
 
752
814
  program_id: Annotated[str, pydantic.Field(alias="programId")]
815
+ r"""The program's unique ID on Dub."""
753
816
 
754
817
  tenant_id: Annotated[Nullable[str], pydantic.Field(alias="tenantId")]
818
+ 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."""
755
819
 
756
820
  links: Nullable[List[CreatePartnerLink]]
821
+ r"""The partner's referral links in this program."""
757
822
 
758
823
  description: OptionalNullable[str] = UNSET
824
+ r"""A brief description of the partner and their background."""
759
825
 
760
826
  clicks: Optional[float] = 0
827
+ r"""The total number of clicks on the partner's links."""
761
828
 
762
829
  leads: Optional[float] = 0
830
+ r"""The total number of leads generated by the partner's links."""
763
831
 
764
832
  sales: Optional[float] = 0
833
+ r"""The total number of sales generated by the partner's links."""
765
834
 
766
835
  sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
836
+ r"""The total amount of sales (in cents) generated by the partner's links."""
767
837
 
768
838
  earnings: Optional[float] = 0
839
+ r"""The total earnings/commissions accrued by the partner's links."""
769
840
 
770
841
  application_id: Annotated[
771
842
  OptionalNullable[str], pydantic.Field(alias="applicationId")
772
843
  ] = UNSET
844
+ r"""If the partner submitted an application to join the program, this is the ID of the application."""
773
845
 
774
846
  @model_serializer(mode="wrap")
775
847
  def serialize_model(self, handler):
@@ -787,6 +859,12 @@ class CreatePartnerResponseBody(BaseModel):
787
859
  "image",
788
860
  "description",
789
861
  "country",
862
+ "website",
863
+ "youtube",
864
+ "twitter",
865
+ "linkedin",
866
+ "instagram",
867
+ "tiktok",
790
868
  "paypalEmail",
791
869
  "stripeConnectId",
792
870
  "payoutsEnabledAt",
@@ -98,19 +98,27 @@ class GetCustomerLink(BaseModel):
98
98
 
99
99
  class GetCustomerPartnerTypedDict(TypedDict):
100
100
  id: str
101
+ r"""The partner's unique ID on Dub."""
101
102
  name: str
103
+ r"""The partner's full legal name."""
102
104
  email: Nullable[str]
105
+ r"""The partner's email address. Should be a unique value across Dub."""
103
106
  image: Nullable[str]
107
+ r"""The partner's avatar image."""
104
108
 
105
109
 
106
110
  class GetCustomerPartner(BaseModel):
107
111
  id: str
112
+ r"""The partner's unique ID on Dub."""
108
113
 
109
114
  name: str
115
+ r"""The partner's full legal name."""
110
116
 
111
117
  email: Nullable[str]
118
+ r"""The partner's email address. Should be a unique value across Dub."""
112
119
 
113
120
  image: Nullable[str]
121
+ r"""The partner's avatar image."""
114
122
 
115
123
  @model_serializer(mode="wrap")
116
124
  def serialize_model(self, handler):
@@ -182,19 +182,27 @@ class GetCustomersLink(BaseModel):
182
182
 
183
183
  class GetCustomersPartnerTypedDict(TypedDict):
184
184
  id: str
185
+ r"""The partner's unique ID on Dub."""
185
186
  name: str
187
+ r"""The partner's full legal name."""
186
188
  email: Nullable[str]
189
+ r"""The partner's email address. Should be a unique value across Dub."""
187
190
  image: Nullable[str]
191
+ r"""The partner's avatar image."""
188
192
 
189
193
 
190
194
  class GetCustomersPartner(BaseModel):
191
195
  id: str
196
+ r"""The partner's unique ID on Dub."""
192
197
 
193
198
  name: str
199
+ r"""The partner's full legal name."""
194
200
 
195
201
  email: Nullable[str]
202
+ r"""The partner's email address. Should be a unique value across Dub."""
196
203
 
197
204
  image: Nullable[str]
205
+ r"""The partner's avatar image."""
198
206
 
199
207
  @model_serializer(mode="wrap")
200
208
  def serialize_model(self, handler):