telnyx 3.5.0a0__py3-none-any.whl → 3.6.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.

Files changed (224) hide show
  1. telnyx/_client.py +56 -756
  2. telnyx/_version.py +1 -1
  3. telnyx/resources/__init__.py +70 -0
  4. telnyx/resources/advanced_orders.py +63 -63
  5. telnyx/resources/ai/assistants/assistants.py +15 -17
  6. telnyx/resources/ai/assistants/versions.py +13 -15
  7. telnyx/resources/ai/conversations/conversations.py +137 -3
  8. telnyx/resources/ai/conversations/messages.py +1 -134
  9. telnyx/resources/brand/brand.py +8 -4
  10. telnyx/resources/calls/actions.py +154 -150
  11. telnyx/resources/calls/calls.py +18 -10
  12. telnyx/resources/conferences/actions.py +8 -24
  13. telnyx/resources/conferences/conferences.py +2 -6
  14. telnyx/resources/documents.py +242 -37
  15. telnyx/resources/legacy/__init__.py +33 -0
  16. telnyx/resources/legacy/legacy.py +102 -0
  17. telnyx/resources/legacy/reporting/__init__.py +47 -0
  18. telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
  19. telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
  20. telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +482 -0
  21. telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
  22. telnyx/resources/legacy/reporting/batch_detail_records/voice.py +539 -0
  23. telnyx/resources/legacy/reporting/reporting.py +134 -0
  24. telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
  25. telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
  26. telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
  27. telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
  28. telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
  29. telnyx/resources/messaging_profiles/messaging_profiles.py +16 -0
  30. telnyx/resources/messaging_tollfree/verification/requests.py +203 -1
  31. telnyx/resources/oauth.py +855 -0
  32. telnyx/resources/oauth_clients.py +711 -0
  33. telnyx/resources/oauth_grants.py +349 -0
  34. telnyx/resources/outbound_voice_profiles.py +24 -4
  35. telnyx/resources/phone_numbers/jobs.py +12 -0
  36. telnyx/resources/porting_orders/porting_orders.py +20 -8
  37. telnyx/resources/sim_cards/actions.py +12 -12
  38. telnyx/resources/sim_cards/sim_cards.py +3 -2
  39. telnyx/resources/texml/accounts/calls/calls.py +11 -0
  40. telnyx/resources/texml/accounts/conferences/participants.py +11 -0
  41. telnyx/resources/verifications/verifications.py +10 -0
  42. telnyx/resources/verified_numbers/verified_numbers.py +25 -4
  43. telnyx/resources/verify_profiles.py +182 -1
  44. telnyx/resources/well_known.py +198 -0
  45. telnyx/types/__init__.py +51 -9
  46. telnyx/types/access_ip_address_list_response.py +3 -12
  47. telnyx/types/access_ip_range_list_response.py +3 -12
  48. telnyx/types/addresses/action_validate_response.py +8 -3
  49. telnyx/types/{advanced_order_update_params.py → advanced_order_update_requirement_group_params.py} +2 -2
  50. telnyx/types/ai/__init__.py +2 -3
  51. telnyx/types/ai/assistant_import_params.py +1 -1
  52. telnyx/types/ai/assistants/__init__.py +0 -3
  53. telnyx/types/ai/assistants_list.py +4 -88
  54. telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
  55. telnyx/types/ai/conversations/__init__.py +0 -1
  56. telnyx/types/ai/import_metadata.py +1 -1
  57. telnyx/types/ai/{assistant_clone_response.py → inference_embedding.py} +2 -2
  58. telnyx/types/ai/inference_embedding_transfer_tool_params.py +6 -0
  59. telnyx/types/ai/inference_embedding_transfer_tool_params_param.py +6 -0
  60. telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
  61. telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
  62. telnyx/types/ai/voice_settings.py +49 -2
  63. telnyx/types/ai/voice_settings_param.py +49 -2
  64. telnyx/types/brand_create_params.py +2 -1
  65. telnyx/types/brand_update_params.py +2 -1
  66. telnyx/types/call_dial_params.py +11 -3
  67. telnyx/types/calls/__init__.py +1 -0
  68. telnyx/types/calls/action_answer_params.py +1 -2
  69. telnyx/types/calls/action_gather_using_ai_params.py +5 -8
  70. telnyx/types/calls/action_start_streaming_params.py +5 -2
  71. telnyx/types/calls/action_start_transcription_params.py +160 -6
  72. telnyx/types/calls/action_transfer_params.py +50 -0
  73. telnyx/types/calls/telnyx_transcription_language.py +108 -0
  74. telnyx/types/calls/transcription_engine_b_config_param.py +3 -102
  75. telnyx/types/calls/transcription_start_request_param.py +161 -6
  76. telnyx/types/campaign_submit_appeal_response.py +0 -3
  77. telnyx/types/country_coverage_retrieve_country_response.py +7 -0
  78. telnyx/types/country_coverage_retrieve_response.py +7 -0
  79. telnyx/types/document_upload_json_params.py +39 -0
  80. telnyx/types/document_upload_json_response.py +12 -0
  81. telnyx/types/legacy/__init__.py +3 -0
  82. telnyx/types/legacy/reporting/__init__.py +12 -0
  83. telnyx/types/legacy/reporting/batch_detail_records/__init__.py +24 -0
  84. telnyx/types/legacy/reporting/batch_detail_records/batch_csv_pagination_meta.py +17 -0
  85. telnyx/types/legacy/reporting/batch_detail_records/cdr_detailed_req_response.py +63 -0
  86. telnyx/types/legacy/reporting/batch_detail_records/mdr_detail_report_response.py +42 -0
  87. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +55 -0
  88. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +12 -0
  89. telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +12 -0
  90. telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +15 -0
  91. telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +12 -0
  92. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
  93. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +12 -0
  94. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +12 -0
  95. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +12 -0
  96. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +12 -0
  97. telnyx/types/legacy/reporting/batch_detail_records/stt_detail_report_response.py +27 -0
  98. telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +57 -0
  99. telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +13 -0
  100. telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +13 -0
  101. telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +15 -0
  102. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
  103. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +13 -0
  104. telnyx/types/legacy/reporting/filter.py +31 -0
  105. telnyx/types/legacy/reporting/filter_param.py +30 -0
  106. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
  107. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
  108. telnyx/types/legacy/reporting/usage_reports/__init__.py +21 -0
  109. telnyx/types/legacy/reporting/usage_reports/cdr_usage_report_response_legacy.py +43 -0
  110. telnyx/types/legacy/reporting/usage_reports/mdr_usage_report_response_legacy.py +38 -0
  111. telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
  112. telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +13 -0
  113. telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +13 -0
  114. telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
  115. telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +15 -0
  116. telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +13 -0
  117. telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
  118. telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
  119. telnyx/types/legacy/reporting/usage_reports/standard_pagination_meta.py +17 -0
  120. telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
  121. telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +13 -0
  122. telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +13 -0
  123. telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
  124. telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +15 -0
  125. telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +13 -0
  126. telnyx/types/message_template.py +12 -0
  127. telnyx/types/messaging_profile.py +3 -0
  128. telnyx/types/messaging_profile_create_params.py +3 -0
  129. telnyx/types/messaging_profile_update_params.py +3 -0
  130. telnyx/types/messaging_tollfree/verification/__init__.py +1 -0
  131. telnyx/types/messaging_tollfree/verification/request_create_params.py +51 -1
  132. telnyx/types/messaging_tollfree/verification/request_update_params.py +51 -1
  133. telnyx/types/messaging_tollfree/verification/toll_free_verification_entity_type.py +9 -0
  134. telnyx/types/messaging_tollfree/verification/verification_request_egress.py +24 -0
  135. telnyx/types/messaging_tollfree/verification/verification_request_status.py +24 -0
  136. telnyx/types/number_order_status_update_webhook_event.py +30 -4
  137. telnyx/types/oauth_client.py +59 -0
  138. telnyx/types/oauth_client_create_params.py +39 -0
  139. telnyx/types/oauth_client_create_response.py +12 -0
  140. telnyx/types/oauth_client_list_params.py +38 -0
  141. telnyx/types/oauth_client_list_response.py +15 -0
  142. telnyx/types/oauth_client_retrieve_response.py +12 -0
  143. telnyx/types/oauth_client_update_params.py +36 -0
  144. telnyx/types/oauth_client_update_response.py +12 -0
  145. telnyx/types/oauth_grant.py +29 -0
  146. telnyx/types/oauth_grant_delete_response.py +12 -0
  147. telnyx/types/oauth_grant_list_params.py +17 -0
  148. telnyx/types/oauth_grant_list_response.py +15 -0
  149. telnyx/types/oauth_grant_retrieve_response.py +12 -0
  150. telnyx/types/oauth_grants_params.py +15 -0
  151. telnyx/types/oauth_grants_response.py +10 -0
  152. telnyx/types/oauth_introspect_params.py +12 -0
  153. telnyx/types/oauth_introspect_response.py +30 -0
  154. telnyx/types/oauth_register_params.py +39 -0
  155. telnyx/types/oauth_register_response.py +45 -0
  156. telnyx/types/oauth_retrieve_authorize_params.py +30 -0
  157. telnyx/types/oauth_retrieve_jwks_response.py +25 -0
  158. telnyx/types/oauth_retrieve_response.py +47 -0
  159. telnyx/types/oauth_token_params.py +33 -0
  160. telnyx/types/oauth_token_response.py +25 -0
  161. telnyx/types/outbound_voice_profile.py +27 -1
  162. telnyx/types/outbound_voice_profile_create_params.py +27 -1
  163. telnyx/types/outbound_voice_profile_list_params.py +1 -1
  164. telnyx/types/outbound_voice_profile_update_params.py +27 -1
  165. telnyx/types/pagination_meta_cloudflare_ip_list_sync.py +15 -0
  166. telnyx/types/pagination_meta_oauth.py +21 -0
  167. telnyx/types/phone_number_blocks/__init__.py +1 -0
  168. telnyx/types/phone_number_blocks/job.py +3 -34
  169. telnyx/types/phone_number_blocks/job_error.py +32 -0
  170. telnyx/types/phone_number_delete_response.py +7 -0
  171. telnyx/types/phone_number_detailed.py +7 -0
  172. telnyx/types/phone_number_list_params.py +6 -0
  173. telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
  174. telnyx/types/phone_numbers/phone_numbers_job.py +3 -36
  175. telnyx/types/porting_order.py +3 -0
  176. telnyx/types/porting_order_create_params.py +3 -0
  177. telnyx/types/porting_order_list_params.py +52 -31
  178. telnyx/types/porting_order_update_params.py +2 -0
  179. telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
  180. telnyx/types/report_list_mdrs_response.py +3 -12
  181. telnyx/types/reports/__init__.py +1 -0
  182. telnyx/types/reports/mdr_usage_report_list_response.py +3 -12
  183. telnyx/types/reports/pagination_meta_reporting.py +17 -0
  184. telnyx/types/requirement_group.py +2 -2
  185. telnyx/types/requirement_group_list_params.py +1 -1
  186. telnyx/types/shared/__init__.py +1 -0
  187. telnyx/types/{error.py → shared/api_error.py} +3 -3
  188. telnyx/types/shared/simple_sim_card.py +15 -0
  189. telnyx/types/sim_card.py +12 -0
  190. telnyx/types/sim_card_update_params.py +2 -1
  191. telnyx/types/stream_bidirectional_codec.py +1 -1
  192. telnyx/types/stream_bidirectional_sampling_rate.py +7 -0
  193. telnyx/types/stream_codec.py +1 -1
  194. telnyx/types/texml/accounts/call_calls_params.py +16 -1
  195. telnyx/types/texml/accounts/conferences/participant_participants_params.py +16 -1
  196. telnyx/types/verification_trigger_call_params.py +7 -0
  197. telnyx/types/verifications/__init__.py +1 -0
  198. telnyx/types/verifications/by_phone_number_list_response.py +4 -13
  199. telnyx/types/verifications/verify_meta.py +17 -0
  200. telnyx/types/verified_number_create_params.py +10 -0
  201. telnyx/types/verify_profile.py +18 -3
  202. telnyx/types/verify_profile_create_template_params.py +12 -0
  203. telnyx/types/verify_profile_list_response.py +4 -13
  204. telnyx/types/verify_profile_message_template_response.py +13 -0
  205. telnyx/types/verify_profile_retrieve_templates_response.py +4 -9
  206. telnyx/types/verify_profile_update_template_params.py +12 -0
  207. telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
  208. telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
  209. {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/METADATA +4 -4
  210. {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/RECORD +212 -121
  211. telnyx/types/ai/assistant_create_response.py +0 -92
  212. telnyx/types/ai/assistant_retrieve_response.py +0 -92
  213. telnyx/types/ai/assistants/version_promote_response.py +0 -92
  214. telnyx/types/ai/assistants/version_retrieve_response.py +0 -92
  215. telnyx/types/ai/assistants/version_update_response.py +0 -92
  216. telnyx/types/client_create_bucket_params.py +0 -13
  217. telnyx/types/client_delete_objects_params.py +0 -20
  218. telnyx/types/client_get_object_params.py +0 -15
  219. telnyx/types/client_list_objects_params.py +0 -13
  220. telnyx/types/client_put_object_params.py +0 -20
  221. telnyx/types/list_buckets_response.py +0 -20
  222. telnyx/types/list_objects_response.py +0 -24
  223. {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/WHEEL +0 -0
  224. {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["PaginationMetaReporting"]
8
+
9
+
10
+ class PaginationMetaReporting(BaseModel):
11
+ page_number: Optional[int] = None
12
+
13
+ page_size: Optional[int] = None
14
+
15
+ total_pages: Optional[int] = None
16
+
17
+ total_results: Optional[int] = None
@@ -20,7 +20,7 @@ class RegulatoryRequirement(BaseModel):
20
20
 
21
21
  requirement_id: Optional[str] = None
22
22
 
23
- status: Optional[Literal["approved", "unapproved", "pending-approval", "declined"]] = None
23
+ status: Optional[Literal["approved", "unapproved", "pending-approval", "declined", "expired"]] = None
24
24
 
25
25
  updated_at: Optional[datetime] = None
26
26
 
@@ -42,6 +42,6 @@ class RequirementGroup(BaseModel):
42
42
 
43
43
  regulatory_requirements: Optional[List[RegulatoryRequirement]] = None
44
44
 
45
- status: Optional[Literal["approved", "unapproved", "pending-approval", "declined"]] = None
45
+ status: Optional[Literal["approved", "unapproved", "pending-approval", "declined", "expired"]] = None
46
46
 
47
47
  updated_at: Optional[datetime] = None
@@ -29,5 +29,5 @@ class Filter(TypedDict, total=False):
29
29
  phone_number_type: Literal["local", "toll_free", "mobile", "national", "shared_cost"]
30
30
  """Filter requirement groups by phone number type."""
31
31
 
32
- status: Literal["approved", "unapproved", "pending-approval", "declined"]
32
+ status: Literal["approved", "unapproved", "pending-approval", "declined", "expired"]
33
33
  """Filter requirement groups by status"""
@@ -1,6 +1,7 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from .metadata import Metadata as Metadata
4
+ from .api_error import APIError as APIError
4
5
  from .short_code import ShortCode as ShortCode
5
6
  from .hosted_number import HostedNumber as HostedNumber
6
7
  from .sim_card_status import SimCardStatus as SimCardStatus
@@ -2,9 +2,9 @@
2
2
 
3
3
  from typing import Dict, Optional
4
4
 
5
- from .._models import BaseModel
5
+ from ..._models import BaseModel
6
6
 
7
- __all__ = ["Error", "Source"]
7
+ __all__ = ["APIError", "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 Error(BaseModel):
18
+ class APIError(BaseModel):
19
19
  code: str
20
20
 
21
21
  title: str
@@ -28,6 +28,9 @@ class SimpleSimCard(BaseModel):
28
28
  actions_in_progress: Optional[bool] = None
29
29
  """Indicate whether the SIM card has any pending (in-progress) actions."""
30
30
 
31
+ authorized_imeis: Optional[List[str]] = None
32
+ """List of IMEIs authorized to use a given SIM card."""
33
+
31
34
  created_at: Optional[str] = None
32
35
  """ISO 8601 formatted date-time indicating when the resource was created."""
33
36
 
@@ -37,6 +40,12 @@ class SimpleSimCard(BaseModel):
37
40
  data_limit: Optional[DataLimit] = None
38
41
  """The SIM card individual data limit configuration."""
39
42
 
43
+ eid: Optional[str] = None
44
+ """The Embedded Identity Document (eID) for eSIM cards."""
45
+
46
+ esim_installation_status: Optional[Literal["released", "disabled"]] = None
47
+ """The installation status of the eSIM. Only applicable for eSIM cards."""
48
+
40
49
  iccid: Optional[str] = None
41
50
  """The ICCID is the identifier of the specific SIM card/chip.
42
51
 
@@ -66,6 +75,9 @@ class SimpleSimCard(BaseModel):
66
75
 
67
76
  record_type: Optional[str] = None
68
77
 
78
+ resources_with_in_progress_actions: Optional[List[object]] = None
79
+ """List of resources with actions in progress."""
80
+
69
81
  sim_card_group_id: Optional[str] = None
70
82
  """The group SIMCardGroup identification.
71
83
 
@@ -83,3 +95,6 @@ class SimpleSimCard(BaseModel):
83
95
 
84
96
  updated_at: Optional[str] = None
85
97
  """ISO 8601 formatted date-time indicating when the resource was updated."""
98
+
99
+ version: Optional[str] = None
100
+ """The version of the SIM card."""
telnyx/types/sim_card.py CHANGED
@@ -103,6 +103,12 @@ class SimCard(BaseModel):
103
103
  data_limit: Optional[DataLimit] = None
104
104
  """The SIM card individual data limit configuration."""
105
105
 
106
+ eid: Optional[str] = None
107
+ """The Embedded Identity Document (eID) for eSIM cards."""
108
+
109
+ esim_installation_status: Optional[Literal["released", "disabled"]] = None
110
+ """The installation status of the eSIM. Only applicable for eSIM cards."""
111
+
106
112
  iccid: Optional[str] = None
107
113
  """The ICCID is the identifier of the specific SIM card/chip.
108
114
 
@@ -158,6 +164,9 @@ class SimCard(BaseModel):
158
164
 
159
165
  record_type: Optional[str] = None
160
166
 
167
+ resources_with_in_progress_actions: Optional[List[object]] = None
168
+ """List of resources with actions in progress."""
169
+
161
170
  sim_card_group_id: Optional[str] = None
162
171
  """The group SIMCardGroup identification.
163
172
 
@@ -175,3 +184,6 @@ class SimCard(BaseModel):
175
184
 
176
185
  updated_at: Optional[str] = None
177
186
  """ISO 8601 formatted date-time indicating when the resource was updated."""
187
+
188
+ version: Optional[str] = None
189
+ """The version of the SIM card."""
@@ -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, TypedDict
6
7
 
7
8
  from .._types import SequenceNotStr
@@ -11,7 +12,7 @@ __all__ = ["SimCardUpdateParams", "DataLimit"]
11
12
 
12
13
 
13
14
  class SimCardUpdateParams(TypedDict, total=False):
14
- authorized_imeis: SequenceNotStr[str]
15
+ authorized_imeis: Optional[SequenceNotStr[str]]
15
16
  """List of IMEIs authorized to use a given SIM card."""
16
17
 
17
18
  data_limit: DataLimit
@@ -4,4 +4,4 @@ from typing_extensions import Literal, TypeAlias
4
4
 
5
5
  __all__ = ["StreamBidirectionalCodec"]
6
6
 
7
- StreamBidirectionalCodec: TypeAlias = Literal["PCMU", "PCMA", "G722", "OPUS", "AMR-WB"]
7
+ StreamBidirectionalCodec: TypeAlias = Literal["PCMU", "PCMA", "G722", "OPUS", "AMR-WB", "L16"]
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["StreamBidirectionalSamplingRate"]
6
+
7
+ StreamBidirectionalSamplingRate: TypeAlias = Literal[8000, 16000, 22050, 24000, 48000]
@@ -4,4 +4,4 @@ from typing_extensions import Literal, TypeAlias
4
4
 
5
5
  __all__ = ["StreamCodec"]
6
6
 
7
- StreamCodec: TypeAlias = Literal["PCMA", "PCMU", "default"]
7
+ StreamCodec: TypeAlias = Literal["PCMU", "PCMA", "G722", "OPUS", "AMR-WB", "L16", "default"]
@@ -2,11 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Iterable
5
6
  from typing_extensions import Literal, Required, Annotated, TypedDict
6
7
 
7
8
  from ...._utils import PropertyInfo
8
9
 
9
- __all__ = ["CallCallsParams"]
10
+ __all__ = ["CallCallsParams", "CustomHeader"]
10
11
 
11
12
 
12
13
  class CallCallsParams(TypedDict, total=False):
@@ -59,6 +60,12 @@ class CallCallsParams(TypedDict, total=False):
59
60
  cancel_playback_on_machine_detection: Annotated[bool, PropertyInfo(alias="CancelPlaybackOnMachineDetection")]
60
61
  """Whether to cancel ongoing playback on `machine` detection. Defaults to `true`."""
61
62
 
63
+ custom_headers: Annotated[Iterable[CustomHeader], PropertyInfo(alias="CustomHeaders")]
64
+ """Custom HTTP headers to be sent with the call.
65
+
66
+ Each header should be an object with 'name' and 'value' properties.
67
+ """
68
+
62
69
  detection_mode: Annotated[Literal["Premium", "Regular"], PropertyInfo(alias="DetectionMode")]
63
70
  """Allows you to chose between Premium and Standard detections."""
64
71
 
@@ -167,3 +174,11 @@ class CallCallsParams(TypedDict, total=False):
167
174
 
168
175
  The default value is inherited from TeXML Application setting.
169
176
  """
177
+
178
+
179
+ class CustomHeader(TypedDict, total=False):
180
+ name: Required[str]
181
+ """The name of the custom header"""
182
+
183
+ value: Required[str]
184
+ """The value of the custom header"""
@@ -2,11 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Iterable
5
6
  from typing_extensions import Literal, Required, Annotated, TypedDict
6
7
 
7
8
  from ....._utils import PropertyInfo
8
9
 
9
- __all__ = ["ParticipantParticipantsParams"]
10
+ __all__ = ["ParticipantParticipantsParams", "CustomHeader"]
10
11
 
11
12
 
12
13
  class ParticipantParticipantsParams(TypedDict, total=False):
@@ -113,6 +114,12 @@ class ParticipantParticipantsParams(TypedDict, total=False):
113
114
  Defaults to `trim-silence`.
114
115
  """
115
116
 
117
+ custom_headers: Annotated[Iterable[CustomHeader], PropertyInfo(alias="CustomHeaders")]
118
+ """Custom HTTP headers to be sent with the call.
119
+
120
+ Each header should be an object with 'name' and 'value' properties.
121
+ """
122
+
116
123
  early_media: Annotated[bool, PropertyInfo(alias="EarlyMedia")]
117
124
  """
118
125
  Whether participant shall be bridged to conference before the participant
@@ -249,3 +256,11 @@ class ParticipantParticipantsParams(TypedDict, total=False):
249
256
  The URL to call for an audio file to play while the participant is waiting for
250
257
  the conference to start.
251
258
  """
259
+
260
+
261
+ class CustomHeader(TypedDict, total=False):
262
+ name: Required[str]
263
+ """The name of the custom header"""
264
+
265
+ value: Required[str]
266
+ """The value of the custom header"""
@@ -18,5 +18,12 @@ class VerificationTriggerCallParams(TypedDict, total=False):
18
18
  custom_code: Optional[str]
19
19
  """Send a self-generated numeric code to the end-user"""
20
20
 
21
+ extension: Optional[str]
22
+ """Optional extension to dial after call is answered using DTMF digits.
23
+
24
+ Valid digits are 0-9, A-D, \\**, and #. Pauses can be added using w (0.5s) and W
25
+ (1s).
26
+ """
27
+
21
28
  timeout_secs: int
22
29
  """The number of seconds the verification code is valid for."""
@@ -2,5 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .verify_meta import VerifyMeta as VerifyMeta
5
6
  from .action_verify_params import ActionVerifyParams as ActionVerifyParams
6
7
  from .by_phone_number_list_response import ByPhoneNumberListResponse as ByPhoneNumberListResponse
@@ -1,24 +1,15 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from ..._models import BaseModel
6
+ from .verify_meta import VerifyMeta
6
7
  from ..verification import Verification
7
8
 
8
- __all__ = ["ByPhoneNumberListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
-
14
- page_size: Optional[int] = None
15
-
16
- total_pages: Optional[int] = None
17
-
18
- total_results: Optional[int] = None
9
+ __all__ = ["ByPhoneNumberListResponse"]
19
10
 
20
11
 
21
12
  class ByPhoneNumberListResponse(BaseModel):
22
13
  data: List[Verification]
23
14
 
24
- meta: Meta
15
+ meta: VerifyMeta
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["VerifyMeta"]
8
+
9
+
10
+ class VerifyMeta(BaseModel):
11
+ page_number: Optional[int] = None
12
+
13
+ page_size: Optional[int] = None
14
+
15
+ total_pages: Optional[int] = None
16
+
17
+ total_results: Optional[int] = None
@@ -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, Required, TypedDict
6
7
 
7
8
  __all__ = ["VerifiedNumberCreateParams"]
@@ -12,3 +13,12 @@ class VerifiedNumberCreateParams(TypedDict, total=False):
12
13
 
13
14
  verification_method: Required[Literal["sms", "call"]]
14
15
  """Verification method."""
16
+
17
+ extension: Optional[str]
18
+ """Optional DTMF extension sequence to dial after the call is answered.
19
+
20
+ This parameter enables verification of phone numbers behind IVR systems that
21
+ require extension dialing. Valid characters: digits 0-9, letters A-D, symbols \\**
22
+ and #. Pauses: w = 0.5 second pause, W = 1 second pause. Maximum length: 50
23
+ characters. Only works with 'call' verification method.
24
+ """
@@ -38,12 +38,17 @@ class Call(BaseModel):
38
38
  to `["*"]`, all destinations will be allowed.
39
39
  """
40
40
 
41
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
42
41
  if TYPE_CHECKING:
42
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
43
+ # value to this field, so for compatibility we avoid doing it at runtime.
44
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
45
+
43
46
  # Stub to indicate that arbitrary properties are accepted.
44
47
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
45
48
  # `getattr(obj, '$type')`
46
49
  def __getattr__(self, attr: str) -> object: ...
50
+ else:
51
+ __pydantic_extra__: Dict[str, object]
47
52
 
48
53
 
49
54
  class Flashcall(BaseModel):
@@ -55,12 +60,17 @@ class Flashcall(BaseModel):
55
60
  identity.
56
61
  """
57
62
 
58
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
59
63
  if TYPE_CHECKING:
64
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
65
+ # value to this field, so for compatibility we avoid doing it at runtime.
66
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
67
+
60
68
  # Stub to indicate that arbitrary properties are accepted.
61
69
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
62
70
  # `getattr(obj, '$type')`
63
71
  def __getattr__(self, attr: str) -> object: ...
72
+ else:
73
+ __pydantic_extra__: Dict[str, object]
64
74
 
65
75
 
66
76
  class SMS(BaseModel):
@@ -97,12 +107,17 @@ class SMS(BaseModel):
97
107
  to `["*"]`, all destinations will be allowed.
98
108
  """
99
109
 
100
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
101
110
  if TYPE_CHECKING:
111
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
112
+ # value to this field, so for compatibility we avoid doing it at runtime.
113
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
114
+
102
115
  # Stub to indicate that arbitrary properties are accepted.
103
116
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
104
117
  # `getattr(obj, '$type')`
105
118
  def __getattr__(self, attr: str) -> object: ...
119
+ else:
120
+ __pydantic_extra__: Dict[str, object]
106
121
 
107
122
 
108
123
  class VerifyProfile(BaseModel):
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["VerifyProfileCreateTemplateParams"]
8
+
9
+
10
+ class VerifyProfileCreateTemplateParams(TypedDict, total=False):
11
+ text: Required[str]
12
+ """The text content of the message template."""
@@ -1,24 +1,15 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from .._models import BaseModel
6
6
  from .verify_profile import VerifyProfile
7
+ from .verifications.verify_meta import VerifyMeta
7
8
 
8
- __all__ = ["VerifyProfileListResponse", "Meta"]
9
-
10
-
11
- class Meta(BaseModel):
12
- page_number: Optional[int] = None
13
-
14
- page_size: Optional[int] = None
15
-
16
- total_pages: Optional[int] = None
17
-
18
- total_results: Optional[int] = None
9
+ __all__ = ["VerifyProfileListResponse"]
19
10
 
20
11
 
21
12
  class VerifyProfileListResponse(BaseModel):
22
13
  data: List[VerifyProfile]
23
14
 
24
- meta: Meta
15
+ meta: VerifyMeta
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["VerifyProfileMessageTemplateResponse"]
8
+
9
+
10
+ class VerifyProfileMessageTemplateResponse(BaseModel):
11
+ id: Optional[str] = None
12
+
13
+ text: Optional[str] = None
@@ -1,17 +1,12 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from .._models import BaseModel
6
+ from .verify_profile_message_template_response import VerifyProfileMessageTemplateResponse
6
7
 
7
- __all__ = ["VerifyProfileRetrieveTemplatesResponse", "Data"]
8
-
9
-
10
- class Data(BaseModel):
11
- id: Optional[str] = None
12
-
13
- text: Optional[str] = None
8
+ __all__ = ["VerifyProfileRetrieveTemplatesResponse"]
14
9
 
15
10
 
16
11
  class VerifyProfileRetrieveTemplatesResponse(BaseModel):
17
- data: List[Data]
12
+ data: List[VerifyProfileMessageTemplateResponse]
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["VerifyProfileUpdateTemplateParams"]
8
+
9
+
10
+ class VerifyProfileUpdateTemplateParams(TypedDict, total=False):
11
+ text: Required[str]
12
+ """The text content of the message template."""
@@ -0,0 +1,42 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["WellKnownRetrieveAuthorizationServerMetadataResponse"]
8
+
9
+
10
+ class WellKnownRetrieveAuthorizationServerMetadataResponse(BaseModel):
11
+ authorization_endpoint: Optional[str] = None
12
+ """Authorization endpoint URL"""
13
+
14
+ code_challenge_methods_supported: Optional[List[str]] = None
15
+ """Supported PKCE code challenge methods"""
16
+
17
+ grant_types_supported: Optional[List[str]] = None
18
+ """Supported grant types"""
19
+
20
+ introspection_endpoint: Optional[str] = None
21
+ """Token introspection endpoint URL"""
22
+
23
+ issuer: Optional[str] = None
24
+ """Authorization server issuer URL"""
25
+
26
+ jwks_uri: Optional[str] = None
27
+ """JWK Set endpoint URL"""
28
+
29
+ registration_endpoint: Optional[str] = None
30
+ """Dynamic client registration endpoint URL"""
31
+
32
+ response_types_supported: Optional[List[str]] = None
33
+ """Supported response types"""
34
+
35
+ scopes_supported: Optional[List[str]] = None
36
+ """Supported OAuth scopes"""
37
+
38
+ token_endpoint: Optional[str] = None
39
+ """Token endpoint URL"""
40
+
41
+ token_endpoint_auth_methods_supported: Optional[List[str]] = None
42
+ """Supported token endpoint authentication methods"""
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["WellKnownRetrieveProtectedResourceMetadataResponse"]
8
+
9
+
10
+ class WellKnownRetrieveProtectedResourceMetadataResponse(BaseModel):
11
+ authorization_servers: Optional[List[str]] = None
12
+ """List of authorization server URLs"""
13
+
14
+ resource: Optional[str] = None
15
+ """Protected resource URL"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telnyx
3
- Version: 3.5.0a0
3
+ Version: 3.6.0
4
4
  Summary: The official Python library for the telnyx API
5
5
  Project-URL: Homepage, https://github.com/team-telnyx/telnyx-python
6
6
  Project-URL: Repository, https://github.com/team-telnyx/telnyx-python
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # Telnyx Python API library
@@ -52,7 +52,7 @@ The full API of this library can be found in [api.md](https://github.com/team-te
52
52
 
53
53
  ```sh
54
54
  # install from PyPI
55
- pip install --pre telnyx
55
+ pip install telnyx
56
56
  ```
57
57
 
58
58
  ## Usage
@@ -118,7 +118,7 @@ You can enable this by installing `aiohttp`:
118
118
 
119
119
  ```sh
120
120
  # install from PyPI
121
- pip install --pre telnyx[aiohttp]
121
+ pip install telnyx[aiohttp]
122
122
  ```
123
123
 
124
124
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: