syllable-sdk 0.38.4__py3-none-any.whl → 0.38.20__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/errors/apierror.py +1 -1
- syllable_sdk/errors/httpvalidationerror.py +1 -1
- syllable_sdk/errors/no_response_error.py +1 -1
- syllable_sdk/errors/responsevalidationerror.py +1 -1
- syllable_sdk/errors/syllablesdkerror.py +1 -1
- syllable_sdk/models/__init__.py +37 -0
- syllable_sdk/models/campaignproperties.py +1 -0
- syllable_sdk/models/dictionarymetadata.py +24 -0
- syllable_sdk/models/incidentcreaterequest.py +10 -4
- syllable_sdk/models/incidentresponse.py +10 -4
- syllable_sdk/models/incidentupdaterequest.py +12 -28
- syllable_sdk/models/insightsoutput.py +7 -1
- syllable_sdk/models/matchtype.py +11 -0
- syllable_sdk/models/outboundcampaign.py +7 -0
- syllable_sdk/models/outboundcampaigninput.py +7 -0
- syllable_sdk/models/promptcreaterequest.py +7 -1
- syllable_sdk/models/pronunciationoverride.py +45 -0
- syllable_sdk/models/pronunciationoverridesdictionary.py +70 -0
- syllable_sdk/models/pronunciations_download_csvop.py +18 -0
- syllable_sdk/models/pronunciationscsvuploadresponse.py +8 -45
- syllable_sdk/models/voicedisplayinfo.py +20 -0
- syllable_sdk/models/voicesamplecreaterequest.py +17 -1
- syllable_sdk/pronunciations.py +604 -0
- {syllable_sdk-0.38.4.dist-info → syllable_sdk-0.38.20.dist-info}/METADATA +5 -1
- {syllable_sdk-0.38.4.dist-info → syllable_sdk-0.38.20.dist-info}/RECORD +27 -21
- {syllable_sdk-0.38.4.dist-info → syllable_sdk-0.38.20.dist-info}/WHEEL +0 -0
syllable_sdk/pronunciations.py
CHANGED
|
@@ -10,6 +10,462 @@ from typing import Any, Mapping, Optional, Union, cast
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Pronunciations(BaseSDK):
|
|
13
|
+
def pronunciations_get(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
|
+
server_url: Optional[str] = None,
|
|
18
|
+
timeout_ms: Optional[int] = None,
|
|
19
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
20
|
+
) -> models.PronunciationOverridesDictionary:
|
|
21
|
+
r"""Get Pronunciations Dictionary
|
|
22
|
+
|
|
23
|
+
:param retries: Override the default retry configuration for this method
|
|
24
|
+
:param server_url: Override the default server URL for this method
|
|
25
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
26
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
27
|
+
"""
|
|
28
|
+
base_url = None
|
|
29
|
+
url_variables = None
|
|
30
|
+
if timeout_ms is None:
|
|
31
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
32
|
+
|
|
33
|
+
if server_url is not None:
|
|
34
|
+
base_url = server_url
|
|
35
|
+
else:
|
|
36
|
+
base_url = self._get_url(base_url, url_variables)
|
|
37
|
+
req = self._build_request(
|
|
38
|
+
method="GET",
|
|
39
|
+
path="/api/v1/pronunciations",
|
|
40
|
+
base_url=base_url,
|
|
41
|
+
url_variables=url_variables,
|
|
42
|
+
request=None,
|
|
43
|
+
request_body_required=False,
|
|
44
|
+
request_has_path_params=False,
|
|
45
|
+
request_has_query_params=True,
|
|
46
|
+
user_agent_header="user-agent",
|
|
47
|
+
accept_header_value="application/json",
|
|
48
|
+
http_headers=http_headers,
|
|
49
|
+
security=self.sdk_configuration.security,
|
|
50
|
+
timeout_ms=timeout_ms,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
if retries == UNSET:
|
|
54
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
55
|
+
retries = self.sdk_configuration.retry_config
|
|
56
|
+
|
|
57
|
+
retry_config = None
|
|
58
|
+
if isinstance(retries, utils.RetryConfig):
|
|
59
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
60
|
+
|
|
61
|
+
http_res = self.do_request(
|
|
62
|
+
hook_ctx=HookContext(
|
|
63
|
+
config=self.sdk_configuration,
|
|
64
|
+
base_url=base_url or "",
|
|
65
|
+
operation_id="pronunciations_get",
|
|
66
|
+
oauth2_scopes=None,
|
|
67
|
+
security_source=get_security_from_env(
|
|
68
|
+
self.sdk_configuration.security, models.Security
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
request=req,
|
|
72
|
+
error_status_codes=["4XX", "5XX"],
|
|
73
|
+
retry_config=retry_config,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
77
|
+
return unmarshal_json_response(
|
|
78
|
+
models.PronunciationOverridesDictionary, http_res
|
|
79
|
+
)
|
|
80
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
81
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
82
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
83
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
84
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
85
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
86
|
+
|
|
87
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
88
|
+
|
|
89
|
+
async def pronunciations_get_async(
|
|
90
|
+
self,
|
|
91
|
+
*,
|
|
92
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
93
|
+
server_url: Optional[str] = None,
|
|
94
|
+
timeout_ms: Optional[int] = None,
|
|
95
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
96
|
+
) -> models.PronunciationOverridesDictionary:
|
|
97
|
+
r"""Get Pronunciations Dictionary
|
|
98
|
+
|
|
99
|
+
:param retries: Override the default retry configuration for this method
|
|
100
|
+
:param server_url: Override the default server URL for this method
|
|
101
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
102
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
103
|
+
"""
|
|
104
|
+
base_url = None
|
|
105
|
+
url_variables = None
|
|
106
|
+
if timeout_ms is None:
|
|
107
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
108
|
+
|
|
109
|
+
if server_url is not None:
|
|
110
|
+
base_url = server_url
|
|
111
|
+
else:
|
|
112
|
+
base_url = self._get_url(base_url, url_variables)
|
|
113
|
+
req = self._build_request_async(
|
|
114
|
+
method="GET",
|
|
115
|
+
path="/api/v1/pronunciations",
|
|
116
|
+
base_url=base_url,
|
|
117
|
+
url_variables=url_variables,
|
|
118
|
+
request=None,
|
|
119
|
+
request_body_required=False,
|
|
120
|
+
request_has_path_params=False,
|
|
121
|
+
request_has_query_params=True,
|
|
122
|
+
user_agent_header="user-agent",
|
|
123
|
+
accept_header_value="application/json",
|
|
124
|
+
http_headers=http_headers,
|
|
125
|
+
security=self.sdk_configuration.security,
|
|
126
|
+
timeout_ms=timeout_ms,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
if retries == UNSET:
|
|
130
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
131
|
+
retries = self.sdk_configuration.retry_config
|
|
132
|
+
|
|
133
|
+
retry_config = None
|
|
134
|
+
if isinstance(retries, utils.RetryConfig):
|
|
135
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
136
|
+
|
|
137
|
+
http_res = await self.do_request_async(
|
|
138
|
+
hook_ctx=HookContext(
|
|
139
|
+
config=self.sdk_configuration,
|
|
140
|
+
base_url=base_url or "",
|
|
141
|
+
operation_id="pronunciations_get",
|
|
142
|
+
oauth2_scopes=None,
|
|
143
|
+
security_source=get_security_from_env(
|
|
144
|
+
self.sdk_configuration.security, models.Security
|
|
145
|
+
),
|
|
146
|
+
),
|
|
147
|
+
request=req,
|
|
148
|
+
error_status_codes=["4XX", "5XX"],
|
|
149
|
+
retry_config=retry_config,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
153
|
+
return unmarshal_json_response(
|
|
154
|
+
models.PronunciationOverridesDictionary, http_res
|
|
155
|
+
)
|
|
156
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
157
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
158
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
159
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
160
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
161
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
162
|
+
|
|
163
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
164
|
+
|
|
165
|
+
def pronunciations_get_metadata(
|
|
166
|
+
self,
|
|
167
|
+
*,
|
|
168
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
169
|
+
server_url: Optional[str] = None,
|
|
170
|
+
timeout_ms: Optional[int] = None,
|
|
171
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
172
|
+
) -> models.DictionaryMetadata:
|
|
173
|
+
r"""Get Pronunciations Metadata
|
|
174
|
+
|
|
175
|
+
:param retries: Override the default retry configuration for this method
|
|
176
|
+
:param server_url: Override the default server URL for this method
|
|
177
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
178
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
179
|
+
"""
|
|
180
|
+
base_url = None
|
|
181
|
+
url_variables = None
|
|
182
|
+
if timeout_ms is None:
|
|
183
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
184
|
+
|
|
185
|
+
if server_url is not None:
|
|
186
|
+
base_url = server_url
|
|
187
|
+
else:
|
|
188
|
+
base_url = self._get_url(base_url, url_variables)
|
|
189
|
+
req = self._build_request(
|
|
190
|
+
method="GET",
|
|
191
|
+
path="/api/v1/pronunciations/metadata",
|
|
192
|
+
base_url=base_url,
|
|
193
|
+
url_variables=url_variables,
|
|
194
|
+
request=None,
|
|
195
|
+
request_body_required=False,
|
|
196
|
+
request_has_path_params=False,
|
|
197
|
+
request_has_query_params=True,
|
|
198
|
+
user_agent_header="user-agent",
|
|
199
|
+
accept_header_value="application/json",
|
|
200
|
+
http_headers=http_headers,
|
|
201
|
+
security=self.sdk_configuration.security,
|
|
202
|
+
timeout_ms=timeout_ms,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
if retries == UNSET:
|
|
206
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
207
|
+
retries = self.sdk_configuration.retry_config
|
|
208
|
+
|
|
209
|
+
retry_config = None
|
|
210
|
+
if isinstance(retries, utils.RetryConfig):
|
|
211
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
212
|
+
|
|
213
|
+
http_res = self.do_request(
|
|
214
|
+
hook_ctx=HookContext(
|
|
215
|
+
config=self.sdk_configuration,
|
|
216
|
+
base_url=base_url or "",
|
|
217
|
+
operation_id="pronunciations_get_metadata",
|
|
218
|
+
oauth2_scopes=None,
|
|
219
|
+
security_source=get_security_from_env(
|
|
220
|
+
self.sdk_configuration.security, models.Security
|
|
221
|
+
),
|
|
222
|
+
),
|
|
223
|
+
request=req,
|
|
224
|
+
error_status_codes=["4XX", "5XX"],
|
|
225
|
+
retry_config=retry_config,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
229
|
+
return unmarshal_json_response(models.DictionaryMetadata, http_res)
|
|
230
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
231
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
232
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
233
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
234
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
235
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
236
|
+
|
|
237
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
238
|
+
|
|
239
|
+
async def pronunciations_get_metadata_async(
|
|
240
|
+
self,
|
|
241
|
+
*,
|
|
242
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
243
|
+
server_url: Optional[str] = None,
|
|
244
|
+
timeout_ms: Optional[int] = None,
|
|
245
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
246
|
+
) -> models.DictionaryMetadata:
|
|
247
|
+
r"""Get Pronunciations Metadata
|
|
248
|
+
|
|
249
|
+
:param retries: Override the default retry configuration for this method
|
|
250
|
+
:param server_url: Override the default server URL for this method
|
|
251
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
252
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
253
|
+
"""
|
|
254
|
+
base_url = None
|
|
255
|
+
url_variables = None
|
|
256
|
+
if timeout_ms is None:
|
|
257
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
258
|
+
|
|
259
|
+
if server_url is not None:
|
|
260
|
+
base_url = server_url
|
|
261
|
+
else:
|
|
262
|
+
base_url = self._get_url(base_url, url_variables)
|
|
263
|
+
req = self._build_request_async(
|
|
264
|
+
method="GET",
|
|
265
|
+
path="/api/v1/pronunciations/metadata",
|
|
266
|
+
base_url=base_url,
|
|
267
|
+
url_variables=url_variables,
|
|
268
|
+
request=None,
|
|
269
|
+
request_body_required=False,
|
|
270
|
+
request_has_path_params=False,
|
|
271
|
+
request_has_query_params=True,
|
|
272
|
+
user_agent_header="user-agent",
|
|
273
|
+
accept_header_value="application/json",
|
|
274
|
+
http_headers=http_headers,
|
|
275
|
+
security=self.sdk_configuration.security,
|
|
276
|
+
timeout_ms=timeout_ms,
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
if retries == UNSET:
|
|
280
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
281
|
+
retries = self.sdk_configuration.retry_config
|
|
282
|
+
|
|
283
|
+
retry_config = None
|
|
284
|
+
if isinstance(retries, utils.RetryConfig):
|
|
285
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
286
|
+
|
|
287
|
+
http_res = await self.do_request_async(
|
|
288
|
+
hook_ctx=HookContext(
|
|
289
|
+
config=self.sdk_configuration,
|
|
290
|
+
base_url=base_url or "",
|
|
291
|
+
operation_id="pronunciations_get_metadata",
|
|
292
|
+
oauth2_scopes=None,
|
|
293
|
+
security_source=get_security_from_env(
|
|
294
|
+
self.sdk_configuration.security, models.Security
|
|
295
|
+
),
|
|
296
|
+
),
|
|
297
|
+
request=req,
|
|
298
|
+
error_status_codes=["4XX", "5XX"],
|
|
299
|
+
retry_config=retry_config,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
303
|
+
return unmarshal_json_response(models.DictionaryMetadata, http_res)
|
|
304
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
305
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
306
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
307
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
308
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
309
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
310
|
+
|
|
311
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
312
|
+
|
|
313
|
+
def pronunciations_download_csv(
|
|
314
|
+
self,
|
|
315
|
+
*,
|
|
316
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
317
|
+
server_url: Optional[str] = None,
|
|
318
|
+
timeout_ms: Optional[int] = None,
|
|
319
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
320
|
+
) -> models.PronunciationsDownloadCsvResponse:
|
|
321
|
+
r"""Download Pronunciations Csv
|
|
322
|
+
|
|
323
|
+
:param retries: Override the default retry configuration for this method
|
|
324
|
+
:param server_url: Override the default server URL for this method
|
|
325
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
326
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
327
|
+
"""
|
|
328
|
+
base_url = None
|
|
329
|
+
url_variables = None
|
|
330
|
+
if timeout_ms is None:
|
|
331
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
332
|
+
|
|
333
|
+
if server_url is not None:
|
|
334
|
+
base_url = server_url
|
|
335
|
+
else:
|
|
336
|
+
base_url = self._get_url(base_url, url_variables)
|
|
337
|
+
req = self._build_request(
|
|
338
|
+
method="GET",
|
|
339
|
+
path="/api/v1/pronunciations/csv",
|
|
340
|
+
base_url=base_url,
|
|
341
|
+
url_variables=url_variables,
|
|
342
|
+
request=None,
|
|
343
|
+
request_body_required=False,
|
|
344
|
+
request_has_path_params=False,
|
|
345
|
+
request_has_query_params=True,
|
|
346
|
+
user_agent_header="user-agent",
|
|
347
|
+
accept_header_value="text/csv",
|
|
348
|
+
http_headers=http_headers,
|
|
349
|
+
security=self.sdk_configuration.security,
|
|
350
|
+
timeout_ms=timeout_ms,
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
if retries == UNSET:
|
|
354
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
355
|
+
retries = self.sdk_configuration.retry_config
|
|
356
|
+
|
|
357
|
+
retry_config = None
|
|
358
|
+
if isinstance(retries, utils.RetryConfig):
|
|
359
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
360
|
+
|
|
361
|
+
http_res = self.do_request(
|
|
362
|
+
hook_ctx=HookContext(
|
|
363
|
+
config=self.sdk_configuration,
|
|
364
|
+
base_url=base_url or "",
|
|
365
|
+
operation_id="pronunciations_download_csv",
|
|
366
|
+
oauth2_scopes=None,
|
|
367
|
+
security_source=get_security_from_env(
|
|
368
|
+
self.sdk_configuration.security, models.Security
|
|
369
|
+
),
|
|
370
|
+
),
|
|
371
|
+
request=req,
|
|
372
|
+
error_status_codes=["4XX", "5XX"],
|
|
373
|
+
stream=True,
|
|
374
|
+
retry_config=retry_config,
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
if utils.match_response(http_res, "200", "text/csv"):
|
|
378
|
+
return models.PronunciationsDownloadCsvResponse(
|
|
379
|
+
result=http_res, headers=utils.get_response_headers(http_res.headers)
|
|
380
|
+
)
|
|
381
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
382
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
383
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
384
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
385
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
386
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
387
|
+
|
|
388
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
389
|
+
raise errors.APIError("Unexpected response received", http_res, http_res_text)
|
|
390
|
+
|
|
391
|
+
async def pronunciations_download_csv_async(
|
|
392
|
+
self,
|
|
393
|
+
*,
|
|
394
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
395
|
+
server_url: Optional[str] = None,
|
|
396
|
+
timeout_ms: Optional[int] = None,
|
|
397
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
398
|
+
) -> models.PronunciationsDownloadCsvResponse:
|
|
399
|
+
r"""Download Pronunciations Csv
|
|
400
|
+
|
|
401
|
+
:param retries: Override the default retry configuration for this method
|
|
402
|
+
:param server_url: Override the default server URL for this method
|
|
403
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
404
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
405
|
+
"""
|
|
406
|
+
base_url = None
|
|
407
|
+
url_variables = None
|
|
408
|
+
if timeout_ms is None:
|
|
409
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
410
|
+
|
|
411
|
+
if server_url is not None:
|
|
412
|
+
base_url = server_url
|
|
413
|
+
else:
|
|
414
|
+
base_url = self._get_url(base_url, url_variables)
|
|
415
|
+
req = self._build_request_async(
|
|
416
|
+
method="GET",
|
|
417
|
+
path="/api/v1/pronunciations/csv",
|
|
418
|
+
base_url=base_url,
|
|
419
|
+
url_variables=url_variables,
|
|
420
|
+
request=None,
|
|
421
|
+
request_body_required=False,
|
|
422
|
+
request_has_path_params=False,
|
|
423
|
+
request_has_query_params=True,
|
|
424
|
+
user_agent_header="user-agent",
|
|
425
|
+
accept_header_value="text/csv",
|
|
426
|
+
http_headers=http_headers,
|
|
427
|
+
security=self.sdk_configuration.security,
|
|
428
|
+
timeout_ms=timeout_ms,
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
if retries == UNSET:
|
|
432
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
433
|
+
retries = self.sdk_configuration.retry_config
|
|
434
|
+
|
|
435
|
+
retry_config = None
|
|
436
|
+
if isinstance(retries, utils.RetryConfig):
|
|
437
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
438
|
+
|
|
439
|
+
http_res = await self.do_request_async(
|
|
440
|
+
hook_ctx=HookContext(
|
|
441
|
+
config=self.sdk_configuration,
|
|
442
|
+
base_url=base_url or "",
|
|
443
|
+
operation_id="pronunciations_download_csv",
|
|
444
|
+
oauth2_scopes=None,
|
|
445
|
+
security_source=get_security_from_env(
|
|
446
|
+
self.sdk_configuration.security, models.Security
|
|
447
|
+
),
|
|
448
|
+
),
|
|
449
|
+
request=req,
|
|
450
|
+
error_status_codes=["4XX", "5XX"],
|
|
451
|
+
stream=True,
|
|
452
|
+
retry_config=retry_config,
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
if utils.match_response(http_res, "200", "text/csv"):
|
|
456
|
+
return models.PronunciationsDownloadCsvResponse(
|
|
457
|
+
result=http_res, headers=utils.get_response_headers(http_res.headers)
|
|
458
|
+
)
|
|
459
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
460
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
461
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
462
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
463
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
464
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
465
|
+
|
|
466
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
467
|
+
raise errors.APIError("Unexpected response received", http_res, http_res_text)
|
|
468
|
+
|
|
13
469
|
def pronunciations_upload_csv(
|
|
14
470
|
self,
|
|
15
471
|
*,
|
|
@@ -199,3 +655,151 @@ class Pronunciations(BaseSDK):
|
|
|
199
655
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
200
656
|
|
|
201
657
|
raise errors.APIError("Unexpected response received", http_res)
|
|
658
|
+
|
|
659
|
+
def pronunciations_delete_csv(
|
|
660
|
+
self,
|
|
661
|
+
*,
|
|
662
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
663
|
+
server_url: Optional[str] = None,
|
|
664
|
+
timeout_ms: Optional[int] = None,
|
|
665
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
666
|
+
):
|
|
667
|
+
r"""Delete Pronunciations Dictionary
|
|
668
|
+
|
|
669
|
+
:param retries: Override the default retry configuration for this method
|
|
670
|
+
:param server_url: Override the default server URL for this method
|
|
671
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
672
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
673
|
+
"""
|
|
674
|
+
base_url = None
|
|
675
|
+
url_variables = None
|
|
676
|
+
if timeout_ms is None:
|
|
677
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
678
|
+
|
|
679
|
+
if server_url is not None:
|
|
680
|
+
base_url = server_url
|
|
681
|
+
else:
|
|
682
|
+
base_url = self._get_url(base_url, url_variables)
|
|
683
|
+
req = self._build_request(
|
|
684
|
+
method="DELETE",
|
|
685
|
+
path="/api/v1/pronunciations/csv",
|
|
686
|
+
base_url=base_url,
|
|
687
|
+
url_variables=url_variables,
|
|
688
|
+
request=None,
|
|
689
|
+
request_body_required=False,
|
|
690
|
+
request_has_path_params=False,
|
|
691
|
+
request_has_query_params=True,
|
|
692
|
+
user_agent_header="user-agent",
|
|
693
|
+
accept_header_value="*/*",
|
|
694
|
+
http_headers=http_headers,
|
|
695
|
+
security=self.sdk_configuration.security,
|
|
696
|
+
timeout_ms=timeout_ms,
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
if retries == UNSET:
|
|
700
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
701
|
+
retries = self.sdk_configuration.retry_config
|
|
702
|
+
|
|
703
|
+
retry_config = None
|
|
704
|
+
if isinstance(retries, utils.RetryConfig):
|
|
705
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
706
|
+
|
|
707
|
+
http_res = self.do_request(
|
|
708
|
+
hook_ctx=HookContext(
|
|
709
|
+
config=self.sdk_configuration,
|
|
710
|
+
base_url=base_url or "",
|
|
711
|
+
operation_id="pronunciations_delete_csv",
|
|
712
|
+
oauth2_scopes=None,
|
|
713
|
+
security_source=get_security_from_env(
|
|
714
|
+
self.sdk_configuration.security, models.Security
|
|
715
|
+
),
|
|
716
|
+
),
|
|
717
|
+
request=req,
|
|
718
|
+
error_status_codes=["4XX", "5XX"],
|
|
719
|
+
retry_config=retry_config,
|
|
720
|
+
)
|
|
721
|
+
|
|
722
|
+
if utils.match_response(http_res, "204", "*"):
|
|
723
|
+
return
|
|
724
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
725
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
726
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
727
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
728
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
729
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
730
|
+
|
|
731
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
732
|
+
|
|
733
|
+
async def pronunciations_delete_csv_async(
|
|
734
|
+
self,
|
|
735
|
+
*,
|
|
736
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
737
|
+
server_url: Optional[str] = None,
|
|
738
|
+
timeout_ms: Optional[int] = None,
|
|
739
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
740
|
+
):
|
|
741
|
+
r"""Delete Pronunciations Dictionary
|
|
742
|
+
|
|
743
|
+
:param retries: Override the default retry configuration for this method
|
|
744
|
+
:param server_url: Override the default server URL for this method
|
|
745
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
746
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
747
|
+
"""
|
|
748
|
+
base_url = None
|
|
749
|
+
url_variables = None
|
|
750
|
+
if timeout_ms is None:
|
|
751
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
752
|
+
|
|
753
|
+
if server_url is not None:
|
|
754
|
+
base_url = server_url
|
|
755
|
+
else:
|
|
756
|
+
base_url = self._get_url(base_url, url_variables)
|
|
757
|
+
req = self._build_request_async(
|
|
758
|
+
method="DELETE",
|
|
759
|
+
path="/api/v1/pronunciations/csv",
|
|
760
|
+
base_url=base_url,
|
|
761
|
+
url_variables=url_variables,
|
|
762
|
+
request=None,
|
|
763
|
+
request_body_required=False,
|
|
764
|
+
request_has_path_params=False,
|
|
765
|
+
request_has_query_params=True,
|
|
766
|
+
user_agent_header="user-agent",
|
|
767
|
+
accept_header_value="*/*",
|
|
768
|
+
http_headers=http_headers,
|
|
769
|
+
security=self.sdk_configuration.security,
|
|
770
|
+
timeout_ms=timeout_ms,
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
if retries == UNSET:
|
|
774
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
775
|
+
retries = self.sdk_configuration.retry_config
|
|
776
|
+
|
|
777
|
+
retry_config = None
|
|
778
|
+
if isinstance(retries, utils.RetryConfig):
|
|
779
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
780
|
+
|
|
781
|
+
http_res = await self.do_request_async(
|
|
782
|
+
hook_ctx=HookContext(
|
|
783
|
+
config=self.sdk_configuration,
|
|
784
|
+
base_url=base_url or "",
|
|
785
|
+
operation_id="pronunciations_delete_csv",
|
|
786
|
+
oauth2_scopes=None,
|
|
787
|
+
security_source=get_security_from_env(
|
|
788
|
+
self.sdk_configuration.security, models.Security
|
|
789
|
+
),
|
|
790
|
+
),
|
|
791
|
+
request=req,
|
|
792
|
+
error_status_codes=["4XX", "5XX"],
|
|
793
|
+
retry_config=retry_config,
|
|
794
|
+
)
|
|
795
|
+
|
|
796
|
+
if utils.match_response(http_res, "204", "*"):
|
|
797
|
+
return
|
|
798
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
799
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
800
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
801
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
802
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
803
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
804
|
+
|
|
805
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: syllable-sdk
|
|
3
|
-
Version: 0.38.
|
|
3
|
+
Version: 0.38.20
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Syllable
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -417,7 +417,11 @@ with SyllableSDK(
|
|
|
417
417
|
|
|
418
418
|
### [pronunciations](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md)
|
|
419
419
|
|
|
420
|
+
* [pronunciations_get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md#pronunciations_get) - Get Pronunciations Dictionary
|
|
421
|
+
* [pronunciations_get_metadata](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md#pronunciations_get_metadata) - Get Pronunciations Metadata
|
|
422
|
+
* [pronunciations_download_csv](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md#pronunciations_download_csv) - Download Pronunciations Csv
|
|
420
423
|
* [pronunciations_upload_csv](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md#pronunciations_upload_csv) - Upload Pronunciations Csv
|
|
424
|
+
* [pronunciations_delete_csv](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/pronunciations/README.md#pronunciations_delete_csv) - Delete Pronunciations Dictionary
|
|
421
425
|
|
|
422
426
|
### [roles](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/roles/README.md)
|
|
423
427
|
|