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/folders.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 typing import Any, List, Mapping, Optional, Union, cast
|
|
9
10
|
|
|
10
11
|
|
|
@@ -107,47 +108,37 @@ class Folders(BaseSDK):
|
|
|
107
108
|
|
|
108
109
|
response_data: Any = None
|
|
109
110
|
if utils.match_response(http_res, "201", "application/json"):
|
|
110
|
-
return
|
|
111
|
-
Optional[components.FolderSchema], http_res
|
|
112
|
-
)
|
|
111
|
+
return unmarshal_json_response(Optional[components.FolderSchema], http_res)
|
|
113
112
|
if utils.match_response(http_res, "400", "application/json"):
|
|
114
|
-
response_data =
|
|
115
|
-
errors.BadRequestData, http_res
|
|
116
|
-
)
|
|
113
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
117
114
|
raise errors.BadRequest(response_data, http_res)
|
|
118
115
|
if utils.match_response(http_res, "401", "application/json"):
|
|
119
|
-
response_data =
|
|
120
|
-
errors.UnauthorizedData, http_res
|
|
121
|
-
)
|
|
116
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
122
117
|
raise errors.Unauthorized(response_data, http_res)
|
|
123
118
|
if utils.match_response(http_res, "403", "application/json"):
|
|
124
|
-
response_data =
|
|
125
|
-
errors.ForbiddenData, http_res
|
|
126
|
-
)
|
|
119
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
127
120
|
raise errors.Forbidden(response_data, http_res)
|
|
128
121
|
if utils.match_response(http_res, "404", "application/json"):
|
|
129
|
-
response_data =
|
|
122
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
130
123
|
raise errors.NotFound(response_data, http_res)
|
|
131
124
|
if utils.match_response(http_res, "409", "application/json"):
|
|
132
|
-
response_data =
|
|
125
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
133
126
|
raise errors.Conflict(response_data, http_res)
|
|
134
127
|
if utils.match_response(http_res, "410", "application/json"):
|
|
135
|
-
response_data =
|
|
136
|
-
errors.InviteExpiredData, http_res
|
|
137
|
-
)
|
|
128
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
138
129
|
raise errors.InviteExpired(response_data, http_res)
|
|
139
130
|
if utils.match_response(http_res, "422", "application/json"):
|
|
140
|
-
response_data =
|
|
131
|
+
response_data = unmarshal_json_response(
|
|
141
132
|
errors.UnprocessableEntityData, http_res
|
|
142
133
|
)
|
|
143
134
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
144
135
|
if utils.match_response(http_res, "429", "application/json"):
|
|
145
|
-
response_data =
|
|
136
|
+
response_data = unmarshal_json_response(
|
|
146
137
|
errors.RateLimitExceededData, http_res
|
|
147
138
|
)
|
|
148
139
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
149
140
|
if utils.match_response(http_res, "500", "application/json"):
|
|
150
|
-
response_data =
|
|
141
|
+
response_data = unmarshal_json_response(
|
|
151
142
|
errors.InternalServerErrorData, http_res
|
|
152
143
|
)
|
|
153
144
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -258,47 +249,37 @@ class Folders(BaseSDK):
|
|
|
258
249
|
|
|
259
250
|
response_data: Any = None
|
|
260
251
|
if utils.match_response(http_res, "201", "application/json"):
|
|
261
|
-
return
|
|
262
|
-
Optional[components.FolderSchema], http_res
|
|
263
|
-
)
|
|
252
|
+
return unmarshal_json_response(Optional[components.FolderSchema], http_res)
|
|
264
253
|
if utils.match_response(http_res, "400", "application/json"):
|
|
265
|
-
response_data =
|
|
266
|
-
errors.BadRequestData, http_res
|
|
267
|
-
)
|
|
254
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
268
255
|
raise errors.BadRequest(response_data, http_res)
|
|
269
256
|
if utils.match_response(http_res, "401", "application/json"):
|
|
270
|
-
response_data =
|
|
271
|
-
errors.UnauthorizedData, http_res
|
|
272
|
-
)
|
|
257
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
273
258
|
raise errors.Unauthorized(response_data, http_res)
|
|
274
259
|
if utils.match_response(http_res, "403", "application/json"):
|
|
275
|
-
response_data =
|
|
276
|
-
errors.ForbiddenData, http_res
|
|
277
|
-
)
|
|
260
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
278
261
|
raise errors.Forbidden(response_data, http_res)
|
|
279
262
|
if utils.match_response(http_res, "404", "application/json"):
|
|
280
|
-
response_data =
|
|
263
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
281
264
|
raise errors.NotFound(response_data, http_res)
|
|
282
265
|
if utils.match_response(http_res, "409", "application/json"):
|
|
283
|
-
response_data =
|
|
266
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
284
267
|
raise errors.Conflict(response_data, http_res)
|
|
285
268
|
if utils.match_response(http_res, "410", "application/json"):
|
|
286
|
-
response_data =
|
|
287
|
-
errors.InviteExpiredData, http_res
|
|
288
|
-
)
|
|
269
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
289
270
|
raise errors.InviteExpired(response_data, http_res)
|
|
290
271
|
if utils.match_response(http_res, "422", "application/json"):
|
|
291
|
-
response_data =
|
|
272
|
+
response_data = unmarshal_json_response(
|
|
292
273
|
errors.UnprocessableEntityData, http_res
|
|
293
274
|
)
|
|
294
275
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
295
276
|
if utils.match_response(http_res, "429", "application/json"):
|
|
296
|
-
response_data =
|
|
277
|
+
response_data = unmarshal_json_response(
|
|
297
278
|
errors.RateLimitExceededData, http_res
|
|
298
279
|
)
|
|
299
280
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
300
281
|
if utils.match_response(http_res, "500", "application/json"):
|
|
301
|
-
response_data =
|
|
282
|
+
response_data = unmarshal_json_response(
|
|
302
283
|
errors.InternalServerErrorData, http_res
|
|
303
284
|
)
|
|
304
285
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -397,47 +378,39 @@ class Folders(BaseSDK):
|
|
|
397
378
|
|
|
398
379
|
response_data: Any = None
|
|
399
380
|
if utils.match_response(http_res, "200", "application/json"):
|
|
400
|
-
return
|
|
381
|
+
return unmarshal_json_response(
|
|
401
382
|
Optional[List[components.FolderSchema]], http_res
|
|
402
383
|
)
|
|
403
384
|
if utils.match_response(http_res, "400", "application/json"):
|
|
404
|
-
response_data =
|
|
405
|
-
errors.BadRequestData, http_res
|
|
406
|
-
)
|
|
385
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
407
386
|
raise errors.BadRequest(response_data, http_res)
|
|
408
387
|
if utils.match_response(http_res, "401", "application/json"):
|
|
409
|
-
response_data =
|
|
410
|
-
errors.UnauthorizedData, http_res
|
|
411
|
-
)
|
|
388
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
412
389
|
raise errors.Unauthorized(response_data, http_res)
|
|
413
390
|
if utils.match_response(http_res, "403", "application/json"):
|
|
414
|
-
response_data =
|
|
415
|
-
errors.ForbiddenData, http_res
|
|
416
|
-
)
|
|
391
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
417
392
|
raise errors.Forbidden(response_data, http_res)
|
|
418
393
|
if utils.match_response(http_res, "404", "application/json"):
|
|
419
|
-
response_data =
|
|
394
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
420
395
|
raise errors.NotFound(response_data, http_res)
|
|
421
396
|
if utils.match_response(http_res, "409", "application/json"):
|
|
422
|
-
response_data =
|
|
397
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
423
398
|
raise errors.Conflict(response_data, http_res)
|
|
424
399
|
if utils.match_response(http_res, "410", "application/json"):
|
|
425
|
-
response_data =
|
|
426
|
-
errors.InviteExpiredData, http_res
|
|
427
|
-
)
|
|
400
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
428
401
|
raise errors.InviteExpired(response_data, http_res)
|
|
429
402
|
if utils.match_response(http_res, "422", "application/json"):
|
|
430
|
-
response_data =
|
|
403
|
+
response_data = unmarshal_json_response(
|
|
431
404
|
errors.UnprocessableEntityData, http_res
|
|
432
405
|
)
|
|
433
406
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
434
407
|
if utils.match_response(http_res, "429", "application/json"):
|
|
435
|
-
response_data =
|
|
408
|
+
response_data = unmarshal_json_response(
|
|
436
409
|
errors.RateLimitExceededData, http_res
|
|
437
410
|
)
|
|
438
411
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
439
412
|
if utils.match_response(http_res, "500", "application/json"):
|
|
440
|
-
response_data =
|
|
413
|
+
response_data = unmarshal_json_response(
|
|
441
414
|
errors.InternalServerErrorData, http_res
|
|
442
415
|
)
|
|
443
416
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -536,47 +509,39 @@ class Folders(BaseSDK):
|
|
|
536
509
|
|
|
537
510
|
response_data: Any = None
|
|
538
511
|
if utils.match_response(http_res, "200", "application/json"):
|
|
539
|
-
return
|
|
512
|
+
return unmarshal_json_response(
|
|
540
513
|
Optional[List[components.FolderSchema]], http_res
|
|
541
514
|
)
|
|
542
515
|
if utils.match_response(http_res, "400", "application/json"):
|
|
543
|
-
response_data =
|
|
544
|
-
errors.BadRequestData, http_res
|
|
545
|
-
)
|
|
516
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
546
517
|
raise errors.BadRequest(response_data, http_res)
|
|
547
518
|
if utils.match_response(http_res, "401", "application/json"):
|
|
548
|
-
response_data =
|
|
549
|
-
errors.UnauthorizedData, http_res
|
|
550
|
-
)
|
|
519
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
551
520
|
raise errors.Unauthorized(response_data, http_res)
|
|
552
521
|
if utils.match_response(http_res, "403", "application/json"):
|
|
553
|
-
response_data =
|
|
554
|
-
errors.ForbiddenData, http_res
|
|
555
|
-
)
|
|
522
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
556
523
|
raise errors.Forbidden(response_data, http_res)
|
|
557
524
|
if utils.match_response(http_res, "404", "application/json"):
|
|
558
|
-
response_data =
|
|
525
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
559
526
|
raise errors.NotFound(response_data, http_res)
|
|
560
527
|
if utils.match_response(http_res, "409", "application/json"):
|
|
561
|
-
response_data =
|
|
528
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
562
529
|
raise errors.Conflict(response_data, http_res)
|
|
563
530
|
if utils.match_response(http_res, "410", "application/json"):
|
|
564
|
-
response_data =
|
|
565
|
-
errors.InviteExpiredData, http_res
|
|
566
|
-
)
|
|
531
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
567
532
|
raise errors.InviteExpired(response_data, http_res)
|
|
568
533
|
if utils.match_response(http_res, "422", "application/json"):
|
|
569
|
-
response_data =
|
|
534
|
+
response_data = unmarshal_json_response(
|
|
570
535
|
errors.UnprocessableEntityData, http_res
|
|
571
536
|
)
|
|
572
537
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
573
538
|
if utils.match_response(http_res, "429", "application/json"):
|
|
574
|
-
response_data =
|
|
539
|
+
response_data = unmarshal_json_response(
|
|
575
540
|
errors.RateLimitExceededData, http_res
|
|
576
541
|
)
|
|
577
542
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
578
543
|
if utils.match_response(http_res, "500", "application/json"):
|
|
579
|
-
response_data =
|
|
544
|
+
response_data = unmarshal_json_response(
|
|
580
545
|
errors.InternalServerErrorData, http_res
|
|
581
546
|
)
|
|
582
547
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -690,47 +655,37 @@ class Folders(BaseSDK):
|
|
|
690
655
|
|
|
691
656
|
response_data: Any = None
|
|
692
657
|
if utils.match_response(http_res, "200", "application/json"):
|
|
693
|
-
return
|
|
694
|
-
Optional[components.FolderSchema], http_res
|
|
695
|
-
)
|
|
658
|
+
return unmarshal_json_response(Optional[components.FolderSchema], http_res)
|
|
696
659
|
if utils.match_response(http_res, "400", "application/json"):
|
|
697
|
-
response_data =
|
|
698
|
-
errors.BadRequestData, http_res
|
|
699
|
-
)
|
|
660
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
700
661
|
raise errors.BadRequest(response_data, http_res)
|
|
701
662
|
if utils.match_response(http_res, "401", "application/json"):
|
|
702
|
-
response_data =
|
|
703
|
-
errors.UnauthorizedData, http_res
|
|
704
|
-
)
|
|
663
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
705
664
|
raise errors.Unauthorized(response_data, http_res)
|
|
706
665
|
if utils.match_response(http_res, "403", "application/json"):
|
|
707
|
-
response_data =
|
|
708
|
-
errors.ForbiddenData, http_res
|
|
709
|
-
)
|
|
666
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
710
667
|
raise errors.Forbidden(response_data, http_res)
|
|
711
668
|
if utils.match_response(http_res, "404", "application/json"):
|
|
712
|
-
response_data =
|
|
669
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
713
670
|
raise errors.NotFound(response_data, http_res)
|
|
714
671
|
if utils.match_response(http_res, "409", "application/json"):
|
|
715
|
-
response_data =
|
|
672
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
716
673
|
raise errors.Conflict(response_data, http_res)
|
|
717
674
|
if utils.match_response(http_res, "410", "application/json"):
|
|
718
|
-
response_data =
|
|
719
|
-
errors.InviteExpiredData, http_res
|
|
720
|
-
)
|
|
675
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
721
676
|
raise errors.InviteExpired(response_data, http_res)
|
|
722
677
|
if utils.match_response(http_res, "422", "application/json"):
|
|
723
|
-
response_data =
|
|
678
|
+
response_data = unmarshal_json_response(
|
|
724
679
|
errors.UnprocessableEntityData, http_res
|
|
725
680
|
)
|
|
726
681
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
727
682
|
if utils.match_response(http_res, "429", "application/json"):
|
|
728
|
-
response_data =
|
|
683
|
+
response_data = unmarshal_json_response(
|
|
729
684
|
errors.RateLimitExceededData, http_res
|
|
730
685
|
)
|
|
731
686
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
732
687
|
if utils.match_response(http_res, "500", "application/json"):
|
|
733
|
-
response_data =
|
|
688
|
+
response_data = unmarshal_json_response(
|
|
734
689
|
errors.InternalServerErrorData, http_res
|
|
735
690
|
)
|
|
736
691
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -844,47 +799,37 @@ class Folders(BaseSDK):
|
|
|
844
799
|
|
|
845
800
|
response_data: Any = None
|
|
846
801
|
if utils.match_response(http_res, "200", "application/json"):
|
|
847
|
-
return
|
|
848
|
-
Optional[components.FolderSchema], http_res
|
|
849
|
-
)
|
|
802
|
+
return unmarshal_json_response(Optional[components.FolderSchema], http_res)
|
|
850
803
|
if utils.match_response(http_res, "400", "application/json"):
|
|
851
|
-
response_data =
|
|
852
|
-
errors.BadRequestData, http_res
|
|
853
|
-
)
|
|
804
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
854
805
|
raise errors.BadRequest(response_data, http_res)
|
|
855
806
|
if utils.match_response(http_res, "401", "application/json"):
|
|
856
|
-
response_data =
|
|
857
|
-
errors.UnauthorizedData, http_res
|
|
858
|
-
)
|
|
807
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
859
808
|
raise errors.Unauthorized(response_data, http_res)
|
|
860
809
|
if utils.match_response(http_res, "403", "application/json"):
|
|
861
|
-
response_data =
|
|
862
|
-
errors.ForbiddenData, http_res
|
|
863
|
-
)
|
|
810
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
864
811
|
raise errors.Forbidden(response_data, http_res)
|
|
865
812
|
if utils.match_response(http_res, "404", "application/json"):
|
|
866
|
-
response_data =
|
|
813
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
867
814
|
raise errors.NotFound(response_data, http_res)
|
|
868
815
|
if utils.match_response(http_res, "409", "application/json"):
|
|
869
|
-
response_data =
|
|
816
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
870
817
|
raise errors.Conflict(response_data, http_res)
|
|
871
818
|
if utils.match_response(http_res, "410", "application/json"):
|
|
872
|
-
response_data =
|
|
873
|
-
errors.InviteExpiredData, http_res
|
|
874
|
-
)
|
|
819
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
875
820
|
raise errors.InviteExpired(response_data, http_res)
|
|
876
821
|
if utils.match_response(http_res, "422", "application/json"):
|
|
877
|
-
response_data =
|
|
822
|
+
response_data = unmarshal_json_response(
|
|
878
823
|
errors.UnprocessableEntityData, http_res
|
|
879
824
|
)
|
|
880
825
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
881
826
|
if utils.match_response(http_res, "429", "application/json"):
|
|
882
|
-
response_data =
|
|
827
|
+
response_data = unmarshal_json_response(
|
|
883
828
|
errors.RateLimitExceededData, http_res
|
|
884
829
|
)
|
|
885
830
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
886
831
|
if utils.match_response(http_res, "500", "application/json"):
|
|
887
|
-
response_data =
|
|
832
|
+
response_data = unmarshal_json_response(
|
|
888
833
|
errors.InternalServerErrorData, http_res
|
|
889
834
|
)
|
|
890
835
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -981,47 +926,39 @@ class Folders(BaseSDK):
|
|
|
981
926
|
|
|
982
927
|
response_data: Any = None
|
|
983
928
|
if utils.match_response(http_res, "200", "application/json"):
|
|
984
|
-
return
|
|
929
|
+
return unmarshal_json_response(
|
|
985
930
|
Optional[operations.DeleteFolderResponseBody], http_res
|
|
986
931
|
)
|
|
987
932
|
if utils.match_response(http_res, "400", "application/json"):
|
|
988
|
-
response_data =
|
|
989
|
-
errors.BadRequestData, http_res
|
|
990
|
-
)
|
|
933
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
991
934
|
raise errors.BadRequest(response_data, http_res)
|
|
992
935
|
if utils.match_response(http_res, "401", "application/json"):
|
|
993
|
-
response_data =
|
|
994
|
-
errors.UnauthorizedData, http_res
|
|
995
|
-
)
|
|
936
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
996
937
|
raise errors.Unauthorized(response_data, http_res)
|
|
997
938
|
if utils.match_response(http_res, "403", "application/json"):
|
|
998
|
-
response_data =
|
|
999
|
-
errors.ForbiddenData, http_res
|
|
1000
|
-
)
|
|
939
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1001
940
|
raise errors.Forbidden(response_data, http_res)
|
|
1002
941
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1003
|
-
response_data =
|
|
942
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1004
943
|
raise errors.NotFound(response_data, http_res)
|
|
1005
944
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1006
|
-
response_data =
|
|
945
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1007
946
|
raise errors.Conflict(response_data, http_res)
|
|
1008
947
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1009
|
-
response_data =
|
|
1010
|
-
errors.InviteExpiredData, http_res
|
|
1011
|
-
)
|
|
948
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1012
949
|
raise errors.InviteExpired(response_data, http_res)
|
|
1013
950
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1014
|
-
response_data =
|
|
951
|
+
response_data = unmarshal_json_response(
|
|
1015
952
|
errors.UnprocessableEntityData, http_res
|
|
1016
953
|
)
|
|
1017
954
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1018
955
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1019
|
-
response_data =
|
|
956
|
+
response_data = unmarshal_json_response(
|
|
1020
957
|
errors.RateLimitExceededData, http_res
|
|
1021
958
|
)
|
|
1022
959
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1023
960
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1024
|
-
response_data =
|
|
961
|
+
response_data = unmarshal_json_response(
|
|
1025
962
|
errors.InternalServerErrorData, http_res
|
|
1026
963
|
)
|
|
1027
964
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1118,47 +1055,39 @@ class Folders(BaseSDK):
|
|
|
1118
1055
|
|
|
1119
1056
|
response_data: Any = None
|
|
1120
1057
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1121
|
-
return
|
|
1058
|
+
return unmarshal_json_response(
|
|
1122
1059
|
Optional[operations.DeleteFolderResponseBody], http_res
|
|
1123
1060
|
)
|
|
1124
1061
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1125
|
-
response_data =
|
|
1126
|
-
errors.BadRequestData, http_res
|
|
1127
|
-
)
|
|
1062
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1128
1063
|
raise errors.BadRequest(response_data, http_res)
|
|
1129
1064
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1130
|
-
response_data =
|
|
1131
|
-
errors.UnauthorizedData, http_res
|
|
1132
|
-
)
|
|
1065
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1133
1066
|
raise errors.Unauthorized(response_data, http_res)
|
|
1134
1067
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1135
|
-
response_data =
|
|
1136
|
-
errors.ForbiddenData, http_res
|
|
1137
|
-
)
|
|
1068
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1138
1069
|
raise errors.Forbidden(response_data, http_res)
|
|
1139
1070
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1140
|
-
response_data =
|
|
1071
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1141
1072
|
raise errors.NotFound(response_data, http_res)
|
|
1142
1073
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1143
|
-
response_data =
|
|
1074
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1144
1075
|
raise errors.Conflict(response_data, http_res)
|
|
1145
1076
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1146
|
-
response_data =
|
|
1147
|
-
errors.InviteExpiredData, http_res
|
|
1148
|
-
)
|
|
1077
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1149
1078
|
raise errors.InviteExpired(response_data, http_res)
|
|
1150
1079
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1151
|
-
response_data =
|
|
1080
|
+
response_data = unmarshal_json_response(
|
|
1152
1081
|
errors.UnprocessableEntityData, http_res
|
|
1153
1082
|
)
|
|
1154
1083
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1155
1084
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1156
|
-
response_data =
|
|
1085
|
+
response_data = unmarshal_json_response(
|
|
1157
1086
|
errors.RateLimitExceededData, http_res
|
|
1158
1087
|
)
|
|
1159
1088
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1160
1089
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1161
|
-
response_data =
|
|
1090
|
+
response_data = unmarshal_json_response(
|
|
1162
1091
|
errors.InternalServerErrorData, http_res
|
|
1163
1092
|
)
|
|
1164
1093
|
raise errors.InternalServerError(response_data, http_res)
|