syllable-sdk 0.35.31__py3-none-any.whl → 0.35.33__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/__init__.py +0 -1
- syllable_sdk/_version.py +3 -3
- syllable_sdk/agents.py +83 -211
- syllable_sdk/basesdk.py +5 -5
- syllable_sdk/batches.py +131 -329
- syllable_sdk/campaigns.py +73 -183
- syllable_sdk/channels.py +29 -73
- syllable_sdk/conversations.py +19 -37
- syllable_sdk/custom_messages.py +73 -183
- syllable_sdk/dashboards.py +67 -195
- syllable_sdk/data_sources.py +85 -183
- syllable_sdk/errors/__init__.py +55 -0
- syllable_sdk/errors/apierror.py +38 -0
- syllable_sdk/errors/httpvalidationerror.py +26 -0
- syllable_sdk/errors/no_response_error.py +13 -0
- syllable_sdk/errors/responsevalidationerror.py +25 -0
- syllable_sdk/errors/syllablesdkerror.py +26 -0
- syllable_sdk/events.py +15 -37
- syllable_sdk/folders.py +121 -293
- syllable_sdk/full_summary.py +19 -37
- syllable_sdk/incidents.py +83 -215
- syllable_sdk/insights_sdk.py +17 -39
- syllable_sdk/insights_tools.py +97 -251
- syllable_sdk/language_groups.py +85 -215
- syllable_sdk/latency.py +19 -37
- syllable_sdk/models/__init__.py +0 -8
- syllable_sdk/numbers.py +53 -111
- syllable_sdk/organizations.py +51 -139
- syllable_sdk/permissions.py +11 -33
- syllable_sdk/prompts.py +95 -249
- syllable_sdk/roles.py +75 -181
- syllable_sdk/services.py +73 -183
- syllable_sdk/session_debug.py +43 -109
- syllable_sdk/session_labels.py +47 -109
- syllable_sdk/sessions.py +59 -141
- syllable_sdk/takeouts.py +35 -99
- syllable_sdk/targets.py +75 -185
- syllable_sdk/test.py +15 -37
- syllable_sdk/tools.py +75 -181
- syllable_sdk/transcript.py +17 -39
- syllable_sdk/twilio.py +43 -109
- syllable_sdk/users.py +97 -247
- syllable_sdk/utils/__init__.py +3 -0
- syllable_sdk/utils/serializers.py +21 -3
- syllable_sdk/v1.py +97 -247
- syllable_sdk/workflows.py +115 -291
- {syllable_sdk-0.35.31.dist-info → syllable_sdk-0.35.33.dist-info}/METADATA +58 -45
- {syllable_sdk-0.35.31.dist-info → syllable_sdk-0.35.33.dist-info}/RECORD +49 -45
- syllable_sdk/models/apierror.py +0 -22
- syllable_sdk/models/httpvalidationerror.py +0 -21
- {syllable_sdk-0.35.31.dist-info → syllable_sdk-0.35.33.dist-info}/WHEEL +0 -0
syllable_sdk/events.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from syllable_sdk import models, utils
|
|
4
|
+
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
|
|
@@ -107,31 +107,20 @@ class Events(BaseSDK):
|
|
|
107
107
|
|
|
108
108
|
response_data: Any = None
|
|
109
109
|
if utils.match_response(http_res, "200", "application/json"):
|
|
110
|
-
return utils.
|
|
110
|
+
return utils.unmarshal_json_response(models.ListResponseEvent, http_res)
|
|
111
111
|
if utils.match_response(http_res, "422", "application/json"):
|
|
112
|
-
response_data = utils.
|
|
113
|
-
|
|
112
|
+
response_data = utils.unmarshal_json_response(
|
|
113
|
+
errors.HTTPValidationErrorData, http_res
|
|
114
114
|
)
|
|
115
|
-
raise
|
|
115
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
116
116
|
if utils.match_response(http_res, "4XX", "*"):
|
|
117
117
|
http_res_text = utils.stream_to_text(http_res)
|
|
118
|
-
raise
|
|
119
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
120
|
-
)
|
|
118
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
121
119
|
if utils.match_response(http_res, "5XX", "*"):
|
|
122
120
|
http_res_text = utils.stream_to_text(http_res)
|
|
123
|
-
raise
|
|
124
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
125
|
-
)
|
|
121
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
126
122
|
|
|
127
|
-
|
|
128
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
129
|
-
raise models.APIError(
|
|
130
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
131
|
-
http_res.status_code,
|
|
132
|
-
http_res_text,
|
|
133
|
-
http_res,
|
|
134
|
-
)
|
|
123
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
135
124
|
|
|
136
125
|
async def list_async(
|
|
137
126
|
self,
|
|
@@ -229,28 +218,17 @@ class Events(BaseSDK):
|
|
|
229
218
|
|
|
230
219
|
response_data: Any = None
|
|
231
220
|
if utils.match_response(http_res, "200", "application/json"):
|
|
232
|
-
return utils.
|
|
221
|
+
return utils.unmarshal_json_response(models.ListResponseEvent, http_res)
|
|
233
222
|
if utils.match_response(http_res, "422", "application/json"):
|
|
234
|
-
response_data = utils.
|
|
235
|
-
|
|
223
|
+
response_data = utils.unmarshal_json_response(
|
|
224
|
+
errors.HTTPValidationErrorData, http_res
|
|
236
225
|
)
|
|
237
|
-
raise
|
|
226
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
238
227
|
if utils.match_response(http_res, "4XX", "*"):
|
|
239
228
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
240
|
-
raise
|
|
241
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
242
|
-
)
|
|
229
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
243
230
|
if utils.match_response(http_res, "5XX", "*"):
|
|
244
231
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
245
|
-
raise
|
|
246
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
247
|
-
)
|
|
232
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
248
233
|
|
|
249
|
-
|
|
250
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
251
|
-
raise models.APIError(
|
|
252
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
253
|
-
http_res.status_code,
|
|
254
|
-
http_res_text,
|
|
255
|
-
http_res,
|
|
256
|
-
)
|
|
234
|
+
raise errors.APIError("Unexpected response received", http_res)
|