dub 0.27.0__py3-none-any.whl → 0.27.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.
- dub/_version.py +3 -3
- dub/analytics.py +21 -36
- dub/commissions.py +41 -72
- dub/customers.py +101 -180
- dub/domains.py +121 -224
- dub/embed_tokens.py +21 -36
- dub/events.py +21 -36
- dub/folders.py +81 -152
- dub/links.py +201 -376
- dub/models/operations/tracklead.py +2 -2
- dub/models/operations/tracksale.py +2 -2
- dub/partners.py +101 -192
- dub/qr_codes.py +19 -34
- dub/tags.py +81 -152
- dub/track.py +41 -72
- dub/utils/__init__.py +0 -3
- dub/utils/serializers.py +1 -18
- dub/utils/unmarshal_json_response.py +24 -0
- dub/workspaces.py +41 -72
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/METADATA +1 -1
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/RECORD +23 -22
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/LICENSE +0 -0
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/WHEEL +0 -0
dub/domains.py
CHANGED
|
@@ -5,6 +5,7 @@ from dub import utils
|
|
|
5
5
|
from dub._hooks import HookContext
|
|
6
6
|
from dub.models import components, errors, operations
|
|
7
7
|
from dub.types import BaseModel, OptionalNullable, UNSET
|
|
8
|
+
from dub.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from jsonpath import JSONPath
|
|
9
10
|
from typing import Any, Dict, List, Mapping, Optional, Union, cast
|
|
10
11
|
|
|
@@ -108,47 +109,37 @@ class Domains(BaseSDK):
|
|
|
108
109
|
|
|
109
110
|
response_data: Any = None
|
|
110
111
|
if utils.match_response(http_res, "201", "application/json"):
|
|
111
|
-
return
|
|
112
|
-
Optional[components.DomainSchema], http_res
|
|
113
|
-
)
|
|
112
|
+
return unmarshal_json_response(Optional[components.DomainSchema], http_res)
|
|
114
113
|
if utils.match_response(http_res, "400", "application/json"):
|
|
115
|
-
response_data =
|
|
116
|
-
errors.BadRequestData, http_res
|
|
117
|
-
)
|
|
114
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
118
115
|
raise errors.BadRequest(response_data, http_res)
|
|
119
116
|
if utils.match_response(http_res, "401", "application/json"):
|
|
120
|
-
response_data =
|
|
121
|
-
errors.UnauthorizedData, http_res
|
|
122
|
-
)
|
|
117
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
123
118
|
raise errors.Unauthorized(response_data, http_res)
|
|
124
119
|
if utils.match_response(http_res, "403", "application/json"):
|
|
125
|
-
response_data =
|
|
126
|
-
errors.ForbiddenData, http_res
|
|
127
|
-
)
|
|
120
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
128
121
|
raise errors.Forbidden(response_data, http_res)
|
|
129
122
|
if utils.match_response(http_res, "404", "application/json"):
|
|
130
|
-
response_data =
|
|
123
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
131
124
|
raise errors.NotFound(response_data, http_res)
|
|
132
125
|
if utils.match_response(http_res, "409", "application/json"):
|
|
133
|
-
response_data =
|
|
126
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
134
127
|
raise errors.Conflict(response_data, http_res)
|
|
135
128
|
if utils.match_response(http_res, "410", "application/json"):
|
|
136
|
-
response_data =
|
|
137
|
-
errors.InviteExpiredData, http_res
|
|
138
|
-
)
|
|
129
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
139
130
|
raise errors.InviteExpired(response_data, http_res)
|
|
140
131
|
if utils.match_response(http_res, "422", "application/json"):
|
|
141
|
-
response_data =
|
|
132
|
+
response_data = unmarshal_json_response(
|
|
142
133
|
errors.UnprocessableEntityData, http_res
|
|
143
134
|
)
|
|
144
135
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
145
136
|
if utils.match_response(http_res, "429", "application/json"):
|
|
146
|
-
response_data =
|
|
137
|
+
response_data = unmarshal_json_response(
|
|
147
138
|
errors.RateLimitExceededData, http_res
|
|
148
139
|
)
|
|
149
140
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
150
141
|
if utils.match_response(http_res, "500", "application/json"):
|
|
151
|
-
response_data =
|
|
142
|
+
response_data = unmarshal_json_response(
|
|
152
143
|
errors.InternalServerErrorData, http_res
|
|
153
144
|
)
|
|
154
145
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -259,47 +250,37 @@ class Domains(BaseSDK):
|
|
|
259
250
|
|
|
260
251
|
response_data: Any = None
|
|
261
252
|
if utils.match_response(http_res, "201", "application/json"):
|
|
262
|
-
return
|
|
263
|
-
Optional[components.DomainSchema], http_res
|
|
264
|
-
)
|
|
253
|
+
return unmarshal_json_response(Optional[components.DomainSchema], http_res)
|
|
265
254
|
if utils.match_response(http_res, "400", "application/json"):
|
|
266
|
-
response_data =
|
|
267
|
-
errors.BadRequestData, http_res
|
|
268
|
-
)
|
|
255
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
269
256
|
raise errors.BadRequest(response_data, http_res)
|
|
270
257
|
if utils.match_response(http_res, "401", "application/json"):
|
|
271
|
-
response_data =
|
|
272
|
-
errors.UnauthorizedData, http_res
|
|
273
|
-
)
|
|
258
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
274
259
|
raise errors.Unauthorized(response_data, http_res)
|
|
275
260
|
if utils.match_response(http_res, "403", "application/json"):
|
|
276
|
-
response_data =
|
|
277
|
-
errors.ForbiddenData, http_res
|
|
278
|
-
)
|
|
261
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
279
262
|
raise errors.Forbidden(response_data, http_res)
|
|
280
263
|
if utils.match_response(http_res, "404", "application/json"):
|
|
281
|
-
response_data =
|
|
264
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
282
265
|
raise errors.NotFound(response_data, http_res)
|
|
283
266
|
if utils.match_response(http_res, "409", "application/json"):
|
|
284
|
-
response_data =
|
|
267
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
285
268
|
raise errors.Conflict(response_data, http_res)
|
|
286
269
|
if utils.match_response(http_res, "410", "application/json"):
|
|
287
|
-
response_data =
|
|
288
|
-
errors.InviteExpiredData, http_res
|
|
289
|
-
)
|
|
270
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
290
271
|
raise errors.InviteExpired(response_data, http_res)
|
|
291
272
|
if utils.match_response(http_res, "422", "application/json"):
|
|
292
|
-
response_data =
|
|
273
|
+
response_data = unmarshal_json_response(
|
|
293
274
|
errors.UnprocessableEntityData, http_res
|
|
294
275
|
)
|
|
295
276
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
296
277
|
if utils.match_response(http_res, "429", "application/json"):
|
|
297
|
-
response_data =
|
|
278
|
+
response_data = unmarshal_json_response(
|
|
298
279
|
errors.RateLimitExceededData, http_res
|
|
299
280
|
)
|
|
300
281
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
301
282
|
if utils.match_response(http_res, "500", "application/json"):
|
|
302
|
-
response_data =
|
|
283
|
+
response_data = unmarshal_json_response(
|
|
303
284
|
errors.InternalServerErrorData, http_res
|
|
304
285
|
)
|
|
305
286
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -423,49 +404,41 @@ class Domains(BaseSDK):
|
|
|
423
404
|
response_data: Any = None
|
|
424
405
|
if utils.match_response(http_res, "200", "application/json"):
|
|
425
406
|
return operations.ListDomainsResponse(
|
|
426
|
-
result=
|
|
407
|
+
result=unmarshal_json_response(
|
|
427
408
|
Optional[List[components.DomainSchema]], http_res
|
|
428
409
|
),
|
|
429
410
|
next=next_func,
|
|
430
411
|
)
|
|
431
412
|
if utils.match_response(http_res, "400", "application/json"):
|
|
432
|
-
response_data =
|
|
433
|
-
errors.BadRequestData, http_res
|
|
434
|
-
)
|
|
413
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
435
414
|
raise errors.BadRequest(response_data, http_res)
|
|
436
415
|
if utils.match_response(http_res, "401", "application/json"):
|
|
437
|
-
response_data =
|
|
438
|
-
errors.UnauthorizedData, http_res
|
|
439
|
-
)
|
|
416
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
440
417
|
raise errors.Unauthorized(response_data, http_res)
|
|
441
418
|
if utils.match_response(http_res, "403", "application/json"):
|
|
442
|
-
response_data =
|
|
443
|
-
errors.ForbiddenData, http_res
|
|
444
|
-
)
|
|
419
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
445
420
|
raise errors.Forbidden(response_data, http_res)
|
|
446
421
|
if utils.match_response(http_res, "404", "application/json"):
|
|
447
|
-
response_data =
|
|
422
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
448
423
|
raise errors.NotFound(response_data, http_res)
|
|
449
424
|
if utils.match_response(http_res, "409", "application/json"):
|
|
450
|
-
response_data =
|
|
425
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
451
426
|
raise errors.Conflict(response_data, http_res)
|
|
452
427
|
if utils.match_response(http_res, "410", "application/json"):
|
|
453
|
-
response_data =
|
|
454
|
-
errors.InviteExpiredData, http_res
|
|
455
|
-
)
|
|
428
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
456
429
|
raise errors.InviteExpired(response_data, http_res)
|
|
457
430
|
if utils.match_response(http_res, "422", "application/json"):
|
|
458
|
-
response_data =
|
|
431
|
+
response_data = unmarshal_json_response(
|
|
459
432
|
errors.UnprocessableEntityData, http_res
|
|
460
433
|
)
|
|
461
434
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
462
435
|
if utils.match_response(http_res, "429", "application/json"):
|
|
463
|
-
response_data =
|
|
436
|
+
response_data = unmarshal_json_response(
|
|
464
437
|
errors.RateLimitExceededData, http_res
|
|
465
438
|
)
|
|
466
439
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
467
440
|
if utils.match_response(http_res, "500", "application/json"):
|
|
468
|
-
response_data =
|
|
441
|
+
response_data = unmarshal_json_response(
|
|
469
442
|
errors.InternalServerErrorData, http_res
|
|
470
443
|
)
|
|
471
444
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -589,49 +562,41 @@ class Domains(BaseSDK):
|
|
|
589
562
|
response_data: Any = None
|
|
590
563
|
if utils.match_response(http_res, "200", "application/json"):
|
|
591
564
|
return operations.ListDomainsResponse(
|
|
592
|
-
result=
|
|
565
|
+
result=unmarshal_json_response(
|
|
593
566
|
Optional[List[components.DomainSchema]], http_res
|
|
594
567
|
),
|
|
595
568
|
next=next_func,
|
|
596
569
|
)
|
|
597
570
|
if utils.match_response(http_res, "400", "application/json"):
|
|
598
|
-
response_data =
|
|
599
|
-
errors.BadRequestData, http_res
|
|
600
|
-
)
|
|
571
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
601
572
|
raise errors.BadRequest(response_data, http_res)
|
|
602
573
|
if utils.match_response(http_res, "401", "application/json"):
|
|
603
|
-
response_data =
|
|
604
|
-
errors.UnauthorizedData, http_res
|
|
605
|
-
)
|
|
574
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
606
575
|
raise errors.Unauthorized(response_data, http_res)
|
|
607
576
|
if utils.match_response(http_res, "403", "application/json"):
|
|
608
|
-
response_data =
|
|
609
|
-
errors.ForbiddenData, http_res
|
|
610
|
-
)
|
|
577
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
611
578
|
raise errors.Forbidden(response_data, http_res)
|
|
612
579
|
if utils.match_response(http_res, "404", "application/json"):
|
|
613
|
-
response_data =
|
|
580
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
614
581
|
raise errors.NotFound(response_data, http_res)
|
|
615
582
|
if utils.match_response(http_res, "409", "application/json"):
|
|
616
|
-
response_data =
|
|
583
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
617
584
|
raise errors.Conflict(response_data, http_res)
|
|
618
585
|
if utils.match_response(http_res, "410", "application/json"):
|
|
619
|
-
response_data =
|
|
620
|
-
errors.InviteExpiredData, http_res
|
|
621
|
-
)
|
|
586
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
622
587
|
raise errors.InviteExpired(response_data, http_res)
|
|
623
588
|
if utils.match_response(http_res, "422", "application/json"):
|
|
624
|
-
response_data =
|
|
589
|
+
response_data = unmarshal_json_response(
|
|
625
590
|
errors.UnprocessableEntityData, http_res
|
|
626
591
|
)
|
|
627
592
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
628
593
|
if utils.match_response(http_res, "429", "application/json"):
|
|
629
|
-
response_data =
|
|
594
|
+
response_data = unmarshal_json_response(
|
|
630
595
|
errors.RateLimitExceededData, http_res
|
|
631
596
|
)
|
|
632
597
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
633
598
|
if utils.match_response(http_res, "500", "application/json"):
|
|
634
|
-
response_data =
|
|
599
|
+
response_data = unmarshal_json_response(
|
|
635
600
|
errors.InternalServerErrorData, http_res
|
|
636
601
|
)
|
|
637
602
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -745,47 +710,37 @@ class Domains(BaseSDK):
|
|
|
745
710
|
|
|
746
711
|
response_data: Any = None
|
|
747
712
|
if utils.match_response(http_res, "200", "application/json"):
|
|
748
|
-
return
|
|
749
|
-
Optional[components.DomainSchema], http_res
|
|
750
|
-
)
|
|
713
|
+
return unmarshal_json_response(Optional[components.DomainSchema], http_res)
|
|
751
714
|
if utils.match_response(http_res, "400", "application/json"):
|
|
752
|
-
response_data =
|
|
753
|
-
errors.BadRequestData, http_res
|
|
754
|
-
)
|
|
715
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
755
716
|
raise errors.BadRequest(response_data, http_res)
|
|
756
717
|
if utils.match_response(http_res, "401", "application/json"):
|
|
757
|
-
response_data =
|
|
758
|
-
errors.UnauthorizedData, http_res
|
|
759
|
-
)
|
|
718
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
760
719
|
raise errors.Unauthorized(response_data, http_res)
|
|
761
720
|
if utils.match_response(http_res, "403", "application/json"):
|
|
762
|
-
response_data =
|
|
763
|
-
errors.ForbiddenData, http_res
|
|
764
|
-
)
|
|
721
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
765
722
|
raise errors.Forbidden(response_data, http_res)
|
|
766
723
|
if utils.match_response(http_res, "404", "application/json"):
|
|
767
|
-
response_data =
|
|
724
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
768
725
|
raise errors.NotFound(response_data, http_res)
|
|
769
726
|
if utils.match_response(http_res, "409", "application/json"):
|
|
770
|
-
response_data =
|
|
727
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
771
728
|
raise errors.Conflict(response_data, http_res)
|
|
772
729
|
if utils.match_response(http_res, "410", "application/json"):
|
|
773
|
-
response_data =
|
|
774
|
-
errors.InviteExpiredData, http_res
|
|
775
|
-
)
|
|
730
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
776
731
|
raise errors.InviteExpired(response_data, http_res)
|
|
777
732
|
if utils.match_response(http_res, "422", "application/json"):
|
|
778
|
-
response_data =
|
|
733
|
+
response_data = unmarshal_json_response(
|
|
779
734
|
errors.UnprocessableEntityData, http_res
|
|
780
735
|
)
|
|
781
736
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
782
737
|
if utils.match_response(http_res, "429", "application/json"):
|
|
783
|
-
response_data =
|
|
738
|
+
response_data = unmarshal_json_response(
|
|
784
739
|
errors.RateLimitExceededData, http_res
|
|
785
740
|
)
|
|
786
741
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
787
742
|
if utils.match_response(http_res, "500", "application/json"):
|
|
788
|
-
response_data =
|
|
743
|
+
response_data = unmarshal_json_response(
|
|
789
744
|
errors.InternalServerErrorData, http_res
|
|
790
745
|
)
|
|
791
746
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -899,47 +854,37 @@ class Domains(BaseSDK):
|
|
|
899
854
|
|
|
900
855
|
response_data: Any = None
|
|
901
856
|
if utils.match_response(http_res, "200", "application/json"):
|
|
902
|
-
return
|
|
903
|
-
Optional[components.DomainSchema], http_res
|
|
904
|
-
)
|
|
857
|
+
return unmarshal_json_response(Optional[components.DomainSchema], http_res)
|
|
905
858
|
if utils.match_response(http_res, "400", "application/json"):
|
|
906
|
-
response_data =
|
|
907
|
-
errors.BadRequestData, http_res
|
|
908
|
-
)
|
|
859
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
909
860
|
raise errors.BadRequest(response_data, http_res)
|
|
910
861
|
if utils.match_response(http_res, "401", "application/json"):
|
|
911
|
-
response_data =
|
|
912
|
-
errors.UnauthorizedData, http_res
|
|
913
|
-
)
|
|
862
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
914
863
|
raise errors.Unauthorized(response_data, http_res)
|
|
915
864
|
if utils.match_response(http_res, "403", "application/json"):
|
|
916
|
-
response_data =
|
|
917
|
-
errors.ForbiddenData, http_res
|
|
918
|
-
)
|
|
865
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
919
866
|
raise errors.Forbidden(response_data, http_res)
|
|
920
867
|
if utils.match_response(http_res, "404", "application/json"):
|
|
921
|
-
response_data =
|
|
868
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
922
869
|
raise errors.NotFound(response_data, http_res)
|
|
923
870
|
if utils.match_response(http_res, "409", "application/json"):
|
|
924
|
-
response_data =
|
|
871
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
925
872
|
raise errors.Conflict(response_data, http_res)
|
|
926
873
|
if utils.match_response(http_res, "410", "application/json"):
|
|
927
|
-
response_data =
|
|
928
|
-
errors.InviteExpiredData, http_res
|
|
929
|
-
)
|
|
874
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
930
875
|
raise errors.InviteExpired(response_data, http_res)
|
|
931
876
|
if utils.match_response(http_res, "422", "application/json"):
|
|
932
|
-
response_data =
|
|
877
|
+
response_data = unmarshal_json_response(
|
|
933
878
|
errors.UnprocessableEntityData, http_res
|
|
934
879
|
)
|
|
935
880
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
936
881
|
if utils.match_response(http_res, "429", "application/json"):
|
|
937
|
-
response_data =
|
|
882
|
+
response_data = unmarshal_json_response(
|
|
938
883
|
errors.RateLimitExceededData, http_res
|
|
939
884
|
)
|
|
940
885
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
941
886
|
if utils.match_response(http_res, "500", "application/json"):
|
|
942
|
-
response_data =
|
|
887
|
+
response_data = unmarshal_json_response(
|
|
943
888
|
errors.InternalServerErrorData, http_res
|
|
944
889
|
)
|
|
945
890
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1036,47 +981,39 @@ class Domains(BaseSDK):
|
|
|
1036
981
|
|
|
1037
982
|
response_data: Any = None
|
|
1038
983
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1039
|
-
return
|
|
984
|
+
return unmarshal_json_response(
|
|
1040
985
|
Optional[operations.DeleteDomainResponseBody], http_res
|
|
1041
986
|
)
|
|
1042
987
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1043
|
-
response_data =
|
|
1044
|
-
errors.BadRequestData, http_res
|
|
1045
|
-
)
|
|
988
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1046
989
|
raise errors.BadRequest(response_data, http_res)
|
|
1047
990
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1048
|
-
response_data =
|
|
1049
|
-
errors.UnauthorizedData, http_res
|
|
1050
|
-
)
|
|
991
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1051
992
|
raise errors.Unauthorized(response_data, http_res)
|
|
1052
993
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1053
|
-
response_data =
|
|
1054
|
-
errors.ForbiddenData, http_res
|
|
1055
|
-
)
|
|
994
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1056
995
|
raise errors.Forbidden(response_data, http_res)
|
|
1057
996
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1058
|
-
response_data =
|
|
997
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1059
998
|
raise errors.NotFound(response_data, http_res)
|
|
1060
999
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1061
|
-
response_data =
|
|
1000
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1062
1001
|
raise errors.Conflict(response_data, http_res)
|
|
1063
1002
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1064
|
-
response_data =
|
|
1065
|
-
errors.InviteExpiredData, http_res
|
|
1066
|
-
)
|
|
1003
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1067
1004
|
raise errors.InviteExpired(response_data, http_res)
|
|
1068
1005
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1069
|
-
response_data =
|
|
1006
|
+
response_data = unmarshal_json_response(
|
|
1070
1007
|
errors.UnprocessableEntityData, http_res
|
|
1071
1008
|
)
|
|
1072
1009
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1073
1010
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1074
|
-
response_data =
|
|
1011
|
+
response_data = unmarshal_json_response(
|
|
1075
1012
|
errors.RateLimitExceededData, http_res
|
|
1076
1013
|
)
|
|
1077
1014
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1078
1015
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1079
|
-
response_data =
|
|
1016
|
+
response_data = unmarshal_json_response(
|
|
1080
1017
|
errors.InternalServerErrorData, http_res
|
|
1081
1018
|
)
|
|
1082
1019
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1173,47 +1110,39 @@ class Domains(BaseSDK):
|
|
|
1173
1110
|
|
|
1174
1111
|
response_data: Any = None
|
|
1175
1112
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1176
|
-
return
|
|
1113
|
+
return unmarshal_json_response(
|
|
1177
1114
|
Optional[operations.DeleteDomainResponseBody], http_res
|
|
1178
1115
|
)
|
|
1179
1116
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1180
|
-
response_data =
|
|
1181
|
-
errors.BadRequestData, http_res
|
|
1182
|
-
)
|
|
1117
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1183
1118
|
raise errors.BadRequest(response_data, http_res)
|
|
1184
1119
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1185
|
-
response_data =
|
|
1186
|
-
errors.UnauthorizedData, http_res
|
|
1187
|
-
)
|
|
1120
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1188
1121
|
raise errors.Unauthorized(response_data, http_res)
|
|
1189
1122
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1190
|
-
response_data =
|
|
1191
|
-
errors.ForbiddenData, http_res
|
|
1192
|
-
)
|
|
1123
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1193
1124
|
raise errors.Forbidden(response_data, http_res)
|
|
1194
1125
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1195
|
-
response_data =
|
|
1126
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1196
1127
|
raise errors.NotFound(response_data, http_res)
|
|
1197
1128
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1198
|
-
response_data =
|
|
1129
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1199
1130
|
raise errors.Conflict(response_data, http_res)
|
|
1200
1131
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1201
|
-
response_data =
|
|
1202
|
-
errors.InviteExpiredData, http_res
|
|
1203
|
-
)
|
|
1132
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1204
1133
|
raise errors.InviteExpired(response_data, http_res)
|
|
1205
1134
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1206
|
-
response_data =
|
|
1135
|
+
response_data = unmarshal_json_response(
|
|
1207
1136
|
errors.UnprocessableEntityData, http_res
|
|
1208
1137
|
)
|
|
1209
1138
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1210
1139
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1211
|
-
response_data =
|
|
1140
|
+
response_data = unmarshal_json_response(
|
|
1212
1141
|
errors.RateLimitExceededData, http_res
|
|
1213
1142
|
)
|
|
1214
1143
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1215
1144
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1216
|
-
response_data =
|
|
1145
|
+
response_data = unmarshal_json_response(
|
|
1217
1146
|
errors.InternalServerErrorData, http_res
|
|
1218
1147
|
)
|
|
1219
1148
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1324,47 +1253,39 @@ class Domains(BaseSDK):
|
|
|
1324
1253
|
|
|
1325
1254
|
response_data: Any = None
|
|
1326
1255
|
if utils.match_response(http_res, "201", "application/json"):
|
|
1327
|
-
return
|
|
1256
|
+
return unmarshal_json_response(
|
|
1328
1257
|
Optional[operations.RegisterDomainResponseBody], http_res
|
|
1329
1258
|
)
|
|
1330
1259
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1331
|
-
response_data =
|
|
1332
|
-
errors.BadRequestData, http_res
|
|
1333
|
-
)
|
|
1260
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1334
1261
|
raise errors.BadRequest(response_data, http_res)
|
|
1335
1262
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1336
|
-
response_data =
|
|
1337
|
-
errors.UnauthorizedData, http_res
|
|
1338
|
-
)
|
|
1263
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1339
1264
|
raise errors.Unauthorized(response_data, http_res)
|
|
1340
1265
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1341
|
-
response_data =
|
|
1342
|
-
errors.ForbiddenData, http_res
|
|
1343
|
-
)
|
|
1266
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1344
1267
|
raise errors.Forbidden(response_data, http_res)
|
|
1345
1268
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1346
|
-
response_data =
|
|
1269
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1347
1270
|
raise errors.NotFound(response_data, http_res)
|
|
1348
1271
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1349
|
-
response_data =
|
|
1272
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1350
1273
|
raise errors.Conflict(response_data, http_res)
|
|
1351
1274
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1352
|
-
response_data =
|
|
1353
|
-
errors.InviteExpiredData, http_res
|
|
1354
|
-
)
|
|
1275
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1355
1276
|
raise errors.InviteExpired(response_data, http_res)
|
|
1356
1277
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1357
|
-
response_data =
|
|
1278
|
+
response_data = unmarshal_json_response(
|
|
1358
1279
|
errors.UnprocessableEntityData, http_res
|
|
1359
1280
|
)
|
|
1360
1281
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1361
1282
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1362
|
-
response_data =
|
|
1283
|
+
response_data = unmarshal_json_response(
|
|
1363
1284
|
errors.RateLimitExceededData, http_res
|
|
1364
1285
|
)
|
|
1365
1286
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1366
1287
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1367
|
-
response_data =
|
|
1288
|
+
response_data = unmarshal_json_response(
|
|
1368
1289
|
errors.InternalServerErrorData, http_res
|
|
1369
1290
|
)
|
|
1370
1291
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1475,47 +1396,39 @@ class Domains(BaseSDK):
|
|
|
1475
1396
|
|
|
1476
1397
|
response_data: Any = None
|
|
1477
1398
|
if utils.match_response(http_res, "201", "application/json"):
|
|
1478
|
-
return
|
|
1399
|
+
return unmarshal_json_response(
|
|
1479
1400
|
Optional[operations.RegisterDomainResponseBody], http_res
|
|
1480
1401
|
)
|
|
1481
1402
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1482
|
-
response_data =
|
|
1483
|
-
errors.BadRequestData, http_res
|
|
1484
|
-
)
|
|
1403
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1485
1404
|
raise errors.BadRequest(response_data, http_res)
|
|
1486
1405
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1487
|
-
response_data =
|
|
1488
|
-
errors.UnauthorizedData, http_res
|
|
1489
|
-
)
|
|
1406
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1490
1407
|
raise errors.Unauthorized(response_data, http_res)
|
|
1491
1408
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1492
|
-
response_data =
|
|
1493
|
-
errors.ForbiddenData, http_res
|
|
1494
|
-
)
|
|
1409
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1495
1410
|
raise errors.Forbidden(response_data, http_res)
|
|
1496
1411
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1497
|
-
response_data =
|
|
1412
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1498
1413
|
raise errors.NotFound(response_data, http_res)
|
|
1499
1414
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1500
|
-
response_data =
|
|
1415
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1501
1416
|
raise errors.Conflict(response_data, http_res)
|
|
1502
1417
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1503
|
-
response_data =
|
|
1504
|
-
errors.InviteExpiredData, http_res
|
|
1505
|
-
)
|
|
1418
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1506
1419
|
raise errors.InviteExpired(response_data, http_res)
|
|
1507
1420
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1508
|
-
response_data =
|
|
1421
|
+
response_data = unmarshal_json_response(
|
|
1509
1422
|
errors.UnprocessableEntityData, http_res
|
|
1510
1423
|
)
|
|
1511
1424
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1512
1425
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1513
|
-
response_data =
|
|
1426
|
+
response_data = unmarshal_json_response(
|
|
1514
1427
|
errors.RateLimitExceededData, http_res
|
|
1515
1428
|
)
|
|
1516
1429
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1517
1430
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1518
|
-
response_data =
|
|
1431
|
+
response_data = unmarshal_json_response(
|
|
1519
1432
|
errors.InternalServerErrorData, http_res
|
|
1520
1433
|
)
|
|
1521
1434
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1615,47 +1528,39 @@ class Domains(BaseSDK):
|
|
|
1615
1528
|
|
|
1616
1529
|
response_data: Any = None
|
|
1617
1530
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1618
|
-
return
|
|
1531
|
+
return unmarshal_json_response(
|
|
1619
1532
|
Optional[List[operations.CheckDomainStatusResponseBody]], http_res
|
|
1620
1533
|
)
|
|
1621
1534
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1622
|
-
response_data =
|
|
1623
|
-
errors.BadRequestData, http_res
|
|
1624
|
-
)
|
|
1535
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1625
1536
|
raise errors.BadRequest(response_data, http_res)
|
|
1626
1537
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1627
|
-
response_data =
|
|
1628
|
-
errors.UnauthorizedData, http_res
|
|
1629
|
-
)
|
|
1538
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1630
1539
|
raise errors.Unauthorized(response_data, http_res)
|
|
1631
1540
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1632
|
-
response_data =
|
|
1633
|
-
errors.ForbiddenData, http_res
|
|
1634
|
-
)
|
|
1541
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1635
1542
|
raise errors.Forbidden(response_data, http_res)
|
|
1636
1543
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1637
|
-
response_data =
|
|
1544
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1638
1545
|
raise errors.NotFound(response_data, http_res)
|
|
1639
1546
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1640
|
-
response_data =
|
|
1547
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1641
1548
|
raise errors.Conflict(response_data, http_res)
|
|
1642
1549
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1643
|
-
response_data =
|
|
1644
|
-
errors.InviteExpiredData, http_res
|
|
1645
|
-
)
|
|
1550
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1646
1551
|
raise errors.InviteExpired(response_data, http_res)
|
|
1647
1552
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1648
|
-
response_data =
|
|
1553
|
+
response_data = unmarshal_json_response(
|
|
1649
1554
|
errors.UnprocessableEntityData, http_res
|
|
1650
1555
|
)
|
|
1651
1556
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1652
1557
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1653
|
-
response_data =
|
|
1558
|
+
response_data = unmarshal_json_response(
|
|
1654
1559
|
errors.RateLimitExceededData, http_res
|
|
1655
1560
|
)
|
|
1656
1561
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1657
1562
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1658
|
-
response_data =
|
|
1563
|
+
response_data = unmarshal_json_response(
|
|
1659
1564
|
errors.InternalServerErrorData, http_res
|
|
1660
1565
|
)
|
|
1661
1566
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1755,47 +1660,39 @@ class Domains(BaseSDK):
|
|
|
1755
1660
|
|
|
1756
1661
|
response_data: Any = None
|
|
1757
1662
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1758
|
-
return
|
|
1663
|
+
return unmarshal_json_response(
|
|
1759
1664
|
Optional[List[operations.CheckDomainStatusResponseBody]], http_res
|
|
1760
1665
|
)
|
|
1761
1666
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1762
|
-
response_data =
|
|
1763
|
-
errors.BadRequestData, http_res
|
|
1764
|
-
)
|
|
1667
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1765
1668
|
raise errors.BadRequest(response_data, http_res)
|
|
1766
1669
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1767
|
-
response_data =
|
|
1768
|
-
errors.UnauthorizedData, http_res
|
|
1769
|
-
)
|
|
1670
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1770
1671
|
raise errors.Unauthorized(response_data, http_res)
|
|
1771
1672
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1772
|
-
response_data =
|
|
1773
|
-
errors.ForbiddenData, http_res
|
|
1774
|
-
)
|
|
1673
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1775
1674
|
raise errors.Forbidden(response_data, http_res)
|
|
1776
1675
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1777
|
-
response_data =
|
|
1676
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1778
1677
|
raise errors.NotFound(response_data, http_res)
|
|
1779
1678
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1780
|
-
response_data =
|
|
1679
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1781
1680
|
raise errors.Conflict(response_data, http_res)
|
|
1782
1681
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1783
|
-
response_data =
|
|
1784
|
-
errors.InviteExpiredData, http_res
|
|
1785
|
-
)
|
|
1682
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1786
1683
|
raise errors.InviteExpired(response_data, http_res)
|
|
1787
1684
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1788
|
-
response_data =
|
|
1685
|
+
response_data = unmarshal_json_response(
|
|
1789
1686
|
errors.UnprocessableEntityData, http_res
|
|
1790
1687
|
)
|
|
1791
1688
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1792
1689
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1793
|
-
response_data =
|
|
1690
|
+
response_data = unmarshal_json_response(
|
|
1794
1691
|
errors.RateLimitExceededData, http_res
|
|
1795
1692
|
)
|
|
1796
1693
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1797
1694
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1798
|
-
response_data =
|
|
1695
|
+
response_data = unmarshal_json_response(
|
|
1799
1696
|
errors.InternalServerErrorData, http_res
|
|
1800
1697
|
)
|
|
1801
1698
|
raise errors.InternalServerError(response_data, http_res)
|