dub 0.34.1__py3-none-any.whl → 0.35.0__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.
Files changed (93) hide show
  1. dub/_version.py +3 -3
  2. dub/basesdk.py +20 -6
  3. dub/models/components/__init__.py +108 -26
  4. dub/models/components/analyticsbrowsers.py +18 -1
  5. dub/models/components/analyticscities.py +18 -1
  6. dub/models/components/analyticscontinents.py +18 -1
  7. dub/models/components/analyticscount.py +18 -1
  8. dub/models/components/analyticscountries.py +20 -1
  9. dub/models/components/analyticsdevices.py +18 -1
  10. dub/models/components/analyticsos.py +18 -1
  11. dub/models/components/analyticsreferers.py +18 -1
  12. dub/models/components/analyticsrefererurls.py +18 -1
  13. dub/models/components/analyticsregions.py +18 -1
  14. dub/models/components/analyticstimeseries.py +18 -1
  15. dub/models/components/analyticstoplinks.py +16 -26
  16. dub/models/components/analyticstopurls.py +18 -1
  17. dub/models/components/analyticstriggers.py +18 -1
  18. dub/models/components/commissioncreatedevent.py +96 -64
  19. dub/models/components/domainschema.py +31 -50
  20. dub/models/components/folderschema.py +18 -19
  21. dub/models/components/leadcreatedevent.py +151 -134
  22. dub/models/components/linkclickedevent.py +57 -70
  23. dub/models/components/linkschema.py +63 -64
  24. dub/models/components/linkwebhookevent.py +43 -51
  25. dub/models/components/partneranalyticscount.py +18 -1
  26. dub/models/components/partneranalyticstimeseries.py +18 -1
  27. dub/models/components/partneranalyticstoplinks.py +16 -27
  28. dub/models/components/partnerapplicationsubmittedevent.py +42 -75
  29. dub/models/components/partnerenrolledevent.py +477 -83
  30. dub/models/components/salecreatedevent.py +152 -151
  31. dub/models/errors/badrequest.py +18 -1
  32. dub/models/errors/conflict.py +18 -1
  33. dub/models/errors/forbidden.py +18 -1
  34. dub/models/errors/internalservererror.py +18 -1
  35. dub/models/errors/inviteexpired.py +18 -1
  36. dub/models/errors/notfound.py +18 -1
  37. dub/models/errors/ratelimitexceeded.py +18 -1
  38. dub/models/errors/unauthorized.py +18 -1
  39. dub/models/errors/unprocessableentity.py +18 -1
  40. dub/models/operations/__init__.py +230 -19
  41. dub/models/operations/approvebountysubmission.py +71 -45
  42. dub/models/operations/banpartner.py +14 -19
  43. dub/models/operations/bulkcreatelinks.py +86 -87
  44. dub/models/operations/bulkupdatelinks.py +97 -82
  45. dub/models/operations/checkdomainstatus.py +1 -17
  46. dub/models/operations/createdomain.py +33 -34
  47. dub/models/operations/createfolder.py +18 -19
  48. dub/models/operations/createlink.py +86 -87
  49. dub/models/operations/createpartner.py +560 -168
  50. dub/models/operations/createpartnerlink.py +74 -85
  51. dub/models/operations/createreferralsembedtoken.py +99 -87
  52. dub/models/operations/createtag.py +18 -1
  53. dub/models/operations/deactivatepartner.py +65 -0
  54. dub/models/operations/getcustomer.py +106 -105
  55. dub/models/operations/getcustomers.py +123 -105
  56. dub/models/operations/getlinkinfo.py +18 -1
  57. dub/models/operations/getlinks.py +36 -1
  58. dub/models/operations/getlinkscount.py +32 -1
  59. dub/models/operations/getqrcode.py +29 -1
  60. dub/models/operations/gettags.py +20 -1
  61. dub/models/operations/listbountysubmissions.py +63 -26
  62. dub/models/operations/listcommissions.py +129 -64
  63. dub/models/operations/listdomains.py +18 -1
  64. dub/models/operations/listevents.py +414 -389
  65. dub/models/operations/listfolders.py +18 -1
  66. dub/models/operations/listpartners.py +510 -84
  67. dub/models/operations/registerdomain.py +1 -17
  68. dub/models/operations/rejectbountysubmission.py +71 -26
  69. dub/models/operations/retrieveanalytics.py +65 -66
  70. dub/models/operations/retrievelinks.py +30 -19
  71. dub/models/operations/retrievepartneranalytics.py +25 -28
  72. dub/models/operations/tracklead.py +38 -83
  73. dub/models/operations/tracksale.py +52 -95
  74. dub/models/operations/updatecommission.py +126 -64
  75. dub/models/operations/updatecustomer.py +122 -131
  76. dub/models/operations/updatedomain.py +50 -35
  77. dub/models/operations/updatefolder.py +34 -19
  78. dub/models/operations/updatelink.py +101 -86
  79. dub/models/operations/updatetag.py +34 -1
  80. dub/models/operations/upsertlink.py +86 -87
  81. dub/models/operations/upsertpartnerlink.py +72 -78
  82. dub/partners.py +288 -0
  83. dub/sdk.py +0 -3
  84. dub/utils/__init__.py +10 -1
  85. {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/METADATA +4 -8
  86. dub-0.35.0.dist-info/RECORD +143 -0
  87. dub/models/components/workspaceschema.py +0 -328
  88. dub/models/operations/getworkspace.py +0 -21
  89. dub/models/operations/updateworkspace.py +0 -78
  90. dub/workspaces.py +0 -561
  91. dub-0.34.1.dist-info/RECORD +0 -146
  92. {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/WHEEL +0 -0
  93. {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/licenses/LICENSE +0 -0
@@ -12,47 +12,46 @@ from typing_extensions import Annotated, NotRequired, TypedDict
12
12
 
13
13
  class ApproveBountySubmissionRequestBodyTypedDict(TypedDict):
14
14
  reward_amount: NotRequired[Nullable[float]]
15
+ r"""The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set."""
15
16
 
16
17
 
17
18
  class ApproveBountySubmissionRequestBody(BaseModel):
18
19
  reward_amount: Annotated[
19
20
  OptionalNullable[float], pydantic.Field(alias="rewardAmount")
20
21
  ] = UNSET
22
+ r"""The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set."""
21
23
 
22
24
  @model_serializer(mode="wrap")
23
25
  def serialize_model(self, handler):
24
- optional_fields = ["rewardAmount"]
25
- nullable_fields = ["rewardAmount"]
26
- null_default_fields = []
27
-
26
+ optional_fields = set(["rewardAmount"])
27
+ nullable_fields = set(["rewardAmount"])
28
28
  serialized = handler(self)
29
-
30
29
  m = {}
31
30
 
32
31
  for n, f in type(self).model_fields.items():
33
32
  k = f.alias or n
34
33
  val = serialized.get(k)
35
- serialized.pop(k, None)
36
-
37
- optional_nullable = k in optional_fields and k in nullable_fields
38
- is_set = (
39
- self.__pydantic_fields_set__.intersection({n})
40
- or k in null_default_fields
41
- ) # pylint: disable=no-member
42
-
43
- if val is not None and val != UNSET_SENTINEL:
44
- m[k] = val
45
- elif val != UNSET_SENTINEL and (
46
- not k in optional_fields or (optional_nullable and is_set)
47
- ):
48
- m[k] = val
34
+ is_nullable_and_explicitly_set = (
35
+ k in nullable_fields
36
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
37
+ )
38
+
39
+ if val != UNSET_SENTINEL:
40
+ if (
41
+ val is not None
42
+ or k not in optional_fields
43
+ or is_nullable_and_explicitly_set
44
+ ):
45
+ m[k] = val
49
46
 
50
47
  return m
51
48
 
52
49
 
53
50
  class ApproveBountySubmissionRequestTypedDict(TypedDict):
54
51
  bounty_id: str
52
+ r"""The ID of the bounty"""
55
53
  submission_id: str
54
+ r"""The ID of the bounty submission"""
56
55
  request_body: NotRequired[ApproveBountySubmissionRequestBodyTypedDict]
57
56
 
58
57
 
@@ -62,34 +61,60 @@ class ApproveBountySubmissionRequest(BaseModel):
62
61
  pydantic.Field(alias="bountyId"),
63
62
  FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
64
63
  ]
64
+ r"""The ID of the bounty"""
65
65
 
66
66
  submission_id: Annotated[
67
67
  str,
68
68
  pydantic.Field(alias="submissionId"),
69
69
  FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
70
70
  ]
71
+ r"""The ID of the bounty submission"""
71
72
 
72
73
  request_body: Annotated[
73
74
  Optional[ApproveBountySubmissionRequestBody],
74
75
  FieldMetadata(request=RequestMetadata(media_type="application/json")),
75
76
  ] = None
76
77
 
78
+ @model_serializer(mode="wrap")
79
+ def serialize_model(self, handler):
80
+ optional_fields = set(["RequestBody"])
81
+ serialized = handler(self)
82
+ m = {}
83
+
84
+ for n, f in type(self).model_fields.items():
85
+ k = f.alias or n
86
+ val = serialized.get(k)
87
+
88
+ if val != UNSET_SENTINEL:
89
+ if val is not None or k not in optional_fields:
90
+ m[k] = val
91
+
92
+ return m
93
+
77
94
 
78
95
  class ApproveBountySubmissionFilesTypedDict(TypedDict):
79
96
  url: str
97
+ r"""The URL of the uploaded file."""
80
98
  file_name: str
99
+ r"""The original file name."""
81
100
  size: float
101
+ r"""The file size in bytes."""
82
102
 
83
103
 
84
104
  class ApproveBountySubmissionFiles(BaseModel):
85
105
  url: str
106
+ r"""The URL of the uploaded file."""
86
107
 
87
108
  file_name: Annotated[str, pydantic.Field(alias="fileName")]
109
+ r"""The original file name."""
88
110
 
89
111
  size: float
112
+ r"""The file size in bytes."""
90
113
 
91
114
 
92
115
  class ApproveBountySubmissionStatus(str, Enum):
116
+ r"""The status of the submission"""
117
+
93
118
  DRAFT = "draft"
94
119
  SUBMITTED = "submitted"
95
120
  APPROVED = "approved"
@@ -100,86 +125,87 @@ class ApproveBountySubmissionResponseBodyTypedDict(TypedDict):
100
125
  r"""The approved bounty submission."""
101
126
 
102
127
  id: str
128
+ r"""The ID of the bounty submission"""
103
129
  bounty_id: str
130
+ r"""The ID of the bounty"""
104
131
  partner_id: str
132
+ r"""The ID of the partner"""
105
133
  description: Nullable[str]
134
+ r"""The description of the submission"""
106
135
  urls: Nullable[List[str]]
136
+ r"""The URLs submitted for the submission"""
107
137
  files: Nullable[List[ApproveBountySubmissionFilesTypedDict]]
138
+ r"""The files uploaded for the submission"""
108
139
  status: ApproveBountySubmissionStatus
140
+ r"""The status of the submission"""
109
141
  performance_count: Nullable[float]
142
+ r"""The performance count of the submission"""
110
143
  created_at: str
144
+ r"""The date and time the submission was created"""
111
145
  completed_at: Nullable[str]
146
+ r"""The date and time the submission was completed"""
112
147
  reviewed_at: Nullable[str]
148
+ r"""The date and time the submission was reviewed"""
113
149
  rejection_reason: Nullable[str]
150
+ r"""The reason for rejecting the submission"""
114
151
  rejection_note: Nullable[str]
152
+ r"""The note for rejecting the submission"""
115
153
 
116
154
 
117
155
  class ApproveBountySubmissionResponseBody(BaseModel):
118
156
  r"""The approved bounty submission."""
119
157
 
120
158
  id: str
159
+ r"""The ID of the bounty submission"""
121
160
 
122
161
  bounty_id: Annotated[str, pydantic.Field(alias="bountyId")]
162
+ r"""The ID of the bounty"""
123
163
 
124
164
  partner_id: Annotated[str, pydantic.Field(alias="partnerId")]
165
+ r"""The ID of the partner"""
125
166
 
126
167
  description: Nullable[str]
168
+ r"""The description of the submission"""
127
169
 
128
170
  urls: Nullable[List[str]]
171
+ r"""The URLs submitted for the submission"""
129
172
 
130
173
  files: Nullable[List[ApproveBountySubmissionFiles]]
174
+ r"""The files uploaded for the submission"""
131
175
 
132
176
  status: ApproveBountySubmissionStatus
177
+ r"""The status of the submission"""
133
178
 
134
179
  performance_count: Annotated[
135
180
  Nullable[float], pydantic.Field(alias="performanceCount")
136
181
  ]
182
+ r"""The performance count of the submission"""
137
183
 
138
184
  created_at: Annotated[str, pydantic.Field(alias="createdAt")]
185
+ r"""The date and time the submission was created"""
139
186
 
140
187
  completed_at: Annotated[Nullable[str], pydantic.Field(alias="completedAt")]
188
+ r"""The date and time the submission was completed"""
141
189
 
142
190
  reviewed_at: Annotated[Nullable[str], pydantic.Field(alias="reviewedAt")]
191
+ r"""The date and time the submission was reviewed"""
143
192
 
144
193
  rejection_reason: Annotated[Nullable[str], pydantic.Field(alias="rejectionReason")]
194
+ r"""The reason for rejecting the submission"""
145
195
 
146
196
  rejection_note: Annotated[Nullable[str], pydantic.Field(alias="rejectionNote")]
197
+ r"""The note for rejecting the submission"""
147
198
 
148
199
  @model_serializer(mode="wrap")
149
200
  def serialize_model(self, handler):
150
- optional_fields = []
151
- nullable_fields = [
152
- "description",
153
- "urls",
154
- "files",
155
- "performanceCount",
156
- "completedAt",
157
- "reviewedAt",
158
- "rejectionReason",
159
- "rejectionNote",
160
- ]
161
- null_default_fields = []
162
-
163
201
  serialized = handler(self)
164
-
165
202
  m = {}
166
203
 
167
204
  for n, f in type(self).model_fields.items():
168
205
  k = f.alias or n
169
206
  val = serialized.get(k)
170
- serialized.pop(k, None)
171
207
 
172
- optional_nullable = k in optional_fields and k in nullable_fields
173
- is_set = (
174
- self.__pydantic_fields_set__.intersection({n})
175
- or k in null_default_fields
176
- ) # pylint: disable=no-member
177
-
178
- if val is not None and val != UNSET_SENTINEL:
179
- m[k] = val
180
- elif val != UNSET_SENTINEL and (
181
- not k in optional_fields or (optional_nullable and is_set)
182
- ):
208
+ if val != UNSET_SENTINEL:
183
209
  m[k] = val
184
210
 
185
211
  return m
@@ -40,31 +40,26 @@ class BanPartnerRequestBody(BaseModel):
40
40
 
41
41
  @model_serializer(mode="wrap")
42
42
  def serialize_model(self, handler):
43
- optional_fields = ["partnerId", "tenantId"]
44
- nullable_fields = ["partnerId", "tenantId"]
45
- null_default_fields = []
46
-
43
+ optional_fields = set(["partnerId", "tenantId"])
44
+ nullable_fields = set(["partnerId", "tenantId"])
47
45
  serialized = handler(self)
48
-
49
46
  m = {}
50
47
 
51
48
  for n, f in type(self).model_fields.items():
52
49
  k = f.alias or n
53
50
  val = serialized.get(k)
54
- serialized.pop(k, None)
55
-
56
- optional_nullable = k in optional_fields and k in nullable_fields
57
- is_set = (
58
- self.__pydantic_fields_set__.intersection({n})
59
- or k in null_default_fields
60
- ) # pylint: disable=no-member
61
-
62
- if val is not None and val != UNSET_SENTINEL:
63
- m[k] = val
64
- elif val != UNSET_SENTINEL and (
65
- not k in optional_fields or (optional_nullable and is_set)
66
- ):
67
- m[k] = val
51
+ is_nullable_and_explicitly_set = (
52
+ k in nullable_fields
53
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
54
+ )
55
+
56
+ if val != UNSET_SENTINEL:
57
+ if (
58
+ val is not None
59
+ or k not in optional_fields
60
+ or is_nullable_and_explicitly_set
61
+ ):
62
+ m[k] = val
68
63
 
69
64
  return m
70
65
 
@@ -292,99 +292,98 @@ class RequestBody(BaseModel):
292
292
 
293
293
  @model_serializer(mode="wrap")
294
294
  def serialize_model(self, handler):
295
- optional_fields = [
296
- "domain",
297
- "key",
298
- "keyLength",
299
- "externalId",
300
- "tenantId",
301
- "programId",
302
- "partnerId",
303
- "prefix",
304
- "trackConversion",
305
- "archived",
306
- "tagIds",
307
- "tagNames",
308
- "folderId",
309
- "comments",
310
- "expiresAt",
311
- "expiredUrl",
312
- "password",
313
- "proxy",
314
- "title",
315
- "description",
316
- "image",
317
- "video",
318
- "rewrite",
319
- "ios",
320
- "android",
321
- "geo",
322
- "doIndex",
323
- "utm_source",
324
- "utm_medium",
325
- "utm_campaign",
326
- "utm_term",
327
- "utm_content",
328
- "ref",
329
- "webhookIds",
330
- "testVariants",
331
- "testStartedAt",
332
- "testCompletedAt",
333
- "publicStats",
334
- "tagId",
335
- ]
336
- nullable_fields = [
337
- "externalId",
338
- "tenantId",
339
- "programId",
340
- "partnerId",
341
- "folderId",
342
- "comments",
343
- "expiresAt",
344
- "expiredUrl",
345
- "password",
346
- "title",
347
- "description",
348
- "image",
349
- "video",
350
- "ios",
351
- "android",
352
- "geo",
353
- "utm_source",
354
- "utm_medium",
355
- "utm_campaign",
356
- "utm_term",
357
- "utm_content",
358
- "ref",
359
- "webhookIds",
360
- "testVariants",
361
- "testStartedAt",
362
- "testCompletedAt",
363
- "tagId",
364
- ]
365
- null_default_fields = []
366
-
295
+ optional_fields = set(
296
+ [
297
+ "domain",
298
+ "key",
299
+ "keyLength",
300
+ "externalId",
301
+ "tenantId",
302
+ "programId",
303
+ "partnerId",
304
+ "prefix",
305
+ "trackConversion",
306
+ "archived",
307
+ "tagIds",
308
+ "tagNames",
309
+ "folderId",
310
+ "comments",
311
+ "expiresAt",
312
+ "expiredUrl",
313
+ "password",
314
+ "proxy",
315
+ "title",
316
+ "description",
317
+ "image",
318
+ "video",
319
+ "rewrite",
320
+ "ios",
321
+ "android",
322
+ "geo",
323
+ "doIndex",
324
+ "utm_source",
325
+ "utm_medium",
326
+ "utm_campaign",
327
+ "utm_term",
328
+ "utm_content",
329
+ "ref",
330
+ "webhookIds",
331
+ "testVariants",
332
+ "testStartedAt",
333
+ "testCompletedAt",
334
+ "publicStats",
335
+ "tagId",
336
+ ]
337
+ )
338
+ nullable_fields = set(
339
+ [
340
+ "externalId",
341
+ "tenantId",
342
+ "programId",
343
+ "partnerId",
344
+ "folderId",
345
+ "comments",
346
+ "expiresAt",
347
+ "expiredUrl",
348
+ "password",
349
+ "title",
350
+ "description",
351
+ "image",
352
+ "video",
353
+ "ios",
354
+ "android",
355
+ "geo",
356
+ "utm_source",
357
+ "utm_medium",
358
+ "utm_campaign",
359
+ "utm_term",
360
+ "utm_content",
361
+ "ref",
362
+ "webhookIds",
363
+ "testVariants",
364
+ "testStartedAt",
365
+ "testCompletedAt",
366
+ "tagId",
367
+ ]
368
+ )
367
369
  serialized = handler(self)
368
-
369
370
  m = {}
370
371
 
371
372
  for n, f in type(self).model_fields.items():
372
373
  k = f.alias or n
373
374
  val = serialized.get(k)
374
- serialized.pop(k, None)
375
-
376
- optional_nullable = k in optional_fields and k in nullable_fields
377
- is_set = (
378
- self.__pydantic_fields_set__.intersection({n})
379
- or k in null_default_fields
380
- ) # pylint: disable=no-member
381
-
382
- if val is not None and val != UNSET_SENTINEL:
383
- m[k] = val
384
- elif val != UNSET_SENTINEL and (
385
- not k in optional_fields or (optional_nullable and is_set)
386
- ):
387
- m[k] = val
375
+ is_nullable_and_explicitly_set = (
376
+ k in nullable_fields
377
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
378
+ )
379
+
380
+ if val != UNSET_SENTINEL:
381
+ if (
382
+ val is not None
383
+ or k not in optional_fields
384
+ or is_nullable_and_explicitly_set
385
+ ):
386
+ m[k] = val
388
387
 
389
388
  return m
390
389