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/qr_codes.py
CHANGED
|
@@ -5,6 +5,7 @@ from dub import utils
|
|
|
5
5
|
from dub._hooks import HookContext
|
|
6
6
|
from dub.models import 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, Mapping, Optional, Union, cast
|
|
9
10
|
|
|
10
11
|
|
|
@@ -97,43 +98,35 @@ class QRCodes(BaseSDK):
|
|
|
97
98
|
if utils.match_response(http_res, "200", "image/png"):
|
|
98
99
|
return http_res.text
|
|
99
100
|
if utils.match_response(http_res, "400", "application/json"):
|
|
100
|
-
response_data =
|
|
101
|
-
errors.BadRequestData, http_res
|
|
102
|
-
)
|
|
101
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
103
102
|
raise errors.BadRequest(response_data, http_res)
|
|
104
103
|
if utils.match_response(http_res, "401", "application/json"):
|
|
105
|
-
response_data =
|
|
106
|
-
errors.UnauthorizedData, http_res
|
|
107
|
-
)
|
|
104
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
108
105
|
raise errors.Unauthorized(response_data, http_res)
|
|
109
106
|
if utils.match_response(http_res, "403", "application/json"):
|
|
110
|
-
response_data =
|
|
111
|
-
errors.ForbiddenData, http_res
|
|
112
|
-
)
|
|
107
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
113
108
|
raise errors.Forbidden(response_data, http_res)
|
|
114
109
|
if utils.match_response(http_res, "404", "application/json"):
|
|
115
|
-
response_data =
|
|
110
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
116
111
|
raise errors.NotFound(response_data, http_res)
|
|
117
112
|
if utils.match_response(http_res, "409", "application/json"):
|
|
118
|
-
response_data =
|
|
113
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
119
114
|
raise errors.Conflict(response_data, http_res)
|
|
120
115
|
if utils.match_response(http_res, "410", "application/json"):
|
|
121
|
-
response_data =
|
|
122
|
-
errors.InviteExpiredData, http_res
|
|
123
|
-
)
|
|
116
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
124
117
|
raise errors.InviteExpired(response_data, http_res)
|
|
125
118
|
if utils.match_response(http_res, "422", "application/json"):
|
|
126
|
-
response_data =
|
|
119
|
+
response_data = unmarshal_json_response(
|
|
127
120
|
errors.UnprocessableEntityData, http_res
|
|
128
121
|
)
|
|
129
122
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
130
123
|
if utils.match_response(http_res, "429", "application/json"):
|
|
131
|
-
response_data =
|
|
124
|
+
response_data = unmarshal_json_response(
|
|
132
125
|
errors.RateLimitExceededData, http_res
|
|
133
126
|
)
|
|
134
127
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
135
128
|
if utils.match_response(http_res, "500", "application/json"):
|
|
136
|
-
response_data =
|
|
129
|
+
response_data = unmarshal_json_response(
|
|
137
130
|
errors.InternalServerErrorData, http_res
|
|
138
131
|
)
|
|
139
132
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -234,43 +227,35 @@ class QRCodes(BaseSDK):
|
|
|
234
227
|
if utils.match_response(http_res, "200", "image/png"):
|
|
235
228
|
return http_res.text
|
|
236
229
|
if utils.match_response(http_res, "400", "application/json"):
|
|
237
|
-
response_data =
|
|
238
|
-
errors.BadRequestData, http_res
|
|
239
|
-
)
|
|
230
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
240
231
|
raise errors.BadRequest(response_data, http_res)
|
|
241
232
|
if utils.match_response(http_res, "401", "application/json"):
|
|
242
|
-
response_data =
|
|
243
|
-
errors.UnauthorizedData, http_res
|
|
244
|
-
)
|
|
233
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
245
234
|
raise errors.Unauthorized(response_data, http_res)
|
|
246
235
|
if utils.match_response(http_res, "403", "application/json"):
|
|
247
|
-
response_data =
|
|
248
|
-
errors.ForbiddenData, http_res
|
|
249
|
-
)
|
|
236
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
250
237
|
raise errors.Forbidden(response_data, http_res)
|
|
251
238
|
if utils.match_response(http_res, "404", "application/json"):
|
|
252
|
-
response_data =
|
|
239
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
253
240
|
raise errors.NotFound(response_data, http_res)
|
|
254
241
|
if utils.match_response(http_res, "409", "application/json"):
|
|
255
|
-
response_data =
|
|
242
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
256
243
|
raise errors.Conflict(response_data, http_res)
|
|
257
244
|
if utils.match_response(http_res, "410", "application/json"):
|
|
258
|
-
response_data =
|
|
259
|
-
errors.InviteExpiredData, http_res
|
|
260
|
-
)
|
|
245
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
261
246
|
raise errors.InviteExpired(response_data, http_res)
|
|
262
247
|
if utils.match_response(http_res, "422", "application/json"):
|
|
263
|
-
response_data =
|
|
248
|
+
response_data = unmarshal_json_response(
|
|
264
249
|
errors.UnprocessableEntityData, http_res
|
|
265
250
|
)
|
|
266
251
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
267
252
|
if utils.match_response(http_res, "429", "application/json"):
|
|
268
|
-
response_data =
|
|
253
|
+
response_data = unmarshal_json_response(
|
|
269
254
|
errors.RateLimitExceededData, http_res
|
|
270
255
|
)
|
|
271
256
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
272
257
|
if utils.match_response(http_res, "500", "application/json"):
|
|
273
|
-
response_data =
|
|
258
|
+
response_data = unmarshal_json_response(
|
|
274
259
|
errors.InternalServerErrorData, http_res
|
|
275
260
|
)
|
|
276
261
|
raise errors.InternalServerError(response_data, http_res)
|
dub/tags.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
|
|
|
@@ -103,47 +104,37 @@ class Tags(BaseSDK):
|
|
|
103
104
|
|
|
104
105
|
response_data: Any = None
|
|
105
106
|
if utils.match_response(http_res, "201", "application/json"):
|
|
106
|
-
return
|
|
107
|
-
Optional[components.TagSchema], http_res
|
|
108
|
-
)
|
|
107
|
+
return unmarshal_json_response(Optional[components.TagSchema], http_res)
|
|
109
108
|
if utils.match_response(http_res, "400", "application/json"):
|
|
110
|
-
response_data =
|
|
111
|
-
errors.BadRequestData, http_res
|
|
112
|
-
)
|
|
109
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
113
110
|
raise errors.BadRequest(response_data, http_res)
|
|
114
111
|
if utils.match_response(http_res, "401", "application/json"):
|
|
115
|
-
response_data =
|
|
116
|
-
errors.UnauthorizedData, http_res
|
|
117
|
-
)
|
|
112
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
118
113
|
raise errors.Unauthorized(response_data, http_res)
|
|
119
114
|
if utils.match_response(http_res, "403", "application/json"):
|
|
120
|
-
response_data =
|
|
121
|
-
errors.ForbiddenData, http_res
|
|
122
|
-
)
|
|
115
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
123
116
|
raise errors.Forbidden(response_data, http_res)
|
|
124
117
|
if utils.match_response(http_res, "404", "application/json"):
|
|
125
|
-
response_data =
|
|
118
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
126
119
|
raise errors.NotFound(response_data, http_res)
|
|
127
120
|
if utils.match_response(http_res, "409", "application/json"):
|
|
128
|
-
response_data =
|
|
121
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
129
122
|
raise errors.Conflict(response_data, http_res)
|
|
130
123
|
if utils.match_response(http_res, "410", "application/json"):
|
|
131
|
-
response_data =
|
|
132
|
-
errors.InviteExpiredData, http_res
|
|
133
|
-
)
|
|
124
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
134
125
|
raise errors.InviteExpired(response_data, http_res)
|
|
135
126
|
if utils.match_response(http_res, "422", "application/json"):
|
|
136
|
-
response_data =
|
|
127
|
+
response_data = unmarshal_json_response(
|
|
137
128
|
errors.UnprocessableEntityData, http_res
|
|
138
129
|
)
|
|
139
130
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
140
131
|
if utils.match_response(http_res, "429", "application/json"):
|
|
141
|
-
response_data =
|
|
132
|
+
response_data = unmarshal_json_response(
|
|
142
133
|
errors.RateLimitExceededData, http_res
|
|
143
134
|
)
|
|
144
135
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
145
136
|
if utils.match_response(http_res, "500", "application/json"):
|
|
146
|
-
response_data =
|
|
137
|
+
response_data = unmarshal_json_response(
|
|
147
138
|
errors.InternalServerErrorData, http_res
|
|
148
139
|
)
|
|
149
140
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -250,47 +241,37 @@ class Tags(BaseSDK):
|
|
|
250
241
|
|
|
251
242
|
response_data: Any = None
|
|
252
243
|
if utils.match_response(http_res, "201", "application/json"):
|
|
253
|
-
return
|
|
254
|
-
Optional[components.TagSchema], http_res
|
|
255
|
-
)
|
|
244
|
+
return unmarshal_json_response(Optional[components.TagSchema], http_res)
|
|
256
245
|
if utils.match_response(http_res, "400", "application/json"):
|
|
257
|
-
response_data =
|
|
258
|
-
errors.BadRequestData, http_res
|
|
259
|
-
)
|
|
246
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
260
247
|
raise errors.BadRequest(response_data, http_res)
|
|
261
248
|
if utils.match_response(http_res, "401", "application/json"):
|
|
262
|
-
response_data =
|
|
263
|
-
errors.UnauthorizedData, http_res
|
|
264
|
-
)
|
|
249
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
265
250
|
raise errors.Unauthorized(response_data, http_res)
|
|
266
251
|
if utils.match_response(http_res, "403", "application/json"):
|
|
267
|
-
response_data =
|
|
268
|
-
errors.ForbiddenData, http_res
|
|
269
|
-
)
|
|
252
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
270
253
|
raise errors.Forbidden(response_data, http_res)
|
|
271
254
|
if utils.match_response(http_res, "404", "application/json"):
|
|
272
|
-
response_data =
|
|
255
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
273
256
|
raise errors.NotFound(response_data, http_res)
|
|
274
257
|
if utils.match_response(http_res, "409", "application/json"):
|
|
275
|
-
response_data =
|
|
258
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
276
259
|
raise errors.Conflict(response_data, http_res)
|
|
277
260
|
if utils.match_response(http_res, "410", "application/json"):
|
|
278
|
-
response_data =
|
|
279
|
-
errors.InviteExpiredData, http_res
|
|
280
|
-
)
|
|
261
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
281
262
|
raise errors.InviteExpired(response_data, http_res)
|
|
282
263
|
if utils.match_response(http_res, "422", "application/json"):
|
|
283
|
-
response_data =
|
|
264
|
+
response_data = unmarshal_json_response(
|
|
284
265
|
errors.UnprocessableEntityData, http_res
|
|
285
266
|
)
|
|
286
267
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
287
268
|
if utils.match_response(http_res, "429", "application/json"):
|
|
288
|
-
response_data =
|
|
269
|
+
response_data = unmarshal_json_response(
|
|
289
270
|
errors.RateLimitExceededData, http_res
|
|
290
271
|
)
|
|
291
272
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
292
273
|
if utils.match_response(http_res, "500", "application/json"):
|
|
293
|
-
response_data =
|
|
274
|
+
response_data = unmarshal_json_response(
|
|
294
275
|
errors.InternalServerErrorData, http_res
|
|
295
276
|
)
|
|
296
277
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -387,47 +368,39 @@ class Tags(BaseSDK):
|
|
|
387
368
|
|
|
388
369
|
response_data: Any = None
|
|
389
370
|
if utils.match_response(http_res, "200", "application/json"):
|
|
390
|
-
return
|
|
371
|
+
return unmarshal_json_response(
|
|
391
372
|
Optional[List[components.TagSchema]], http_res
|
|
392
373
|
)
|
|
393
374
|
if utils.match_response(http_res, "400", "application/json"):
|
|
394
|
-
response_data =
|
|
395
|
-
errors.BadRequestData, http_res
|
|
396
|
-
)
|
|
375
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
397
376
|
raise errors.BadRequest(response_data, http_res)
|
|
398
377
|
if utils.match_response(http_res, "401", "application/json"):
|
|
399
|
-
response_data =
|
|
400
|
-
errors.UnauthorizedData, http_res
|
|
401
|
-
)
|
|
378
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
402
379
|
raise errors.Unauthorized(response_data, http_res)
|
|
403
380
|
if utils.match_response(http_res, "403", "application/json"):
|
|
404
|
-
response_data =
|
|
405
|
-
errors.ForbiddenData, http_res
|
|
406
|
-
)
|
|
381
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
407
382
|
raise errors.Forbidden(response_data, http_res)
|
|
408
383
|
if utils.match_response(http_res, "404", "application/json"):
|
|
409
|
-
response_data =
|
|
384
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
410
385
|
raise errors.NotFound(response_data, http_res)
|
|
411
386
|
if utils.match_response(http_res, "409", "application/json"):
|
|
412
|
-
response_data =
|
|
387
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
413
388
|
raise errors.Conflict(response_data, http_res)
|
|
414
389
|
if utils.match_response(http_res, "410", "application/json"):
|
|
415
|
-
response_data =
|
|
416
|
-
errors.InviteExpiredData, http_res
|
|
417
|
-
)
|
|
390
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
418
391
|
raise errors.InviteExpired(response_data, http_res)
|
|
419
392
|
if utils.match_response(http_res, "422", "application/json"):
|
|
420
|
-
response_data =
|
|
393
|
+
response_data = unmarshal_json_response(
|
|
421
394
|
errors.UnprocessableEntityData, http_res
|
|
422
395
|
)
|
|
423
396
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
424
397
|
if utils.match_response(http_res, "429", "application/json"):
|
|
425
|
-
response_data =
|
|
398
|
+
response_data = unmarshal_json_response(
|
|
426
399
|
errors.RateLimitExceededData, http_res
|
|
427
400
|
)
|
|
428
401
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
429
402
|
if utils.match_response(http_res, "500", "application/json"):
|
|
430
|
-
response_data =
|
|
403
|
+
response_data = unmarshal_json_response(
|
|
431
404
|
errors.InternalServerErrorData, http_res
|
|
432
405
|
)
|
|
433
406
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -524,47 +497,39 @@ class Tags(BaseSDK):
|
|
|
524
497
|
|
|
525
498
|
response_data: Any = None
|
|
526
499
|
if utils.match_response(http_res, "200", "application/json"):
|
|
527
|
-
return
|
|
500
|
+
return unmarshal_json_response(
|
|
528
501
|
Optional[List[components.TagSchema]], http_res
|
|
529
502
|
)
|
|
530
503
|
if utils.match_response(http_res, "400", "application/json"):
|
|
531
|
-
response_data =
|
|
532
|
-
errors.BadRequestData, http_res
|
|
533
|
-
)
|
|
504
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
534
505
|
raise errors.BadRequest(response_data, http_res)
|
|
535
506
|
if utils.match_response(http_res, "401", "application/json"):
|
|
536
|
-
response_data =
|
|
537
|
-
errors.UnauthorizedData, http_res
|
|
538
|
-
)
|
|
507
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
539
508
|
raise errors.Unauthorized(response_data, http_res)
|
|
540
509
|
if utils.match_response(http_res, "403", "application/json"):
|
|
541
|
-
response_data =
|
|
542
|
-
errors.ForbiddenData, http_res
|
|
543
|
-
)
|
|
510
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
544
511
|
raise errors.Forbidden(response_data, http_res)
|
|
545
512
|
if utils.match_response(http_res, "404", "application/json"):
|
|
546
|
-
response_data =
|
|
513
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
547
514
|
raise errors.NotFound(response_data, http_res)
|
|
548
515
|
if utils.match_response(http_res, "409", "application/json"):
|
|
549
|
-
response_data =
|
|
516
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
550
517
|
raise errors.Conflict(response_data, http_res)
|
|
551
518
|
if utils.match_response(http_res, "410", "application/json"):
|
|
552
|
-
response_data =
|
|
553
|
-
errors.InviteExpiredData, http_res
|
|
554
|
-
)
|
|
519
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
555
520
|
raise errors.InviteExpired(response_data, http_res)
|
|
556
521
|
if utils.match_response(http_res, "422", "application/json"):
|
|
557
|
-
response_data =
|
|
522
|
+
response_data = unmarshal_json_response(
|
|
558
523
|
errors.UnprocessableEntityData, http_res
|
|
559
524
|
)
|
|
560
525
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
561
526
|
if utils.match_response(http_res, "429", "application/json"):
|
|
562
|
-
response_data =
|
|
527
|
+
response_data = unmarshal_json_response(
|
|
563
528
|
errors.RateLimitExceededData, http_res
|
|
564
529
|
)
|
|
565
530
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
566
531
|
if utils.match_response(http_res, "500", "application/json"):
|
|
567
|
-
response_data =
|
|
532
|
+
response_data = unmarshal_json_response(
|
|
568
533
|
errors.InternalServerErrorData, http_res
|
|
569
534
|
)
|
|
570
535
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -678,47 +643,37 @@ class Tags(BaseSDK):
|
|
|
678
643
|
|
|
679
644
|
response_data: Any = None
|
|
680
645
|
if utils.match_response(http_res, "200", "application/json"):
|
|
681
|
-
return
|
|
682
|
-
Optional[components.TagSchema], http_res
|
|
683
|
-
)
|
|
646
|
+
return unmarshal_json_response(Optional[components.TagSchema], http_res)
|
|
684
647
|
if utils.match_response(http_res, "400", "application/json"):
|
|
685
|
-
response_data =
|
|
686
|
-
errors.BadRequestData, http_res
|
|
687
|
-
)
|
|
648
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
688
649
|
raise errors.BadRequest(response_data, http_res)
|
|
689
650
|
if utils.match_response(http_res, "401", "application/json"):
|
|
690
|
-
response_data =
|
|
691
|
-
errors.UnauthorizedData, http_res
|
|
692
|
-
)
|
|
651
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
693
652
|
raise errors.Unauthorized(response_data, http_res)
|
|
694
653
|
if utils.match_response(http_res, "403", "application/json"):
|
|
695
|
-
response_data =
|
|
696
|
-
errors.ForbiddenData, http_res
|
|
697
|
-
)
|
|
654
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
698
655
|
raise errors.Forbidden(response_data, http_res)
|
|
699
656
|
if utils.match_response(http_res, "404", "application/json"):
|
|
700
|
-
response_data =
|
|
657
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
701
658
|
raise errors.NotFound(response_data, http_res)
|
|
702
659
|
if utils.match_response(http_res, "409", "application/json"):
|
|
703
|
-
response_data =
|
|
660
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
704
661
|
raise errors.Conflict(response_data, http_res)
|
|
705
662
|
if utils.match_response(http_res, "410", "application/json"):
|
|
706
|
-
response_data =
|
|
707
|
-
errors.InviteExpiredData, http_res
|
|
708
|
-
)
|
|
663
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
709
664
|
raise errors.InviteExpired(response_data, http_res)
|
|
710
665
|
if utils.match_response(http_res, "422", "application/json"):
|
|
711
|
-
response_data =
|
|
666
|
+
response_data = unmarshal_json_response(
|
|
712
667
|
errors.UnprocessableEntityData, http_res
|
|
713
668
|
)
|
|
714
669
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
715
670
|
if utils.match_response(http_res, "429", "application/json"):
|
|
716
|
-
response_data =
|
|
671
|
+
response_data = unmarshal_json_response(
|
|
717
672
|
errors.RateLimitExceededData, http_res
|
|
718
673
|
)
|
|
719
674
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
720
675
|
if utils.match_response(http_res, "500", "application/json"):
|
|
721
|
-
response_data =
|
|
676
|
+
response_data = unmarshal_json_response(
|
|
722
677
|
errors.InternalServerErrorData, http_res
|
|
723
678
|
)
|
|
724
679
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -832,47 +787,37 @@ class Tags(BaseSDK):
|
|
|
832
787
|
|
|
833
788
|
response_data: Any = None
|
|
834
789
|
if utils.match_response(http_res, "200", "application/json"):
|
|
835
|
-
return
|
|
836
|
-
Optional[components.TagSchema], http_res
|
|
837
|
-
)
|
|
790
|
+
return unmarshal_json_response(Optional[components.TagSchema], http_res)
|
|
838
791
|
if utils.match_response(http_res, "400", "application/json"):
|
|
839
|
-
response_data =
|
|
840
|
-
errors.BadRequestData, http_res
|
|
841
|
-
)
|
|
792
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
842
793
|
raise errors.BadRequest(response_data, http_res)
|
|
843
794
|
if utils.match_response(http_res, "401", "application/json"):
|
|
844
|
-
response_data =
|
|
845
|
-
errors.UnauthorizedData, http_res
|
|
846
|
-
)
|
|
795
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
847
796
|
raise errors.Unauthorized(response_data, http_res)
|
|
848
797
|
if utils.match_response(http_res, "403", "application/json"):
|
|
849
|
-
response_data =
|
|
850
|
-
errors.ForbiddenData, http_res
|
|
851
|
-
)
|
|
798
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
852
799
|
raise errors.Forbidden(response_data, http_res)
|
|
853
800
|
if utils.match_response(http_res, "404", "application/json"):
|
|
854
|
-
response_data =
|
|
801
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
855
802
|
raise errors.NotFound(response_data, http_res)
|
|
856
803
|
if utils.match_response(http_res, "409", "application/json"):
|
|
857
|
-
response_data =
|
|
804
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
858
805
|
raise errors.Conflict(response_data, http_res)
|
|
859
806
|
if utils.match_response(http_res, "410", "application/json"):
|
|
860
|
-
response_data =
|
|
861
|
-
errors.InviteExpiredData, http_res
|
|
862
|
-
)
|
|
807
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
863
808
|
raise errors.InviteExpired(response_data, http_res)
|
|
864
809
|
if utils.match_response(http_res, "422", "application/json"):
|
|
865
|
-
response_data =
|
|
810
|
+
response_data = unmarshal_json_response(
|
|
866
811
|
errors.UnprocessableEntityData, http_res
|
|
867
812
|
)
|
|
868
813
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
869
814
|
if utils.match_response(http_res, "429", "application/json"):
|
|
870
|
-
response_data =
|
|
815
|
+
response_data = unmarshal_json_response(
|
|
871
816
|
errors.RateLimitExceededData, http_res
|
|
872
817
|
)
|
|
873
818
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
874
819
|
if utils.match_response(http_res, "500", "application/json"):
|
|
875
|
-
response_data =
|
|
820
|
+
response_data = unmarshal_json_response(
|
|
876
821
|
errors.InternalServerErrorData, http_res
|
|
877
822
|
)
|
|
878
823
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -969,47 +914,39 @@ class Tags(BaseSDK):
|
|
|
969
914
|
|
|
970
915
|
response_data: Any = None
|
|
971
916
|
if utils.match_response(http_res, "200", "application/json"):
|
|
972
|
-
return
|
|
917
|
+
return unmarshal_json_response(
|
|
973
918
|
Optional[operations.DeleteTagResponseBody], http_res
|
|
974
919
|
)
|
|
975
920
|
if utils.match_response(http_res, "400", "application/json"):
|
|
976
|
-
response_data =
|
|
977
|
-
errors.BadRequestData, http_res
|
|
978
|
-
)
|
|
921
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
979
922
|
raise errors.BadRequest(response_data, http_res)
|
|
980
923
|
if utils.match_response(http_res, "401", "application/json"):
|
|
981
|
-
response_data =
|
|
982
|
-
errors.UnauthorizedData, http_res
|
|
983
|
-
)
|
|
924
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
984
925
|
raise errors.Unauthorized(response_data, http_res)
|
|
985
926
|
if utils.match_response(http_res, "403", "application/json"):
|
|
986
|
-
response_data =
|
|
987
|
-
errors.ForbiddenData, http_res
|
|
988
|
-
)
|
|
927
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
989
928
|
raise errors.Forbidden(response_data, http_res)
|
|
990
929
|
if utils.match_response(http_res, "404", "application/json"):
|
|
991
|
-
response_data =
|
|
930
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
992
931
|
raise errors.NotFound(response_data, http_res)
|
|
993
932
|
if utils.match_response(http_res, "409", "application/json"):
|
|
994
|
-
response_data =
|
|
933
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
995
934
|
raise errors.Conflict(response_data, http_res)
|
|
996
935
|
if utils.match_response(http_res, "410", "application/json"):
|
|
997
|
-
response_data =
|
|
998
|
-
errors.InviteExpiredData, http_res
|
|
999
|
-
)
|
|
936
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1000
937
|
raise errors.InviteExpired(response_data, http_res)
|
|
1001
938
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1002
|
-
response_data =
|
|
939
|
+
response_data = unmarshal_json_response(
|
|
1003
940
|
errors.UnprocessableEntityData, http_res
|
|
1004
941
|
)
|
|
1005
942
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1006
943
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1007
|
-
response_data =
|
|
944
|
+
response_data = unmarshal_json_response(
|
|
1008
945
|
errors.RateLimitExceededData, http_res
|
|
1009
946
|
)
|
|
1010
947
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1011
948
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1012
|
-
response_data =
|
|
949
|
+
response_data = unmarshal_json_response(
|
|
1013
950
|
errors.InternalServerErrorData, http_res
|
|
1014
951
|
)
|
|
1015
952
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1106,47 +1043,39 @@ class Tags(BaseSDK):
|
|
|
1106
1043
|
|
|
1107
1044
|
response_data: Any = None
|
|
1108
1045
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1109
|
-
return
|
|
1046
|
+
return unmarshal_json_response(
|
|
1110
1047
|
Optional[operations.DeleteTagResponseBody], http_res
|
|
1111
1048
|
)
|
|
1112
1049
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1113
|
-
response_data =
|
|
1114
|
-
errors.BadRequestData, http_res
|
|
1115
|
-
)
|
|
1050
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1116
1051
|
raise errors.BadRequest(response_data, http_res)
|
|
1117
1052
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1118
|
-
response_data =
|
|
1119
|
-
errors.UnauthorizedData, http_res
|
|
1120
|
-
)
|
|
1053
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1121
1054
|
raise errors.Unauthorized(response_data, http_res)
|
|
1122
1055
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1123
|
-
response_data =
|
|
1124
|
-
errors.ForbiddenData, http_res
|
|
1125
|
-
)
|
|
1056
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1126
1057
|
raise errors.Forbidden(response_data, http_res)
|
|
1127
1058
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1128
|
-
response_data =
|
|
1059
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1129
1060
|
raise errors.NotFound(response_data, http_res)
|
|
1130
1061
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1131
|
-
response_data =
|
|
1062
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1132
1063
|
raise errors.Conflict(response_data, http_res)
|
|
1133
1064
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1134
|
-
response_data =
|
|
1135
|
-
errors.InviteExpiredData, http_res
|
|
1136
|
-
)
|
|
1065
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1137
1066
|
raise errors.InviteExpired(response_data, http_res)
|
|
1138
1067
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1139
|
-
response_data =
|
|
1068
|
+
response_data = unmarshal_json_response(
|
|
1140
1069
|
errors.UnprocessableEntityData, http_res
|
|
1141
1070
|
)
|
|
1142
1071
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1143
1072
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1144
|
-
response_data =
|
|
1073
|
+
response_data = unmarshal_json_response(
|
|
1145
1074
|
errors.RateLimitExceededData, http_res
|
|
1146
1075
|
)
|
|
1147
1076
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1148
1077
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1149
|
-
response_data =
|
|
1078
|
+
response_data = unmarshal_json_response(
|
|
1150
1079
|
errors.InternalServerErrorData, http_res
|
|
1151
1080
|
)
|
|
1152
1081
|
raise errors.InternalServerError(response_data, http_res)
|