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.
- dub/_version.py +3 -3
- dub/basesdk.py +20 -6
- dub/models/components/__init__.py +108 -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 +96 -64
- 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 +230 -19
- dub/models/operations/approvebountysubmission.py +71 -45
- 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 +63 -26
- 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 +71 -26
- 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 +72 -78
- dub/partners.py +288 -0
- dub/sdk.py +0 -3
- dub/utils/__init__.py +10 -1
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/METADATA +4 -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/workspaces.py +0 -561
- dub-0.34.1.dist-info/RECORD +0 -146
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/WHEEL +0 -0
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/licenses/LICENSE +0 -0
dub/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "dub"
|
|
6
|
-
__version__: str = "0.
|
|
6
|
+
__version__: str = "0.35.0"
|
|
7
7
|
__openapi_doc_version__: str = "0.0.1"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.
|
|
8
|
+
__gen_version__: str = "2.803.3"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.35.0 2.803.3 0.0.1 dub"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
dub/basesdk.py
CHANGED
|
@@ -4,7 +4,12 @@ from .sdkconfiguration import SDKConfiguration
|
|
|
4
4
|
from dub import utils
|
|
5
5
|
from dub._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext
|
|
6
6
|
from dub.models import errors
|
|
7
|
-
from dub.utils import
|
|
7
|
+
from dub.utils import (
|
|
8
|
+
RetryConfig,
|
|
9
|
+
SerializedRequestBody,
|
|
10
|
+
get_body_content,
|
|
11
|
+
run_sync_in_thread,
|
|
12
|
+
)
|
|
8
13
|
import httpx
|
|
9
14
|
from typing import Callable, List, Mapping, Optional, Tuple
|
|
10
15
|
from urllib.parse import parse_qs, urlparse
|
|
@@ -308,7 +313,10 @@ class BaseSDK:
|
|
|
308
313
|
async def do():
|
|
309
314
|
http_res = None
|
|
310
315
|
try:
|
|
311
|
-
req =
|
|
316
|
+
req = await run_sync_in_thread(
|
|
317
|
+
hooks.before_request, BeforeRequestContext(hook_ctx), request
|
|
318
|
+
)
|
|
319
|
+
|
|
312
320
|
logger.debug(
|
|
313
321
|
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
|
314
322
|
req.method,
|
|
@@ -322,7 +330,10 @@ class BaseSDK:
|
|
|
322
330
|
|
|
323
331
|
http_res = await client.send(req, stream=stream)
|
|
324
332
|
except Exception as e:
|
|
325
|
-
_, e =
|
|
333
|
+
_, e = await run_sync_in_thread(
|
|
334
|
+
hooks.after_error, AfterErrorContext(hook_ctx), None, e
|
|
335
|
+
)
|
|
336
|
+
|
|
326
337
|
if e is not None:
|
|
327
338
|
logger.debug("Request Exception", exc_info=True)
|
|
328
339
|
raise e
|
|
@@ -340,9 +351,10 @@ class BaseSDK:
|
|
|
340
351
|
)
|
|
341
352
|
|
|
342
353
|
if utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
343
|
-
result, err =
|
|
344
|
-
AfterErrorContext(hook_ctx), http_res, None
|
|
354
|
+
result, err = await run_sync_in_thread(
|
|
355
|
+
hooks.after_error, AfterErrorContext(hook_ctx), http_res, None
|
|
345
356
|
)
|
|
357
|
+
|
|
346
358
|
if err is not None:
|
|
347
359
|
logger.debug("Request Exception", exc_info=True)
|
|
348
360
|
raise err
|
|
@@ -362,6 +374,8 @@ class BaseSDK:
|
|
|
362
374
|
http_res = await do()
|
|
363
375
|
|
|
364
376
|
if not utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
365
|
-
http_res =
|
|
377
|
+
http_res = await run_sync_in_thread(
|
|
378
|
+
hooks.after_success, AfterSuccessContext(hook_ctx), http_res
|
|
379
|
+
)
|
|
366
380
|
|
|
367
381
|
return http_res
|
|
@@ -144,13 +144,49 @@ if TYPE_CHECKING:
|
|
|
144
144
|
)
|
|
145
145
|
from .partnerenrolledevent import (
|
|
146
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,
|
|
147
168
|
Links,
|
|
148
169
|
LinksTypedDict,
|
|
170
|
+
Options,
|
|
171
|
+
OptionsTypedDict,
|
|
149
172
|
PartnerEnrolledEvent,
|
|
150
173
|
PartnerEnrolledEventData,
|
|
151
174
|
PartnerEnrolledEventDataTypedDict,
|
|
152
175
|
PartnerEnrolledEventEvent,
|
|
176
|
+
PartnerEnrolledEventFieldsDataReferralFormData5Type,
|
|
177
|
+
PartnerEnrolledEventFieldsDataReferralFormData6Type,
|
|
178
|
+
PartnerEnrolledEventFieldsDataReferralFormData7Type,
|
|
179
|
+
PartnerEnrolledEventFieldsDataReferralFormData8Type,
|
|
180
|
+
PartnerEnrolledEventFieldsDataReferralFormDataType,
|
|
181
|
+
PartnerEnrolledEventFieldsDataType,
|
|
182
|
+
PartnerEnrolledEventFieldsType,
|
|
153
183
|
PartnerEnrolledEventTypedDict,
|
|
184
|
+
ReferralFormData,
|
|
185
|
+
ReferralFormDataTypedDict,
|
|
186
|
+
Seven,
|
|
187
|
+
SevenTypedDict,
|
|
188
|
+
Six,
|
|
189
|
+
SixTypedDict,
|
|
154
190
|
Status,
|
|
155
191
|
)
|
|
156
192
|
from .salecreatedevent import (
|
|
@@ -174,16 +210,6 @@ if TYPE_CHECKING:
|
|
|
174
210
|
)
|
|
175
211
|
from .security import Security, SecurityTypedDict
|
|
176
212
|
from .webhookevent import WebhookEvent, WebhookEventTypedDict
|
|
177
|
-
from .workspaceschema import (
|
|
178
|
-
Domains,
|
|
179
|
-
DomainsTypedDict,
|
|
180
|
-
Plan,
|
|
181
|
-
Role,
|
|
182
|
-
Users,
|
|
183
|
-
UsersTypedDict,
|
|
184
|
-
WorkspaceSchema,
|
|
185
|
-
WorkspaceSchemaTypedDict,
|
|
186
|
-
)
|
|
187
213
|
|
|
188
214
|
__all__ = [
|
|
189
215
|
"AccessLevel",
|
|
@@ -237,6 +263,8 @@ __all__ = [
|
|
|
237
263
|
"CommissionCreatedEventStatus",
|
|
238
264
|
"CommissionCreatedEventType",
|
|
239
265
|
"CommissionCreatedEventTypedDict",
|
|
266
|
+
"Constraints",
|
|
267
|
+
"ConstraintsTypedDict",
|
|
240
268
|
"Continent",
|
|
241
269
|
"Customer",
|
|
242
270
|
"CustomerTypedDict",
|
|
@@ -244,12 +272,29 @@ __all__ = [
|
|
|
244
272
|
"DataTypedDict",
|
|
245
273
|
"DomainSchema",
|
|
246
274
|
"DomainSchemaTypedDict",
|
|
247
|
-
"
|
|
248
|
-
"
|
|
275
|
+
"Eight",
|
|
276
|
+
"EightTypedDict",
|
|
249
277
|
"Event",
|
|
250
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",
|
|
251
294
|
"FolderSchema",
|
|
252
295
|
"FolderSchemaTypedDict",
|
|
296
|
+
"Four",
|
|
297
|
+
"FourTypedDict",
|
|
253
298
|
"LeadCreatedEvent",
|
|
254
299
|
"LeadCreatedEventClick",
|
|
255
300
|
"LeadCreatedEventClickTypedDict",
|
|
@@ -286,6 +331,8 @@ __all__ = [
|
|
|
286
331
|
"Links",
|
|
287
332
|
"LinksTypedDict",
|
|
288
333
|
"One",
|
|
334
|
+
"Options",
|
|
335
|
+
"OptionsTypedDict",
|
|
289
336
|
"Partner",
|
|
290
337
|
"PartnerAnalyticsCount",
|
|
291
338
|
"PartnerAnalyticsCountTypedDict",
|
|
@@ -305,13 +352,20 @@ __all__ = [
|
|
|
305
352
|
"PartnerEnrolledEventData",
|
|
306
353
|
"PartnerEnrolledEventDataTypedDict",
|
|
307
354
|
"PartnerEnrolledEventEvent",
|
|
355
|
+
"PartnerEnrolledEventFieldsDataReferralFormData5Type",
|
|
356
|
+
"PartnerEnrolledEventFieldsDataReferralFormData6Type",
|
|
357
|
+
"PartnerEnrolledEventFieldsDataReferralFormData7Type",
|
|
358
|
+
"PartnerEnrolledEventFieldsDataReferralFormData8Type",
|
|
359
|
+
"PartnerEnrolledEventFieldsDataReferralFormDataType",
|
|
360
|
+
"PartnerEnrolledEventFieldsDataType",
|
|
361
|
+
"PartnerEnrolledEventFieldsType",
|
|
308
362
|
"PartnerEnrolledEventTypedDict",
|
|
309
363
|
"PartnerTypedDict",
|
|
310
|
-
"
|
|
364
|
+
"ReferralFormData",
|
|
365
|
+
"ReferralFormDataTypedDict",
|
|
311
366
|
"Region",
|
|
312
367
|
"RegisteredDomain",
|
|
313
368
|
"RegisteredDomainTypedDict",
|
|
314
|
-
"Role",
|
|
315
369
|
"Sale",
|
|
316
370
|
"SaleCreatedEvent",
|
|
317
371
|
"SaleCreatedEventClick",
|
|
@@ -331,6 +385,10 @@ __all__ = [
|
|
|
331
385
|
"SaleTypedDict",
|
|
332
386
|
"Security",
|
|
333
387
|
"SecurityTypedDict",
|
|
388
|
+
"Seven",
|
|
389
|
+
"SevenTypedDict",
|
|
390
|
+
"Six",
|
|
391
|
+
"SixTypedDict",
|
|
334
392
|
"Status",
|
|
335
393
|
"TestVariants",
|
|
336
394
|
"TestVariantsTypedDict",
|
|
@@ -338,12 +396,8 @@ __all__ = [
|
|
|
338
396
|
"Trigger",
|
|
339
397
|
"Two",
|
|
340
398
|
"Type",
|
|
341
|
-
"Users",
|
|
342
|
-
"UsersTypedDict",
|
|
343
399
|
"WebhookEvent",
|
|
344
400
|
"WebhookEventTypedDict",
|
|
345
|
-
"WorkspaceSchema",
|
|
346
|
-
"WorkspaceSchemaTypedDict",
|
|
347
401
|
]
|
|
348
402
|
|
|
349
403
|
_dynamic_imports: dict[str, str] = {
|
|
@@ -468,13 +522,49 @@ _dynamic_imports: dict[str, str] = {
|
|
|
468
522
|
"PartnerApplicationSubmittedEventStatus": ".partnerapplicationsubmittedevent",
|
|
469
523
|
"PartnerApplicationSubmittedEventTypedDict": ".partnerapplicationsubmittedevent",
|
|
470
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",
|
|
471
546
|
"Links": ".partnerenrolledevent",
|
|
472
547
|
"LinksTypedDict": ".partnerenrolledevent",
|
|
548
|
+
"Options": ".partnerenrolledevent",
|
|
549
|
+
"OptionsTypedDict": ".partnerenrolledevent",
|
|
473
550
|
"PartnerEnrolledEvent": ".partnerenrolledevent",
|
|
474
551
|
"PartnerEnrolledEventData": ".partnerenrolledevent",
|
|
475
552
|
"PartnerEnrolledEventDataTypedDict": ".partnerenrolledevent",
|
|
476
553
|
"PartnerEnrolledEventEvent": ".partnerenrolledevent",
|
|
554
|
+
"PartnerEnrolledEventFieldsDataReferralFormData5Type": ".partnerenrolledevent",
|
|
555
|
+
"PartnerEnrolledEventFieldsDataReferralFormData6Type": ".partnerenrolledevent",
|
|
556
|
+
"PartnerEnrolledEventFieldsDataReferralFormData7Type": ".partnerenrolledevent",
|
|
557
|
+
"PartnerEnrolledEventFieldsDataReferralFormData8Type": ".partnerenrolledevent",
|
|
558
|
+
"PartnerEnrolledEventFieldsDataReferralFormDataType": ".partnerenrolledevent",
|
|
559
|
+
"PartnerEnrolledEventFieldsDataType": ".partnerenrolledevent",
|
|
560
|
+
"PartnerEnrolledEventFieldsType": ".partnerenrolledevent",
|
|
477
561
|
"PartnerEnrolledEventTypedDict": ".partnerenrolledevent",
|
|
562
|
+
"ReferralFormData": ".partnerenrolledevent",
|
|
563
|
+
"ReferralFormDataTypedDict": ".partnerenrolledevent",
|
|
564
|
+
"Seven": ".partnerenrolledevent",
|
|
565
|
+
"SevenTypedDict": ".partnerenrolledevent",
|
|
566
|
+
"Six": ".partnerenrolledevent",
|
|
567
|
+
"SixTypedDict": ".partnerenrolledevent",
|
|
478
568
|
"Status": ".partnerenrolledevent",
|
|
479
569
|
"Sale": ".salecreatedevent",
|
|
480
570
|
"SaleCreatedEvent": ".salecreatedevent",
|
|
@@ -497,14 +587,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
497
587
|
"SecurityTypedDict": ".security",
|
|
498
588
|
"WebhookEvent": ".webhookevent",
|
|
499
589
|
"WebhookEventTypedDict": ".webhookevent",
|
|
500
|
-
"Domains": ".workspaceschema",
|
|
501
|
-
"DomainsTypedDict": ".workspaceschema",
|
|
502
|
-
"Plan": ".workspaceschema",
|
|
503
|
-
"Role": ".workspaceschema",
|
|
504
|
-
"Users": ".workspaceschema",
|
|
505
|
-
"UsersTypedDict": ".workspaceschema",
|
|
506
|
-
"WorkspaceSchema": ".workspaceschema",
|
|
507
|
-
"WorkspaceSchemaTypedDict": ".workspaceschema",
|
|
508
590
|
}
|
|
509
591
|
|
|
510
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
|