dub 0.34.0__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.
- dub/_version.py +3 -3
- dub/basesdk.py +20 -6
- dub/{workspaces.py → bounties.py} +349 -69
- dub/models/components/__init__.py +114 -26
- dub/models/components/analyticsbrowsers.py +18 -1
- dub/models/components/analyticscities.py +18 -1
- dub/models/components/analyticscontinents.py +18 -1
- dub/models/components/analyticscount.py +18 -1
- dub/models/components/analyticscountries.py +20 -1
- dub/models/components/analyticsdevices.py +18 -1
- dub/models/components/analyticsos.py +18 -1
- dub/models/components/analyticsreferers.py +18 -1
- dub/models/components/analyticsrefererurls.py +18 -1
- dub/models/components/analyticsregions.py +18 -1
- dub/models/components/analyticstimeseries.py +18 -1
- dub/models/components/analyticstoplinks.py +16 -26
- dub/models/components/analyticstopurls.py +18 -1
- dub/models/components/analyticstriggers.py +18 -1
- dub/models/components/commissioncreatedevent.py +123 -63
- dub/models/components/domainschema.py +31 -50
- dub/models/components/folderschema.py +18 -19
- dub/models/components/leadcreatedevent.py +151 -134
- dub/models/components/linkclickedevent.py +57 -70
- dub/models/components/linkschema.py +63 -64
- dub/models/components/linkwebhookevent.py +43 -51
- dub/models/components/partneranalyticscount.py +18 -1
- dub/models/components/partneranalyticstimeseries.py +18 -1
- dub/models/components/partneranalyticstoplinks.py +16 -27
- dub/models/components/partnerapplicationsubmittedevent.py +42 -75
- dub/models/components/partnerenrolledevent.py +477 -83
- dub/models/components/salecreatedevent.py +152 -151
- dub/models/errors/badrequest.py +18 -1
- dub/models/errors/conflict.py +18 -1
- dub/models/errors/forbidden.py +18 -1
- dub/models/errors/internalservererror.py +18 -1
- dub/models/errors/inviteexpired.py +18 -1
- dub/models/errors/notfound.py +18 -1
- dub/models/errors/ratelimitexceeded.py +18 -1
- dub/models/errors/unauthorized.py +18 -1
- dub/models/errors/unprocessableentity.py +18 -1
- dub/models/operations/__init__.py +323 -19
- dub/models/operations/approvebountysubmission.py +211 -0
- dub/models/operations/banpartner.py +14 -19
- dub/models/operations/bulkcreatelinks.py +86 -87
- dub/models/operations/bulkupdatelinks.py +97 -82
- dub/models/operations/checkdomainstatus.py +1 -17
- dub/models/operations/createdomain.py +33 -34
- dub/models/operations/createfolder.py +18 -19
- dub/models/operations/createlink.py +86 -87
- dub/models/operations/createpartner.py +560 -168
- dub/models/operations/createpartnerlink.py +74 -85
- dub/models/operations/createreferralsembedtoken.py +99 -87
- dub/models/operations/createtag.py +18 -1
- dub/models/operations/deactivatepartner.py +65 -0
- dub/models/operations/getcustomer.py +106 -105
- dub/models/operations/getcustomers.py +123 -105
- dub/models/operations/getlinkinfo.py +18 -1
- dub/models/operations/getlinks.py +36 -1
- dub/models/operations/getlinkscount.py +32 -1
- dub/models/operations/getqrcode.py +29 -1
- dub/models/operations/gettags.py +20 -1
- dub/models/operations/listbountysubmissions.py +249 -0
- dub/models/operations/listcommissions.py +129 -64
- dub/models/operations/listdomains.py +18 -1
- dub/models/operations/listevents.py +414 -389
- dub/models/operations/listfolders.py +18 -1
- dub/models/operations/listpartners.py +510 -84
- dub/models/operations/registerdomain.py +1 -17
- dub/models/operations/rejectbountysubmission.py +219 -0
- dub/models/operations/retrieveanalytics.py +65 -66
- dub/models/operations/retrievelinks.py +30 -19
- dub/models/operations/retrievepartneranalytics.py +25 -28
- dub/models/operations/tracklead.py +38 -83
- dub/models/operations/tracksale.py +52 -95
- dub/models/operations/updatecommission.py +126 -64
- dub/models/operations/updatecustomer.py +122 -131
- dub/models/operations/updatedomain.py +50 -35
- dub/models/operations/updatefolder.py +34 -19
- dub/models/operations/updatelink.py +101 -86
- dub/models/operations/updatetag.py +34 -1
- dub/models/operations/upsertlink.py +86 -87
- dub/models/operations/upsertpartnerlink.py +77 -90
- dub/partners.py +288 -0
- dub/sdk.py +3 -3
- dub/utils/__init__.py +10 -1
- {dub-0.34.0.dist-info → dub-0.35.0.dist-info}/METADATA +10 -8
- dub-0.35.0.dist-info/RECORD +143 -0
- dub/models/components/workspaceschema.py +0 -328
- dub/models/operations/getworkspace.py +0 -21
- dub/models/operations/updateworkspace.py +0 -78
- dub-0.34.0.dist-info/RECORD +0 -142
- {dub-0.34.0.dist-info → dub-0.35.0.dist-info}/WHEEL +0 -0
- {dub-0.34.0.dist-info → dub-0.35.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -47,6 +47,8 @@ if TYPE_CHECKING:
|
|
|
47
47
|
CommissionCreatedEventData,
|
|
48
48
|
CommissionCreatedEventDataTypedDict,
|
|
49
49
|
CommissionCreatedEventEvent,
|
|
50
|
+
CommissionCreatedEventLink,
|
|
51
|
+
CommissionCreatedEventLinkTypedDict,
|
|
50
52
|
CommissionCreatedEventPartner,
|
|
51
53
|
CommissionCreatedEventPartnerTypedDict,
|
|
52
54
|
CommissionCreatedEventStatus,
|
|
@@ -142,13 +144,49 @@ if TYPE_CHECKING:
|
|
|
142
144
|
)
|
|
143
145
|
from .partnerenrolledevent import (
|
|
144
146
|
BannedReason,
|
|
147
|
+
Constraints,
|
|
148
|
+
ConstraintsTypedDict,
|
|
149
|
+
Eight,
|
|
150
|
+
EightTypedDict,
|
|
151
|
+
Fields,
|
|
152
|
+
Fields1,
|
|
153
|
+
Fields1TypedDict,
|
|
154
|
+
Fields2,
|
|
155
|
+
Fields2TypedDict,
|
|
156
|
+
Fields3,
|
|
157
|
+
Fields3TypedDict,
|
|
158
|
+
FieldsConstraints,
|
|
159
|
+
FieldsConstraintsTypedDict,
|
|
160
|
+
FieldsOptions,
|
|
161
|
+
FieldsOptionsTypedDict,
|
|
162
|
+
FieldsType,
|
|
163
|
+
FieldsTypedDict,
|
|
164
|
+
Five,
|
|
165
|
+
FiveTypedDict,
|
|
166
|
+
Four,
|
|
167
|
+
FourTypedDict,
|
|
145
168
|
Links,
|
|
146
169
|
LinksTypedDict,
|
|
170
|
+
Options,
|
|
171
|
+
OptionsTypedDict,
|
|
147
172
|
PartnerEnrolledEvent,
|
|
148
173
|
PartnerEnrolledEventData,
|
|
149
174
|
PartnerEnrolledEventDataTypedDict,
|
|
150
175
|
PartnerEnrolledEventEvent,
|
|
176
|
+
PartnerEnrolledEventFieldsDataReferralFormData5Type,
|
|
177
|
+
PartnerEnrolledEventFieldsDataReferralFormData6Type,
|
|
178
|
+
PartnerEnrolledEventFieldsDataReferralFormData7Type,
|
|
179
|
+
PartnerEnrolledEventFieldsDataReferralFormData8Type,
|
|
180
|
+
PartnerEnrolledEventFieldsDataReferralFormDataType,
|
|
181
|
+
PartnerEnrolledEventFieldsDataType,
|
|
182
|
+
PartnerEnrolledEventFieldsType,
|
|
151
183
|
PartnerEnrolledEventTypedDict,
|
|
184
|
+
ReferralFormData,
|
|
185
|
+
ReferralFormDataTypedDict,
|
|
186
|
+
Seven,
|
|
187
|
+
SevenTypedDict,
|
|
188
|
+
Six,
|
|
189
|
+
SixTypedDict,
|
|
152
190
|
Status,
|
|
153
191
|
)
|
|
154
192
|
from .salecreatedevent import (
|
|
@@ -172,16 +210,6 @@ if TYPE_CHECKING:
|
|
|
172
210
|
)
|
|
173
211
|
from .security import Security, SecurityTypedDict
|
|
174
212
|
from .webhookevent import WebhookEvent, WebhookEventTypedDict
|
|
175
|
-
from .workspaceschema import (
|
|
176
|
-
Domains,
|
|
177
|
-
DomainsTypedDict,
|
|
178
|
-
Plan,
|
|
179
|
-
Role,
|
|
180
|
-
Users,
|
|
181
|
-
UsersTypedDict,
|
|
182
|
-
WorkspaceSchema,
|
|
183
|
-
WorkspaceSchemaTypedDict,
|
|
184
|
-
)
|
|
185
213
|
|
|
186
214
|
__all__ = [
|
|
187
215
|
"AccessLevel",
|
|
@@ -228,11 +256,15 @@ __all__ = [
|
|
|
228
256
|
"CommissionCreatedEventData",
|
|
229
257
|
"CommissionCreatedEventDataTypedDict",
|
|
230
258
|
"CommissionCreatedEventEvent",
|
|
259
|
+
"CommissionCreatedEventLink",
|
|
260
|
+
"CommissionCreatedEventLinkTypedDict",
|
|
231
261
|
"CommissionCreatedEventPartner",
|
|
232
262
|
"CommissionCreatedEventPartnerTypedDict",
|
|
233
263
|
"CommissionCreatedEventStatus",
|
|
234
264
|
"CommissionCreatedEventType",
|
|
235
265
|
"CommissionCreatedEventTypedDict",
|
|
266
|
+
"Constraints",
|
|
267
|
+
"ConstraintsTypedDict",
|
|
236
268
|
"Continent",
|
|
237
269
|
"Customer",
|
|
238
270
|
"CustomerTypedDict",
|
|
@@ -240,12 +272,29 @@ __all__ = [
|
|
|
240
272
|
"DataTypedDict",
|
|
241
273
|
"DomainSchema",
|
|
242
274
|
"DomainSchemaTypedDict",
|
|
243
|
-
"
|
|
244
|
-
"
|
|
275
|
+
"Eight",
|
|
276
|
+
"EightTypedDict",
|
|
245
277
|
"Event",
|
|
246
278
|
"EventTypedDict",
|
|
279
|
+
"Fields",
|
|
280
|
+
"Fields1",
|
|
281
|
+
"Fields1TypedDict",
|
|
282
|
+
"Fields2",
|
|
283
|
+
"Fields2TypedDict",
|
|
284
|
+
"Fields3",
|
|
285
|
+
"Fields3TypedDict",
|
|
286
|
+
"FieldsConstraints",
|
|
287
|
+
"FieldsConstraintsTypedDict",
|
|
288
|
+
"FieldsOptions",
|
|
289
|
+
"FieldsOptionsTypedDict",
|
|
290
|
+
"FieldsType",
|
|
291
|
+
"FieldsTypedDict",
|
|
292
|
+
"Five",
|
|
293
|
+
"FiveTypedDict",
|
|
247
294
|
"FolderSchema",
|
|
248
295
|
"FolderSchemaTypedDict",
|
|
296
|
+
"Four",
|
|
297
|
+
"FourTypedDict",
|
|
249
298
|
"LeadCreatedEvent",
|
|
250
299
|
"LeadCreatedEventClick",
|
|
251
300
|
"LeadCreatedEventClickTypedDict",
|
|
@@ -282,6 +331,8 @@ __all__ = [
|
|
|
282
331
|
"Links",
|
|
283
332
|
"LinksTypedDict",
|
|
284
333
|
"One",
|
|
334
|
+
"Options",
|
|
335
|
+
"OptionsTypedDict",
|
|
285
336
|
"Partner",
|
|
286
337
|
"PartnerAnalyticsCount",
|
|
287
338
|
"PartnerAnalyticsCountTypedDict",
|
|
@@ -301,13 +352,20 @@ __all__ = [
|
|
|
301
352
|
"PartnerEnrolledEventData",
|
|
302
353
|
"PartnerEnrolledEventDataTypedDict",
|
|
303
354
|
"PartnerEnrolledEventEvent",
|
|
355
|
+
"PartnerEnrolledEventFieldsDataReferralFormData5Type",
|
|
356
|
+
"PartnerEnrolledEventFieldsDataReferralFormData6Type",
|
|
357
|
+
"PartnerEnrolledEventFieldsDataReferralFormData7Type",
|
|
358
|
+
"PartnerEnrolledEventFieldsDataReferralFormData8Type",
|
|
359
|
+
"PartnerEnrolledEventFieldsDataReferralFormDataType",
|
|
360
|
+
"PartnerEnrolledEventFieldsDataType",
|
|
361
|
+
"PartnerEnrolledEventFieldsType",
|
|
304
362
|
"PartnerEnrolledEventTypedDict",
|
|
305
363
|
"PartnerTypedDict",
|
|
306
|
-
"
|
|
364
|
+
"ReferralFormData",
|
|
365
|
+
"ReferralFormDataTypedDict",
|
|
307
366
|
"Region",
|
|
308
367
|
"RegisteredDomain",
|
|
309
368
|
"RegisteredDomainTypedDict",
|
|
310
|
-
"Role",
|
|
311
369
|
"Sale",
|
|
312
370
|
"SaleCreatedEvent",
|
|
313
371
|
"SaleCreatedEventClick",
|
|
@@ -327,6 +385,10 @@ __all__ = [
|
|
|
327
385
|
"SaleTypedDict",
|
|
328
386
|
"Security",
|
|
329
387
|
"SecurityTypedDict",
|
|
388
|
+
"Seven",
|
|
389
|
+
"SevenTypedDict",
|
|
390
|
+
"Six",
|
|
391
|
+
"SixTypedDict",
|
|
330
392
|
"Status",
|
|
331
393
|
"TestVariants",
|
|
332
394
|
"TestVariantsTypedDict",
|
|
@@ -334,12 +396,8 @@ __all__ = [
|
|
|
334
396
|
"Trigger",
|
|
335
397
|
"Two",
|
|
336
398
|
"Type",
|
|
337
|
-
"Users",
|
|
338
|
-
"UsersTypedDict",
|
|
339
399
|
"WebhookEvent",
|
|
340
400
|
"WebhookEventTypedDict",
|
|
341
|
-
"WorkspaceSchema",
|
|
342
|
-
"WorkspaceSchemaTypedDict",
|
|
343
401
|
]
|
|
344
402
|
|
|
345
403
|
_dynamic_imports: dict[str, str] = {
|
|
@@ -382,6 +440,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
382
440
|
"CommissionCreatedEventData": ".commissioncreatedevent",
|
|
383
441
|
"CommissionCreatedEventDataTypedDict": ".commissioncreatedevent",
|
|
384
442
|
"CommissionCreatedEventEvent": ".commissioncreatedevent",
|
|
443
|
+
"CommissionCreatedEventLink": ".commissioncreatedevent",
|
|
444
|
+
"CommissionCreatedEventLinkTypedDict": ".commissioncreatedevent",
|
|
385
445
|
"CommissionCreatedEventPartner": ".commissioncreatedevent",
|
|
386
446
|
"CommissionCreatedEventPartnerTypedDict": ".commissioncreatedevent",
|
|
387
447
|
"CommissionCreatedEventStatus": ".commissioncreatedevent",
|
|
@@ -462,13 +522,49 @@ _dynamic_imports: dict[str, str] = {
|
|
|
462
522
|
"PartnerApplicationSubmittedEventStatus": ".partnerapplicationsubmittedevent",
|
|
463
523
|
"PartnerApplicationSubmittedEventTypedDict": ".partnerapplicationsubmittedevent",
|
|
464
524
|
"BannedReason": ".partnerenrolledevent",
|
|
525
|
+
"Constraints": ".partnerenrolledevent",
|
|
526
|
+
"ConstraintsTypedDict": ".partnerenrolledevent",
|
|
527
|
+
"Eight": ".partnerenrolledevent",
|
|
528
|
+
"EightTypedDict": ".partnerenrolledevent",
|
|
529
|
+
"Fields": ".partnerenrolledevent",
|
|
530
|
+
"Fields1": ".partnerenrolledevent",
|
|
531
|
+
"Fields1TypedDict": ".partnerenrolledevent",
|
|
532
|
+
"Fields2": ".partnerenrolledevent",
|
|
533
|
+
"Fields2TypedDict": ".partnerenrolledevent",
|
|
534
|
+
"Fields3": ".partnerenrolledevent",
|
|
535
|
+
"Fields3TypedDict": ".partnerenrolledevent",
|
|
536
|
+
"FieldsConstraints": ".partnerenrolledevent",
|
|
537
|
+
"FieldsConstraintsTypedDict": ".partnerenrolledevent",
|
|
538
|
+
"FieldsOptions": ".partnerenrolledevent",
|
|
539
|
+
"FieldsOptionsTypedDict": ".partnerenrolledevent",
|
|
540
|
+
"FieldsType": ".partnerenrolledevent",
|
|
541
|
+
"FieldsTypedDict": ".partnerenrolledevent",
|
|
542
|
+
"Five": ".partnerenrolledevent",
|
|
543
|
+
"FiveTypedDict": ".partnerenrolledevent",
|
|
544
|
+
"Four": ".partnerenrolledevent",
|
|
545
|
+
"FourTypedDict": ".partnerenrolledevent",
|
|
465
546
|
"Links": ".partnerenrolledevent",
|
|
466
547
|
"LinksTypedDict": ".partnerenrolledevent",
|
|
548
|
+
"Options": ".partnerenrolledevent",
|
|
549
|
+
"OptionsTypedDict": ".partnerenrolledevent",
|
|
467
550
|
"PartnerEnrolledEvent": ".partnerenrolledevent",
|
|
468
551
|
"PartnerEnrolledEventData": ".partnerenrolledevent",
|
|
469
552
|
"PartnerEnrolledEventDataTypedDict": ".partnerenrolledevent",
|
|
470
553
|
"PartnerEnrolledEventEvent": ".partnerenrolledevent",
|
|
554
|
+
"PartnerEnrolledEventFieldsDataReferralFormData5Type": ".partnerenrolledevent",
|
|
555
|
+
"PartnerEnrolledEventFieldsDataReferralFormData6Type": ".partnerenrolledevent",
|
|
556
|
+
"PartnerEnrolledEventFieldsDataReferralFormData7Type": ".partnerenrolledevent",
|
|
557
|
+
"PartnerEnrolledEventFieldsDataReferralFormData8Type": ".partnerenrolledevent",
|
|
558
|
+
"PartnerEnrolledEventFieldsDataReferralFormDataType": ".partnerenrolledevent",
|
|
559
|
+
"PartnerEnrolledEventFieldsDataType": ".partnerenrolledevent",
|
|
560
|
+
"PartnerEnrolledEventFieldsType": ".partnerenrolledevent",
|
|
471
561
|
"PartnerEnrolledEventTypedDict": ".partnerenrolledevent",
|
|
562
|
+
"ReferralFormData": ".partnerenrolledevent",
|
|
563
|
+
"ReferralFormDataTypedDict": ".partnerenrolledevent",
|
|
564
|
+
"Seven": ".partnerenrolledevent",
|
|
565
|
+
"SevenTypedDict": ".partnerenrolledevent",
|
|
566
|
+
"Six": ".partnerenrolledevent",
|
|
567
|
+
"SixTypedDict": ".partnerenrolledevent",
|
|
472
568
|
"Status": ".partnerenrolledevent",
|
|
473
569
|
"Sale": ".salecreatedevent",
|
|
474
570
|
"SaleCreatedEvent": ".salecreatedevent",
|
|
@@ -491,14 +587,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
491
587
|
"SecurityTypedDict": ".security",
|
|
492
588
|
"WebhookEvent": ".webhookevent",
|
|
493
589
|
"WebhookEventTypedDict": ".webhookevent",
|
|
494
|
-
"Domains": ".workspaceschema",
|
|
495
|
-
"DomainsTypedDict": ".workspaceschema",
|
|
496
|
-
"Plan": ".workspaceschema",
|
|
497
|
-
"Role": ".workspaceschema",
|
|
498
|
-
"Users": ".workspaceschema",
|
|
499
|
-
"UsersTypedDict": ".workspaceschema",
|
|
500
|
-
"WorkspaceSchema": ".workspaceschema",
|
|
501
|
-
"WorkspaceSchemaTypedDict": ".workspaceschema",
|
|
502
590
|
}
|
|
503
591
|
|
|
504
592
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsBrowsers(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales from this browser, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -45,3 +46,19 @@ class AnalyticsCities(BaseModel):
|
|
|
45
46
|
|
|
46
47
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
47
48
|
r"""The total amount of sales from this city, in cents"""
|
|
49
|
+
|
|
50
|
+
@model_serializer(mode="wrap")
|
|
51
|
+
def serialize_model(self, handler):
|
|
52
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
53
|
+
serialized = handler(self)
|
|
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
|
+
|
|
60
|
+
if val != UNSET_SENTINEL:
|
|
61
|
+
if val is not None or k not in optional_fields:
|
|
62
|
+
m[k] = val
|
|
63
|
+
|
|
64
|
+
return m
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
from enum import Enum
|
|
6
6
|
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
7
8
|
from typing import Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
@@ -48,3 +49,19 @@ class AnalyticsContinents(BaseModel):
|
|
|
48
49
|
|
|
49
50
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
50
51
|
r"""The total amount of sales from this continent, in cents"""
|
|
52
|
+
|
|
53
|
+
@model_serializer(mode="wrap")
|
|
54
|
+
def serialize_model(self, handler):
|
|
55
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
56
|
+
serialized = handler(self)
|
|
57
|
+
m = {}
|
|
58
|
+
|
|
59
|
+
for n, f in type(self).model_fields.items():
|
|
60
|
+
k = f.alias or n
|
|
61
|
+
val = serialized.get(k)
|
|
62
|
+
|
|
63
|
+
if val != UNSET_SENTINEL:
|
|
64
|
+
if val is not None or k not in optional_fields:
|
|
65
|
+
m[k] = val
|
|
66
|
+
|
|
67
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -30,3 +31,19 @@ class AnalyticsCount(BaseModel):
|
|
|
30
31
|
|
|
31
32
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
32
33
|
r"""The total amount of sales, in cents"""
|
|
34
|
+
|
|
35
|
+
@model_serializer(mode="wrap")
|
|
36
|
+
def serialize_model(self, handler):
|
|
37
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
38
|
+
serialized = handler(self)
|
|
39
|
+
m = {}
|
|
40
|
+
|
|
41
|
+
for n, f in type(self).model_fields.items():
|
|
42
|
+
k = f.alias or n
|
|
43
|
+
val = serialized.get(k)
|
|
44
|
+
|
|
45
|
+
if val != UNSET_SENTINEL:
|
|
46
|
+
if val is not None or k not in optional_fields:
|
|
47
|
+
m[k] = val
|
|
48
|
+
|
|
49
|
+
return m
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
from enum import Enum
|
|
6
6
|
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
7
8
|
from typing import Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
@@ -50,3 +51,21 @@ class AnalyticsCountries(BaseModel):
|
|
|
50
51
|
|
|
51
52
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
52
53
|
r"""The total amount of sales from this country, in cents"""
|
|
54
|
+
|
|
55
|
+
@model_serializer(mode="wrap")
|
|
56
|
+
def serialize_model(self, handler):
|
|
57
|
+
optional_fields = set(
|
|
58
|
+
["region", "city", "clicks", "leads", "sales", "saleAmount"]
|
|
59
|
+
)
|
|
60
|
+
serialized = handler(self)
|
|
61
|
+
m = {}
|
|
62
|
+
|
|
63
|
+
for n, f in type(self).model_fields.items():
|
|
64
|
+
k = f.alias or n
|
|
65
|
+
val = serialized.get(k)
|
|
66
|
+
|
|
67
|
+
if val != UNSET_SENTINEL:
|
|
68
|
+
if val is not None or k not in optional_fields:
|
|
69
|
+
m[k] = val
|
|
70
|
+
|
|
71
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsDevices(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales from this device, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsOS(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales from this OS, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsReferers(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales from this referer, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsRefererUrls(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales from this referer to this URL, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
from enum import Enum
|
|
6
6
|
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
7
8
|
from typing import Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
@@ -48,3 +49,19 @@ class AnalyticsRegions(BaseModel):
|
|
|
48
49
|
|
|
49
50
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
50
51
|
r"""The total amount of sales from this region, in cents"""
|
|
52
|
+
|
|
53
|
+
@model_serializer(mode="wrap")
|
|
54
|
+
def serialize_model(self, handler):
|
|
55
|
+
optional_fields = set(["city", "clicks", "leads", "sales", "saleAmount"])
|
|
56
|
+
serialized = handler(self)
|
|
57
|
+
m = {}
|
|
58
|
+
|
|
59
|
+
for n, f in type(self).model_fields.items():
|
|
60
|
+
k = f.alias or n
|
|
61
|
+
val = serialized.get(k)
|
|
62
|
+
|
|
63
|
+
if val != UNSET_SENTINEL:
|
|
64
|
+
if val is not None or k not in optional_fields:
|
|
65
|
+
m[k] = val
|
|
66
|
+
|
|
67
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -35,3 +36,19 @@ class AnalyticsTimeseries(BaseModel):
|
|
|
35
36
|
|
|
36
37
|
sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0
|
|
37
38
|
r"""The total amount of sales in the interval, in cents"""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount"])
|
|
43
|
+
serialized = handler(self)
|
|
44
|
+
m = {}
|
|
45
|
+
|
|
46
|
+
for n, f in type(self).model_fields.items():
|
|
47
|
+
k = f.alias or n
|
|
48
|
+
val = serialized.get(k)
|
|
49
|
+
|
|
50
|
+
if val != UNSET_SENTINEL:
|
|
51
|
+
if val is not None or k not in optional_fields:
|
|
52
|
+
m[k] = val
|
|
53
|
+
|
|
54
|
+
return m
|
|
@@ -84,37 +84,27 @@ class AnalyticsTopLinks(BaseModel):
|
|
|
84
84
|
|
|
85
85
|
@model_serializer(mode="wrap")
|
|
86
86
|
def serialize_model(self, handler):
|
|
87
|
-
optional_fields =
|
|
88
|
-
"comments",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"leads",
|
|
92
|
-
"sales",
|
|
93
|
-
"saleAmount",
|
|
94
|
-
]
|
|
95
|
-
nullable_fields = ["comments", "title"]
|
|
96
|
-
null_default_fields = []
|
|
97
|
-
|
|
87
|
+
optional_fields = set(
|
|
88
|
+
["comments", "title", "clicks", "leads", "sales", "saleAmount"]
|
|
89
|
+
)
|
|
90
|
+
nullable_fields = set(["comments", "title"])
|
|
98
91
|
serialized = handler(self)
|
|
99
|
-
|
|
100
92
|
m = {}
|
|
101
93
|
|
|
102
94
|
for n, f in type(self).model_fields.items():
|
|
103
95
|
k = f.alias or n
|
|
104
96
|
val = serialized.get(k)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
):
|
|
118
|
-
m[k] = val
|
|
97
|
+
is_nullable_and_explicitly_set = (
|
|
98
|
+
k in nullable_fields
|
|
99
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
if val != UNSET_SENTINEL:
|
|
103
|
+
if (
|
|
104
|
+
val is not None
|
|
105
|
+
or k not in optional_fields
|
|
106
|
+
or is_nullable_and_explicitly_set
|
|
107
|
+
):
|
|
108
|
+
m[k] = val
|
|
119
109
|
|
|
120
110
|
return m
|