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/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "syllable-sdk"
|
|
6
|
-
__version__: str = "0.35.
|
|
6
|
+
__version__: str = "0.35.34"
|
|
7
7
|
__openapi_doc_version__: str = "0.0.2"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.35.
|
|
8
|
+
__gen_version__: str = "2.653.0"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.35.34 2.653.0 0.0.2 syllable-sdk"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
syllable_sdk/agents.py
CHANGED
|
@@ -7,6 +7,7 @@ from syllable_sdk._hooks import HookContext
|
|
|
7
7
|
from syllable_sdk.test import Test
|
|
8
8
|
from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
|
|
9
9
|
from syllable_sdk.utils import get_security_from_env
|
|
10
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
10
11
|
from typing import Any, List, Mapping, Optional, Union, cast
|
|
11
12
|
|
|
12
13
|
|
|
@@ -122,11 +123,9 @@ class Agents(BaseSDK):
|
|
|
122
123
|
|
|
123
124
|
response_data: Any = None
|
|
124
125
|
if utils.match_response(http_res, "200", "application/json"):
|
|
125
|
-
return
|
|
126
|
-
models.ListResponseAgentResponse, http_res
|
|
127
|
-
)
|
|
126
|
+
return unmarshal_json_response(models.ListResponseAgentResponse, http_res)
|
|
128
127
|
if utils.match_response(http_res, "422", "application/json"):
|
|
129
|
-
response_data =
|
|
128
|
+
response_data = unmarshal_json_response(
|
|
130
129
|
errors.HTTPValidationErrorData, http_res
|
|
131
130
|
)
|
|
132
131
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -237,11 +236,9 @@ class Agents(BaseSDK):
|
|
|
237
236
|
|
|
238
237
|
response_data: Any = None
|
|
239
238
|
if utils.match_response(http_res, "200", "application/json"):
|
|
240
|
-
return
|
|
241
|
-
models.ListResponseAgentResponse, http_res
|
|
242
|
-
)
|
|
239
|
+
return unmarshal_json_response(models.ListResponseAgentResponse, http_res)
|
|
243
240
|
if utils.match_response(http_res, "422", "application/json"):
|
|
244
|
-
response_data =
|
|
241
|
+
response_data = unmarshal_json_response(
|
|
245
242
|
errors.HTTPValidationErrorData, http_res
|
|
246
243
|
)
|
|
247
244
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -331,9 +328,9 @@ class Agents(BaseSDK):
|
|
|
331
328
|
|
|
332
329
|
response_data: Any = None
|
|
333
330
|
if utils.match_response(http_res, "200", "application/json"):
|
|
334
|
-
return
|
|
331
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
335
332
|
if utils.match_response(http_res, "422", "application/json"):
|
|
336
|
-
response_data =
|
|
333
|
+
response_data = unmarshal_json_response(
|
|
337
334
|
errors.HTTPValidationErrorData, http_res
|
|
338
335
|
)
|
|
339
336
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -423,9 +420,9 @@ class Agents(BaseSDK):
|
|
|
423
420
|
|
|
424
421
|
response_data: Any = None
|
|
425
422
|
if utils.match_response(http_res, "200", "application/json"):
|
|
426
|
-
return
|
|
423
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
427
424
|
if utils.match_response(http_res, "422", "application/json"):
|
|
428
|
-
response_data =
|
|
425
|
+
response_data = unmarshal_json_response(
|
|
429
426
|
errors.HTTPValidationErrorData, http_res
|
|
430
427
|
)
|
|
431
428
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -515,9 +512,9 @@ class Agents(BaseSDK):
|
|
|
515
512
|
|
|
516
513
|
response_data: Any = None
|
|
517
514
|
if utils.match_response(http_res, "200", "application/json"):
|
|
518
|
-
return
|
|
515
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
519
516
|
if utils.match_response(http_res, "422", "application/json"):
|
|
520
|
-
response_data =
|
|
517
|
+
response_data = unmarshal_json_response(
|
|
521
518
|
errors.HTTPValidationErrorData, http_res
|
|
522
519
|
)
|
|
523
520
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -607,9 +604,9 @@ class Agents(BaseSDK):
|
|
|
607
604
|
|
|
608
605
|
response_data: Any = None
|
|
609
606
|
if utils.match_response(http_res, "200", "application/json"):
|
|
610
|
-
return
|
|
607
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
611
608
|
if utils.match_response(http_res, "422", "application/json"):
|
|
612
|
-
response_data =
|
|
609
|
+
response_data = unmarshal_json_response(
|
|
613
610
|
errors.HTTPValidationErrorData, http_res
|
|
614
611
|
)
|
|
615
612
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -696,9 +693,9 @@ class Agents(BaseSDK):
|
|
|
696
693
|
|
|
697
694
|
response_data: Any = None
|
|
698
695
|
if utils.match_response(http_res, "200", "application/json"):
|
|
699
|
-
return
|
|
696
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
700
697
|
if utils.match_response(http_res, "422", "application/json"):
|
|
701
|
-
response_data =
|
|
698
|
+
response_data = unmarshal_json_response(
|
|
702
699
|
errors.HTTPValidationErrorData, http_res
|
|
703
700
|
)
|
|
704
701
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -785,9 +782,9 @@ class Agents(BaseSDK):
|
|
|
785
782
|
|
|
786
783
|
response_data: Any = None
|
|
787
784
|
if utils.match_response(http_res, "200", "application/json"):
|
|
788
|
-
return
|
|
785
|
+
return unmarshal_json_response(models.AgentResponse, http_res)
|
|
789
786
|
if utils.match_response(http_res, "422", "application/json"):
|
|
790
|
-
response_data =
|
|
787
|
+
response_data = unmarshal_json_response(
|
|
791
788
|
errors.HTTPValidationErrorData, http_res
|
|
792
789
|
)
|
|
793
790
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -875,9 +872,9 @@ class Agents(BaseSDK):
|
|
|
875
872
|
|
|
876
873
|
response_data: Any = None
|
|
877
874
|
if utils.match_response(http_res, "200", "application/json"):
|
|
878
|
-
return
|
|
875
|
+
return unmarshal_json_response(Any, http_res)
|
|
879
876
|
if utils.match_response(http_res, "422", "application/json"):
|
|
880
|
-
response_data =
|
|
877
|
+
response_data = unmarshal_json_response(
|
|
881
878
|
errors.HTTPValidationErrorData, http_res
|
|
882
879
|
)
|
|
883
880
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -965,9 +962,9 @@ class Agents(BaseSDK):
|
|
|
965
962
|
|
|
966
963
|
response_data: Any = None
|
|
967
964
|
if utils.match_response(http_res, "200", "application/json"):
|
|
968
|
-
return
|
|
965
|
+
return unmarshal_json_response(Any, http_res)
|
|
969
966
|
if utils.match_response(http_res, "422", "application/json"):
|
|
970
|
-
response_data =
|
|
967
|
+
response_data = unmarshal_json_response(
|
|
971
968
|
errors.HTTPValidationErrorData, http_res
|
|
972
969
|
)
|
|
973
970
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1046,7 +1043,7 @@ class Agents(BaseSDK):
|
|
|
1046
1043
|
)
|
|
1047
1044
|
|
|
1048
1045
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1049
|
-
return
|
|
1046
|
+
return unmarshal_json_response(List[models.AgentVoice], http_res)
|
|
1050
1047
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1051
1048
|
http_res_text = utils.stream_to_text(http_res)
|
|
1052
1049
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -1122,7 +1119,7 @@ class Agents(BaseSDK):
|
|
|
1122
1119
|
)
|
|
1123
1120
|
|
|
1124
1121
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1125
|
-
return
|
|
1122
|
+
return unmarshal_json_response(List[models.AgentVoice], http_res)
|
|
1126
1123
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1127
1124
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1128
1125
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
syllable_sdk/batches.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
|
|
|
@@ -107,11 +108,11 @@ class Batches(BaseSDK):
|
|
|
107
108
|
|
|
108
109
|
response_data: Any = None
|
|
109
110
|
if utils.match_response(http_res, "200", "application/json"):
|
|
110
|
-
return
|
|
111
|
+
return unmarshal_json_response(
|
|
111
112
|
models.ListResponseCommunicationBatch, http_res
|
|
112
113
|
)
|
|
113
114
|
if utils.match_response(http_res, "422", "application/json"):
|
|
114
|
-
response_data =
|
|
115
|
+
response_data = unmarshal_json_response(
|
|
115
116
|
errors.HTTPValidationErrorData, http_res
|
|
116
117
|
)
|
|
117
118
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -220,11 +221,11 @@ class Batches(BaseSDK):
|
|
|
220
221
|
|
|
221
222
|
response_data: Any = None
|
|
222
223
|
if utils.match_response(http_res, "200", "application/json"):
|
|
223
|
-
return
|
|
224
|
+
return unmarshal_json_response(
|
|
224
225
|
models.ListResponseCommunicationBatch, http_res
|
|
225
226
|
)
|
|
226
227
|
if utils.match_response(http_res, "422", "application/json"):
|
|
227
|
-
response_data =
|
|
228
|
+
response_data = unmarshal_json_response(
|
|
228
229
|
errors.HTTPValidationErrorData, http_res
|
|
229
230
|
)
|
|
230
231
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -314,9 +315,9 @@ class Batches(BaseSDK):
|
|
|
314
315
|
|
|
315
316
|
response_data: Any = None
|
|
316
317
|
if utils.match_response(http_res, "200", "application/json"):
|
|
317
|
-
return
|
|
318
|
+
return unmarshal_json_response(models.CommunicationBatch, http_res)
|
|
318
319
|
if utils.match_response(http_res, "422", "application/json"):
|
|
319
|
-
response_data =
|
|
320
|
+
response_data = unmarshal_json_response(
|
|
320
321
|
errors.HTTPValidationErrorData, http_res
|
|
321
322
|
)
|
|
322
323
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -406,9 +407,9 @@ class Batches(BaseSDK):
|
|
|
406
407
|
|
|
407
408
|
response_data: Any = None
|
|
408
409
|
if utils.match_response(http_res, "200", "application/json"):
|
|
409
|
-
return
|
|
410
|
+
return unmarshal_json_response(models.CommunicationBatch, http_res)
|
|
410
411
|
if utils.match_response(http_res, "422", "application/json"):
|
|
411
|
-
response_data =
|
|
412
|
+
response_data = unmarshal_json_response(
|
|
412
413
|
errors.HTTPValidationErrorData, http_res
|
|
413
414
|
)
|
|
414
415
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -493,9 +494,9 @@ class Batches(BaseSDK):
|
|
|
493
494
|
|
|
494
495
|
response_data: Any = None
|
|
495
496
|
if utils.match_response(http_res, "200", "application/json"):
|
|
496
|
-
return
|
|
497
|
+
return unmarshal_json_response(models.BatchDetails, http_res)
|
|
497
498
|
if utils.match_response(http_res, "422", "application/json"):
|
|
498
|
-
response_data =
|
|
499
|
+
response_data = unmarshal_json_response(
|
|
499
500
|
errors.HTTPValidationErrorData, http_res
|
|
500
501
|
)
|
|
501
502
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -580,9 +581,9 @@ class Batches(BaseSDK):
|
|
|
580
581
|
|
|
581
582
|
response_data: Any = None
|
|
582
583
|
if utils.match_response(http_res, "200", "application/json"):
|
|
583
|
-
return
|
|
584
|
+
return unmarshal_json_response(models.BatchDetails, http_res)
|
|
584
585
|
if utils.match_response(http_res, "422", "application/json"):
|
|
585
|
-
response_data =
|
|
586
|
+
response_data = unmarshal_json_response(
|
|
586
587
|
errors.HTTPValidationErrorData, http_res
|
|
587
588
|
)
|
|
588
589
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -681,9 +682,9 @@ class Batches(BaseSDK):
|
|
|
681
682
|
|
|
682
683
|
response_data: Any = None
|
|
683
684
|
if utils.match_response(http_res, "200", "application/json"):
|
|
684
|
-
return
|
|
685
|
+
return unmarshal_json_response(models.CommunicationBatch, http_res)
|
|
685
686
|
if utils.match_response(http_res, "422", "application/json"):
|
|
686
|
-
response_data =
|
|
687
|
+
response_data = unmarshal_json_response(
|
|
687
688
|
errors.HTTPValidationErrorData, http_res
|
|
688
689
|
)
|
|
689
690
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -782,9 +783,9 @@ class Batches(BaseSDK):
|
|
|
782
783
|
|
|
783
784
|
response_data: Any = None
|
|
784
785
|
if utils.match_response(http_res, "200", "application/json"):
|
|
785
|
-
return
|
|
786
|
+
return unmarshal_json_response(models.CommunicationBatch, http_res)
|
|
786
787
|
if utils.match_response(http_res, "422", "application/json"):
|
|
787
|
-
response_data =
|
|
788
|
+
response_data = unmarshal_json_response(
|
|
788
789
|
errors.HTTPValidationErrorData, http_res
|
|
789
790
|
)
|
|
790
791
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -883,9 +884,9 @@ class Batches(BaseSDK):
|
|
|
883
884
|
|
|
884
885
|
response_data: Any = None
|
|
885
886
|
if utils.match_response(http_res, "200", "application/json"):
|
|
886
|
-
return
|
|
887
|
+
return unmarshal_json_response(Any, http_res)
|
|
887
888
|
if utils.match_response(http_res, "422", "application/json"):
|
|
888
|
-
response_data =
|
|
889
|
+
response_data = unmarshal_json_response(
|
|
889
890
|
errors.HTTPValidationErrorData, http_res
|
|
890
891
|
)
|
|
891
892
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -984,9 +985,9 @@ class Batches(BaseSDK):
|
|
|
984
985
|
|
|
985
986
|
response_data: Any = None
|
|
986
987
|
if utils.match_response(http_res, "200", "application/json"):
|
|
987
|
-
return
|
|
988
|
+
return unmarshal_json_response(Any, http_res)
|
|
988
989
|
if utils.match_response(http_res, "422", "application/json"):
|
|
989
|
-
response_data =
|
|
990
|
+
response_data = unmarshal_json_response(
|
|
990
991
|
errors.HTTPValidationErrorData, http_res
|
|
991
992
|
)
|
|
992
993
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1087,9 +1088,9 @@ class Batches(BaseSDK):
|
|
|
1087
1088
|
|
|
1088
1089
|
response_data: Any = None
|
|
1089
1090
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1090
|
-
return
|
|
1091
|
+
return unmarshal_json_response(Any, http_res)
|
|
1091
1092
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1092
|
-
response_data =
|
|
1093
|
+
response_data = unmarshal_json_response(
|
|
1093
1094
|
errors.HTTPValidationErrorData, http_res
|
|
1094
1095
|
)
|
|
1095
1096
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1190,9 +1191,9 @@ class Batches(BaseSDK):
|
|
|
1190
1191
|
|
|
1191
1192
|
response_data: Any = None
|
|
1192
1193
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1193
|
-
return
|
|
1194
|
+
return unmarshal_json_response(Any, http_res)
|
|
1194
1195
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1195
|
-
response_data =
|
|
1196
|
+
response_data = unmarshal_json_response(
|
|
1196
1197
|
errors.HTTPValidationErrorData, http_res
|
|
1197
1198
|
)
|
|
1198
1199
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1286,11 +1287,11 @@ class Batches(BaseSDK):
|
|
|
1286
1287
|
|
|
1287
1288
|
response_data: Any = None
|
|
1288
1289
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1289
|
-
return
|
|
1290
|
+
return unmarshal_json_response(
|
|
1290
1291
|
List[models.CommunicationRequestResult], http_res
|
|
1291
1292
|
)
|
|
1292
1293
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1293
|
-
response_data =
|
|
1294
|
+
response_data = unmarshal_json_response(
|
|
1294
1295
|
errors.HTTPValidationErrorData, http_res
|
|
1295
1296
|
)
|
|
1296
1297
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1384,11 +1385,11 @@ class Batches(BaseSDK):
|
|
|
1384
1385
|
|
|
1385
1386
|
response_data: Any = None
|
|
1386
1387
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1387
|
-
return
|
|
1388
|
+
return unmarshal_json_response(
|
|
1388
1389
|
List[models.CommunicationRequestResult], http_res
|
|
1389
1390
|
)
|
|
1390
1391
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1391
|
-
response_data =
|
|
1392
|
+
response_data = unmarshal_json_response(
|
|
1392
1393
|
errors.HTTPValidationErrorData, http_res
|
|
1393
1394
|
)
|
|
1394
1395
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1487,9 +1488,9 @@ class Batches(BaseSDK):
|
|
|
1487
1488
|
|
|
1488
1489
|
response_data: Any = None
|
|
1489
1490
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1490
|
-
return
|
|
1491
|
+
return unmarshal_json_response(Any, http_res)
|
|
1491
1492
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1492
|
-
response_data =
|
|
1493
|
+
response_data = unmarshal_json_response(
|
|
1493
1494
|
errors.HTTPValidationErrorData, http_res
|
|
1494
1495
|
)
|
|
1495
1496
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1588,9 +1589,9 @@ class Batches(BaseSDK):
|
|
|
1588
1589
|
|
|
1589
1590
|
response_data: Any = None
|
|
1590
1591
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1591
|
-
return
|
|
1592
|
+
return unmarshal_json_response(Any, http_res)
|
|
1592
1593
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1593
|
-
response_data =
|
|
1594
|
+
response_data = unmarshal_json_response(
|
|
1594
1595
|
errors.HTTPValidationErrorData, http_res
|
|
1595
1596
|
)
|
|
1596
1597
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1681,9 +1682,9 @@ class Batches(BaseSDK):
|
|
|
1681
1682
|
|
|
1682
1683
|
response_data: Any = None
|
|
1683
1684
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1684
|
-
return
|
|
1685
|
+
return unmarshal_json_response(Any, http_res)
|
|
1685
1686
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1686
|
-
response_data =
|
|
1687
|
+
response_data = unmarshal_json_response(
|
|
1687
1688
|
errors.HTTPValidationErrorData, http_res
|
|
1688
1689
|
)
|
|
1689
1690
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1774,9 +1775,9 @@ class Batches(BaseSDK):
|
|
|
1774
1775
|
|
|
1775
1776
|
response_data: Any = None
|
|
1776
1777
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1777
|
-
return
|
|
1778
|
+
return unmarshal_json_response(Any, http_res)
|
|
1778
1779
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1779
|
-
response_data =
|
|
1780
|
+
response_data = unmarshal_json_response(
|
|
1780
1781
|
errors.HTTPValidationErrorData, http_res
|
|
1781
1782
|
)
|
|
1782
1783
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/campaigns.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
|
|
|
@@ -107,11 +108,11 @@ class Campaigns(BaseSDK):
|
|
|
107
108
|
|
|
108
109
|
response_data: Any = None
|
|
109
110
|
if utils.match_response(http_res, "200", "application/json"):
|
|
110
|
-
return
|
|
111
|
+
return unmarshal_json_response(
|
|
111
112
|
models.ListResponseOutboundCampaign, http_res
|
|
112
113
|
)
|
|
113
114
|
if utils.match_response(http_res, "422", "application/json"):
|
|
114
|
-
response_data =
|
|
115
|
+
response_data = unmarshal_json_response(
|
|
115
116
|
errors.HTTPValidationErrorData, http_res
|
|
116
117
|
)
|
|
117
118
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -220,11 +221,11 @@ class Campaigns(BaseSDK):
|
|
|
220
221
|
|
|
221
222
|
response_data: Any = None
|
|
222
223
|
if utils.match_response(http_res, "200", "application/json"):
|
|
223
|
-
return
|
|
224
|
+
return unmarshal_json_response(
|
|
224
225
|
models.ListResponseOutboundCampaign, http_res
|
|
225
226
|
)
|
|
226
227
|
if utils.match_response(http_res, "422", "application/json"):
|
|
227
|
-
response_data =
|
|
228
|
+
response_data = unmarshal_json_response(
|
|
228
229
|
errors.HTTPValidationErrorData, http_res
|
|
229
230
|
)
|
|
230
231
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -314,9 +315,9 @@ class Campaigns(BaseSDK):
|
|
|
314
315
|
|
|
315
316
|
response_data: Any = None
|
|
316
317
|
if utils.match_response(http_res, "200", "application/json"):
|
|
317
|
-
return
|
|
318
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
318
319
|
if utils.match_response(http_res, "422", "application/json"):
|
|
319
|
-
response_data =
|
|
320
|
+
response_data = unmarshal_json_response(
|
|
320
321
|
errors.HTTPValidationErrorData, http_res
|
|
321
322
|
)
|
|
322
323
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -406,9 +407,9 @@ class Campaigns(BaseSDK):
|
|
|
406
407
|
|
|
407
408
|
response_data: Any = None
|
|
408
409
|
if utils.match_response(http_res, "200", "application/json"):
|
|
409
|
-
return
|
|
410
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
410
411
|
if utils.match_response(http_res, "422", "application/json"):
|
|
411
|
-
response_data =
|
|
412
|
+
response_data = unmarshal_json_response(
|
|
412
413
|
errors.HTTPValidationErrorData, http_res
|
|
413
414
|
)
|
|
414
415
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -493,9 +494,9 @@ class Campaigns(BaseSDK):
|
|
|
493
494
|
|
|
494
495
|
response_data: Any = None
|
|
495
496
|
if utils.match_response(http_res, "200", "application/json"):
|
|
496
|
-
return
|
|
497
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
497
498
|
if utils.match_response(http_res, "422", "application/json"):
|
|
498
|
-
response_data =
|
|
499
|
+
response_data = unmarshal_json_response(
|
|
499
500
|
errors.HTTPValidationErrorData, http_res
|
|
500
501
|
)
|
|
501
502
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -580,9 +581,9 @@ class Campaigns(BaseSDK):
|
|
|
580
581
|
|
|
581
582
|
response_data: Any = None
|
|
582
583
|
if utils.match_response(http_res, "200", "application/json"):
|
|
583
|
-
return
|
|
584
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
584
585
|
if utils.match_response(http_res, "422", "application/json"):
|
|
585
|
-
response_data =
|
|
586
|
+
response_data = unmarshal_json_response(
|
|
586
587
|
errors.HTTPValidationErrorData, http_res
|
|
587
588
|
)
|
|
588
589
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -681,9 +682,9 @@ class Campaigns(BaseSDK):
|
|
|
681
682
|
|
|
682
683
|
response_data: Any = None
|
|
683
684
|
if utils.match_response(http_res, "200", "application/json"):
|
|
684
|
-
return
|
|
685
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
685
686
|
if utils.match_response(http_res, "422", "application/json"):
|
|
686
|
-
response_data =
|
|
687
|
+
response_data = unmarshal_json_response(
|
|
687
688
|
errors.HTTPValidationErrorData, http_res
|
|
688
689
|
)
|
|
689
690
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -782,9 +783,9 @@ class Campaigns(BaseSDK):
|
|
|
782
783
|
|
|
783
784
|
response_data: Any = None
|
|
784
785
|
if utils.match_response(http_res, "200", "application/json"):
|
|
785
|
-
return
|
|
786
|
+
return unmarshal_json_response(models.OutboundCampaign, http_res)
|
|
786
787
|
if utils.match_response(http_res, "422", "application/json"):
|
|
787
|
-
response_data =
|
|
788
|
+
response_data = unmarshal_json_response(
|
|
788
789
|
errors.HTTPValidationErrorData, http_res
|
|
789
790
|
)
|
|
790
791
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -869,9 +870,9 @@ class Campaigns(BaseSDK):
|
|
|
869
870
|
|
|
870
871
|
response_data: Any = None
|
|
871
872
|
if utils.match_response(http_res, "200", "application/json"):
|
|
872
|
-
return
|
|
873
|
+
return unmarshal_json_response(Any, http_res)
|
|
873
874
|
if utils.match_response(http_res, "422", "application/json"):
|
|
874
|
-
response_data =
|
|
875
|
+
response_data = unmarshal_json_response(
|
|
875
876
|
errors.HTTPValidationErrorData, http_res
|
|
876
877
|
)
|
|
877
878
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -956,9 +957,9 @@ class Campaigns(BaseSDK):
|
|
|
956
957
|
|
|
957
958
|
response_data: Any = None
|
|
958
959
|
if utils.match_response(http_res, "200", "application/json"):
|
|
959
|
-
return
|
|
960
|
+
return unmarshal_json_response(Any, http_res)
|
|
960
961
|
if utils.match_response(http_res, "422", "application/json"):
|
|
961
|
-
response_data =
|
|
962
|
+
response_data = unmarshal_json_response(
|
|
962
963
|
errors.HTTPValidationErrorData, http_res
|
|
963
964
|
)
|
|
964
965
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/channels.py
CHANGED
|
@@ -8,6 +8,7 @@ from syllable_sdk.targets import Targets
|
|
|
8
8
|
from syllable_sdk.twilio import Twilio
|
|
9
9
|
from syllable_sdk.types import OptionalNullable, UNSET
|
|
10
10
|
from syllable_sdk.utils import get_security_from_env
|
|
11
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
11
12
|
from typing import Any, List, Mapping, Optional
|
|
12
13
|
|
|
13
14
|
|
|
@@ -124,9 +125,9 @@ class Channels(BaseSDK):
|
|
|
124
125
|
|
|
125
126
|
response_data: Any = None
|
|
126
127
|
if utils.match_response(http_res, "200", "application/json"):
|
|
127
|
-
return
|
|
128
|
+
return unmarshal_json_response(models.ListResponseChannel, http_res)
|
|
128
129
|
if utils.match_response(http_res, "422", "application/json"):
|
|
129
|
-
response_data =
|
|
130
|
+
response_data = unmarshal_json_response(
|
|
130
131
|
errors.HTTPValidationErrorData, http_res
|
|
131
132
|
)
|
|
132
133
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -235,9 +236,9 @@ class Channels(BaseSDK):
|
|
|
235
236
|
|
|
236
237
|
response_data: Any = None
|
|
237
238
|
if utils.match_response(http_res, "200", "application/json"):
|
|
238
|
-
return
|
|
239
|
+
return unmarshal_json_response(models.ListResponseChannel, http_res)
|
|
239
240
|
if utils.match_response(http_res, "422", "application/json"):
|
|
240
|
-
response_data =
|
|
241
|
+
response_data = unmarshal_json_response(
|
|
241
242
|
errors.HTTPValidationErrorData, http_res
|
|
242
243
|
)
|
|
243
244
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -327,9 +328,9 @@ class Channels(BaseSDK):
|
|
|
327
328
|
|
|
328
329
|
response_data: Any = None
|
|
329
330
|
if utils.match_response(http_res, "200", "application/json"):
|
|
330
|
-
return
|
|
331
|
+
return unmarshal_json_response(Any, http_res)
|
|
331
332
|
if utils.match_response(http_res, "422", "application/json"):
|
|
332
|
-
response_data =
|
|
333
|
+
response_data = unmarshal_json_response(
|
|
333
334
|
errors.HTTPValidationErrorData, http_res
|
|
334
335
|
)
|
|
335
336
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -419,9 +420,9 @@ class Channels(BaseSDK):
|
|
|
419
420
|
|
|
420
421
|
response_data: Any = None
|
|
421
422
|
if utils.match_response(http_res, "200", "application/json"):
|
|
422
|
-
return
|
|
423
|
+
return unmarshal_json_response(Any, http_res)
|
|
423
424
|
if utils.match_response(http_res, "422", "application/json"):
|
|
424
|
-
response_data =
|
|
425
|
+
response_data = unmarshal_json_response(
|
|
425
426
|
errors.HTTPValidationErrorData, http_res
|
|
426
427
|
)
|
|
427
428
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/conversations.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
|
|
9
10
|
|
|
10
11
|
|
|
@@ -107,11 +108,9 @@ class Conversations(BaseSDK):
|
|
|
107
108
|
|
|
108
109
|
response_data: Any = None
|
|
109
110
|
if utils.match_response(http_res, "200", "application/json"):
|
|
110
|
-
return
|
|
111
|
-
models.ListResponseConversation, http_res
|
|
112
|
-
)
|
|
111
|
+
return unmarshal_json_response(models.ListResponseConversation, http_res)
|
|
113
112
|
if utils.match_response(http_res, "422", "application/json"):
|
|
114
|
-
response_data =
|
|
113
|
+
response_data = unmarshal_json_response(
|
|
115
114
|
errors.HTTPValidationErrorData, http_res
|
|
116
115
|
)
|
|
117
116
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -220,11 +219,9 @@ class Conversations(BaseSDK):
|
|
|
220
219
|
|
|
221
220
|
response_data: Any = None
|
|
222
221
|
if utils.match_response(http_res, "200", "application/json"):
|
|
223
|
-
return
|
|
224
|
-
models.ListResponseConversation, http_res
|
|
225
|
-
)
|
|
222
|
+
return unmarshal_json_response(models.ListResponseConversation, http_res)
|
|
226
223
|
if utils.match_response(http_res, "422", "application/json"):
|
|
227
|
-
response_data =
|
|
224
|
+
response_data = unmarshal_json_response(
|
|
228
225
|
errors.HTTPValidationErrorData, http_res
|
|
229
226
|
)
|
|
230
227
|
raise errors.HTTPValidationError(response_data, http_res)
|