telnyx 3.5.0a0__py3-none-any.whl → 3.7.0a0__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.
Potentially problematic release.
This version of telnyx might be problematic. Click here for more details.
- telnyx/_client.py +53 -2
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +70 -0
- telnyx/resources/ai/conversations/conversations.py +137 -3
- telnyx/resources/ai/conversations/messages.py +1 -134
- telnyx/resources/calls/actions.py +146 -146
- telnyx/resources/calls/calls.py +4 -10
- telnyx/resources/conferences/actions.py +8 -24
- telnyx/resources/conferences/conferences.py +2 -6
- telnyx/resources/legacy/__init__.py +33 -0
- telnyx/resources/legacy/legacy.py +102 -0
- telnyx/resources/legacy/reporting/__init__.py +47 -0
- telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
- telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
- telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +481 -0
- telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
- telnyx/resources/legacy/reporting/batch_detail_records/voice.py +538 -0
- telnyx/resources/legacy/reporting/reporting.py +134 -0
- telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
- telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
- telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
- telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
- telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
- telnyx/resources/oauth.py +855 -0
- telnyx/resources/oauth_clients.py +711 -0
- telnyx/resources/oauth_grants.py +349 -0
- telnyx/resources/phone_numbers/jobs.py +12 -0
- telnyx/resources/porting_orders/porting_orders.py +20 -8
- telnyx/resources/sim_cards/sim_cards.py +3 -2
- telnyx/resources/verifications/verifications.py +10 -0
- telnyx/resources/verify_profiles.py +183 -1
- telnyx/resources/well_known.py +198 -0
- telnyx/types/__init__.py +41 -1
- telnyx/types/addresses/action_validate_response.py +2 -2
- telnyx/types/ai/__init__.py +1 -0
- telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
- telnyx/types/ai/conversations/__init__.py +0 -1
- telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
- telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
- telnyx/types/{error.py → api_error.py} +2 -2
- telnyx/types/call_dial_params.py +2 -3
- telnyx/types/calls/action_answer_params.py +1 -2
- telnyx/types/calls/action_gather_using_ai_params.py +5 -8
- telnyx/types/calls/action_start_streaming_params.py +4 -2
- telnyx/types/calls/action_transfer_params.py +50 -0
- telnyx/types/campaign_submit_appeal_response.py +0 -3
- telnyx/types/legacy/__init__.py +3 -0
- telnyx/types/legacy/reporting/__init__.py +10 -0
- telnyx/types/legacy/reporting/batch_detail_records/__init__.py +20 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +77 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +68 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +68 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +80 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +68 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +31 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +31 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +31 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +31 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +79 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +91 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +91 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +102 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +91 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
- telnyx/types/legacy/reporting/usage_reports/__init__.py +18 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +43 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +43 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +54 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +43 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +48 -0
- telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +48 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +59 -0
- telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +48 -0
- telnyx/types/number_order_status_update_webhook_event.py +30 -4
- telnyx/types/oauth_client_create_params.py +39 -0
- telnyx/types/oauth_client_create_response.py +63 -0
- telnyx/types/oauth_client_list_params.py +38 -0
- telnyx/types/oauth_client_list_response.py +79 -0
- telnyx/types/oauth_client_retrieve_response.py +63 -0
- telnyx/types/oauth_client_update_params.py +36 -0
- telnyx/types/oauth_client_update_response.py +63 -0
- telnyx/types/oauth_grant_delete_response.py +33 -0
- telnyx/types/oauth_grant_list_params.py +17 -0
- telnyx/types/oauth_grant_list_response.py +49 -0
- telnyx/types/oauth_grant_retrieve_response.py +33 -0
- telnyx/types/oauth_grants_params.py +15 -0
- telnyx/types/oauth_grants_response.py +10 -0
- telnyx/types/oauth_introspect_params.py +12 -0
- telnyx/types/oauth_introspect_response.py +30 -0
- telnyx/types/oauth_register_params.py +39 -0
- telnyx/types/oauth_register_response.py +45 -0
- telnyx/types/oauth_retrieve_authorize_params.py +30 -0
- telnyx/types/oauth_retrieve_jwks_response.py +25 -0
- telnyx/types/oauth_retrieve_response.py +47 -0
- telnyx/types/oauth_token_params.py +33 -0
- telnyx/types/oauth_token_response.py +25 -0
- telnyx/types/phone_number_delete_response.py +7 -0
- telnyx/types/phone_number_detailed.py +7 -0
- telnyx/types/phone_number_list_params.py +6 -0
- telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
- telnyx/types/porting_order.py +3 -0
- telnyx/types/porting_order_create_params.py +3 -0
- telnyx/types/porting_order_list_params.py +52 -31
- telnyx/types/porting_order_update_params.py +2 -0
- telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
- telnyx/types/shared/simple_sim_card.py +15 -0
- telnyx/types/sim_card.py +12 -0
- telnyx/types/sim_card_update_params.py +2 -1
- telnyx/types/stream_bidirectional_codec.py +1 -1
- telnyx/types/stream_codec.py +1 -1
- telnyx/types/verification_trigger_call_params.py +7 -0
- telnyx/types/verify_profile_create_template_params.py +12 -0
- telnyx/types/verify_profile_create_template_response.py +17 -0
- telnyx/types/verify_profile_update_template_params.py +12 -0
- telnyx/types/verify_profile_update_template_response.py +17 -0
- telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
- telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/METADATA +1 -1
- {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/RECORD +130 -48
- {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/WHEEL +0 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ....._types import Body, Query, Headers, NotGiven, not_given
|
|
11
|
+
from ....._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ....._compat import cached_property
|
|
13
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ....._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ....._base_client import make_request_options
|
|
21
|
+
from .....types.legacy.reporting.batch_detail_records import speech_to_text_create_params
|
|
22
|
+
from .....types.legacy.reporting.batch_detail_records.speech_to_text_list_response import SpeechToTextListResponse
|
|
23
|
+
from .....types.legacy.reporting.batch_detail_records.speech_to_text_create_response import SpeechToTextCreateResponse
|
|
24
|
+
from .....types.legacy.reporting.batch_detail_records.speech_to_text_delete_response import SpeechToTextDeleteResponse
|
|
25
|
+
from .....types.legacy.reporting.batch_detail_records.speech_to_text_retrieve_response import (
|
|
26
|
+
SpeechToTextRetrieveResponse,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
__all__ = ["SpeechToTextResource", "AsyncSpeechToTextResource"]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class SpeechToTextResource(SyncAPIResource):
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_raw_response(self) -> SpeechToTextResourceWithRawResponse:
|
|
35
|
+
"""
|
|
36
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
37
|
+
the raw response object instead of the parsed content.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
|
|
40
|
+
"""
|
|
41
|
+
return SpeechToTextResourceWithRawResponse(self)
|
|
42
|
+
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_streaming_response(self) -> SpeechToTextResourceWithStreamingResponse:
|
|
45
|
+
"""
|
|
46
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
47
|
+
|
|
48
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
|
|
49
|
+
"""
|
|
50
|
+
return SpeechToTextResourceWithStreamingResponse(self)
|
|
51
|
+
|
|
52
|
+
def create(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
end_date: Union[str, datetime],
|
|
56
|
+
start_date: Union[str, datetime],
|
|
57
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
58
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
59
|
+
extra_headers: Headers | None = None,
|
|
60
|
+
extra_query: Query | None = None,
|
|
61
|
+
extra_body: Body | None = None,
|
|
62
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
63
|
+
) -> SpeechToTextCreateResponse:
|
|
64
|
+
"""
|
|
65
|
+
Creates a new Speech to Text batch report request with the specified filters
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
end_date: End date in ISO format with timezone (date range must be up to one month)
|
|
69
|
+
|
|
70
|
+
start_date: Start date in ISO format with timezone
|
|
71
|
+
|
|
72
|
+
extra_headers: Send extra headers
|
|
73
|
+
|
|
74
|
+
extra_query: Add additional query parameters to the request
|
|
75
|
+
|
|
76
|
+
extra_body: Add additional JSON properties to the request
|
|
77
|
+
|
|
78
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
79
|
+
"""
|
|
80
|
+
return self._post(
|
|
81
|
+
"/legacy/reporting/batch_detail_records/speech_to_text",
|
|
82
|
+
body=maybe_transform(
|
|
83
|
+
{
|
|
84
|
+
"end_date": end_date,
|
|
85
|
+
"start_date": start_date,
|
|
86
|
+
},
|
|
87
|
+
speech_to_text_create_params.SpeechToTextCreateParams,
|
|
88
|
+
),
|
|
89
|
+
options=make_request_options(
|
|
90
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
91
|
+
),
|
|
92
|
+
cast_to=SpeechToTextCreateResponse,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def retrieve(
|
|
96
|
+
self,
|
|
97
|
+
id: str,
|
|
98
|
+
*,
|
|
99
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
100
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
101
|
+
extra_headers: Headers | None = None,
|
|
102
|
+
extra_query: Query | None = None,
|
|
103
|
+
extra_body: Body | None = None,
|
|
104
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
105
|
+
) -> SpeechToTextRetrieveResponse:
|
|
106
|
+
"""
|
|
107
|
+
Retrieves a specific Speech to Text batch report request by ID
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
extra_headers: Send extra headers
|
|
111
|
+
|
|
112
|
+
extra_query: Add additional query parameters to the request
|
|
113
|
+
|
|
114
|
+
extra_body: Add additional JSON properties to the request
|
|
115
|
+
|
|
116
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
117
|
+
"""
|
|
118
|
+
if not id:
|
|
119
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
120
|
+
return self._get(
|
|
121
|
+
f"/legacy/reporting/batch_detail_records/speech_to_text/{id}",
|
|
122
|
+
options=make_request_options(
|
|
123
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
124
|
+
),
|
|
125
|
+
cast_to=SpeechToTextRetrieveResponse,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
def list(
|
|
129
|
+
self,
|
|
130
|
+
*,
|
|
131
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
132
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
133
|
+
extra_headers: Headers | None = None,
|
|
134
|
+
extra_query: Query | None = None,
|
|
135
|
+
extra_body: Body | None = None,
|
|
136
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
137
|
+
) -> SpeechToTextListResponse:
|
|
138
|
+
"""Retrieves all Speech to Text batch report requests for the authenticated user"""
|
|
139
|
+
return self._get(
|
|
140
|
+
"/legacy/reporting/batch_detail_records/speech_to_text",
|
|
141
|
+
options=make_request_options(
|
|
142
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
143
|
+
),
|
|
144
|
+
cast_to=SpeechToTextListResponse,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
def delete(
|
|
148
|
+
self,
|
|
149
|
+
id: str,
|
|
150
|
+
*,
|
|
151
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
152
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
153
|
+
extra_headers: Headers | None = None,
|
|
154
|
+
extra_query: Query | None = None,
|
|
155
|
+
extra_body: Body | None = None,
|
|
156
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
157
|
+
) -> SpeechToTextDeleteResponse:
|
|
158
|
+
"""
|
|
159
|
+
Deletes a specific Speech to Text batch report request by ID
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
extra_headers: Send extra headers
|
|
163
|
+
|
|
164
|
+
extra_query: Add additional query parameters to the request
|
|
165
|
+
|
|
166
|
+
extra_body: Add additional JSON properties to the request
|
|
167
|
+
|
|
168
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
169
|
+
"""
|
|
170
|
+
if not id:
|
|
171
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
172
|
+
return self._delete(
|
|
173
|
+
f"/legacy/reporting/batch_detail_records/speech_to_text/{id}",
|
|
174
|
+
options=make_request_options(
|
|
175
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
176
|
+
),
|
|
177
|
+
cast_to=SpeechToTextDeleteResponse,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class AsyncSpeechToTextResource(AsyncAPIResource):
|
|
182
|
+
@cached_property
|
|
183
|
+
def with_raw_response(self) -> AsyncSpeechToTextResourceWithRawResponse:
|
|
184
|
+
"""
|
|
185
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
186
|
+
the raw response object instead of the parsed content.
|
|
187
|
+
|
|
188
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
|
|
189
|
+
"""
|
|
190
|
+
return AsyncSpeechToTextResourceWithRawResponse(self)
|
|
191
|
+
|
|
192
|
+
@cached_property
|
|
193
|
+
def with_streaming_response(self) -> AsyncSpeechToTextResourceWithStreamingResponse:
|
|
194
|
+
"""
|
|
195
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
196
|
+
|
|
197
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
|
|
198
|
+
"""
|
|
199
|
+
return AsyncSpeechToTextResourceWithStreamingResponse(self)
|
|
200
|
+
|
|
201
|
+
async def create(
|
|
202
|
+
self,
|
|
203
|
+
*,
|
|
204
|
+
end_date: Union[str, datetime],
|
|
205
|
+
start_date: Union[str, datetime],
|
|
206
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
207
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
208
|
+
extra_headers: Headers | None = None,
|
|
209
|
+
extra_query: Query | None = None,
|
|
210
|
+
extra_body: Body | None = None,
|
|
211
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
212
|
+
) -> SpeechToTextCreateResponse:
|
|
213
|
+
"""
|
|
214
|
+
Creates a new Speech to Text batch report request with the specified filters
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
end_date: End date in ISO format with timezone (date range must be up to one month)
|
|
218
|
+
|
|
219
|
+
start_date: Start date in ISO format with timezone
|
|
220
|
+
|
|
221
|
+
extra_headers: Send extra headers
|
|
222
|
+
|
|
223
|
+
extra_query: Add additional query parameters to the request
|
|
224
|
+
|
|
225
|
+
extra_body: Add additional JSON properties to the request
|
|
226
|
+
|
|
227
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
228
|
+
"""
|
|
229
|
+
return await self._post(
|
|
230
|
+
"/legacy/reporting/batch_detail_records/speech_to_text",
|
|
231
|
+
body=await async_maybe_transform(
|
|
232
|
+
{
|
|
233
|
+
"end_date": end_date,
|
|
234
|
+
"start_date": start_date,
|
|
235
|
+
},
|
|
236
|
+
speech_to_text_create_params.SpeechToTextCreateParams,
|
|
237
|
+
),
|
|
238
|
+
options=make_request_options(
|
|
239
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
240
|
+
),
|
|
241
|
+
cast_to=SpeechToTextCreateResponse,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
async def retrieve(
|
|
245
|
+
self,
|
|
246
|
+
id: str,
|
|
247
|
+
*,
|
|
248
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
249
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
250
|
+
extra_headers: Headers | None = None,
|
|
251
|
+
extra_query: Query | None = None,
|
|
252
|
+
extra_body: Body | None = None,
|
|
253
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
254
|
+
) -> SpeechToTextRetrieveResponse:
|
|
255
|
+
"""
|
|
256
|
+
Retrieves a specific Speech to Text batch report request by ID
|
|
257
|
+
|
|
258
|
+
Args:
|
|
259
|
+
extra_headers: Send extra headers
|
|
260
|
+
|
|
261
|
+
extra_query: Add additional query parameters to the request
|
|
262
|
+
|
|
263
|
+
extra_body: Add additional JSON properties to the request
|
|
264
|
+
|
|
265
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
266
|
+
"""
|
|
267
|
+
if not id:
|
|
268
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
269
|
+
return await self._get(
|
|
270
|
+
f"/legacy/reporting/batch_detail_records/speech_to_text/{id}",
|
|
271
|
+
options=make_request_options(
|
|
272
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
273
|
+
),
|
|
274
|
+
cast_to=SpeechToTextRetrieveResponse,
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
async def list(
|
|
278
|
+
self,
|
|
279
|
+
*,
|
|
280
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
281
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
282
|
+
extra_headers: Headers | None = None,
|
|
283
|
+
extra_query: Query | None = None,
|
|
284
|
+
extra_body: Body | None = None,
|
|
285
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
286
|
+
) -> SpeechToTextListResponse:
|
|
287
|
+
"""Retrieves all Speech to Text batch report requests for the authenticated user"""
|
|
288
|
+
return await self._get(
|
|
289
|
+
"/legacy/reporting/batch_detail_records/speech_to_text",
|
|
290
|
+
options=make_request_options(
|
|
291
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
292
|
+
),
|
|
293
|
+
cast_to=SpeechToTextListResponse,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
async def delete(
|
|
297
|
+
self,
|
|
298
|
+
id: str,
|
|
299
|
+
*,
|
|
300
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
301
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
302
|
+
extra_headers: Headers | None = None,
|
|
303
|
+
extra_query: Query | None = None,
|
|
304
|
+
extra_body: Body | None = None,
|
|
305
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
306
|
+
) -> SpeechToTextDeleteResponse:
|
|
307
|
+
"""
|
|
308
|
+
Deletes a specific Speech to Text batch report request by ID
|
|
309
|
+
|
|
310
|
+
Args:
|
|
311
|
+
extra_headers: Send extra headers
|
|
312
|
+
|
|
313
|
+
extra_query: Add additional query parameters to the request
|
|
314
|
+
|
|
315
|
+
extra_body: Add additional JSON properties to the request
|
|
316
|
+
|
|
317
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
318
|
+
"""
|
|
319
|
+
if not id:
|
|
320
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
321
|
+
return await self._delete(
|
|
322
|
+
f"/legacy/reporting/batch_detail_records/speech_to_text/{id}",
|
|
323
|
+
options=make_request_options(
|
|
324
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
325
|
+
),
|
|
326
|
+
cast_to=SpeechToTextDeleteResponse,
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
class SpeechToTextResourceWithRawResponse:
|
|
331
|
+
def __init__(self, speech_to_text: SpeechToTextResource) -> None:
|
|
332
|
+
self._speech_to_text = speech_to_text
|
|
333
|
+
|
|
334
|
+
self.create = to_raw_response_wrapper(
|
|
335
|
+
speech_to_text.create,
|
|
336
|
+
)
|
|
337
|
+
self.retrieve = to_raw_response_wrapper(
|
|
338
|
+
speech_to_text.retrieve,
|
|
339
|
+
)
|
|
340
|
+
self.list = to_raw_response_wrapper(
|
|
341
|
+
speech_to_text.list,
|
|
342
|
+
)
|
|
343
|
+
self.delete = to_raw_response_wrapper(
|
|
344
|
+
speech_to_text.delete,
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
class AsyncSpeechToTextResourceWithRawResponse:
|
|
349
|
+
def __init__(self, speech_to_text: AsyncSpeechToTextResource) -> None:
|
|
350
|
+
self._speech_to_text = speech_to_text
|
|
351
|
+
|
|
352
|
+
self.create = async_to_raw_response_wrapper(
|
|
353
|
+
speech_to_text.create,
|
|
354
|
+
)
|
|
355
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
356
|
+
speech_to_text.retrieve,
|
|
357
|
+
)
|
|
358
|
+
self.list = async_to_raw_response_wrapper(
|
|
359
|
+
speech_to_text.list,
|
|
360
|
+
)
|
|
361
|
+
self.delete = async_to_raw_response_wrapper(
|
|
362
|
+
speech_to_text.delete,
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
class SpeechToTextResourceWithStreamingResponse:
|
|
367
|
+
def __init__(self, speech_to_text: SpeechToTextResource) -> None:
|
|
368
|
+
self._speech_to_text = speech_to_text
|
|
369
|
+
|
|
370
|
+
self.create = to_streamed_response_wrapper(
|
|
371
|
+
speech_to_text.create,
|
|
372
|
+
)
|
|
373
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
374
|
+
speech_to_text.retrieve,
|
|
375
|
+
)
|
|
376
|
+
self.list = to_streamed_response_wrapper(
|
|
377
|
+
speech_to_text.list,
|
|
378
|
+
)
|
|
379
|
+
self.delete = to_streamed_response_wrapper(
|
|
380
|
+
speech_to_text.delete,
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
class AsyncSpeechToTextResourceWithStreamingResponse:
|
|
385
|
+
def __init__(self, speech_to_text: AsyncSpeechToTextResource) -> None:
|
|
386
|
+
self._speech_to_text = speech_to_text
|
|
387
|
+
|
|
388
|
+
self.create = async_to_streamed_response_wrapper(
|
|
389
|
+
speech_to_text.create,
|
|
390
|
+
)
|
|
391
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
392
|
+
speech_to_text.retrieve,
|
|
393
|
+
)
|
|
394
|
+
self.list = async_to_streamed_response_wrapper(
|
|
395
|
+
speech_to_text.list,
|
|
396
|
+
)
|
|
397
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
398
|
+
speech_to_text.delete,
|
|
399
|
+
)
|