syllable-sdk 0.35.33__py3-none-any.whl → 0.35.38__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/models/agentsttprovider.py +1 -1
- syllable_sdk/models/insightworkflowcondition.py +8 -1
- syllable_sdk/models/insightworkflowinput.py +10 -10
- syllable_sdk/models/insightworkflowoutput.py +10 -10
- 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/sdk.py +23 -8
- 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.38.dist-info}/METADATA +24 -8
- {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.38.dist-info}/RECORD +46 -45
- {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.38.dist-info}/WHEEL +0 -0
syllable_sdk/full_summary.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,9 @@ class FullSummary(BaseSDK):
|
|
|
81
82
|
|
|
82
83
|
response_data: Any = None
|
|
83
84
|
if utils.match_response(http_res, "200", "application/json"):
|
|
84
|
-
return
|
|
85
|
-
models.SessionSummaryResponse, http_res
|
|
86
|
-
)
|
|
85
|
+
return unmarshal_json_response(models.SessionSummaryResponse, http_res)
|
|
87
86
|
if utils.match_response(http_res, "422", "application/json"):
|
|
88
|
-
response_data =
|
|
87
|
+
response_data = unmarshal_json_response(
|
|
89
88
|
errors.HTTPValidationErrorData, http_res
|
|
90
89
|
)
|
|
91
90
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -170,11 +169,9 @@ class FullSummary(BaseSDK):
|
|
|
170
169
|
|
|
171
170
|
response_data: Any = None
|
|
172
171
|
if utils.match_response(http_res, "200", "application/json"):
|
|
173
|
-
return
|
|
174
|
-
models.SessionSummaryResponse, http_res
|
|
175
|
-
)
|
|
172
|
+
return unmarshal_json_response(models.SessionSummaryResponse, http_res)
|
|
176
173
|
if utils.match_response(http_res, "422", "application/json"):
|
|
177
|
-
response_data =
|
|
174
|
+
response_data = unmarshal_json_response(
|
|
178
175
|
errors.HTTPValidationErrorData, http_res
|
|
179
176
|
)
|
|
180
177
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/incidents.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,11 @@ class Incidents(BaseSDK):
|
|
|
109
110
|
|
|
110
111
|
response_data: Any = None
|
|
111
112
|
if utils.match_response(http_res, "200", "application/json"):
|
|
112
|
-
return
|
|
113
|
+
return unmarshal_json_response(
|
|
113
114
|
models.ListResponseIncidentResponse, http_res
|
|
114
115
|
)
|
|
115
116
|
if utils.match_response(http_res, "422", "application/json"):
|
|
116
|
-
response_data =
|
|
117
|
+
response_data = unmarshal_json_response(
|
|
117
118
|
errors.HTTPValidationErrorData, http_res
|
|
118
119
|
)
|
|
119
120
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -224,11 +225,11 @@ class Incidents(BaseSDK):
|
|
|
224
225
|
|
|
225
226
|
response_data: Any = None
|
|
226
227
|
if utils.match_response(http_res, "200", "application/json"):
|
|
227
|
-
return
|
|
228
|
+
return unmarshal_json_response(
|
|
228
229
|
models.ListResponseIncidentResponse, http_res
|
|
229
230
|
)
|
|
230
231
|
if utils.match_response(http_res, "422", "application/json"):
|
|
231
|
-
response_data =
|
|
232
|
+
response_data = unmarshal_json_response(
|
|
232
233
|
errors.HTTPValidationErrorData, http_res
|
|
233
234
|
)
|
|
234
235
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -320,9 +321,9 @@ class Incidents(BaseSDK):
|
|
|
320
321
|
|
|
321
322
|
response_data: Any = None
|
|
322
323
|
if utils.match_response(http_res, "200", "application/json"):
|
|
323
|
-
return
|
|
324
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
324
325
|
if utils.match_response(http_res, "422", "application/json"):
|
|
325
|
-
response_data =
|
|
326
|
+
response_data = unmarshal_json_response(
|
|
326
327
|
errors.HTTPValidationErrorData, http_res
|
|
327
328
|
)
|
|
328
329
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -414,9 +415,9 @@ class Incidents(BaseSDK):
|
|
|
414
415
|
|
|
415
416
|
response_data: Any = None
|
|
416
417
|
if utils.match_response(http_res, "200", "application/json"):
|
|
417
|
-
return
|
|
418
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
418
419
|
if utils.match_response(http_res, "422", "application/json"):
|
|
419
|
-
response_data =
|
|
420
|
+
response_data = unmarshal_json_response(
|
|
420
421
|
errors.HTTPValidationErrorData, http_res
|
|
421
422
|
)
|
|
422
423
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -508,9 +509,9 @@ class Incidents(BaseSDK):
|
|
|
508
509
|
|
|
509
510
|
response_data: Any = None
|
|
510
511
|
if utils.match_response(http_res, "200", "application/json"):
|
|
511
|
-
return
|
|
512
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
512
513
|
if utils.match_response(http_res, "422", "application/json"):
|
|
513
|
-
response_data =
|
|
514
|
+
response_data = unmarshal_json_response(
|
|
514
515
|
errors.HTTPValidationErrorData, http_res
|
|
515
516
|
)
|
|
516
517
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -602,9 +603,9 @@ class Incidents(BaseSDK):
|
|
|
602
603
|
|
|
603
604
|
response_data: Any = None
|
|
604
605
|
if utils.match_response(http_res, "200", "application/json"):
|
|
605
|
-
return
|
|
606
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
606
607
|
if utils.match_response(http_res, "422", "application/json"):
|
|
607
|
-
response_data =
|
|
608
|
+
response_data = unmarshal_json_response(
|
|
608
609
|
errors.HTTPValidationErrorData, http_res
|
|
609
610
|
)
|
|
610
611
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -683,7 +684,7 @@ class Incidents(BaseSDK):
|
|
|
683
684
|
)
|
|
684
685
|
|
|
685
686
|
if utils.match_response(http_res, "200", "application/json"):
|
|
686
|
-
return
|
|
687
|
+
return unmarshal_json_response(
|
|
687
688
|
List[models.IncidentOrganizationResponse], http_res
|
|
688
689
|
)
|
|
689
690
|
if utils.match_response(http_res, "4XX", "*"):
|
|
@@ -761,7 +762,7 @@ class Incidents(BaseSDK):
|
|
|
761
762
|
)
|
|
762
763
|
|
|
763
764
|
if utils.match_response(http_res, "200", "application/json"):
|
|
764
|
-
return
|
|
765
|
+
return unmarshal_json_response(
|
|
765
766
|
List[models.IncidentOrganizationResponse], http_res
|
|
766
767
|
)
|
|
767
768
|
if utils.match_response(http_res, "4XX", "*"):
|
|
@@ -847,9 +848,9 @@ class Incidents(BaseSDK):
|
|
|
847
848
|
|
|
848
849
|
response_data: Any = None
|
|
849
850
|
if utils.match_response(http_res, "200", "application/json"):
|
|
850
|
-
return
|
|
851
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
851
852
|
if utils.match_response(http_res, "422", "application/json"):
|
|
852
|
-
response_data =
|
|
853
|
+
response_data = unmarshal_json_response(
|
|
853
854
|
errors.HTTPValidationErrorData, http_res
|
|
854
855
|
)
|
|
855
856
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -936,9 +937,9 @@ class Incidents(BaseSDK):
|
|
|
936
937
|
|
|
937
938
|
response_data: Any = None
|
|
938
939
|
if utils.match_response(http_res, "200", "application/json"):
|
|
939
|
-
return
|
|
940
|
+
return unmarshal_json_response(models.IncidentResponse, http_res)
|
|
940
941
|
if utils.match_response(http_res, "422", "application/json"):
|
|
941
|
-
response_data =
|
|
942
|
+
response_data = unmarshal_json_response(
|
|
942
943
|
errors.HTTPValidationErrorData, http_res
|
|
943
944
|
)
|
|
944
945
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1028,9 +1029,9 @@ class Incidents(BaseSDK):
|
|
|
1028
1029
|
|
|
1029
1030
|
response_data: Any = None
|
|
1030
1031
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1031
|
-
return
|
|
1032
|
+
return unmarshal_json_response(Any, http_res)
|
|
1032
1033
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1033
|
-
response_data =
|
|
1034
|
+
response_data = unmarshal_json_response(
|
|
1034
1035
|
errors.HTTPValidationErrorData, http_res
|
|
1035
1036
|
)
|
|
1036
1037
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1120,9 +1121,9 @@ class Incidents(BaseSDK):
|
|
|
1120
1121
|
|
|
1121
1122
|
response_data: Any = None
|
|
1122
1123
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1123
|
-
return
|
|
1124
|
+
return unmarshal_json_response(Any, http_res)
|
|
1124
1125
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1125
|
-
response_data =
|
|
1126
|
+
response_data = unmarshal_json_response(
|
|
1126
1127
|
errors.HTTPValidationErrorData, http_res
|
|
1127
1128
|
)
|
|
1128
1129
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/insights_sdk.py
CHANGED
|
@@ -8,6 +8,7 @@ from syllable_sdk.folders import Folders
|
|
|
8
8
|
from syllable_sdk.insights_tools import InsightsTools
|
|
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 syllable_sdk.workflows import Workflows
|
|
12
13
|
from typing import Any, List, Mapping, Optional
|
|
13
14
|
|
|
@@ -130,11 +131,9 @@ class InsightsSDK(BaseSDK):
|
|
|
130
131
|
|
|
131
132
|
response_data: Any = None
|
|
132
133
|
if utils.match_response(http_res, "200", "application/json"):
|
|
133
|
-
return
|
|
134
|
-
models.ListResponseInsightsOutput, http_res
|
|
135
|
-
)
|
|
134
|
+
return unmarshal_json_response(models.ListResponseInsightsOutput, http_res)
|
|
136
135
|
if utils.match_response(http_res, "422", "application/json"):
|
|
137
|
-
response_data =
|
|
136
|
+
response_data = unmarshal_json_response(
|
|
138
137
|
errors.HTTPValidationErrorData, http_res
|
|
139
138
|
)
|
|
140
139
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -245,11 +244,9 @@ class InsightsSDK(BaseSDK):
|
|
|
245
244
|
|
|
246
245
|
response_data: Any = None
|
|
247
246
|
if utils.match_response(http_res, "200", "application/json"):
|
|
248
|
-
return
|
|
249
|
-
models.ListResponseInsightsOutput, http_res
|
|
250
|
-
)
|
|
247
|
+
return unmarshal_json_response(models.ListResponseInsightsOutput, http_res)
|
|
251
248
|
if utils.match_response(http_res, "422", "application/json"):
|
|
252
|
-
response_data =
|
|
249
|
+
response_data = unmarshal_json_response(
|
|
253
250
|
errors.HTTPValidationErrorData, http_res
|
|
254
251
|
)
|
|
255
252
|
raise errors.HTTPValidationError(response_data, http_res)
|
syllable_sdk/insights_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,11 @@ class InsightsTools(BaseSDK):
|
|
|
109
110
|
|
|
110
111
|
response_data: Any = None
|
|
111
112
|
if utils.match_response(http_res, "200", "application/json"):
|
|
112
|
-
return
|
|
113
|
+
return unmarshal_json_response(
|
|
113
114
|
models.ListResponseInsightToolOutput, http_res
|
|
114
115
|
)
|
|
115
116
|
if utils.match_response(http_res, "422", "application/json"):
|
|
116
|
-
response_data =
|
|
117
|
+
response_data = unmarshal_json_response(
|
|
117
118
|
errors.HTTPValidationErrorData, http_res
|
|
118
119
|
)
|
|
119
120
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -224,11 +225,11 @@ class InsightsTools(BaseSDK):
|
|
|
224
225
|
|
|
225
226
|
response_data: Any = None
|
|
226
227
|
if utils.match_response(http_res, "200", "application/json"):
|
|
227
|
-
return
|
|
228
|
+
return unmarshal_json_response(
|
|
228
229
|
models.ListResponseInsightToolOutput, http_res
|
|
229
230
|
)
|
|
230
231
|
if utils.match_response(http_res, "422", "application/json"):
|
|
231
|
-
response_data =
|
|
232
|
+
response_data = unmarshal_json_response(
|
|
232
233
|
errors.HTTPValidationErrorData, http_res
|
|
233
234
|
)
|
|
234
235
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -318,9 +319,9 @@ class InsightsTools(BaseSDK):
|
|
|
318
319
|
|
|
319
320
|
response_data: Any = None
|
|
320
321
|
if utils.match_response(http_res, "200", "application/json"):
|
|
321
|
-
return
|
|
322
|
+
return unmarshal_json_response(models.InsightToolOutput, http_res)
|
|
322
323
|
if utils.match_response(http_res, "422", "application/json"):
|
|
323
|
-
response_data =
|
|
324
|
+
response_data = unmarshal_json_response(
|
|
324
325
|
errors.HTTPValidationErrorData, http_res
|
|
325
326
|
)
|
|
326
327
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -410,9 +411,9 @@ class InsightsTools(BaseSDK):
|
|
|
410
411
|
|
|
411
412
|
response_data: Any = None
|
|
412
413
|
if utils.match_response(http_res, "200", "application/json"):
|
|
413
|
-
return
|
|
414
|
+
return unmarshal_json_response(models.InsightToolOutput, http_res)
|
|
414
415
|
if utils.match_response(http_res, "422", "application/json"):
|
|
415
|
-
response_data =
|
|
416
|
+
response_data = unmarshal_json_response(
|
|
416
417
|
errors.HTTPValidationErrorData, http_res
|
|
417
418
|
)
|
|
418
419
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -499,9 +500,9 @@ class InsightsTools(BaseSDK):
|
|
|
499
500
|
|
|
500
501
|
response_data: Any = None
|
|
501
502
|
if utils.match_response(http_res, "200", "application/json"):
|
|
502
|
-
return
|
|
503
|
+
return unmarshal_json_response(models.InsightToolOutput, http_res)
|
|
503
504
|
if utils.match_response(http_res, "422", "application/json"):
|
|
504
|
-
response_data =
|
|
505
|
+
response_data = unmarshal_json_response(
|
|
505
506
|
errors.HTTPValidationErrorData, http_res
|
|
506
507
|
)
|
|
507
508
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -588,9 +589,9 @@ class InsightsTools(BaseSDK):
|
|
|
588
589
|
|
|
589
590
|
response_data: Any = None
|
|
590
591
|
if utils.match_response(http_res, "200", "application/json"):
|
|
591
|
-
return
|
|
592
|
+
return unmarshal_json_response(models.InsightToolOutput, http_res)
|
|
592
593
|
if utils.match_response(http_res, "422", "application/json"):
|
|
593
|
-
response_data =
|
|
594
|
+
response_data = unmarshal_json_response(
|
|
594
595
|
errors.HTTPValidationErrorData, http_res
|
|
595
596
|
)
|
|
596
597
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -677,9 +678,9 @@ class InsightsTools(BaseSDK):
|
|
|
677
678
|
|
|
678
679
|
response_data: Any = None
|
|
679
680
|
if utils.match_response(http_res, "200", "application/json"):
|
|
680
|
-
return
|
|
681
|
+
return unmarshal_json_response(Any, http_res)
|
|
681
682
|
if utils.match_response(http_res, "422", "application/json"):
|
|
682
|
-
response_data =
|
|
683
|
+
response_data = unmarshal_json_response(
|
|
683
684
|
errors.HTTPValidationErrorData, http_res
|
|
684
685
|
)
|
|
685
686
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -766,9 +767,9 @@ class InsightsTools(BaseSDK):
|
|
|
766
767
|
|
|
767
768
|
response_data: Any = None
|
|
768
769
|
if utils.match_response(http_res, "200", "application/json"):
|
|
769
|
-
return
|
|
770
|
+
return unmarshal_json_response(Any, http_res)
|
|
770
771
|
if utils.match_response(http_res, "422", "application/json"):
|
|
771
|
-
response_data =
|
|
772
|
+
response_data = unmarshal_json_response(
|
|
772
773
|
errors.HTTPValidationErrorData, http_res
|
|
773
774
|
)
|
|
774
775
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -869,9 +870,9 @@ class InsightsTools(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(models.InsightToolOutput, 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)
|
|
@@ -972,9 +973,9 @@ class InsightsTools(BaseSDK):
|
|
|
972
973
|
|
|
973
974
|
response_data: Any = None
|
|
974
975
|
if utils.match_response(http_res, "200", "application/json"):
|
|
975
|
-
return
|
|
976
|
+
return unmarshal_json_response(models.InsightToolOutput, http_res)
|
|
976
977
|
if utils.match_response(http_res, "422", "application/json"):
|
|
977
|
-
response_data =
|
|
978
|
+
response_data = unmarshal_json_response(
|
|
978
979
|
errors.HTTPValidationErrorData, http_res
|
|
979
980
|
)
|
|
980
981
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1066,9 +1067,9 @@ class InsightsTools(BaseSDK):
|
|
|
1066
1067
|
|
|
1067
1068
|
response_data: Any = None
|
|
1068
1069
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1069
|
-
return
|
|
1070
|
+
return unmarshal_json_response(Any, http_res)
|
|
1070
1071
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1071
|
-
response_data =
|
|
1072
|
+
response_data = unmarshal_json_response(
|
|
1072
1073
|
errors.HTTPValidationErrorData, http_res
|
|
1073
1074
|
)
|
|
1074
1075
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1160,9 +1161,9 @@ class InsightsTools(BaseSDK):
|
|
|
1160
1161
|
|
|
1161
1162
|
response_data: Any = None
|
|
1162
1163
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1163
|
-
return
|
|
1164
|
+
return unmarshal_json_response(Any, http_res)
|
|
1164
1165
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1165
|
-
response_data =
|
|
1166
|
+
response_data = unmarshal_json_response(
|
|
1166
1167
|
errors.HTTPValidationErrorData, http_res
|
|
1167
1168
|
)
|
|
1168
1169
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1241,9 +1242,7 @@ class InsightsTools(BaseSDK):
|
|
|
1241
1242
|
)
|
|
1242
1243
|
|
|
1243
1244
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1244
|
-
return
|
|
1245
|
-
List[models.InsightToolDefinition], http_res
|
|
1246
|
-
)
|
|
1245
|
+
return unmarshal_json_response(List[models.InsightToolDefinition], http_res)
|
|
1247
1246
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1248
1247
|
http_res_text = utils.stream_to_text(http_res)
|
|
1249
1248
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -1319,9 +1318,7 @@ class InsightsTools(BaseSDK):
|
|
|
1319
1318
|
)
|
|
1320
1319
|
|
|
1321
1320
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1322
|
-
return
|
|
1323
|
-
List[models.InsightToolDefinition], http_res
|
|
1324
|
-
)
|
|
1321
|
+
return unmarshal_json_response(List[models.InsightToolDefinition], http_res)
|
|
1325
1322
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1326
1323
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1327
1324
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
syllable_sdk/language_groups.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 BaseModel, 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, List, Mapping, Optional, Union, cast
|
|
10
11
|
|
|
11
12
|
|
|
@@ -110,11 +111,11 @@ class LanguageGroups(BaseSDK):
|
|
|
110
111
|
|
|
111
112
|
response_data: Any = None
|
|
112
113
|
if utils.match_response(http_res, "200", "application/json"):
|
|
113
|
-
return
|
|
114
|
+
return unmarshal_json_response(
|
|
114
115
|
models.ListResponseLanguageGroupResponse, http_res
|
|
115
116
|
)
|
|
116
117
|
if utils.match_response(http_res, "422", "application/json"):
|
|
117
|
-
response_data =
|
|
118
|
+
response_data = unmarshal_json_response(
|
|
118
119
|
errors.HTTPValidationErrorData, http_res
|
|
119
120
|
)
|
|
120
121
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -225,11 +226,11 @@ class LanguageGroups(BaseSDK):
|
|
|
225
226
|
|
|
226
227
|
response_data: Any = None
|
|
227
228
|
if utils.match_response(http_res, "200", "application/json"):
|
|
228
|
-
return
|
|
229
|
+
return unmarshal_json_response(
|
|
229
230
|
models.ListResponseLanguageGroupResponse, http_res
|
|
230
231
|
)
|
|
231
232
|
if utils.match_response(http_res, "422", "application/json"):
|
|
232
|
-
response_data =
|
|
233
|
+
response_data = unmarshal_json_response(
|
|
233
234
|
errors.HTTPValidationErrorData, http_res
|
|
234
235
|
)
|
|
235
236
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -322,9 +323,9 @@ class LanguageGroups(BaseSDK):
|
|
|
322
323
|
|
|
323
324
|
response_data: Any = None
|
|
324
325
|
if utils.match_response(http_res, "200", "application/json"):
|
|
325
|
-
return
|
|
326
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
326
327
|
if utils.match_response(http_res, "422", "application/json"):
|
|
327
|
-
response_data =
|
|
328
|
+
response_data = unmarshal_json_response(
|
|
328
329
|
errors.HTTPValidationErrorData, http_res
|
|
329
330
|
)
|
|
330
331
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -417,9 +418,9 @@ class LanguageGroups(BaseSDK):
|
|
|
417
418
|
|
|
418
419
|
response_data: Any = None
|
|
419
420
|
if utils.match_response(http_res, "200", "application/json"):
|
|
420
|
-
return
|
|
421
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
421
422
|
if utils.match_response(http_res, "422", "application/json"):
|
|
422
|
-
response_data =
|
|
423
|
+
response_data = unmarshal_json_response(
|
|
423
424
|
errors.HTTPValidationErrorData, http_res
|
|
424
425
|
)
|
|
425
426
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -512,9 +513,9 @@ class LanguageGroups(BaseSDK):
|
|
|
512
513
|
|
|
513
514
|
response_data: Any = None
|
|
514
515
|
if utils.match_response(http_res, "200", "application/json"):
|
|
515
|
-
return
|
|
516
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
516
517
|
if utils.match_response(http_res, "422", "application/json"):
|
|
517
|
-
response_data =
|
|
518
|
+
response_data = unmarshal_json_response(
|
|
518
519
|
errors.HTTPValidationErrorData, http_res
|
|
519
520
|
)
|
|
520
521
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -607,9 +608,9 @@ class LanguageGroups(BaseSDK):
|
|
|
607
608
|
|
|
608
609
|
response_data: Any = None
|
|
609
610
|
if utils.match_response(http_res, "200", "application/json"):
|
|
610
|
-
return
|
|
611
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
611
612
|
if utils.match_response(http_res, "422", "application/json"):
|
|
612
|
-
response_data =
|
|
613
|
+
response_data = unmarshal_json_response(
|
|
613
614
|
errors.HTTPValidationErrorData, http_res
|
|
614
615
|
)
|
|
615
616
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -696,9 +697,9 @@ class LanguageGroups(BaseSDK):
|
|
|
696
697
|
|
|
697
698
|
response_data: Any = None
|
|
698
699
|
if utils.match_response(http_res, "200", "application/json"):
|
|
699
|
-
return
|
|
700
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
700
701
|
if utils.match_response(http_res, "422", "application/json"):
|
|
701
|
-
response_data =
|
|
702
|
+
response_data = unmarshal_json_response(
|
|
702
703
|
errors.HTTPValidationErrorData, http_res
|
|
703
704
|
)
|
|
704
705
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -785,9 +786,9 @@ class LanguageGroups(BaseSDK):
|
|
|
785
786
|
|
|
786
787
|
response_data: Any = None
|
|
787
788
|
if utils.match_response(http_res, "200", "application/json"):
|
|
788
|
-
return
|
|
789
|
+
return unmarshal_json_response(models.LanguageGroupResponse, http_res)
|
|
789
790
|
if utils.match_response(http_res, "422", "application/json"):
|
|
790
|
-
response_data =
|
|
791
|
+
response_data = unmarshal_json_response(
|
|
791
792
|
errors.HTTPValidationErrorData, http_res
|
|
792
793
|
)
|
|
793
794
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -877,9 +878,9 @@ class LanguageGroups(BaseSDK):
|
|
|
877
878
|
|
|
878
879
|
response_data: Any = None
|
|
879
880
|
if utils.match_response(http_res, "200", "application/json"):
|
|
880
|
-
return
|
|
881
|
+
return unmarshal_json_response(Any, http_res)
|
|
881
882
|
if utils.match_response(http_res, "422", "application/json"):
|
|
882
|
-
response_data =
|
|
883
|
+
response_data = unmarshal_json_response(
|
|
883
884
|
errors.HTTPValidationErrorData, http_res
|
|
884
885
|
)
|
|
885
886
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -969,9 +970,9 @@ class LanguageGroups(BaseSDK):
|
|
|
969
970
|
|
|
970
971
|
response_data: Any = None
|
|
971
972
|
if utils.match_response(http_res, "200", "application/json"):
|
|
972
|
-
return
|
|
973
|
+
return unmarshal_json_response(Any, http_res)
|
|
973
974
|
if utils.match_response(http_res, "422", "application/json"):
|
|
974
|
-
response_data =
|
|
975
|
+
response_data = unmarshal_json_response(
|
|
975
976
|
errors.HTTPValidationErrorData, http_res
|
|
976
977
|
)
|
|
977
978
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1067,7 +1068,7 @@ class LanguageGroups(BaseSDK):
|
|
|
1067
1068
|
return http_res
|
|
1068
1069
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1069
1070
|
http_res_text = utils.stream_to_text(http_res)
|
|
1070
|
-
response_data =
|
|
1071
|
+
response_data = unmarshal_json_response(
|
|
1071
1072
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
1072
1073
|
)
|
|
1073
1074
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
|
@@ -1164,7 +1165,7 @@ class LanguageGroups(BaseSDK):
|
|
|
1164
1165
|
return http_res
|
|
1165
1166
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1166
1167
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1167
|
-
response_data =
|
|
1168
|
+
response_data = unmarshal_json_response(
|
|
1168
1169
|
errors.HTTPValidationErrorData, http_res, http_res_text
|
|
1169
1170
|
)
|
|
1170
1171
|
raise errors.HTTPValidationError(response_data, http_res, http_res_text)
|
syllable_sdk/latency.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,9 @@ class Latency(BaseSDK):
|
|
|
81
82
|
|
|
82
83
|
response_data: Any = None
|
|
83
84
|
if utils.match_response(http_res, "200", "application/json"):
|
|
84
|
-
return
|
|
85
|
-
models.InspectLatencyResponse, http_res
|
|
86
|
-
)
|
|
85
|
+
return unmarshal_json_response(models.InspectLatencyResponse, http_res)
|
|
87
86
|
if utils.match_response(http_res, "422", "application/json"):
|
|
88
|
-
response_data =
|
|
87
|
+
response_data = unmarshal_json_response(
|
|
89
88
|
errors.HTTPValidationErrorData, http_res
|
|
90
89
|
)
|
|
91
90
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -170,11 +169,9 @@ class Latency(BaseSDK):
|
|
|
170
169
|
|
|
171
170
|
response_data: Any = None
|
|
172
171
|
if utils.match_response(http_res, "200", "application/json"):
|
|
173
|
-
return
|
|
174
|
-
models.InspectLatencyResponse, http_res
|
|
175
|
-
)
|
|
172
|
+
return unmarshal_json_response(models.InspectLatencyResponse, http_res)
|
|
176
173
|
if utils.match_response(http_res, "422", "application/json"):
|
|
177
|
-
response_data =
|
|
174
|
+
response_data = unmarshal_json_response(
|
|
178
175
|
errors.HTTPValidationErrorData, http_res
|
|
179
176
|
)
|
|
180
177
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -9,7 +9,7 @@ from syllable_sdk.types import (
|
|
|
9
9
|
UNSET,
|
|
10
10
|
UNSET_SENTINEL,
|
|
11
11
|
)
|
|
12
|
-
from typing import List, Union
|
|
12
|
+
from typing import Dict, List, Union
|
|
13
13
|
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
14
14
|
|
|
15
15
|
|
|
@@ -36,6 +36,8 @@ class InsightWorkflowConditionTypedDict(TypedDict):
|
|
|
36
36
|
r"""List of prompts"""
|
|
37
37
|
folder_list: NotRequired[Nullable[List[int]]]
|
|
38
38
|
r"""List of folder IDs"""
|
|
39
|
+
sheet_info: NotRequired[Nullable[Dict[str, str]]]
|
|
40
|
+
r"""Information about the sheet to be used for the workflow"""
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
class InsightWorkflowCondition(BaseModel):
|
|
@@ -59,6 +61,9 @@ class InsightWorkflowCondition(BaseModel):
|
|
|
59
61
|
folder_list: OptionalNullable[List[int]] = UNSET
|
|
60
62
|
r"""List of folder IDs"""
|
|
61
63
|
|
|
64
|
+
sheet_info: OptionalNullable[Dict[str, str]] = UNSET
|
|
65
|
+
r"""Information about the sheet to be used for the workflow"""
|
|
66
|
+
|
|
62
67
|
@model_serializer(mode="wrap")
|
|
63
68
|
def serialize_model(self, handler):
|
|
64
69
|
optional_fields = [
|
|
@@ -68,6 +73,7 @@ class InsightWorkflowCondition(BaseModel):
|
|
|
68
73
|
"agent_list",
|
|
69
74
|
"prompt_list",
|
|
70
75
|
"folder_list",
|
|
76
|
+
"sheet_info",
|
|
71
77
|
]
|
|
72
78
|
nullable_fields = [
|
|
73
79
|
"min_duration",
|
|
@@ -76,6 +82,7 @@ class InsightWorkflowCondition(BaseModel):
|
|
|
76
82
|
"agent_list",
|
|
77
83
|
"prompt_list",
|
|
78
84
|
"folder_list",
|
|
85
|
+
"sheet_info",
|
|
79
86
|
]
|
|
80
87
|
null_default_fields = []
|
|
81
88
|
|