telnyx 3.0.0__py3-none-any.whl → 3.1.0__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 +35 -786
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +24 -24
- telnyx/resources/brand/brand.py +8 -4
- telnyx/resources/calls/calls.py +12 -0
- telnyx/resources/oauth.py +317 -315
- telnyx/resources/oauth_grants.py +15 -15
- telnyx/resources/verified_numbers/verified_numbers.py +25 -4
- telnyx/types/__init__.py +12 -19
- telnyx/types/addresses/action_validate_response.py +8 -3
- telnyx/types/ai/inference_embedding_transfer_tool_params.py +6 -0
- telnyx/types/ai/inference_embedding_transfer_tool_params_param.py +6 -0
- telnyx/types/ai/voice_settings.py +49 -2
- telnyx/types/ai/voice_settings_param.py +49 -2
- telnyx/types/brand_create_params.py +2 -1
- telnyx/types/brand_update_params.py +2 -1
- telnyx/types/call_dial_params.py +8 -0
- telnyx/types/country_coverage_retrieve_country_response.py +7 -0
- telnyx/types/country_coverage_retrieve_response.py +7 -0
- telnyx/types/{api_error.py → error.py} +2 -2
- telnyx/types/{oauth_retrieve_authorize_params.py → oauth_authorize_params.py} +2 -2
- telnyx/types/{oauth_grants_params.py → oauth_create_grant_params.py} +2 -2
- telnyx/types/{oauth_grants_response.py → oauth_create_grant_response.py} +2 -2
- telnyx/types/{oauth_token_params.py → oauth_exchange_token_params.py} +2 -2
- telnyx/types/{oauth_token_response.py → oauth_exchange_token_response.py} +2 -2
- telnyx/types/{oauth_grant_delete_response.py → oauth_grant_revoke_response.py} +2 -2
- telnyx/types/{oauth_introspect_params.py → oauth_introspect_token_params.py} +2 -2
- telnyx/types/{oauth_introspect_response.py → oauth_introspect_token_response.py} +2 -2
- telnyx/types/{oauth_register_params.py → oauth_register_client_params.py} +2 -2
- telnyx/types/{oauth_register_response.py → oauth_register_client_response.py} +2 -2
- telnyx/types/{oauth_retrieve_response.py → oauth_retrieve_consent_response.py} +2 -2
- telnyx/types/verified_number_create_params.py +10 -0
- telnyx/types/verify_profile.py +18 -3
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/METADATA +1 -1
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/RECORD +37 -44
- telnyx/types/client_create_bucket_params.py +0 -13
- telnyx/types/client_delete_objects_params.py +0 -20
- telnyx/types/client_get_object_params.py +0 -15
- telnyx/types/client_list_objects_params.py +0 -13
- telnyx/types/client_put_object_params.py +0 -20
- telnyx/types/list_buckets_response.py +0 -20
- telnyx/types/list_objects_response.py +0 -24
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/WHEEL +0 -0
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/licenses/LICENSE +0 -0
telnyx/resources/oauth_grants.py
CHANGED
|
@@ -17,7 +17,7 @@ from .._response import (
|
|
|
17
17
|
)
|
|
18
18
|
from .._base_client import make_request_options
|
|
19
19
|
from ..types.oauth_grant_list_response import OAuthGrantListResponse
|
|
20
|
-
from ..types.
|
|
20
|
+
from ..types.oauth_grant_revoke_response import OAuthGrantRevokeResponse
|
|
21
21
|
from ..types.oauth_grant_retrieve_response import OAuthGrantRetrieveResponse
|
|
22
22
|
|
|
23
23
|
__all__ = ["OAuthGrantsResource", "AsyncOAuthGrantsResource"]
|
|
@@ -122,7 +122,7 @@ class OAuthGrantsResource(SyncAPIResource):
|
|
|
122
122
|
cast_to=OAuthGrantListResponse,
|
|
123
123
|
)
|
|
124
124
|
|
|
125
|
-
def
|
|
125
|
+
def revoke(
|
|
126
126
|
self,
|
|
127
127
|
id: str,
|
|
128
128
|
*,
|
|
@@ -132,7 +132,7 @@ class OAuthGrantsResource(SyncAPIResource):
|
|
|
132
132
|
extra_query: Query | None = None,
|
|
133
133
|
extra_body: Body | None = None,
|
|
134
134
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
135
|
-
) ->
|
|
135
|
+
) -> OAuthGrantRevokeResponse:
|
|
136
136
|
"""
|
|
137
137
|
Revoke an OAuth grant
|
|
138
138
|
|
|
@@ -152,7 +152,7 @@ class OAuthGrantsResource(SyncAPIResource):
|
|
|
152
152
|
options=make_request_options(
|
|
153
153
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
154
154
|
),
|
|
155
|
-
cast_to=
|
|
155
|
+
cast_to=OAuthGrantRevokeResponse,
|
|
156
156
|
)
|
|
157
157
|
|
|
158
158
|
|
|
@@ -255,7 +255,7 @@ class AsyncOAuthGrantsResource(AsyncAPIResource):
|
|
|
255
255
|
cast_to=OAuthGrantListResponse,
|
|
256
256
|
)
|
|
257
257
|
|
|
258
|
-
async def
|
|
258
|
+
async def revoke(
|
|
259
259
|
self,
|
|
260
260
|
id: str,
|
|
261
261
|
*,
|
|
@@ -265,7 +265,7 @@ class AsyncOAuthGrantsResource(AsyncAPIResource):
|
|
|
265
265
|
extra_query: Query | None = None,
|
|
266
266
|
extra_body: Body | None = None,
|
|
267
267
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
268
|
-
) ->
|
|
268
|
+
) -> OAuthGrantRevokeResponse:
|
|
269
269
|
"""
|
|
270
270
|
Revoke an OAuth grant
|
|
271
271
|
|
|
@@ -285,7 +285,7 @@ class AsyncOAuthGrantsResource(AsyncAPIResource):
|
|
|
285
285
|
options=make_request_options(
|
|
286
286
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
287
287
|
),
|
|
288
|
-
cast_to=
|
|
288
|
+
cast_to=OAuthGrantRevokeResponse,
|
|
289
289
|
)
|
|
290
290
|
|
|
291
291
|
|
|
@@ -299,8 +299,8 @@ class OAuthGrantsResourceWithRawResponse:
|
|
|
299
299
|
self.list = to_raw_response_wrapper(
|
|
300
300
|
oauth_grants.list,
|
|
301
301
|
)
|
|
302
|
-
self.
|
|
303
|
-
oauth_grants.
|
|
302
|
+
self.revoke = to_raw_response_wrapper(
|
|
303
|
+
oauth_grants.revoke,
|
|
304
304
|
)
|
|
305
305
|
|
|
306
306
|
|
|
@@ -314,8 +314,8 @@ class AsyncOAuthGrantsResourceWithRawResponse:
|
|
|
314
314
|
self.list = async_to_raw_response_wrapper(
|
|
315
315
|
oauth_grants.list,
|
|
316
316
|
)
|
|
317
|
-
self.
|
|
318
|
-
oauth_grants.
|
|
317
|
+
self.revoke = async_to_raw_response_wrapper(
|
|
318
|
+
oauth_grants.revoke,
|
|
319
319
|
)
|
|
320
320
|
|
|
321
321
|
|
|
@@ -329,8 +329,8 @@ class OAuthGrantsResourceWithStreamingResponse:
|
|
|
329
329
|
self.list = to_streamed_response_wrapper(
|
|
330
330
|
oauth_grants.list,
|
|
331
331
|
)
|
|
332
|
-
self.
|
|
333
|
-
oauth_grants.
|
|
332
|
+
self.revoke = to_streamed_response_wrapper(
|
|
333
|
+
oauth_grants.revoke,
|
|
334
334
|
)
|
|
335
335
|
|
|
336
336
|
|
|
@@ -344,6 +344,6 @@ class AsyncOAuthGrantsResourceWithStreamingResponse:
|
|
|
344
344
|
self.list = async_to_streamed_response_wrapper(
|
|
345
345
|
oauth_grants.list,
|
|
346
346
|
)
|
|
347
|
-
self.
|
|
348
|
-
oauth_grants.
|
|
347
|
+
self.revoke = async_to_streamed_response_wrapper(
|
|
348
|
+
oauth_grants.revoke,
|
|
349
349
|
)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
5
6
|
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
@@ -62,6 +63,7 @@ class VerifiedNumbersResource(SyncAPIResource):
|
|
|
62
63
|
*,
|
|
63
64
|
phone_number: str,
|
|
64
65
|
verification_method: Literal["sms", "call"],
|
|
66
|
+
extension: Optional[str] | Omit = omit,
|
|
65
67
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
66
68
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
67
69
|
extra_headers: Headers | None = None,
|
|
@@ -69,12 +71,20 @@ class VerifiedNumbersResource(SyncAPIResource):
|
|
|
69
71
|
extra_body: Body | None = None,
|
|
70
72
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
71
73
|
) -> VerifiedNumberCreateResponse:
|
|
72
|
-
"""
|
|
73
|
-
|
|
74
|
+
"""Initiates phone number verification procedure.
|
|
75
|
+
|
|
76
|
+
Supports DTMF extension dialing
|
|
77
|
+
for voice calls to numbers behind IVR systems.
|
|
74
78
|
|
|
75
79
|
Args:
|
|
76
80
|
verification_method: Verification method.
|
|
77
81
|
|
|
82
|
+
extension: Optional DTMF extension sequence to dial after the call is answered. This
|
|
83
|
+
parameter enables verification of phone numbers behind IVR systems that require
|
|
84
|
+
extension dialing. Valid characters: digits 0-9, letters A-D, symbols \\** and #.
|
|
85
|
+
Pauses: w = 0.5 second pause, W = 1 second pause. Maximum length: 50 characters.
|
|
86
|
+
Only works with 'call' verification method.
|
|
87
|
+
|
|
78
88
|
extra_headers: Send extra headers
|
|
79
89
|
|
|
80
90
|
extra_query: Add additional query parameters to the request
|
|
@@ -89,6 +99,7 @@ class VerifiedNumbersResource(SyncAPIResource):
|
|
|
89
99
|
{
|
|
90
100
|
"phone_number": phone_number,
|
|
91
101
|
"verification_method": verification_method,
|
|
102
|
+
"extension": extension,
|
|
92
103
|
},
|
|
93
104
|
verified_number_create_params.VerifiedNumberCreateParams,
|
|
94
105
|
),
|
|
@@ -236,6 +247,7 @@ class AsyncVerifiedNumbersResource(AsyncAPIResource):
|
|
|
236
247
|
*,
|
|
237
248
|
phone_number: str,
|
|
238
249
|
verification_method: Literal["sms", "call"],
|
|
250
|
+
extension: Optional[str] | Omit = omit,
|
|
239
251
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
240
252
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
241
253
|
extra_headers: Headers | None = None,
|
|
@@ -243,12 +255,20 @@ class AsyncVerifiedNumbersResource(AsyncAPIResource):
|
|
|
243
255
|
extra_body: Body | None = None,
|
|
244
256
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
245
257
|
) -> VerifiedNumberCreateResponse:
|
|
246
|
-
"""
|
|
247
|
-
|
|
258
|
+
"""Initiates phone number verification procedure.
|
|
259
|
+
|
|
260
|
+
Supports DTMF extension dialing
|
|
261
|
+
for voice calls to numbers behind IVR systems.
|
|
248
262
|
|
|
249
263
|
Args:
|
|
250
264
|
verification_method: Verification method.
|
|
251
265
|
|
|
266
|
+
extension: Optional DTMF extension sequence to dial after the call is answered. This
|
|
267
|
+
parameter enables verification of phone numbers behind IVR systems that require
|
|
268
|
+
extension dialing. Valid characters: digits 0-9, letters A-D, symbols \\** and #.
|
|
269
|
+
Pauses: w = 0.5 second pause, W = 1 second pause. Maximum length: 50 characters.
|
|
270
|
+
Only works with 'call' verification method.
|
|
271
|
+
|
|
252
272
|
extra_headers: Send extra headers
|
|
253
273
|
|
|
254
274
|
extra_query: Add additional query parameters to the request
|
|
@@ -263,6 +283,7 @@ class AsyncVerifiedNumbersResource(AsyncAPIResource):
|
|
|
263
283
|
{
|
|
264
284
|
"phone_number": phone_number,
|
|
265
285
|
"verification_method": verification_method,
|
|
286
|
+
"extension": extension,
|
|
266
287
|
},
|
|
267
288
|
verified_number_create_params.VerifiedNumberCreateParams,
|
|
268
289
|
),
|
telnyx/types/__init__.py
CHANGED
|
@@ -8,6 +8,7 @@ from .ip import IP as IP
|
|
|
8
8
|
from .fax import Fax as Fax
|
|
9
9
|
from .fqdn import Fqdn as Fqdn
|
|
10
10
|
from .room import Room as Room
|
|
11
|
+
from .error import Error as Error
|
|
11
12
|
from .record import Record as Record
|
|
12
13
|
from .shared import (
|
|
13
14
|
Metadata as Metadata,
|
|
@@ -29,7 +30,6 @@ from .shared import (
|
|
|
29
30
|
from .address import Address as Address
|
|
30
31
|
from .sim_card import SimCard as SimCard
|
|
31
32
|
from .vertical import Vertical as Vertical
|
|
32
|
-
from .api_error import APIError as APIError
|
|
33
33
|
from .dtmf_type import DtmfType as DtmfType
|
|
34
34
|
from .interface import Interface as Interface
|
|
35
35
|
from .rcs_agent import RcsAgent as RcsAgent
|
|
@@ -112,7 +112,6 @@ from .ip_delete_response import IPDeleteResponse as IPDeleteResponse
|
|
|
112
112
|
from .ip_update_response import IPUpdateResponse as IPUpdateResponse
|
|
113
113
|
from .number_block_order import NumberBlockOrder as NumberBlockOrder
|
|
114
114
|
from .number_reservation import NumberReservation as NumberReservation
|
|
115
|
-
from .oauth_token_params import OAuthTokenParams as OAuthTokenParams
|
|
116
115
|
from .porting_order_misc import PortingOrderMisc as PortingOrderMisc
|
|
117
116
|
from .porting_order_type import PortingOrderType as PortingOrderType
|
|
118
117
|
from .rcs_agent_response import RcsAgentResponse as RcsAgentResponse
|
|
@@ -139,7 +138,6 @@ from .media_upload_params import MediaUploadParams as MediaUploadParams
|
|
|
139
138
|
from .message_send_params import MessageSendParams as MessageSendParams
|
|
140
139
|
from .messsage_rcs_params import MesssageRcsParams as MesssageRcsParams
|
|
141
140
|
from .network_list_params import NetworkListParams as NetworkListParams
|
|
142
|
-
from .oauth_grants_params import OAuthGrantsParams as OAuthGrantsParams
|
|
143
141
|
from .outbound_fqdn_param import OutboundFqdnParam as OutboundFqdnParam
|
|
144
142
|
from .portout_list_params import PortoutListParams as PortoutListParams
|
|
145
143
|
from .telnyx_campaign_csp import TelnyxCampaignCsp as TelnyxCampaignCsp
|
|
@@ -158,7 +156,6 @@ from .notification_channel import NotificationChannel as NotificationChannel
|
|
|
158
156
|
from .notification_profile import NotificationProfile as NotificationProfile
|
|
159
157
|
from .notification_setting import NotificationSetting as NotificationSetting
|
|
160
158
|
from .number_pool_settings import NumberPoolSettings as NumberPoolSettings
|
|
161
|
-
from .oauth_token_response import OAuthTokenResponse as OAuthTokenResponse
|
|
162
159
|
from .rcs_suggestion_param import RcsSuggestionParam as RcsSuggestionParam
|
|
163
160
|
from .region_list_response import RegionListResponse as RegionListResponse
|
|
164
161
|
from .room_create_response import RoomCreateResponse as RoomCreateResponse
|
|
@@ -181,8 +178,6 @@ from .credential_connection import CredentialConnection as CredentialConnection
|
|
|
181
178
|
from .fax_retrieve_response import FaxRetrieveResponse as FaxRetrieveResponse
|
|
182
179
|
from .global_ip_list_params import GlobalIPListParams as GlobalIPListParams
|
|
183
180
|
from .invoice_list_response import InvoiceListResponse as InvoiceListResponse
|
|
184
|
-
from .list_buckets_response import ListBucketsResponse as ListBucketsResponse
|
|
185
|
-
from .list_objects_response import ListObjectsResponse as ListObjectsResponse
|
|
186
181
|
from .media_update_response import MediaUpdateResponse as MediaUpdateResponse
|
|
187
182
|
from .media_upload_response import MediaUploadResponse as MediaUploadResponse
|
|
188
183
|
from .message_send_response import MessageSendResponse as MessageSendResponse
|
|
@@ -190,8 +185,6 @@ from .messsage_rcs_response import MesssageRcsResponse as MesssageRcsResponse
|
|
|
190
185
|
from .network_create_params import NetworkCreateParams as NetworkCreateParams
|
|
191
186
|
from .network_list_response import NetworkListResponse as NetworkListResponse
|
|
192
187
|
from .network_update_params import NetworkUpdateParams as NetworkUpdateParams
|
|
193
|
-
from .oauth_grants_response import OAuthGrantsResponse as OAuthGrantsResponse
|
|
194
|
-
from .oauth_register_params import OAuthRegisterParams as OAuthRegisterParams
|
|
195
188
|
from .phone_number_campaign import PhoneNumberCampaign as PhoneNumberCampaign
|
|
196
189
|
from .phone_number_detailed import PhoneNumberDetailed as PhoneNumberDetailed
|
|
197
190
|
from .portout_list_response import PortoutListResponse as PortoutListResponse
|
|
@@ -210,6 +203,7 @@ from .document_upload_params import DocumentUploadParams as DocumentUploadParams
|
|
|
210
203
|
from .enum_retrieve_response import EnumRetrieveResponse as EnumRetrieveResponse
|
|
211
204
|
from .fqdn_retrieve_response import FqdnRetrieveResponse as FqdnRetrieveResponse
|
|
212
205
|
from .gcs_configuration_data import GcsConfigurationData as GcsConfigurationData
|
|
206
|
+
from .oauth_authorize_params import OAuthAuthorizeParams as OAuthAuthorizeParams
|
|
213
207
|
from .ota_update_list_params import OtaUpdateListParams as OtaUpdateListParams
|
|
214
208
|
from .outbound_voice_profile import OutboundVoiceProfile as OutboundVoiceProfile
|
|
215
209
|
from .porting_order_end_user import PortingOrderEndUser as PortingOrderEndUser
|
|
@@ -243,9 +237,6 @@ from .network_create_response import NetworkCreateResponse as NetworkCreateRespo
|
|
|
243
237
|
from .network_delete_response import NetworkDeleteResponse as NetworkDeleteResponse
|
|
244
238
|
from .network_update_response import NetworkUpdateResponse as NetworkUpdateResponse
|
|
245
239
|
from .oauth_grant_list_params import OAuthGrantListParams as OAuthGrantListParams
|
|
246
|
-
from .oauth_introspect_params import OAuthIntrospectParams as OAuthIntrospectParams
|
|
247
|
-
from .oauth_register_response import OAuthRegisterResponse as OAuthRegisterResponse
|
|
248
|
-
from .oauth_retrieve_response import OAuthRetrieveResponse as OAuthRetrieveResponse
|
|
249
240
|
from .outbound_call_recording import OutboundCallRecording as OutboundCallRecording
|
|
250
241
|
from .porting_order_documents import PortingOrderDocuments as PortingOrderDocuments
|
|
251
242
|
from .porting_order_messaging import PortingOrderMessaging as PortingOrderMessaging
|
|
@@ -261,8 +252,6 @@ from .azure_configuration_data import AzureConfigurationData as AzureConfigurati
|
|
|
261
252
|
from .call_control_application import CallControlApplication as CallControlApplication
|
|
262
253
|
from .call_event_list_response import CallEventListResponse as CallEventListResponse
|
|
263
254
|
from .channel_zone_list_params import ChannelZoneListParams as ChannelZoneListParams
|
|
264
|
-
from .client_get_object_params import ClientGetObjectParams as ClientGetObjectParams
|
|
265
|
-
from .client_put_object_params import ClientPutObjectParams as ClientPutObjectParams
|
|
266
255
|
from .conference_create_params import ConferenceCreateParams as ConferenceCreateParams
|
|
267
256
|
from .conference_list_response import ConferenceListResponse as ConferenceListResponse
|
|
268
257
|
from .connection_list_response import ConnectionListResponse as ConnectionListResponse
|
|
@@ -306,8 +295,8 @@ from .message_retrieve_response import MessageRetrieveResponse as MessageRetriev
|
|
|
306
295
|
from .message_schedule_response import MessageScheduleResponse as MessageScheduleResponse
|
|
307
296
|
from .network_retrieve_response import NetworkRetrieveResponse as NetworkRetrieveResponse
|
|
308
297
|
from .number_order_phone_number import NumberOrderPhoneNumber as NumberOrderPhoneNumber
|
|
298
|
+
from .oauth_create_grant_params import OAuthCreateGrantParams as OAuthCreateGrantParams
|
|
309
299
|
from .oauth_grant_list_response import OAuthGrantListResponse as OAuthGrantListResponse
|
|
310
|
-
from .oauth_introspect_response import OAuthIntrospectResponse as OAuthIntrospectResponse
|
|
311
300
|
from .porting_order_list_params import PortingOrderListParams as PortingOrderListParams
|
|
312
301
|
from .porting_order_requirement import PortingOrderRequirement as PortingOrderRequirement
|
|
313
302
|
from .portout_retrieve_response import PortoutRetrieveResponse as PortoutRetrieveResponse
|
|
@@ -321,7 +310,6 @@ from .access_ip_address_response import AccessIPAddressResponse as AccessIPAddre
|
|
|
321
310
|
from .call_bridged_webhook_event import CallBridgedWebhookEvent as CallBridgedWebhookEvent
|
|
322
311
|
from .channel_zone_list_response import ChannelZoneListResponse as ChannelZoneListResponse
|
|
323
312
|
from .channel_zone_update_params import ChannelZoneUpdateParams as ChannelZoneUpdateParams
|
|
324
|
-
from .client_list_objects_params import ClientListObjectsParams as ClientListObjectsParams
|
|
325
313
|
from .conference_create_response import ConferenceCreateResponse as ConferenceCreateResponse
|
|
326
314
|
from .document_retrieve_response import DocumentRetrieveResponse as DocumentRetrieveResponse
|
|
327
315
|
from .dynamic_emergency_endpoint import DynamicEmergencyEndpoint as DynamicEmergencyEndpoint
|
|
@@ -356,7 +344,6 @@ from .billing_group_update_params import BillingGroupUpdateParams as BillingGrou
|
|
|
356
344
|
from .brand_get_feedback_response import BrandGetFeedbackResponse as BrandGetFeedbackResponse
|
|
357
345
|
from .call_answered_webhook_event import CallAnsweredWebhookEvent as CallAnsweredWebhookEvent
|
|
358
346
|
from .call_enqueued_webhook_event import CallEnqueuedWebhookEvent as CallEnqueuedWebhookEvent
|
|
359
|
-
from .client_create_bucket_params import ClientCreateBucketParams as ClientCreateBucketParams
|
|
360
347
|
from .detail_record_list_response import DetailRecordListResponse as DetailRecordListResponse
|
|
361
348
|
from .document_link_list_response import DocumentLinkListResponse as DocumentLinkListResponse
|
|
362
349
|
from .fax_application_list_params import FaxApplicationListParams as FaxApplicationListParams
|
|
@@ -368,7 +355,9 @@ from .ip_connection_list_response import IPConnectionListResponse as IPConnectio
|
|
|
368
355
|
from .ip_connection_update_params import IPConnectionUpdateParams as IPConnectionUpdateParams
|
|
369
356
|
from .ledger_billing_group_report import LedgerBillingGroupReport as LedgerBillingGroupReport
|
|
370
357
|
from .managed_account_list_params import ManagedAccountListParams as ManagedAccountListParams
|
|
371
|
-
from .
|
|
358
|
+
from .oauth_create_grant_response import OAuthCreateGrantResponse as OAuthCreateGrantResponse
|
|
359
|
+
from .oauth_exchange_token_params import OAuthExchangeTokenParams as OAuthExchangeTokenParams
|
|
360
|
+
from .oauth_grant_revoke_response import OAuthGrantRevokeResponse as OAuthGrantRevokeResponse
|
|
372
361
|
from .porting_order_create_params import PortingOrderCreateParams as PortingOrderCreateParams
|
|
373
362
|
from .porting_order_list_response import PortingOrderListResponse as PortingOrderListResponse
|
|
374
363
|
from .porting_order_update_params import PortingOrderUpdateParams as PortingOrderUpdateParams
|
|
@@ -383,7 +372,6 @@ from .advanced_order_update_params import AdvancedOrderUpdateParams as AdvancedO
|
|
|
383
372
|
from .call_initiated_webhook_event import CallInitiatedWebhookEvent as CallInitiatedWebhookEvent
|
|
384
373
|
from .campaign_deactivate_response import CampaignDeactivateResponse as CampaignDeactivateResponse
|
|
385
374
|
from .channel_zone_update_response import ChannelZoneUpdateResponse as ChannelZoneUpdateResponse
|
|
386
|
-
from .client_delete_objects_params import ClientDeleteObjectsParams as ClientDeleteObjectsParams
|
|
387
375
|
from .conference_retrieve_response import ConferenceRetrieveResponse as ConferenceRetrieveResponse
|
|
388
376
|
from .connection_retrieve_response import ConnectionRetrieveResponse as ConnectionRetrieveResponse
|
|
389
377
|
from .create_verification_response import CreateVerificationResponse as CreateVerificationResponse
|
|
@@ -395,6 +383,7 @@ from .number_order_create_response import NumberOrderCreateResponse as NumberOrd
|
|
|
395
383
|
from .number_order_update_response import NumberOrderUpdateResponse as NumberOrderUpdateResponse
|
|
396
384
|
from .oauth_client_create_response import OAuthClientCreateResponse as OAuthClientCreateResponse
|
|
397
385
|
from .oauth_client_update_response import OAuthClientUpdateResponse as OAuthClientUpdateResponse
|
|
386
|
+
from .oauth_register_client_params import OAuthRegisterClientParams as OAuthRegisterClientParams
|
|
398
387
|
from .oauth_retrieve_jwks_response import OAuthRetrieveJwksResponse as OAuthRetrieveJwksResponse
|
|
399
388
|
from .ota_update_retrieve_response import OtaUpdateRetrieveResponse as OtaUpdateRetrieveResponse
|
|
400
389
|
from .partner_campaign_list_params import PartnerCampaignListParams as PartnerCampaignListParams
|
|
@@ -456,7 +445,9 @@ from .message_send_long_code_params import MessageSendLongCodeParams as MessageS
|
|
|
456
445
|
from .messaging_profile_list_params import MessagingProfileListParams as MessagingProfileListParams
|
|
457
446
|
from .number_lookup_retrieve_params import NumberLookupRetrieveParams as NumberLookupRetrieveParams
|
|
458
447
|
from .numbers_feature_create_params import NumbersFeatureCreateParams as NumbersFeatureCreateParams
|
|
448
|
+
from .oauth_exchange_token_response import OAuthExchangeTokenResponse as OAuthExchangeTokenResponse
|
|
459
449
|
from .oauth_grant_retrieve_response import OAuthGrantRetrieveResponse as OAuthGrantRetrieveResponse
|
|
450
|
+
from .oauth_introspect_token_params import OAuthIntrospectTokenParams as OAuthIntrospectTokenParams
|
|
460
451
|
from .outbound_call_recording_param import OutboundCallRecordingParam as OutboundCallRecordingParam
|
|
461
452
|
from .phone_number_slim_list_params import PhoneNumberSlimListParams as PhoneNumberSlimListParams
|
|
462
453
|
from .porting_order_create_response import PortingOrderCreateResponse as PortingOrderCreateResponse
|
|
@@ -486,6 +477,7 @@ from .number_block_order_list_params import NumberBlockOrderListParams as Number
|
|
|
486
477
|
from .number_order_retrieve_response import NumberOrderRetrieveResponse as NumberOrderRetrieveResponse
|
|
487
478
|
from .number_reservation_list_params import NumberReservationListParams as NumberReservationListParams
|
|
488
479
|
from .oauth_client_retrieve_response import OAuthClientRetrieveResponse as OAuthClientRetrieveResponse
|
|
480
|
+
from .oauth_register_client_response import OAuthRegisterClientResponse as OAuthRegisterClientResponse
|
|
489
481
|
from .partner_campaign_list_response import PartnerCampaignListResponse as PartnerCampaignListResponse
|
|
490
482
|
from .partner_campaign_update_params import PartnerCampaignUpdateParams as PartnerCampaignUpdateParams
|
|
491
483
|
from .phone_number_retrieve_response import PhoneNumberRetrieveResponse as PhoneNumberRetrieveResponse
|
|
@@ -543,7 +535,8 @@ from .messaging_profile_update_params import MessagingProfileUpdateParams as Mes
|
|
|
543
535
|
from .number_lookup_retrieve_response import NumberLookupRetrieveResponse as NumberLookupRetrieveResponse
|
|
544
536
|
from .number_order_with_phone_numbers import NumberOrderWithPhoneNumbers as NumberOrderWithPhoneNumbers
|
|
545
537
|
from .numbers_feature_create_response import NumbersFeatureCreateResponse as NumbersFeatureCreateResponse
|
|
546
|
-
from .
|
|
538
|
+
from .oauth_introspect_token_response import OAuthIntrospectTokenResponse as OAuthIntrospectTokenResponse
|
|
539
|
+
from .oauth_retrieve_consent_response import OAuthRetrieveConsentResponse as OAuthRetrieveConsentResponse
|
|
547
540
|
from .phone_number_slim_list_response import PhoneNumberSlimListResponse as PhoneNumberSlimListResponse
|
|
548
541
|
from .porting_order_end_user_location import PortingOrderEndUserLocation as PortingOrderEndUserLocation
|
|
549
542
|
from .porting_order_retrieve_response import PortingOrderRetrieveResponse as PortingOrderRetrieveResponse
|
|
@@ -5,8 +5,8 @@ from typing_extensions import Literal
|
|
|
5
5
|
|
|
6
6
|
from pydantic import Field as FieldInfo
|
|
7
7
|
|
|
8
|
+
from ..error import Error
|
|
8
9
|
from ..._models import BaseModel
|
|
9
|
-
from ..api_error import APIError
|
|
10
10
|
|
|
11
11
|
__all__ = ["ActionValidateResponse", "Data", "DataSuggested"]
|
|
12
12
|
|
|
@@ -39,12 +39,17 @@ class DataSuggested(BaseModel):
|
|
|
39
39
|
street_address: Optional[str] = None
|
|
40
40
|
"""The primary street address information about the address."""
|
|
41
41
|
|
|
42
|
-
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
43
42
|
if TYPE_CHECKING:
|
|
43
|
+
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
|
|
44
|
+
# value to this field, so for compatibility we avoid doing it at runtime.
|
|
45
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
46
|
+
|
|
44
47
|
# Stub to indicate that arbitrary properties are accepted.
|
|
45
48
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
46
49
|
# `getattr(obj, '$type')`
|
|
47
50
|
def __getattr__(self, attr: str) -> object: ...
|
|
51
|
+
else:
|
|
52
|
+
__pydantic_extra__: Dict[str, object]
|
|
48
53
|
|
|
49
54
|
|
|
50
55
|
class Data(BaseModel):
|
|
@@ -54,7 +59,7 @@ class Data(BaseModel):
|
|
|
54
59
|
suggested: DataSuggested
|
|
55
60
|
"""Provides normalized address when available."""
|
|
56
61
|
|
|
57
|
-
errors: Optional[List[
|
|
62
|
+
errors: Optional[List[Error]] = None
|
|
58
63
|
|
|
59
64
|
record_type: Optional[str] = None
|
|
60
65
|
"""Identifies the type of the resource."""
|
|
@@ -41,3 +41,9 @@ class InferenceEmbeddingTransferToolParams(BaseModel):
|
|
|
41
41
|
|
|
42
42
|
custom_headers: Optional[List[CustomHeader]] = None
|
|
43
43
|
"""Custom headers to be added to the SIP INVITE for the transfer command."""
|
|
44
|
+
|
|
45
|
+
warm_transfer_instructions: Optional[str] = None
|
|
46
|
+
"""
|
|
47
|
+
Natural language instructions for your agent for how to provide context for the
|
|
48
|
+
transfer recipient.
|
|
49
|
+
"""
|
|
@@ -48,3 +48,9 @@ class InferenceEmbeddingTransferToolParamsParam(
|
|
|
48
48
|
|
|
49
49
|
custom_headers: Iterable[CustomHeader]
|
|
50
50
|
"""Custom headers to be added to the SIP INVITE for the transfer command."""
|
|
51
|
+
|
|
52
|
+
warm_transfer_instructions: str
|
|
53
|
+
"""
|
|
54
|
+
Natural language instructions for your agent for how to provide context for the
|
|
55
|
+
transfer recipient.
|
|
56
|
+
"""
|
|
@@ -1,10 +1,50 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
5
|
|
|
5
6
|
from ..._models import BaseModel
|
|
6
7
|
|
|
7
|
-
__all__ = [
|
|
8
|
+
__all__ = [
|
|
9
|
+
"VoiceSettings",
|
|
10
|
+
"BackgroundAudio",
|
|
11
|
+
"BackgroundAudioUnionMember0",
|
|
12
|
+
"BackgroundAudioUnionMember1",
|
|
13
|
+
"BackgroundAudioUnionMember2",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BackgroundAudioUnionMember0(BaseModel):
|
|
18
|
+
type: Literal["predefined_media"]
|
|
19
|
+
"""Select from predefined media options."""
|
|
20
|
+
|
|
21
|
+
value: Literal["silence", "office"]
|
|
22
|
+
"""The predefined media to use. `silence` disables background audio."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BackgroundAudioUnionMember1(BaseModel):
|
|
26
|
+
type: Literal["media_url"]
|
|
27
|
+
"""Provide a direct URL to an MP3 file. The audio will loop during the call."""
|
|
28
|
+
|
|
29
|
+
value: str
|
|
30
|
+
"""HTTPS URL to an MP3 file."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class BackgroundAudioUnionMember2(BaseModel):
|
|
34
|
+
type: Literal["media_name"]
|
|
35
|
+
"""Reference a previously uploaded media by its name from Telnyx Media Storage."""
|
|
36
|
+
|
|
37
|
+
value: str
|
|
38
|
+
"""
|
|
39
|
+
The `name` of a media asset created via
|
|
40
|
+
[Media Storage API](https://developers.telnyx.com/api/media-storage/create-media-storage).
|
|
41
|
+
The audio will loop during the call.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
BackgroundAudio: TypeAlias = Union[
|
|
46
|
+
BackgroundAudioUnionMember0, BackgroundAudioUnionMember1, BackgroundAudioUnionMember2
|
|
47
|
+
]
|
|
8
48
|
|
|
9
49
|
|
|
10
50
|
class VoiceSettings(BaseModel):
|
|
@@ -28,6 +68,13 @@ class VoiceSettings(BaseModel):
|
|
|
28
68
|
with this integration.
|
|
29
69
|
"""
|
|
30
70
|
|
|
71
|
+
background_audio: Optional[BackgroundAudio] = None
|
|
72
|
+
"""Optional background audio to play on the call.
|
|
73
|
+
|
|
74
|
+
Use a predefined media bed, or supply a looped MP3 URL. If a media URL is chosen
|
|
75
|
+
in the portal, customers can preview it before saving.
|
|
76
|
+
"""
|
|
77
|
+
|
|
31
78
|
voice_speed: Optional[float] = None
|
|
32
79
|
"""The speed of the voice in the range [0.25, 2.0].
|
|
33
80
|
|
|
@@ -2,9 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
6
7
|
|
|
7
|
-
__all__ = [
|
|
8
|
+
__all__ = [
|
|
9
|
+
"VoiceSettingsParam",
|
|
10
|
+
"BackgroundAudio",
|
|
11
|
+
"BackgroundAudioUnionMember0",
|
|
12
|
+
"BackgroundAudioUnionMember1",
|
|
13
|
+
"BackgroundAudioUnionMember2",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BackgroundAudioUnionMember0(TypedDict, total=False):
|
|
18
|
+
type: Required[Literal["predefined_media"]]
|
|
19
|
+
"""Select from predefined media options."""
|
|
20
|
+
|
|
21
|
+
value: Required[Literal["silence", "office"]]
|
|
22
|
+
"""The predefined media to use. `silence` disables background audio."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BackgroundAudioUnionMember1(TypedDict, total=False):
|
|
26
|
+
type: Required[Literal["media_url"]]
|
|
27
|
+
"""Provide a direct URL to an MP3 file. The audio will loop during the call."""
|
|
28
|
+
|
|
29
|
+
value: Required[str]
|
|
30
|
+
"""HTTPS URL to an MP3 file."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class BackgroundAudioUnionMember2(TypedDict, total=False):
|
|
34
|
+
type: Required[Literal["media_name"]]
|
|
35
|
+
"""Reference a previously uploaded media by its name from Telnyx Media Storage."""
|
|
36
|
+
|
|
37
|
+
value: Required[str]
|
|
38
|
+
"""
|
|
39
|
+
The `name` of a media asset created via
|
|
40
|
+
[Media Storage API](https://developers.telnyx.com/api/media-storage/create-media-storage).
|
|
41
|
+
The audio will loop during the call.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
BackgroundAudio: TypeAlias = Union[
|
|
46
|
+
BackgroundAudioUnionMember0, BackgroundAudioUnionMember1, BackgroundAudioUnionMember2
|
|
47
|
+
]
|
|
8
48
|
|
|
9
49
|
|
|
10
50
|
class VoiceSettingsParam(TypedDict, total=False):
|
|
@@ -28,6 +68,13 @@ class VoiceSettingsParam(TypedDict, total=False):
|
|
|
28
68
|
with this integration.
|
|
29
69
|
"""
|
|
30
70
|
|
|
71
|
+
background_audio: BackgroundAudio
|
|
72
|
+
"""Optional background audio to play on the call.
|
|
73
|
+
|
|
74
|
+
Use a predefined media bed, or supply a looped MP3 URL. If a media URL is chosen
|
|
75
|
+
in the portal, customers can preview it before saving.
|
|
76
|
+
"""
|
|
77
|
+
|
|
31
78
|
voice_speed: float
|
|
32
79
|
"""The speed of the voice in the range [0.25, 2.0].
|
|
33
80
|
|
|
@@ -31,7 +31,8 @@ class BrandCreateParams(TypedDict, total=False):
|
|
|
31
31
|
business_contact_email: Annotated[str, PropertyInfo(alias="businessContactEmail")]
|
|
32
32
|
"""Business contact email.
|
|
33
33
|
|
|
34
|
-
Required if `entityType` is `PUBLIC_PROFIT`.
|
|
34
|
+
Required if `entityType` is `PUBLIC_PROFIT`. Otherwise, it is recommended to
|
|
35
|
+
either omit this field or set it to `null`.
|
|
35
36
|
"""
|
|
36
37
|
|
|
37
38
|
city: str
|
|
@@ -39,7 +39,8 @@ class BrandUpdateParams(TypedDict, total=False):
|
|
|
39
39
|
business_contact_email: Annotated[str, PropertyInfo(alias="businessContactEmail")]
|
|
40
40
|
"""Business contact email.
|
|
41
41
|
|
|
42
|
-
Required if `entityType` will be changed to `PUBLIC_PROFIT`.
|
|
42
|
+
Required if `entityType` will be changed to `PUBLIC_PROFIT`. Otherwise, it is
|
|
43
|
+
recommended to either omit this field or set it to `null`.
|
|
43
44
|
"""
|
|
44
45
|
|
|
45
46
|
city: str
|
telnyx/types/call_dial_params.py
CHANGED
|
@@ -139,6 +139,14 @@ class CallDialParams(TypedDict, total=False):
|
|
|
139
139
|
WAV or MP3 file.
|
|
140
140
|
"""
|
|
141
141
|
|
|
142
|
+
park_after_unbridge: str
|
|
143
|
+
"""If supplied with the value `self`, the current leg will be parked after
|
|
144
|
+
unbridge.
|
|
145
|
+
|
|
146
|
+
If not set, the default behavior is to hang up the leg. When park_after_unbridge
|
|
147
|
+
is set, link_to becomes required.
|
|
148
|
+
"""
|
|
149
|
+
|
|
142
150
|
preferred_codecs: str
|
|
143
151
|
"""
|
|
144
152
|
The list of comma-separated codecs in a preferred order for the forked media to
|
|
@@ -10,6 +10,8 @@ __all__ = ["CountryCoverageRetrieveCountryResponse", "Data", "DataLocal", "DataT
|
|
|
10
10
|
class DataLocal(BaseModel):
|
|
11
11
|
features: Optional[List[str]] = None
|
|
12
12
|
|
|
13
|
+
full_pstn_replacement: Optional[bool] = None
|
|
14
|
+
|
|
13
15
|
international_sms: Optional[bool] = None
|
|
14
16
|
|
|
15
17
|
p2p: Optional[bool] = None
|
|
@@ -22,6 +24,8 @@ class DataLocal(BaseModel):
|
|
|
22
24
|
class DataTollFree(BaseModel):
|
|
23
25
|
features: Optional[List[str]] = None
|
|
24
26
|
|
|
27
|
+
full_pstn_replacement: Optional[bool] = None
|
|
28
|
+
|
|
25
29
|
international_sms: Optional[bool] = None
|
|
26
30
|
|
|
27
31
|
p2p: Optional[bool] = None
|
|
@@ -59,6 +63,9 @@ class Data(BaseModel):
|
|
|
59
63
|
quickship: Optional[bool] = None
|
|
60
64
|
"""Supports quickship"""
|
|
61
65
|
|
|
66
|
+
region: Optional[str] = None
|
|
67
|
+
"""Geographic region (e.g., AMER, EMEA, APAC)"""
|
|
68
|
+
|
|
62
69
|
reservable: Optional[bool] = None
|
|
63
70
|
"""Supports reservable"""
|
|
64
71
|
|
|
@@ -10,6 +10,8 @@ __all__ = ["CountryCoverageRetrieveResponse", "Data", "DataLocal", "DataTollFree
|
|
|
10
10
|
class DataLocal(BaseModel):
|
|
11
11
|
features: Optional[List[str]] = None
|
|
12
12
|
|
|
13
|
+
full_pstn_replacement: Optional[bool] = None
|
|
14
|
+
|
|
13
15
|
international_sms: Optional[bool] = None
|
|
14
16
|
|
|
15
17
|
p2p: Optional[bool] = None
|
|
@@ -22,6 +24,8 @@ class DataLocal(BaseModel):
|
|
|
22
24
|
class DataTollFree(BaseModel):
|
|
23
25
|
features: Optional[List[str]] = None
|
|
24
26
|
|
|
27
|
+
full_pstn_replacement: Optional[bool] = None
|
|
28
|
+
|
|
25
29
|
international_sms: Optional[bool] = None
|
|
26
30
|
|
|
27
31
|
p2p: Optional[bool] = None
|
|
@@ -59,6 +63,9 @@ class Data(BaseModel):
|
|
|
59
63
|
quickship: Optional[bool] = None
|
|
60
64
|
"""Supports quickship"""
|
|
61
65
|
|
|
66
|
+
region: Optional[str] = None
|
|
67
|
+
"""Geographic region (e.g., AMER, EMEA, APAC)"""
|
|
68
|
+
|
|
62
69
|
reservable: Optional[bool] = None
|
|
63
70
|
"""Supports reservable"""
|
|
64
71
|
|
|
@@ -4,7 +4,7 @@ from typing import Dict, Optional
|
|
|
4
4
|
|
|
5
5
|
from .._models import BaseModel
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["Error", "Source"]
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Source(BaseModel):
|
|
@@ -15,7 +15,7 @@ class Source(BaseModel):
|
|
|
15
15
|
"""JSON pointer (RFC6901) to the offending entity."""
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class
|
|
18
|
+
class Error(BaseModel):
|
|
19
19
|
code: str
|
|
20
20
|
|
|
21
21
|
title: str
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import Literal, Required, TypedDict
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["OAuthAuthorizeParams"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class OAuthAuthorizeParams(TypedDict, total=False):
|
|
11
11
|
client_id: Required[str]
|
|
12
12
|
"""OAuth client identifier"""
|
|
13
13
|
|