syllable-sdk 0.43.1__py3-none-any.whl → 0.44.4__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 +12 -0
- syllable_sdk/basesdk.py +6 -0
- syllable_sdk/batches.py +18 -0
- syllable_sdk/campaigns.py +10 -0
- syllable_sdk/channels.py +8 -0
- syllable_sdk/conversation_config.py +411 -0
- syllable_sdk/conversations.py +2 -0
- syllable_sdk/custom_messages.py +10 -0
- syllable_sdk/dashboards.py +12 -0
- syllable_sdk/data_sources.py +10 -0
- syllable_sdk/directory.py +20 -5
- syllable_sdk/events.py +2 -0
- syllable_sdk/folders.py +16 -0
- syllable_sdk/full_summary.py +2 -0
- syllable_sdk/incidents.py +12 -0
- syllable_sdk/insights_sdk.py +2 -0
- syllable_sdk/insights_tools.py +14 -0
- syllable_sdk/language_groups.py +12 -0
- syllable_sdk/latency.py +2 -0
- syllable_sdk/models/__init__.py +43 -5
- syllable_sdk/models/bridgephrasesconfig.py +39 -0
- syllable_sdk/models/directory_member_test_extensionop.py +4 -5
- syllable_sdk/models/directorymembertestresponse.py +9 -4
- syllable_sdk/models/get_bridge_phrases_configop.py +64 -0
- syllable_sdk/models/pronunciationoverridesdictionary.py +6 -3
- syllable_sdk/models/schemas_cortex_v1_bridge_phrases_dictionarymetadata.py +67 -0
- syllable_sdk/models/{dictionarymetadata.py → schemas_tts_v1_pronunciations_dictionarymetadata.py} +2 -2
- syllable_sdk/models/step.py +2 -2
- syllable_sdk/models/stepeventactions.py +25 -4
- syllable_sdk/models/update_bridge_phrases_configop.py +71 -0
- syllable_sdk/numbers.py +6 -0
- syllable_sdk/organizations.py +8 -0
- syllable_sdk/permissions.py +2 -0
- syllable_sdk/prompts.py +14 -0
- syllable_sdk/pronunciations.py +18 -4
- syllable_sdk/roles.py +10 -0
- syllable_sdk/sdk.py +6 -0
- syllable_sdk/services.py +10 -0
- syllable_sdk/session_debug.py +6 -0
- syllable_sdk/session_labels.py +6 -0
- syllable_sdk/sessions.py +8 -0
- syllable_sdk/takeouts.py +6 -0
- syllable_sdk/targets.py +10 -0
- syllable_sdk/test.py +2 -0
- syllable_sdk/tools.py +10 -0
- syllable_sdk/transcript.py +2 -0
- syllable_sdk/twilio.py +6 -0
- syllable_sdk/users.py +14 -0
- syllable_sdk/utils/forms.py +21 -10
- syllable_sdk/utils/queryparams.py +14 -2
- syllable_sdk/utils/retries.py +69 -5
- syllable_sdk/v1.py +14 -0
- syllable_sdk/voice_groups.py +12 -0
- syllable_sdk/workflows.py +16 -0
- {syllable_sdk-0.43.1.dist-info → syllable_sdk-0.44.4.dist-info}/METADATA +6 -1
- {syllable_sdk-0.43.1.dist-info → syllable_sdk-0.44.4.dist-info}/RECORD +58 -53
- {syllable_sdk-0.43.1.dist-info → syllable_sdk-0.44.4.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from .basesdk import BaseSDK
|
|
4
|
+
from syllable_sdk import errors, models, utils
|
|
5
|
+
from syllable_sdk._hooks import HookContext
|
|
6
|
+
from syllable_sdk.types import OptionalNullable, UNSET
|
|
7
|
+
from syllable_sdk.utils import get_security_from_env
|
|
8
|
+
from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
+
from typing import Any, Mapping, Optional, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ConversationConfig(BaseSDK):
|
|
13
|
+
def get_bridge_phrases_config(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
agent_id: OptionalNullable[int] = UNSET,
|
|
17
|
+
tool_name: OptionalNullable[str] = UNSET,
|
|
18
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
19
|
+
server_url: Optional[str] = None,
|
|
20
|
+
timeout_ms: Optional[int] = None,
|
|
21
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
22
|
+
) -> models.BridgePhrasesConfig:
|
|
23
|
+
r"""Get Bridge Phrases Config
|
|
24
|
+
|
|
25
|
+
Get the bridge phrases configuration.
|
|
26
|
+
|
|
27
|
+
:param agent_id: Agent ID to fetch config for
|
|
28
|
+
:param tool_name: Tool name to fetch config for
|
|
29
|
+
:param retries: Override the default retry configuration for this method
|
|
30
|
+
:param server_url: Override the default server URL for this method
|
|
31
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
32
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
33
|
+
"""
|
|
34
|
+
base_url = None
|
|
35
|
+
url_variables = None
|
|
36
|
+
if timeout_ms is None:
|
|
37
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
38
|
+
|
|
39
|
+
if server_url is not None:
|
|
40
|
+
base_url = server_url
|
|
41
|
+
else:
|
|
42
|
+
base_url = self._get_url(base_url, url_variables)
|
|
43
|
+
|
|
44
|
+
request = models.GetBridgePhrasesConfigRequest(
|
|
45
|
+
agent_id=agent_id,
|
|
46
|
+
tool_name=tool_name,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
req = self._build_request(
|
|
50
|
+
method="GET",
|
|
51
|
+
path="/api/v1/conversation-config/bridges",
|
|
52
|
+
base_url=base_url,
|
|
53
|
+
url_variables=url_variables,
|
|
54
|
+
request=request,
|
|
55
|
+
request_body_required=False,
|
|
56
|
+
request_has_path_params=False,
|
|
57
|
+
request_has_query_params=True,
|
|
58
|
+
user_agent_header="user-agent",
|
|
59
|
+
accept_header_value="application/json",
|
|
60
|
+
http_headers=http_headers,
|
|
61
|
+
security=self.sdk_configuration.security,
|
|
62
|
+
allow_empty_value=None,
|
|
63
|
+
timeout_ms=timeout_ms,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if retries == UNSET:
|
|
67
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
68
|
+
retries = self.sdk_configuration.retry_config
|
|
69
|
+
|
|
70
|
+
retry_config = None
|
|
71
|
+
if isinstance(retries, utils.RetryConfig):
|
|
72
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
73
|
+
|
|
74
|
+
http_res = self.do_request(
|
|
75
|
+
hook_ctx=HookContext(
|
|
76
|
+
config=self.sdk_configuration,
|
|
77
|
+
base_url=base_url or "",
|
|
78
|
+
operation_id="get_bridge_phrases_config",
|
|
79
|
+
oauth2_scopes=None,
|
|
80
|
+
security_source=get_security_from_env(
|
|
81
|
+
self.sdk_configuration.security, models.Security
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
request=req,
|
|
85
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
86
|
+
retry_config=retry_config,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
response_data: Any = None
|
|
90
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
91
|
+
return unmarshal_json_response(models.BridgePhrasesConfig, http_res)
|
|
92
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
93
|
+
response_data = unmarshal_json_response(
|
|
94
|
+
errors.HTTPValidationErrorData, http_res
|
|
95
|
+
)
|
|
96
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
97
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
98
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
99
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
100
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
101
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
102
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
103
|
+
|
|
104
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
105
|
+
|
|
106
|
+
async def get_bridge_phrases_config_async(
|
|
107
|
+
self,
|
|
108
|
+
*,
|
|
109
|
+
agent_id: OptionalNullable[int] = UNSET,
|
|
110
|
+
tool_name: OptionalNullable[str] = UNSET,
|
|
111
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
112
|
+
server_url: Optional[str] = None,
|
|
113
|
+
timeout_ms: Optional[int] = None,
|
|
114
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
115
|
+
) -> models.BridgePhrasesConfig:
|
|
116
|
+
r"""Get Bridge Phrases Config
|
|
117
|
+
|
|
118
|
+
Get the bridge phrases configuration.
|
|
119
|
+
|
|
120
|
+
:param agent_id: Agent ID to fetch config for
|
|
121
|
+
:param tool_name: Tool name to fetch config for
|
|
122
|
+
:param retries: Override the default retry configuration for this method
|
|
123
|
+
:param server_url: Override the default server URL for this method
|
|
124
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
125
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
126
|
+
"""
|
|
127
|
+
base_url = None
|
|
128
|
+
url_variables = None
|
|
129
|
+
if timeout_ms is None:
|
|
130
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
131
|
+
|
|
132
|
+
if server_url is not None:
|
|
133
|
+
base_url = server_url
|
|
134
|
+
else:
|
|
135
|
+
base_url = self._get_url(base_url, url_variables)
|
|
136
|
+
|
|
137
|
+
request = models.GetBridgePhrasesConfigRequest(
|
|
138
|
+
agent_id=agent_id,
|
|
139
|
+
tool_name=tool_name,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
req = self._build_request_async(
|
|
143
|
+
method="GET",
|
|
144
|
+
path="/api/v1/conversation-config/bridges",
|
|
145
|
+
base_url=base_url,
|
|
146
|
+
url_variables=url_variables,
|
|
147
|
+
request=request,
|
|
148
|
+
request_body_required=False,
|
|
149
|
+
request_has_path_params=False,
|
|
150
|
+
request_has_query_params=True,
|
|
151
|
+
user_agent_header="user-agent",
|
|
152
|
+
accept_header_value="application/json",
|
|
153
|
+
http_headers=http_headers,
|
|
154
|
+
security=self.sdk_configuration.security,
|
|
155
|
+
allow_empty_value=None,
|
|
156
|
+
timeout_ms=timeout_ms,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
if retries == UNSET:
|
|
160
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
161
|
+
retries = self.sdk_configuration.retry_config
|
|
162
|
+
|
|
163
|
+
retry_config = None
|
|
164
|
+
if isinstance(retries, utils.RetryConfig):
|
|
165
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
166
|
+
|
|
167
|
+
http_res = await self.do_request_async(
|
|
168
|
+
hook_ctx=HookContext(
|
|
169
|
+
config=self.sdk_configuration,
|
|
170
|
+
base_url=base_url or "",
|
|
171
|
+
operation_id="get_bridge_phrases_config",
|
|
172
|
+
oauth2_scopes=None,
|
|
173
|
+
security_source=get_security_from_env(
|
|
174
|
+
self.sdk_configuration.security, models.Security
|
|
175
|
+
),
|
|
176
|
+
),
|
|
177
|
+
request=req,
|
|
178
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
179
|
+
retry_config=retry_config,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
response_data: Any = None
|
|
183
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
184
|
+
return unmarshal_json_response(models.BridgePhrasesConfig, http_res)
|
|
185
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
186
|
+
response_data = unmarshal_json_response(
|
|
187
|
+
errors.HTTPValidationErrorData, http_res
|
|
188
|
+
)
|
|
189
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
190
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
191
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
192
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
193
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
194
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
195
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
196
|
+
|
|
197
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
198
|
+
|
|
199
|
+
def update_bridge_phrases_config(
|
|
200
|
+
self,
|
|
201
|
+
*,
|
|
202
|
+
bridge_phrases_config: Union[
|
|
203
|
+
models.BridgePhrasesConfig, models.BridgePhrasesConfigTypedDict
|
|
204
|
+
],
|
|
205
|
+
agent_id: OptionalNullable[int] = UNSET,
|
|
206
|
+
tool_name: OptionalNullable[str] = UNSET,
|
|
207
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
208
|
+
server_url: Optional[str] = None,
|
|
209
|
+
timeout_ms: Optional[int] = None,
|
|
210
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
211
|
+
) -> models.BridgePhrasesConfig:
|
|
212
|
+
r"""Update Bridge Phrases Config
|
|
213
|
+
|
|
214
|
+
Update the bridge phrases configuration.
|
|
215
|
+
|
|
216
|
+
:param bridge_phrases_config:
|
|
217
|
+
:param agent_id: Agent ID to update config for
|
|
218
|
+
:param tool_name: Tool name to update config for
|
|
219
|
+
:param retries: Override the default retry configuration for this method
|
|
220
|
+
:param server_url: Override the default server URL for this method
|
|
221
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
222
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
223
|
+
"""
|
|
224
|
+
base_url = None
|
|
225
|
+
url_variables = None
|
|
226
|
+
if timeout_ms is None:
|
|
227
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
228
|
+
|
|
229
|
+
if server_url is not None:
|
|
230
|
+
base_url = server_url
|
|
231
|
+
else:
|
|
232
|
+
base_url = self._get_url(base_url, url_variables)
|
|
233
|
+
|
|
234
|
+
request = models.UpdateBridgePhrasesConfigRequest(
|
|
235
|
+
agent_id=agent_id,
|
|
236
|
+
tool_name=tool_name,
|
|
237
|
+
bridge_phrases_config=utils.get_pydantic_model(
|
|
238
|
+
bridge_phrases_config, models.BridgePhrasesConfig
|
|
239
|
+
),
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
req = self._build_request(
|
|
243
|
+
method="PUT",
|
|
244
|
+
path="/api/v1/conversation-config/bridges",
|
|
245
|
+
base_url=base_url,
|
|
246
|
+
url_variables=url_variables,
|
|
247
|
+
request=request,
|
|
248
|
+
request_body_required=True,
|
|
249
|
+
request_has_path_params=False,
|
|
250
|
+
request_has_query_params=True,
|
|
251
|
+
user_agent_header="user-agent",
|
|
252
|
+
accept_header_value="application/json",
|
|
253
|
+
http_headers=http_headers,
|
|
254
|
+
security=self.sdk_configuration.security,
|
|
255
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
256
|
+
request.bridge_phrases_config,
|
|
257
|
+
False,
|
|
258
|
+
False,
|
|
259
|
+
"json",
|
|
260
|
+
models.BridgePhrasesConfig,
|
|
261
|
+
),
|
|
262
|
+
allow_empty_value=None,
|
|
263
|
+
timeout_ms=timeout_ms,
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
if retries == UNSET:
|
|
267
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
268
|
+
retries = self.sdk_configuration.retry_config
|
|
269
|
+
|
|
270
|
+
retry_config = None
|
|
271
|
+
if isinstance(retries, utils.RetryConfig):
|
|
272
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
273
|
+
|
|
274
|
+
http_res = self.do_request(
|
|
275
|
+
hook_ctx=HookContext(
|
|
276
|
+
config=self.sdk_configuration,
|
|
277
|
+
base_url=base_url or "",
|
|
278
|
+
operation_id="update_bridge_phrases_config",
|
|
279
|
+
oauth2_scopes=None,
|
|
280
|
+
security_source=get_security_from_env(
|
|
281
|
+
self.sdk_configuration.security, models.Security
|
|
282
|
+
),
|
|
283
|
+
),
|
|
284
|
+
request=req,
|
|
285
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
286
|
+
retry_config=retry_config,
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
response_data: Any = None
|
|
290
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
291
|
+
return unmarshal_json_response(models.BridgePhrasesConfig, http_res)
|
|
292
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
293
|
+
response_data = unmarshal_json_response(
|
|
294
|
+
errors.HTTPValidationErrorData, http_res
|
|
295
|
+
)
|
|
296
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
297
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
298
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
299
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
300
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
301
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
302
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
303
|
+
|
|
304
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
305
|
+
|
|
306
|
+
async def update_bridge_phrases_config_async(
|
|
307
|
+
self,
|
|
308
|
+
*,
|
|
309
|
+
bridge_phrases_config: Union[
|
|
310
|
+
models.BridgePhrasesConfig, models.BridgePhrasesConfigTypedDict
|
|
311
|
+
],
|
|
312
|
+
agent_id: OptionalNullable[int] = UNSET,
|
|
313
|
+
tool_name: OptionalNullable[str] = UNSET,
|
|
314
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
315
|
+
server_url: Optional[str] = None,
|
|
316
|
+
timeout_ms: Optional[int] = None,
|
|
317
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
318
|
+
) -> models.BridgePhrasesConfig:
|
|
319
|
+
r"""Update Bridge Phrases Config
|
|
320
|
+
|
|
321
|
+
Update the bridge phrases configuration.
|
|
322
|
+
|
|
323
|
+
:param bridge_phrases_config:
|
|
324
|
+
:param agent_id: Agent ID to update config for
|
|
325
|
+
:param tool_name: Tool name to update config for
|
|
326
|
+
:param retries: Override the default retry configuration for this method
|
|
327
|
+
:param server_url: Override the default server URL for this method
|
|
328
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
329
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
330
|
+
"""
|
|
331
|
+
base_url = None
|
|
332
|
+
url_variables = None
|
|
333
|
+
if timeout_ms is None:
|
|
334
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
335
|
+
|
|
336
|
+
if server_url is not None:
|
|
337
|
+
base_url = server_url
|
|
338
|
+
else:
|
|
339
|
+
base_url = self._get_url(base_url, url_variables)
|
|
340
|
+
|
|
341
|
+
request = models.UpdateBridgePhrasesConfigRequest(
|
|
342
|
+
agent_id=agent_id,
|
|
343
|
+
tool_name=tool_name,
|
|
344
|
+
bridge_phrases_config=utils.get_pydantic_model(
|
|
345
|
+
bridge_phrases_config, models.BridgePhrasesConfig
|
|
346
|
+
),
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
req = self._build_request_async(
|
|
350
|
+
method="PUT",
|
|
351
|
+
path="/api/v1/conversation-config/bridges",
|
|
352
|
+
base_url=base_url,
|
|
353
|
+
url_variables=url_variables,
|
|
354
|
+
request=request,
|
|
355
|
+
request_body_required=True,
|
|
356
|
+
request_has_path_params=False,
|
|
357
|
+
request_has_query_params=True,
|
|
358
|
+
user_agent_header="user-agent",
|
|
359
|
+
accept_header_value="application/json",
|
|
360
|
+
http_headers=http_headers,
|
|
361
|
+
security=self.sdk_configuration.security,
|
|
362
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
363
|
+
request.bridge_phrases_config,
|
|
364
|
+
False,
|
|
365
|
+
False,
|
|
366
|
+
"json",
|
|
367
|
+
models.BridgePhrasesConfig,
|
|
368
|
+
),
|
|
369
|
+
allow_empty_value=None,
|
|
370
|
+
timeout_ms=timeout_ms,
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
if retries == UNSET:
|
|
374
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
375
|
+
retries = self.sdk_configuration.retry_config
|
|
376
|
+
|
|
377
|
+
retry_config = None
|
|
378
|
+
if isinstance(retries, utils.RetryConfig):
|
|
379
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
380
|
+
|
|
381
|
+
http_res = await self.do_request_async(
|
|
382
|
+
hook_ctx=HookContext(
|
|
383
|
+
config=self.sdk_configuration,
|
|
384
|
+
base_url=base_url or "",
|
|
385
|
+
operation_id="update_bridge_phrases_config",
|
|
386
|
+
oauth2_scopes=None,
|
|
387
|
+
security_source=get_security_from_env(
|
|
388
|
+
self.sdk_configuration.security, models.Security
|
|
389
|
+
),
|
|
390
|
+
),
|
|
391
|
+
request=req,
|
|
392
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
393
|
+
retry_config=retry_config,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
response_data: Any = None
|
|
397
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
398
|
+
return unmarshal_json_response(models.BridgePhrasesConfig, http_res)
|
|
399
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
400
|
+
response_data = unmarshal_json_response(
|
|
401
|
+
errors.HTTPValidationErrorData, http_res
|
|
402
|
+
)
|
|
403
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
404
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
405
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
406
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
407
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
408
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
409
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
410
|
+
|
|
411
|
+
raise errors.APIError("Unexpected response received", http_res)
|
syllable_sdk/conversations.py
CHANGED
|
@@ -80,6 +80,7 @@ class Conversations(BaseSDK):
|
|
|
80
80
|
accept_header_value="application/json",
|
|
81
81
|
http_headers=http_headers,
|
|
82
82
|
security=self.sdk_configuration.security,
|
|
83
|
+
allow_empty_value=None,
|
|
83
84
|
timeout_ms=timeout_ms,
|
|
84
85
|
)
|
|
85
86
|
|
|
@@ -191,6 +192,7 @@ class Conversations(BaseSDK):
|
|
|
191
192
|
accept_header_value="application/json",
|
|
192
193
|
http_headers=http_headers,
|
|
193
194
|
security=self.sdk_configuration.security,
|
|
195
|
+
allow_empty_value=None,
|
|
194
196
|
timeout_ms=timeout_ms,
|
|
195
197
|
)
|
|
196
198
|
|
syllable_sdk/custom_messages.py
CHANGED
|
@@ -82,6 +82,7 @@ class CustomMessages(BaseSDK):
|
|
|
82
82
|
accept_header_value="application/json",
|
|
83
83
|
http_headers=http_headers,
|
|
84
84
|
security=self.sdk_configuration.security,
|
|
85
|
+
allow_empty_value=None,
|
|
85
86
|
timeout_ms=timeout_ms,
|
|
86
87
|
)
|
|
87
88
|
|
|
@@ -197,6 +198,7 @@ class CustomMessages(BaseSDK):
|
|
|
197
198
|
accept_header_value="application/json",
|
|
198
199
|
http_headers=http_headers,
|
|
199
200
|
security=self.sdk_configuration.security,
|
|
201
|
+
allow_empty_value=None,
|
|
200
202
|
timeout_ms=timeout_ms,
|
|
201
203
|
)
|
|
202
204
|
|
|
@@ -294,6 +296,7 @@ class CustomMessages(BaseSDK):
|
|
|
294
296
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
295
297
|
request, False, False, "json", models.CustomMessageCreateRequest
|
|
296
298
|
),
|
|
299
|
+
allow_empty_value=None,
|
|
297
300
|
timeout_ms=timeout_ms,
|
|
298
301
|
)
|
|
299
302
|
|
|
@@ -389,6 +392,7 @@ class CustomMessages(BaseSDK):
|
|
|
389
392
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
390
393
|
request, False, False, "json", models.CustomMessageCreateRequest
|
|
391
394
|
),
|
|
395
|
+
allow_empty_value=None,
|
|
392
396
|
timeout_ms=timeout_ms,
|
|
393
397
|
)
|
|
394
398
|
|
|
@@ -484,6 +488,7 @@ class CustomMessages(BaseSDK):
|
|
|
484
488
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
485
489
|
request, False, False, "json", models.CustomMessageUpdateRequest
|
|
486
490
|
),
|
|
491
|
+
allow_empty_value=None,
|
|
487
492
|
timeout_ms=timeout_ms,
|
|
488
493
|
)
|
|
489
494
|
|
|
@@ -579,6 +584,7 @@ class CustomMessages(BaseSDK):
|
|
|
579
584
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
580
585
|
request, False, False, "json", models.CustomMessageUpdateRequest
|
|
581
586
|
),
|
|
587
|
+
allow_empty_value=None,
|
|
582
588
|
timeout_ms=timeout_ms,
|
|
583
589
|
)
|
|
584
590
|
|
|
@@ -668,6 +674,7 @@ class CustomMessages(BaseSDK):
|
|
|
668
674
|
accept_header_value="application/json",
|
|
669
675
|
http_headers=http_headers,
|
|
670
676
|
security=self.sdk_configuration.security,
|
|
677
|
+
allow_empty_value=None,
|
|
671
678
|
timeout_ms=timeout_ms,
|
|
672
679
|
)
|
|
673
680
|
|
|
@@ -757,6 +764,7 @@ class CustomMessages(BaseSDK):
|
|
|
757
764
|
accept_header_value="application/json",
|
|
758
765
|
http_headers=http_headers,
|
|
759
766
|
security=self.sdk_configuration.security,
|
|
767
|
+
allow_empty_value=None,
|
|
760
768
|
timeout_ms=timeout_ms,
|
|
761
769
|
)
|
|
762
770
|
|
|
@@ -849,6 +857,7 @@ class CustomMessages(BaseSDK):
|
|
|
849
857
|
accept_header_value="application/json",
|
|
850
858
|
http_headers=http_headers,
|
|
851
859
|
security=self.sdk_configuration.security,
|
|
860
|
+
allow_empty_value=None,
|
|
852
861
|
timeout_ms=timeout_ms,
|
|
853
862
|
)
|
|
854
863
|
|
|
@@ -941,6 +950,7 @@ class CustomMessages(BaseSDK):
|
|
|
941
950
|
accept_header_value="application/json",
|
|
942
951
|
http_headers=http_headers,
|
|
943
952
|
security=self.sdk_configuration.security,
|
|
953
|
+
allow_empty_value=None,
|
|
944
954
|
timeout_ms=timeout_ms,
|
|
945
955
|
)
|
|
946
956
|
|
syllable_sdk/dashboards.py
CHANGED
|
@@ -86,6 +86,7 @@ class Dashboards(BaseSDK):
|
|
|
86
86
|
accept_header_value="application/json",
|
|
87
87
|
http_headers=http_headers,
|
|
88
88
|
security=self.sdk_configuration.security,
|
|
89
|
+
allow_empty_value=None,
|
|
89
90
|
timeout_ms=timeout_ms,
|
|
90
91
|
)
|
|
91
92
|
|
|
@@ -204,6 +205,7 @@ class Dashboards(BaseSDK):
|
|
|
204
205
|
accept_header_value="application/json",
|
|
205
206
|
http_headers=http_headers,
|
|
206
207
|
security=self.sdk_configuration.security,
|
|
208
|
+
allow_empty_value=None,
|
|
207
209
|
timeout_ms=timeout_ms,
|
|
208
210
|
)
|
|
209
211
|
|
|
@@ -298,6 +300,7 @@ class Dashboards(BaseSDK):
|
|
|
298
300
|
accept_header_value="application/json",
|
|
299
301
|
http_headers=http_headers,
|
|
300
302
|
security=self.sdk_configuration.security,
|
|
303
|
+
allow_empty_value=None,
|
|
301
304
|
timeout_ms=timeout_ms,
|
|
302
305
|
)
|
|
303
306
|
|
|
@@ -390,6 +393,7 @@ class Dashboards(BaseSDK):
|
|
|
390
393
|
accept_header_value="application/json",
|
|
391
394
|
http_headers=http_headers,
|
|
392
395
|
security=self.sdk_configuration.security,
|
|
396
|
+
allow_empty_value=None,
|
|
393
397
|
timeout_ms=timeout_ms,
|
|
394
398
|
)
|
|
395
399
|
|
|
@@ -479,6 +483,7 @@ class Dashboards(BaseSDK):
|
|
|
479
483
|
accept_header_value="application/json",
|
|
480
484
|
http_headers=http_headers,
|
|
481
485
|
security=self.sdk_configuration.security,
|
|
486
|
+
allow_empty_value=None,
|
|
482
487
|
timeout_ms=timeout_ms,
|
|
483
488
|
)
|
|
484
489
|
|
|
@@ -562,6 +567,7 @@ class Dashboards(BaseSDK):
|
|
|
562
567
|
accept_header_value="application/json",
|
|
563
568
|
http_headers=http_headers,
|
|
564
569
|
security=self.sdk_configuration.security,
|
|
570
|
+
allow_empty_value=None,
|
|
565
571
|
timeout_ms=timeout_ms,
|
|
566
572
|
)
|
|
567
573
|
|
|
@@ -645,6 +651,7 @@ class Dashboards(BaseSDK):
|
|
|
645
651
|
accept_header_value="application/json",
|
|
646
652
|
http_headers=http_headers,
|
|
647
653
|
security=self.sdk_configuration.security,
|
|
654
|
+
allow_empty_value=None,
|
|
648
655
|
timeout_ms=timeout_ms,
|
|
649
656
|
)
|
|
650
657
|
|
|
@@ -728,6 +735,7 @@ class Dashboards(BaseSDK):
|
|
|
728
735
|
accept_header_value="application/json",
|
|
729
736
|
http_headers=http_headers,
|
|
730
737
|
security=self.sdk_configuration.security,
|
|
738
|
+
allow_empty_value=None,
|
|
731
739
|
timeout_ms=timeout_ms,
|
|
732
740
|
)
|
|
733
741
|
|
|
@@ -811,6 +819,7 @@ class Dashboards(BaseSDK):
|
|
|
811
819
|
accept_header_value="application/json",
|
|
812
820
|
http_headers=http_headers,
|
|
813
821
|
security=self.sdk_configuration.security,
|
|
822
|
+
allow_empty_value=None,
|
|
814
823
|
timeout_ms=timeout_ms,
|
|
815
824
|
)
|
|
816
825
|
|
|
@@ -894,6 +903,7 @@ class Dashboards(BaseSDK):
|
|
|
894
903
|
accept_header_value="application/json",
|
|
895
904
|
http_headers=http_headers,
|
|
896
905
|
security=self.sdk_configuration.security,
|
|
906
|
+
allow_empty_value=None,
|
|
897
907
|
timeout_ms=timeout_ms,
|
|
898
908
|
)
|
|
899
909
|
|
|
@@ -977,6 +987,7 @@ class Dashboards(BaseSDK):
|
|
|
977
987
|
accept_header_value="application/json",
|
|
978
988
|
http_headers=http_headers,
|
|
979
989
|
security=self.sdk_configuration.security,
|
|
990
|
+
allow_empty_value=None,
|
|
980
991
|
timeout_ms=timeout_ms,
|
|
981
992
|
)
|
|
982
993
|
|
|
@@ -1060,6 +1071,7 @@ class Dashboards(BaseSDK):
|
|
|
1060
1071
|
accept_header_value="application/json",
|
|
1061
1072
|
http_headers=http_headers,
|
|
1062
1073
|
security=self.sdk_configuration.security,
|
|
1074
|
+
allow_empty_value=None,
|
|
1063
1075
|
timeout_ms=timeout_ms,
|
|
1064
1076
|
)
|
|
1065
1077
|
|
syllable_sdk/data_sources.py
CHANGED
|
@@ -82,6 +82,7 @@ class DataSources(BaseSDK):
|
|
|
82
82
|
accept_header_value="application/json",
|
|
83
83
|
http_headers=http_headers,
|
|
84
84
|
security=self.sdk_configuration.security,
|
|
85
|
+
allow_empty_value=None,
|
|
85
86
|
timeout_ms=timeout_ms,
|
|
86
87
|
)
|
|
87
88
|
|
|
@@ -197,6 +198,7 @@ class DataSources(BaseSDK):
|
|
|
197
198
|
accept_header_value="application/json",
|
|
198
199
|
http_headers=http_headers,
|
|
199
200
|
security=self.sdk_configuration.security,
|
|
201
|
+
allow_empty_value=None,
|
|
200
202
|
timeout_ms=timeout_ms,
|
|
201
203
|
)
|
|
202
204
|
|
|
@@ -293,6 +295,7 @@ class DataSources(BaseSDK):
|
|
|
293
295
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
294
296
|
request, False, False, "json", models.DataSourceCreateRequest
|
|
295
297
|
),
|
|
298
|
+
allow_empty_value=None,
|
|
296
299
|
timeout_ms=timeout_ms,
|
|
297
300
|
)
|
|
298
301
|
|
|
@@ -387,6 +390,7 @@ class DataSources(BaseSDK):
|
|
|
387
390
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
388
391
|
request, False, False, "json", models.DataSourceCreateRequest
|
|
389
392
|
),
|
|
393
|
+
allow_empty_value=None,
|
|
390
394
|
timeout_ms=timeout_ms,
|
|
391
395
|
)
|
|
392
396
|
|
|
@@ -481,6 +485,7 @@ class DataSources(BaseSDK):
|
|
|
481
485
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
482
486
|
request, False, False, "json", models.DataSourceUpdateRequest
|
|
483
487
|
),
|
|
488
|
+
allow_empty_value=None,
|
|
484
489
|
timeout_ms=timeout_ms,
|
|
485
490
|
)
|
|
486
491
|
|
|
@@ -575,6 +580,7 @@ class DataSources(BaseSDK):
|
|
|
575
580
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
576
581
|
request, False, False, "json", models.DataSourceUpdateRequest
|
|
577
582
|
),
|
|
583
|
+
allow_empty_value=None,
|
|
578
584
|
timeout_ms=timeout_ms,
|
|
579
585
|
)
|
|
580
586
|
|
|
@@ -664,6 +670,7 @@ class DataSources(BaseSDK):
|
|
|
664
670
|
accept_header_value="application/json",
|
|
665
671
|
http_headers=http_headers,
|
|
666
672
|
security=self.sdk_configuration.security,
|
|
673
|
+
allow_empty_value=None,
|
|
667
674
|
timeout_ms=timeout_ms,
|
|
668
675
|
)
|
|
669
676
|
|
|
@@ -753,6 +760,7 @@ class DataSources(BaseSDK):
|
|
|
753
760
|
accept_header_value="application/json",
|
|
754
761
|
http_headers=http_headers,
|
|
755
762
|
security=self.sdk_configuration.security,
|
|
763
|
+
allow_empty_value=None,
|
|
756
764
|
timeout_ms=timeout_ms,
|
|
757
765
|
)
|
|
758
766
|
|
|
@@ -845,6 +853,7 @@ class DataSources(BaseSDK):
|
|
|
845
853
|
accept_header_value="application/json",
|
|
846
854
|
http_headers=http_headers,
|
|
847
855
|
security=self.sdk_configuration.security,
|
|
856
|
+
allow_empty_value=None,
|
|
848
857
|
timeout_ms=timeout_ms,
|
|
849
858
|
)
|
|
850
859
|
|
|
@@ -937,6 +946,7 @@ class DataSources(BaseSDK):
|
|
|
937
946
|
accept_header_value="application/json",
|
|
938
947
|
http_headers=http_headers,
|
|
939
948
|
security=self.sdk_configuration.security,
|
|
949
|
+
allow_empty_value=None,
|
|
940
950
|
timeout_ms=timeout_ms,
|
|
941
951
|
)
|
|
942
952
|
|