syllable-sdk 0.35.33__py3-none-any.whl → 0.35.34__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.
- syllable_sdk/_version.py +3 -3
- syllable_sdk/agents.py +23 -26
- syllable_sdk/batches.py +37 -36
- syllable_sdk/campaigns.py +21 -20
- syllable_sdk/channels.py +9 -8
- syllable_sdk/conversations.py +5 -8
- syllable_sdk/custom_messages.py +21 -20
- syllable_sdk/dashboards.py +17 -20
- syllable_sdk/data_sources.py +21 -32
- syllable_sdk/events.py +5 -4
- syllable_sdk/folders.py +33 -40
- syllable_sdk/full_summary.py +5 -8
- syllable_sdk/incidents.py +23 -22
- syllable_sdk/insights_sdk.py +5 -8
- syllable_sdk/insights_tools.py +27 -30
- syllable_sdk/language_groups.py +23 -22
- syllable_sdk/latency.py +5 -8
- syllable_sdk/numbers.py +13 -24
- syllable_sdk/organizations.py +15 -14
- syllable_sdk/permissions.py +3 -2
- syllable_sdk/prompts.py +27 -30
- syllable_sdk/roles.py +21 -24
- syllable_sdk/services.py +21 -24
- syllable_sdk/session_debug.py +13 -12
- syllable_sdk/session_labels.py +13 -16
- syllable_sdk/sessions.py +15 -18
- syllable_sdk/takeouts.py +9 -8
- syllable_sdk/targets.py +21 -24
- syllable_sdk/test.py +5 -4
- syllable_sdk/tools.py +21 -24
- syllable_sdk/transcript.py +5 -4
- syllable_sdk/twilio.py +13 -12
- syllable_sdk/users.py +27 -30
- syllable_sdk/utils/__init__.py +0 -3
- syllable_sdk/utils/serializers.py +1 -18
- syllable_sdk/utils/unmarshal_json_response.py +24 -0
- syllable_sdk/v1.py +27 -30
- syllable_sdk/workflows.py +33 -32
- {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.34.dist-info}/METADATA +1 -1
- {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.34.dist-info}/RECORD +41 -40
- {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.34.dist-info}/WHEEL +0 -0
syllable_sdk/session_debug.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, Mapping, Optional
|
|
9
10
|
|
|
10
11
|
|
|
@@ -84,9 +85,9 @@ class SessionDebug(BaseSDK):
|
|
|
84
85
|
|
|
85
86
|
response_data: Any = None
|
|
86
87
|
if utils.match_response(http_res, "200", "application/json"):
|
|
87
|
-
return
|
|
88
|
+
return unmarshal_json_response(models.SessionData, http_res)
|
|
88
89
|
if utils.match_response(http_res, "422", "application/json"):
|
|
89
|
-
response_data =
|
|
90
|
+
response_data = unmarshal_json_response(
|
|
90
91
|
errors.HTTPValidationErrorData, http_res
|
|
91
92
|
)
|
|
92
93
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -174,9 +175,9 @@ class SessionDebug(BaseSDK):
|
|
|
174
175
|
|
|
175
176
|
response_data: Any = None
|
|
176
177
|
if utils.match_response(http_res, "200", "application/json"):
|
|
177
|
-
return
|
|
178
|
+
return unmarshal_json_response(models.SessionData, http_res)
|
|
178
179
|
if utils.match_response(http_res, "422", "application/json"):
|
|
179
|
-
response_data =
|
|
180
|
+
response_data = unmarshal_json_response(
|
|
180
181
|
errors.HTTPValidationErrorData, http_res
|
|
181
182
|
)
|
|
182
183
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -261,9 +262,9 @@ class SessionDebug(BaseSDK):
|
|
|
261
262
|
|
|
262
263
|
response_data: Any = None
|
|
263
264
|
if utils.match_response(http_res, "200", "application/json"):
|
|
264
|
-
return
|
|
265
|
+
return unmarshal_json_response(models.SessionData, http_res)
|
|
265
266
|
if utils.match_response(http_res, "422", "application/json"):
|
|
266
|
-
response_data =
|
|
267
|
+
response_data = unmarshal_json_response(
|
|
267
268
|
errors.HTTPValidationErrorData, http_res
|
|
268
269
|
)
|
|
269
270
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -348,9 +349,9 @@ class SessionDebug(BaseSDK):
|
|
|
348
349
|
|
|
349
350
|
response_data: Any = None
|
|
350
351
|
if utils.match_response(http_res, "200", "application/json"):
|
|
351
|
-
return
|
|
352
|
+
return unmarshal_json_response(models.SessionData, http_res)
|
|
352
353
|
if utils.match_response(http_res, "422", "application/json"):
|
|
353
|
-
response_data =
|
|
354
|
+
response_data = unmarshal_json_response(
|
|
354
355
|
errors.HTTPValidationErrorData, http_res
|
|
355
356
|
)
|
|
356
357
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -438,9 +439,9 @@ class SessionDebug(BaseSDK):
|
|
|
438
439
|
|
|
439
440
|
response_data: Any = None
|
|
440
441
|
if utils.match_response(http_res, "200", "application/json"):
|
|
441
|
-
return
|
|
442
|
+
return unmarshal_json_response(models.ToolResultData, http_res)
|
|
442
443
|
if utils.match_response(http_res, "422", "application/json"):
|
|
443
|
-
response_data =
|
|
444
|
+
response_data = unmarshal_json_response(
|
|
444
445
|
errors.HTTPValidationErrorData, http_res
|
|
445
446
|
)
|
|
446
447
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -528,9 +529,9 @@ class SessionDebug(BaseSDK):
|
|
|
528
529
|
|
|
529
530
|
response_data: Any = None
|
|
530
531
|
if utils.match_response(http_res, "200", "application/json"):
|
|
531
|
-
return
|
|
532
|
+
return unmarshal_json_response(models.ToolResultData, http_res)
|
|
532
533
|
if utils.match_response(http_res, "422", "application/json"):
|
|
533
|
-
response_data =
|
|
534
|
+
response_data = unmarshal_json_response(
|
|
534
535
|
errors.HTTPValidationErrorData, http_res
|
|
535
536
|
)
|
|
536
537
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/session_labels.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, List, Mapping, Optional, Union, cast
|
|
9
10
|
|
|
10
11
|
|
|
@@ -83,9 +84,9 @@ class SessionLabels(BaseSDK):
|
|
|
83
84
|
|
|
84
85
|
response_data: Any = None
|
|
85
86
|
if utils.match_response(http_res, "200", "application/json"):
|
|
86
|
-
return
|
|
87
|
+
return unmarshal_json_response(models.SessionLabel, http_res)
|
|
87
88
|
if utils.match_response(http_res, "422", "application/json"):
|
|
88
|
-
response_data =
|
|
89
|
+
response_data = unmarshal_json_response(
|
|
89
90
|
errors.HTTPValidationErrorData, http_res
|
|
90
91
|
)
|
|
91
92
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -170,9 +171,9 @@ class SessionLabels(BaseSDK):
|
|
|
170
171
|
|
|
171
172
|
response_data: Any = None
|
|
172
173
|
if utils.match_response(http_res, "200", "application/json"):
|
|
173
|
-
return
|
|
174
|
+
return unmarshal_json_response(models.SessionLabel, http_res)
|
|
174
175
|
if utils.match_response(http_res, "422", "application/json"):
|
|
175
|
-
response_data =
|
|
176
|
+
response_data = unmarshal_json_response(
|
|
176
177
|
errors.HTTPValidationErrorData, http_res
|
|
177
178
|
)
|
|
178
179
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -262,9 +263,9 @@ class SessionLabels(BaseSDK):
|
|
|
262
263
|
|
|
263
264
|
response_data: Any = None
|
|
264
265
|
if utils.match_response(http_res, "200", "application/json"):
|
|
265
|
-
return
|
|
266
|
+
return unmarshal_json_response(models.SessionLabel, http_res)
|
|
266
267
|
if utils.match_response(http_res, "422", "application/json"):
|
|
267
|
-
response_data =
|
|
268
|
+
response_data = unmarshal_json_response(
|
|
268
269
|
errors.HTTPValidationErrorData, http_res
|
|
269
270
|
)
|
|
270
271
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -354,9 +355,9 @@ class SessionLabels(BaseSDK):
|
|
|
354
355
|
|
|
355
356
|
response_data: Any = None
|
|
356
357
|
if utils.match_response(http_res, "200", "application/json"):
|
|
357
|
-
return
|
|
358
|
+
return unmarshal_json_response(models.SessionLabel, http_res)
|
|
358
359
|
if utils.match_response(http_res, "422", "application/json"):
|
|
359
|
-
response_data =
|
|
360
|
+
response_data = unmarshal_json_response(
|
|
360
361
|
errors.HTTPValidationErrorData, http_res
|
|
361
362
|
)
|
|
362
363
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -465,11 +466,9 @@ class SessionLabels(BaseSDK):
|
|
|
465
466
|
|
|
466
467
|
response_data: Any = None
|
|
467
468
|
if utils.match_response(http_res, "200", "application/json"):
|
|
468
|
-
return
|
|
469
|
-
models.ListResponseSessionLabel, http_res
|
|
470
|
-
)
|
|
469
|
+
return unmarshal_json_response(models.ListResponseSessionLabel, http_res)
|
|
471
470
|
if utils.match_response(http_res, "422", "application/json"):
|
|
472
|
-
response_data =
|
|
471
|
+
response_data = unmarshal_json_response(
|
|
473
472
|
errors.HTTPValidationErrorData, http_res
|
|
474
473
|
)
|
|
475
474
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -578,11 +577,9 @@ class SessionLabels(BaseSDK):
|
|
|
578
577
|
|
|
579
578
|
response_data: Any = None
|
|
580
579
|
if utils.match_response(http_res, "200", "application/json"):
|
|
581
|
-
return
|
|
582
|
-
models.ListResponseSessionLabel, http_res
|
|
583
|
-
)
|
|
580
|
+
return unmarshal_json_response(models.ListResponseSessionLabel, http_res)
|
|
584
581
|
if utils.match_response(http_res, "422", "application/json"):
|
|
585
|
-
response_data =
|
|
582
|
+
response_data = unmarshal_json_response(
|
|
586
583
|
errors.HTTPValidationErrorData, http_res
|
|
587
584
|
)
|
|
588
585
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/sessions.py
CHANGED
|
@@ -10,6 +10,7 @@ from syllable_sdk.latency import Latency
|
|
|
10
10
|
from syllable_sdk.transcript import Transcript
|
|
11
11
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
12
12
|
from syllable_sdk.utils import get_security_from_env
|
|
13
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
13
14
|
from typing import Any, List, Mapping, Optional
|
|
14
15
|
|
|
15
16
|
|
|
@@ -126,9 +127,9 @@ class Sessions(BaseSDK):
|
|
|
126
127
|
|
|
127
128
|
response_data: Any = None
|
|
128
129
|
if utils.match_response(http_res, "200", "application/json"):
|
|
129
|
-
return
|
|
130
|
+
return unmarshal_json_response(models.ListResponseSession, http_res)
|
|
130
131
|
if utils.match_response(http_res, "422", "application/json"):
|
|
131
|
-
response_data =
|
|
132
|
+
response_data = unmarshal_json_response(
|
|
132
133
|
errors.HTTPValidationErrorData, http_res
|
|
133
134
|
)
|
|
134
135
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -237,9 +238,9 @@ class Sessions(BaseSDK):
|
|
|
237
238
|
|
|
238
239
|
response_data: Any = None
|
|
239
240
|
if utils.match_response(http_res, "200", "application/json"):
|
|
240
|
-
return
|
|
241
|
+
return unmarshal_json_response(models.ListResponseSession, http_res)
|
|
241
242
|
if utils.match_response(http_res, "422", "application/json"):
|
|
242
|
-
response_data =
|
|
243
|
+
response_data = unmarshal_json_response(
|
|
243
244
|
errors.HTTPValidationErrorData, http_res
|
|
244
245
|
)
|
|
245
246
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -324,9 +325,9 @@ class Sessions(BaseSDK):
|
|
|
324
325
|
|
|
325
326
|
response_data: Any = None
|
|
326
327
|
if utils.match_response(http_res, "200", "application/json"):
|
|
327
|
-
return
|
|
328
|
+
return unmarshal_json_response(models.Session, http_res)
|
|
328
329
|
if utils.match_response(http_res, "422", "application/json"):
|
|
329
|
-
response_data =
|
|
330
|
+
response_data = unmarshal_json_response(
|
|
330
331
|
errors.HTTPValidationErrorData, http_res
|
|
331
332
|
)
|
|
332
333
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -411,9 +412,9 @@ class Sessions(BaseSDK):
|
|
|
411
412
|
|
|
412
413
|
response_data: Any = None
|
|
413
414
|
if utils.match_response(http_res, "200", "application/json"):
|
|
414
|
-
return
|
|
415
|
+
return unmarshal_json_response(models.Session, http_res)
|
|
415
416
|
if utils.match_response(http_res, "422", "application/json"):
|
|
416
|
-
response_data =
|
|
417
|
+
response_data = unmarshal_json_response(
|
|
417
418
|
errors.HTTPValidationErrorData, http_res
|
|
418
419
|
)
|
|
419
420
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -498,11 +499,9 @@ class Sessions(BaseSDK):
|
|
|
498
499
|
|
|
499
500
|
response_data: Any = None
|
|
500
501
|
if utils.match_response(http_res, "200", "application/json"):
|
|
501
|
-
return
|
|
502
|
-
models.SessionRecordingResponse, http_res
|
|
503
|
-
)
|
|
502
|
+
return unmarshal_json_response(models.SessionRecordingResponse, http_res)
|
|
504
503
|
if utils.match_response(http_res, "422", "application/json"):
|
|
505
|
-
response_data =
|
|
504
|
+
response_data = unmarshal_json_response(
|
|
506
505
|
errors.HTTPValidationErrorData, http_res
|
|
507
506
|
)
|
|
508
507
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -587,11 +586,9 @@ class Sessions(BaseSDK):
|
|
|
587
586
|
|
|
588
587
|
response_data: Any = None
|
|
589
588
|
if utils.match_response(http_res, "200", "application/json"):
|
|
590
|
-
return
|
|
591
|
-
models.SessionRecordingResponse, http_res
|
|
592
|
-
)
|
|
589
|
+
return unmarshal_json_response(models.SessionRecordingResponse, http_res)
|
|
593
590
|
if utils.match_response(http_res, "422", "application/json"):
|
|
594
|
-
response_data =
|
|
591
|
+
response_data = unmarshal_json_response(
|
|
595
592
|
errors.HTTPValidationErrorData, http_res
|
|
596
593
|
)
|
|
597
594
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -680,7 +677,7 @@ class Sessions(BaseSDK):
|
|
|
680
677
|
return http_res
|
|
681
678
|
if utils.match_response(http_res, "422", "application/json"):
|
|
682
679
|
http_res_text = utils.stream_to_text(http_res)
|
|
683
|
-
response_data =
|
|
680
|
+
response_data = unmarshal_json_response(
|
|
684
681
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
685
682
|
)
|
|
686
683
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
|
@@ -770,7 +767,7 @@ class Sessions(BaseSDK):
|
|
|
770
767
|
return http_res
|
|
771
768
|
if utils.match_response(http_res, "422", "application/json"):
|
|
772
769
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
773
|
-
response_data =
|
|
770
|
+
response_data = unmarshal_json_response(
|
|
774
771
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
775
772
|
)
|
|
776
773
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
syllable_sdk/takeouts.py
CHANGED
|
@@ -6,6 +6,7 @@ from syllable_sdk import errors, models, utils
|
|
|
6
6
|
from syllable_sdk._hooks import HookContext
|
|
7
7
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
8
8
|
from syllable_sdk.utils import get_security_from_env
|
|
9
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
10
|
from typing import Any, Mapping, Optional
|
|
10
11
|
|
|
11
12
|
|
|
@@ -74,7 +75,7 @@ class Takeouts(BaseSDK):
|
|
|
74
75
|
)
|
|
75
76
|
|
|
76
77
|
if utils.match_response(http_res, "200", "application/json"):
|
|
77
|
-
return
|
|
78
|
+
return unmarshal_json_response(models.CreateTakeoutResponse, http_res)
|
|
78
79
|
if utils.match_response(http_res, "4XX", "*"):
|
|
79
80
|
http_res_text = utils.stream_to_text(http_res)
|
|
80
81
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -148,7 +149,7 @@ class Takeouts(BaseSDK):
|
|
|
148
149
|
)
|
|
149
150
|
|
|
150
151
|
if utils.match_response(http_res, "200", "application/json"):
|
|
151
|
-
return
|
|
152
|
+
return unmarshal_json_response(models.CreateTakeoutResponse, http_res)
|
|
152
153
|
if utils.match_response(http_res, "4XX", "*"):
|
|
153
154
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
154
155
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -230,9 +231,9 @@ class Takeouts(BaseSDK):
|
|
|
230
231
|
|
|
231
232
|
response_data: Any = None
|
|
232
233
|
if utils.match_response(http_res, "200", "application/json"):
|
|
233
|
-
return
|
|
234
|
+
return unmarshal_json_response(models.TakeoutStatusResponse, http_res)
|
|
234
235
|
if utils.match_response(http_res, "422", "application/json"):
|
|
235
|
-
response_data =
|
|
236
|
+
response_data = unmarshal_json_response(
|
|
236
237
|
errors.HTTPValidationErrorData, http_res
|
|
237
238
|
)
|
|
238
239
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -317,9 +318,9 @@ class Takeouts(BaseSDK):
|
|
|
317
318
|
|
|
318
319
|
response_data: Any = None
|
|
319
320
|
if utils.match_response(http_res, "200", "application/json"):
|
|
320
|
-
return
|
|
321
|
+
return unmarshal_json_response(models.TakeoutStatusResponse, http_res)
|
|
321
322
|
if utils.match_response(http_res, "422", "application/json"):
|
|
322
|
-
response_data =
|
|
323
|
+
response_data = unmarshal_json_response(
|
|
323
324
|
errors.HTTPValidationErrorData, http_res
|
|
324
325
|
)
|
|
325
326
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -411,7 +412,7 @@ class Takeouts(BaseSDK):
|
|
|
411
412
|
return http_res
|
|
412
413
|
if utils.match_response(http_res, "422", "application/json"):
|
|
413
414
|
http_res_text = utils.stream_to_text(http_res)
|
|
414
|
-
response_data =
|
|
415
|
+
response_data = unmarshal_json_response(
|
|
415
416
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
416
417
|
)
|
|
417
418
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
|
@@ -504,7 +505,7 @@ class Takeouts(BaseSDK):
|
|
|
504
505
|
return http_res
|
|
505
506
|
if utils.match_response(http_res, "422", "application/json"):
|
|
506
507
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
507
|
-
response_data =
|
|
508
|
+
response_data = unmarshal_json_response(
|
|
508
509
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
509
510
|
)
|
|
510
511
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
syllable_sdk/targets.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, List, Mapping, Optional, Union
|
|
9
10
|
|
|
10
11
|
|
|
@@ -109,11 +110,9 @@ class Targets(BaseSDK):
|
|
|
109
110
|
|
|
110
111
|
response_data: Any = None
|
|
111
112
|
if utils.match_response(http_res, "200", "application/json"):
|
|
112
|
-
return
|
|
113
|
-
models.ListResponseAvailableTarget, http_res
|
|
114
|
-
)
|
|
113
|
+
return unmarshal_json_response(models.ListResponseAvailableTarget, http_res)
|
|
115
114
|
if utils.match_response(http_res, "422", "application/json"):
|
|
116
|
-
response_data =
|
|
115
|
+
response_data = unmarshal_json_response(
|
|
117
116
|
errors.HTTPValidationErrorData, http_res
|
|
118
117
|
)
|
|
119
118
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -224,11 +223,9 @@ class Targets(BaseSDK):
|
|
|
224
223
|
|
|
225
224
|
response_data: Any = None
|
|
226
225
|
if utils.match_response(http_res, "200", "application/json"):
|
|
227
|
-
return
|
|
228
|
-
models.ListResponseAvailableTarget, http_res
|
|
229
|
-
)
|
|
226
|
+
return unmarshal_json_response(models.ListResponseAvailableTarget, http_res)
|
|
230
227
|
if utils.match_response(http_res, "422", "application/json"):
|
|
231
|
-
response_data =
|
|
228
|
+
response_data = unmarshal_json_response(
|
|
232
229
|
errors.HTTPValidationErrorData, http_res
|
|
233
230
|
)
|
|
234
231
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -337,11 +334,11 @@ class Targets(BaseSDK):
|
|
|
337
334
|
|
|
338
335
|
response_data: Any = None
|
|
339
336
|
if utils.match_response(http_res, "200", "application/json"):
|
|
340
|
-
return
|
|
337
|
+
return unmarshal_json_response(
|
|
341
338
|
models.ListResponseChannelTargetResponse, http_res
|
|
342
339
|
)
|
|
343
340
|
if utils.match_response(http_res, "422", "application/json"):
|
|
344
|
-
response_data =
|
|
341
|
+
response_data = unmarshal_json_response(
|
|
345
342
|
errors.HTTPValidationErrorData, http_res
|
|
346
343
|
)
|
|
347
344
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -450,11 +447,11 @@ class Targets(BaseSDK):
|
|
|
450
447
|
|
|
451
448
|
response_data: Any = None
|
|
452
449
|
if utils.match_response(http_res, "200", "application/json"):
|
|
453
|
-
return
|
|
450
|
+
return unmarshal_json_response(
|
|
454
451
|
models.ListResponseChannelTargetResponse, http_res
|
|
455
452
|
)
|
|
456
453
|
if utils.match_response(http_res, "422", "application/json"):
|
|
457
|
-
response_data =
|
|
454
|
+
response_data = unmarshal_json_response(
|
|
458
455
|
errors.HTTPValidationErrorData, http_res
|
|
459
456
|
)
|
|
460
457
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -554,9 +551,9 @@ class Targets(BaseSDK):
|
|
|
554
551
|
|
|
555
552
|
response_data: Any = None
|
|
556
553
|
if utils.match_response(http_res, "200", "application/json"):
|
|
557
|
-
return
|
|
554
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
558
555
|
if utils.match_response(http_res, "422", "application/json"):
|
|
559
|
-
response_data =
|
|
556
|
+
response_data = unmarshal_json_response(
|
|
560
557
|
errors.HTTPValidationErrorData, http_res
|
|
561
558
|
)
|
|
562
559
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -656,9 +653,9 @@ class Targets(BaseSDK):
|
|
|
656
653
|
|
|
657
654
|
response_data: Any = None
|
|
658
655
|
if utils.match_response(http_res, "200", "application/json"):
|
|
659
|
-
return
|
|
656
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
660
657
|
if utils.match_response(http_res, "422", "application/json"):
|
|
661
|
-
response_data =
|
|
658
|
+
response_data = unmarshal_json_response(
|
|
662
659
|
errors.HTTPValidationErrorData, http_res
|
|
663
660
|
)
|
|
664
661
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -746,9 +743,9 @@ class Targets(BaseSDK):
|
|
|
746
743
|
|
|
747
744
|
response_data: Any = None
|
|
748
745
|
if utils.match_response(http_res, "200", "application/json"):
|
|
749
|
-
return
|
|
746
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
750
747
|
if utils.match_response(http_res, "422", "application/json"):
|
|
751
|
-
response_data =
|
|
748
|
+
response_data = unmarshal_json_response(
|
|
752
749
|
errors.HTTPValidationErrorData, http_res
|
|
753
750
|
)
|
|
754
751
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -836,9 +833,9 @@ class Targets(BaseSDK):
|
|
|
836
833
|
|
|
837
834
|
response_data: Any = None
|
|
838
835
|
if utils.match_response(http_res, "200", "application/json"):
|
|
839
|
-
return
|
|
836
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
840
837
|
if utils.match_response(http_res, "422", "application/json"):
|
|
841
|
-
response_data =
|
|
838
|
+
response_data = unmarshal_json_response(
|
|
842
839
|
errors.HTTPValidationErrorData, http_res
|
|
843
840
|
)
|
|
844
841
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -943,9 +940,9 @@ class Targets(BaseSDK):
|
|
|
943
940
|
|
|
944
941
|
response_data: Any = None
|
|
945
942
|
if utils.match_response(http_res, "200", "application/json"):
|
|
946
|
-
return
|
|
943
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
947
944
|
if utils.match_response(http_res, "422", "application/json"):
|
|
948
|
-
response_data =
|
|
945
|
+
response_data = unmarshal_json_response(
|
|
949
946
|
errors.HTTPValidationErrorData, http_res
|
|
950
947
|
)
|
|
951
948
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1050,9 +1047,9 @@ class Targets(BaseSDK):
|
|
|
1050
1047
|
|
|
1051
1048
|
response_data: Any = None
|
|
1052
1049
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1053
|
-
return
|
|
1050
|
+
return unmarshal_json_response(models.ChannelTargetResponse, http_res)
|
|
1054
1051
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1055
|
-
response_data =
|
|
1052
|
+
response_data = unmarshal_json_response(
|
|
1056
1053
|
errors.HTTPValidationErrorData, http_res
|
|
1057
1054
|
)
|
|
1058
1055
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/test.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, Mapping, Optional, Union, cast
|
|
9
10
|
|
|
10
11
|
|
|
@@ -88,9 +89,9 @@ class Test(BaseSDK):
|
|
|
88
89
|
|
|
89
90
|
response_data: Any = None
|
|
90
91
|
if utils.match_response(http_res, "200", "application/json"):
|
|
91
|
-
return
|
|
92
|
+
return unmarshal_json_response(models.TestMessageResponse, http_res)
|
|
92
93
|
if utils.match_response(http_res, "422", "application/json"):
|
|
93
|
-
response_data =
|
|
94
|
+
response_data = unmarshal_json_response(
|
|
94
95
|
errors.HTTPValidationErrorData, http_res
|
|
95
96
|
)
|
|
96
97
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -180,9 +181,9 @@ class Test(BaseSDK):
|
|
|
180
181
|
|
|
181
182
|
response_data: Any = None
|
|
182
183
|
if utils.match_response(http_res, "200", "application/json"):
|
|
183
|
-
return
|
|
184
|
+
return unmarshal_json_response(models.TestMessageResponse, http_res)
|
|
184
185
|
if utils.match_response(http_res, "422", "application/json"):
|
|
185
|
-
response_data =
|
|
186
|
+
response_data = unmarshal_json_response(
|
|
186
187
|
errors.HTTPValidationErrorData, http_res
|
|
187
188
|
)
|
|
188
189
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/tools.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, List, Mapping, Optional, Union, cast
|
|
9
10
|
|
|
10
11
|
|
|
@@ -109,11 +110,9 @@ class Tools(BaseSDK):
|
|
|
109
110
|
|
|
110
111
|
response_data: Any = None
|
|
111
112
|
if utils.match_response(http_res, "200", "application/json"):
|
|
112
|
-
return
|
|
113
|
-
models.ListResponseToolResponse, http_res
|
|
114
|
-
)
|
|
113
|
+
return unmarshal_json_response(models.ListResponseToolResponse, http_res)
|
|
115
114
|
if utils.match_response(http_res, "422", "application/json"):
|
|
116
|
-
response_data =
|
|
115
|
+
response_data = unmarshal_json_response(
|
|
117
116
|
errors.HTTPValidationErrorData, http_res
|
|
118
117
|
)
|
|
119
118
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -224,11 +223,9 @@ class Tools(BaseSDK):
|
|
|
224
223
|
|
|
225
224
|
response_data: Any = None
|
|
226
225
|
if utils.match_response(http_res, "200", "application/json"):
|
|
227
|
-
return
|
|
228
|
-
models.ListResponseToolResponse, http_res
|
|
229
|
-
)
|
|
226
|
+
return unmarshal_json_response(models.ListResponseToolResponse, http_res)
|
|
230
227
|
if utils.match_response(http_res, "422", "application/json"):
|
|
231
|
-
response_data =
|
|
228
|
+
response_data = unmarshal_json_response(
|
|
232
229
|
errors.HTTPValidationErrorData, http_res
|
|
233
230
|
)
|
|
234
231
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -318,9 +315,9 @@ class Tools(BaseSDK):
|
|
|
318
315
|
|
|
319
316
|
response_data: Any = None
|
|
320
317
|
if utils.match_response(http_res, "200", "application/json"):
|
|
321
|
-
return
|
|
318
|
+
return unmarshal_json_response(models.ToolResponse, http_res)
|
|
322
319
|
if utils.match_response(http_res, "422", "application/json"):
|
|
323
|
-
response_data =
|
|
320
|
+
response_data = unmarshal_json_response(
|
|
324
321
|
errors.HTTPValidationErrorData, http_res
|
|
325
322
|
)
|
|
326
323
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -410,9 +407,9 @@ class Tools(BaseSDK):
|
|
|
410
407
|
|
|
411
408
|
response_data: Any = None
|
|
412
409
|
if utils.match_response(http_res, "200", "application/json"):
|
|
413
|
-
return
|
|
410
|
+
return unmarshal_json_response(models.ToolResponse, http_res)
|
|
414
411
|
if utils.match_response(http_res, "422", "application/json"):
|
|
415
|
-
response_data =
|
|
412
|
+
response_data = unmarshal_json_response(
|
|
416
413
|
errors.HTTPValidationErrorData, http_res
|
|
417
414
|
)
|
|
418
415
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -502,9 +499,9 @@ class Tools(BaseSDK):
|
|
|
502
499
|
|
|
503
500
|
response_data: Any = None
|
|
504
501
|
if utils.match_response(http_res, "200", "application/json"):
|
|
505
|
-
return
|
|
502
|
+
return unmarshal_json_response(models.ToolResponse, http_res)
|
|
506
503
|
if utils.match_response(http_res, "422", "application/json"):
|
|
507
|
-
response_data =
|
|
504
|
+
response_data = unmarshal_json_response(
|
|
508
505
|
errors.HTTPValidationErrorData, http_res
|
|
509
506
|
)
|
|
510
507
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -594,9 +591,9 @@ class Tools(BaseSDK):
|
|
|
594
591
|
|
|
595
592
|
response_data: Any = None
|
|
596
593
|
if utils.match_response(http_res, "200", "application/json"):
|
|
597
|
-
return
|
|
594
|
+
return unmarshal_json_response(models.ToolResponse, http_res)
|
|
598
595
|
if utils.match_response(http_res, "422", "application/json"):
|
|
599
|
-
response_data =
|
|
596
|
+
response_data = unmarshal_json_response(
|
|
600
597
|
errors.HTTPValidationErrorData, http_res
|
|
601
598
|
)
|
|
602
599
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -683,9 +680,9 @@ class Tools(BaseSDK):
|
|
|
683
680
|
|
|
684
681
|
response_data: Any = None
|
|
685
682
|
if utils.match_response(http_res, "200", "application/json"):
|
|
686
|
-
return
|
|
683
|
+
return unmarshal_json_response(models.ToolDetailResponse, http_res)
|
|
687
684
|
if utils.match_response(http_res, "422", "application/json"):
|
|
688
|
-
response_data =
|
|
685
|
+
response_data = unmarshal_json_response(
|
|
689
686
|
errors.HTTPValidationErrorData, http_res
|
|
690
687
|
)
|
|
691
688
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -772,9 +769,9 @@ class Tools(BaseSDK):
|
|
|
772
769
|
|
|
773
770
|
response_data: Any = None
|
|
774
771
|
if utils.match_response(http_res, "200", "application/json"):
|
|
775
|
-
return
|
|
772
|
+
return unmarshal_json_response(models.ToolDetailResponse, http_res)
|
|
776
773
|
if utils.match_response(http_res, "422", "application/json"):
|
|
777
|
-
response_data =
|
|
774
|
+
response_data = unmarshal_json_response(
|
|
778
775
|
errors.HTTPValidationErrorData, http_res
|
|
779
776
|
)
|
|
780
777
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -864,9 +861,9 @@ class Tools(BaseSDK):
|
|
|
864
861
|
|
|
865
862
|
response_data: Any = None
|
|
866
863
|
if utils.match_response(http_res, "200", "application/json"):
|
|
867
|
-
return
|
|
864
|
+
return unmarshal_json_response(Any, http_res)
|
|
868
865
|
if utils.match_response(http_res, "422", "application/json"):
|
|
869
|
-
response_data =
|
|
866
|
+
response_data = unmarshal_json_response(
|
|
870
867
|
errors.HTTPValidationErrorData, http_res
|
|
871
868
|
)
|
|
872
869
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -956,9 +953,9 @@ class Tools(BaseSDK):
|
|
|
956
953
|
|
|
957
954
|
response_data: Any = None
|
|
958
955
|
if utils.match_response(http_res, "200", "application/json"):
|
|
959
|
-
return
|
|
956
|
+
return unmarshal_json_response(Any, http_res)
|
|
960
957
|
if utils.match_response(http_res, "422", "application/json"):
|
|
961
|
-
response_data =
|
|
958
|
+
response_data = unmarshal_json_response(
|
|
962
959
|
errors.HTTPValidationErrorData, http_res
|
|
963
960
|
)
|
|
964
961
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/transcript.py
CHANGED
|
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
|
|
|
5
5
|
from syllable_sdk._hooks import HookContext
|
|
6
6
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, Mapping, Optional
|
|
9
10
|
|
|
10
11
|
|
|
@@ -81,11 +82,11 @@ class Transcript(BaseSDK):
|
|
|
81
82
|
|
|
82
83
|
response_data: Any = None
|
|
83
84
|
if utils.match_response(http_res, "200", "application/json"):
|
|
84
|
-
return
|
|
85
|
+
return unmarshal_json_response(
|
|
85
86
|
models.SessionTranscriptionResponse, http_res
|
|
86
87
|
)
|
|
87
88
|
if utils.match_response(http_res, "422", "application/json"):
|
|
88
|
-
response_data =
|
|
89
|
+
response_data = unmarshal_json_response(
|
|
89
90
|
errors.HTTPValidationErrorData, http_res
|
|
90
91
|
)
|
|
91
92
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -170,11 +171,11 @@ class Transcript(BaseSDK):
|
|
|
170
171
|
|
|
171
172
|
response_data: Any = None
|
|
172
173
|
if utils.match_response(http_res, "200", "application/json"):
|
|
173
|
-
return
|
|
174
|
+
return unmarshal_json_response(
|
|
174
175
|
models.SessionTranscriptionResponse, http_res
|
|
175
176
|
)
|
|
176
177
|
if utils.match_response(http_res, "422", "application/json"):
|
|
177
|
-
response_data =
|
|
178
|
+
response_data = unmarshal_json_response(
|
|
178
179
|
errors.HTTPValidationErrorData, http_res
|
|
179
180
|
)
|
|
180
181
|
raise errors.HTTPValidationError(response_data, http_res)
|