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
@@ -102,6 +102,56 @@ class ActionTransferParams(TypedDict, total=False):
102
102
  behavior is to hang up the leg.
103
103
  """
104
104
 
105
+ record: Literal["record-from-answer"]
106
+ """Start recording automatically after an event. Disabled by default."""
107
+
108
+ record_channels: Literal["single", "dual"]
109
+ """
110
+ Defines which channel should be recorded ('single' or 'dual') when `record` is
111
+ specified.
112
+ """
113
+
114
+ record_custom_file_name: str
115
+ """The custom recording file name to be used instead of the default `call_leg_id`.
116
+
117
+ Telnyx will still add a Unix timestamp suffix.
118
+ """
119
+
120
+ record_format: Literal["wav", "mp3"]
121
+ """
122
+ Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
123
+ """
124
+
125
+ record_max_length: int
126
+ """
127
+ Defines the maximum length for the recording in seconds when `record` is
128
+ specified. The minimum value is 0. The maximum value is 43200. The default value
129
+ is 0 (infinite).
130
+ """
131
+
132
+ record_timeout_secs: int
133
+ """
134
+ The number of seconds that Telnyx will wait for the recording to be stopped if
135
+ silence is detected when `record` is specified. The timer only starts when the
136
+ speech is detected. Please note that call transcription is used to detect
137
+ silence and the related charge will be applied. The minimum value is 0. The
138
+ default value is 0 (infinite).
139
+ """
140
+
141
+ record_track: Literal["both", "inbound", "outbound"]
142
+ """The audio track to be recorded.
143
+
144
+ Can be either `both`, `inbound` or `outbound`. If only single track is specified
145
+ (`inbound`, `outbound`), `channels` configuration is ignored and it will be
146
+ recorded as mono (single channel).
147
+ """
148
+
149
+ record_trim: Literal["trim-silence"]
150
+ """
151
+ When set to `trim-silence`, silence will be removed from the beginning and end
152
+ of the recording.
153
+ """
154
+
105
155
  sip_auth_password: str
106
156
  """SIP Authentication password used for SIP challenges."""
107
157
 
@@ -0,0 +1,108 @@
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__ = ["TelnyxTranscriptionLanguage"]
6
+
7
+ TelnyxTranscriptionLanguage: TypeAlias = Literal[
8
+ "en",
9
+ "zh",
10
+ "de",
11
+ "es",
12
+ "ru",
13
+ "ko",
14
+ "fr",
15
+ "ja",
16
+ "pt",
17
+ "tr",
18
+ "pl",
19
+ "ca",
20
+ "nl",
21
+ "ar",
22
+ "sv",
23
+ "it",
24
+ "id",
25
+ "hi",
26
+ "fi",
27
+ "vi",
28
+ "he",
29
+ "uk",
30
+ "el",
31
+ "ms",
32
+ "cs",
33
+ "ro",
34
+ "da",
35
+ "hu",
36
+ "ta",
37
+ "no",
38
+ "th",
39
+ "ur",
40
+ "hr",
41
+ "bg",
42
+ "lt",
43
+ "la",
44
+ "mi",
45
+ "ml",
46
+ "cy",
47
+ "sk",
48
+ "te",
49
+ "fa",
50
+ "lv",
51
+ "bn",
52
+ "sr",
53
+ "az",
54
+ "sl",
55
+ "kn",
56
+ "et",
57
+ "mk",
58
+ "br",
59
+ "eu",
60
+ "is",
61
+ "hy",
62
+ "ne",
63
+ "mn",
64
+ "bs",
65
+ "kk",
66
+ "sq",
67
+ "sw",
68
+ "gl",
69
+ "mr",
70
+ "pa",
71
+ "si",
72
+ "km",
73
+ "sn",
74
+ "yo",
75
+ "so",
76
+ "af",
77
+ "oc",
78
+ "ka",
79
+ "be",
80
+ "tg",
81
+ "sd",
82
+ "gu",
83
+ "am",
84
+ "yi",
85
+ "lo",
86
+ "uz",
87
+ "fo",
88
+ "ht",
89
+ "ps",
90
+ "tk",
91
+ "nn",
92
+ "mt",
93
+ "sa",
94
+ "lb",
95
+ "my",
96
+ "bo",
97
+ "tl",
98
+ "mg",
99
+ "as",
100
+ "tt",
101
+ "haw",
102
+ "ln",
103
+ "ha",
104
+ "ba",
105
+ "jw",
106
+ "su",
107
+ "auto_detect",
108
+ ]
@@ -4,112 +4,13 @@ from __future__ import annotations
4
4
 
5
5
  from typing_extensions import Literal, TypedDict
6
6
 
7
+ from .telnyx_transcription_language import TelnyxTranscriptionLanguage
8
+
7
9
  __all__ = ["TranscriptionEngineBConfigParam"]
8
10
 
9
11
 
10
12
  class TranscriptionEngineBConfigParam(TypedDict, total=False):
11
- language: Literal[
12
- "en",
13
- "zh",
14
- "de",
15
- "es",
16
- "ru",
17
- "ko",
18
- "fr",
19
- "ja",
20
- "pt",
21
- "tr",
22
- "pl",
23
- "ca",
24
- "nl",
25
- "ar",
26
- "sv",
27
- "it",
28
- "id",
29
- "hi",
30
- "fi",
31
- "vi",
32
- "he",
33
- "uk",
34
- "el",
35
- "ms",
36
- "cs",
37
- "ro",
38
- "da",
39
- "hu",
40
- "ta",
41
- "no",
42
- "th",
43
- "ur",
44
- "hr",
45
- "bg",
46
- "lt",
47
- "la",
48
- "mi",
49
- "ml",
50
- "cy",
51
- "sk",
52
- "te",
53
- "fa",
54
- "lv",
55
- "bn",
56
- "sr",
57
- "az",
58
- "sl",
59
- "kn",
60
- "et",
61
- "mk",
62
- "br",
63
- "eu",
64
- "is",
65
- "hy",
66
- "ne",
67
- "mn",
68
- "bs",
69
- "kk",
70
- "sq",
71
- "sw",
72
- "gl",
73
- "mr",
74
- "pa",
75
- "si",
76
- "km",
77
- "sn",
78
- "yo",
79
- "so",
80
- "af",
81
- "oc",
82
- "ka",
83
- "be",
84
- "tg",
85
- "sd",
86
- "gu",
87
- "am",
88
- "yi",
89
- "lo",
90
- "uz",
91
- "fo",
92
- "ht",
93
- "ps",
94
- "tk",
95
- "nn",
96
- "mt",
97
- "sa",
98
- "lb",
99
- "my",
100
- "bo",
101
- "tl",
102
- "mg",
103
- "as",
104
- "tt",
105
- "haw",
106
- "ln",
107
- "ha",
108
- "ba",
109
- "jw",
110
- "su",
111
- "auto_detect",
112
- ]
13
+ language: TelnyxTranscriptionLanguage
113
14
  """Language to use for speech recognition"""
114
15
 
115
16
  transcription_engine: Literal["B"]
@@ -2,15 +2,166 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union
6
- from typing_extensions import Literal, TypeAlias, TypedDict
5
+ from typing import Union, Iterable
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
7
 
8
+ from ..._types import SequenceNotStr
9
+ from .google_transcription_language import GoogleTranscriptionLanguage
10
+ from .telnyx_transcription_language import TelnyxTranscriptionLanguage
8
11
  from .transcription_engine_a_config_param import TranscriptionEngineAConfigParam
9
12
  from .transcription_engine_b_config_param import TranscriptionEngineBConfigParam
10
13
 
11
- __all__ = ["TranscriptionStartRequestParam", "TranscriptionEngineConfig"]
14
+ __all__ = [
15
+ "TranscriptionStartRequestParam",
16
+ "TranscriptionEngineConfig",
17
+ "TranscriptionEngineConfigTranscriptionEngineGoogleConfig",
18
+ "TranscriptionEngineConfigTranscriptionEngineGoogleConfigSpeechContext",
19
+ "TranscriptionEngineConfigTranscriptionEngineTelnyxConfig",
20
+ "TranscriptionEngineConfigTranscriptionEngineDeepgramConfig",
21
+ ]
12
22
 
13
- TranscriptionEngineConfig: TypeAlias = Union[TranscriptionEngineAConfigParam, TranscriptionEngineBConfigParam]
23
+
24
+ class TranscriptionEngineConfigTranscriptionEngineGoogleConfigSpeechContext(TypedDict, total=False):
25
+ boost: float
26
+ """Boost factor for the speech context."""
27
+
28
+ phrases: SequenceNotStr[str]
29
+
30
+
31
+ class TranscriptionEngineConfigTranscriptionEngineGoogleConfig(TypedDict, total=False):
32
+ enable_speaker_diarization: bool
33
+ """Enables speaker diarization."""
34
+
35
+ hints: SequenceNotStr[str]
36
+ """Hints to improve transcription accuracy."""
37
+
38
+ interim_results: bool
39
+ """Whether to send also interim results.
40
+
41
+ If set to false, only final results will be sent.
42
+ """
43
+
44
+ language: GoogleTranscriptionLanguage
45
+ """Language to use for speech recognition"""
46
+
47
+ max_speaker_count: int
48
+ """Defines maximum number of speakers in the conversation."""
49
+
50
+ min_speaker_count: int
51
+ """Defines minimum number of speakers in the conversation."""
52
+
53
+ model: Literal[
54
+ "latest_long",
55
+ "latest_short",
56
+ "command_and_search",
57
+ "phone_call",
58
+ "video",
59
+ "default",
60
+ "medical_conversation",
61
+ "medical_dictation",
62
+ ]
63
+ """The model to use for transcription."""
64
+
65
+ profanity_filter: bool
66
+ """Enables profanity_filter."""
67
+
68
+ speech_context: Iterable[TranscriptionEngineConfigTranscriptionEngineGoogleConfigSpeechContext]
69
+ """Speech context to improve transcription accuracy."""
70
+
71
+ transcription_engine: Literal["Google"]
72
+ """Engine identifier for Google transcription service"""
73
+
74
+ use_enhanced: bool
75
+ """Enables enhanced transcription, this works for models `phone_call` and `video`."""
76
+
77
+
78
+ class TranscriptionEngineConfigTranscriptionEngineTelnyxConfig(TypedDict, total=False):
79
+ language: TelnyxTranscriptionLanguage
80
+ """Language to use for speech recognition"""
81
+
82
+ transcription_engine: Literal["Telnyx"]
83
+ """Engine identifier for Telnyx transcription service"""
84
+
85
+ transcription_model: Literal["openai/whisper-tiny", "openai/whisper-large-v3-turbo"]
86
+ """The model to use for transcription."""
87
+
88
+
89
+ class TranscriptionEngineConfigTranscriptionEngineDeepgramConfig(TypedDict, total=False):
90
+ transcription_engine: Required[Literal["Deepgram"]]
91
+ """Engine identifier for Deepgram transcription service"""
92
+
93
+ transcription_model: Required[Literal["deepgram/nova-2", "deepgram/nova-3"]]
94
+ """The model to use for transcription."""
95
+
96
+ language: Literal[
97
+ "bg",
98
+ "ca",
99
+ "zh",
100
+ "zh-CN",
101
+ "zh-Hans",
102
+ "zh-TW",
103
+ "zh-Hant",
104
+ "zh-HK",
105
+ "cs",
106
+ "da",
107
+ "da-DK",
108
+ "nl",
109
+ "en",
110
+ "en-US",
111
+ "en-AU",
112
+ "en-GB",
113
+ "en-NZ",
114
+ "en-IN",
115
+ "et",
116
+ "fi",
117
+ "nl-BE",
118
+ "fr",
119
+ "fr-CA",
120
+ "de",
121
+ "de-CH",
122
+ "el",
123
+ "hi",
124
+ "hu",
125
+ "id",
126
+ "it",
127
+ "ja",
128
+ "ko",
129
+ "ko-KR",
130
+ "lv",
131
+ "lt",
132
+ "ms",
133
+ "no",
134
+ "pl",
135
+ "pt",
136
+ "pt-BR",
137
+ "pt-PT",
138
+ "ro",
139
+ "ru",
140
+ "sk",
141
+ "es",
142
+ "es-419",
143
+ "sv",
144
+ "sv-SE",
145
+ "th",
146
+ "th-TH",
147
+ "tr",
148
+ "uk",
149
+ "vi",
150
+ "auto_detect",
151
+ ]
152
+ """Language to use for speech recognition.
153
+
154
+ Available languages depend on the selected model.
155
+ """
156
+
157
+
158
+ TranscriptionEngineConfig: TypeAlias = Union[
159
+ TranscriptionEngineConfigTranscriptionEngineGoogleConfig,
160
+ TranscriptionEngineConfigTranscriptionEngineTelnyxConfig,
161
+ TranscriptionEngineConfigTranscriptionEngineDeepgramConfig,
162
+ TranscriptionEngineAConfigParam,
163
+ TranscriptionEngineBConfigParam,
164
+ ]
14
165
 
15
166
 
16
167
  class TranscriptionStartRequestParam(TypedDict, total=False):
@@ -27,8 +178,12 @@ class TranscriptionStartRequestParam(TypedDict, total=False):
27
178
  `call_control_id`.
28
179
  """
29
180
 
30
- transcription_engine: Literal["A", "B"]
31
- """Engine to use for speech recognition. `A` - `Google`, `B` - `Telnyx`."""
181
+ transcription_engine: Literal["Google", "Telnyx", "Deepgram", "A", "B"]
182
+ """Engine to use for speech recognition.
183
+
184
+ Legacy values `A` - `Google`, `B` - `Telnyx` are supported for backward
185
+ compatibility.
186
+ """
32
187
 
33
188
  transcription_engine_config: TranscriptionEngineConfig
34
189
 
@@ -11,6 +11,3 @@ __all__ = ["CampaignSubmitAppealResponse"]
11
11
  class CampaignSubmitAppealResponse(BaseModel):
12
12
  appealed_at: Optional[datetime] = None
13
13
  """Timestamp when the appeal was submitted"""
14
-
15
- previous_status: Optional[str] = None
16
- """Previous campaign status (currently always null)"""
@@ -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
 
@@ -0,0 +1,39 @@
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 typing_extensions import Required, Annotated, TypeAlias, TypedDict
7
+
8
+ from .._types import Base64FileInput
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["DocumentUploadJsonParams", "DocServiceDocumentUploadURL", "DocServiceDocumentUploadInline"]
12
+
13
+
14
+ class DocServiceDocumentUploadURL(TypedDict, total=False):
15
+ url: Required[str]
16
+ """
17
+ If the file is already hosted publicly, you can provide a URL and have the
18
+ documents service fetch it for you.
19
+ """
20
+
21
+ customer_reference: str
22
+ """Optional reference string for customer tracking."""
23
+
24
+ filename: str
25
+ """The filename of the document."""
26
+
27
+
28
+ class DocServiceDocumentUploadInline(TypedDict, total=False):
29
+ file: Required[Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]]
30
+ """The Base64 encoded contents of the file you are uploading."""
31
+
32
+ customer_reference: str
33
+ """A customer reference string for customer look ups."""
34
+
35
+ filename: str
36
+ """The filename of the document."""
37
+
38
+
39
+ DocumentUploadJsonParams: TypeAlias = Union[DocServiceDocumentUploadURL, DocServiceDocumentUploadInline]
@@ -0,0 +1,12 @@
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
+ from .doc_service_document import DocServiceDocument
7
+
8
+ __all__ = ["DocumentUploadJsonResponse"]
9
+
10
+
11
+ class DocumentUploadJsonResponse(BaseModel):
12
+ data: Optional[DocServiceDocument] = None
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -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 .filter import Filter as Filter
6
+ from .filter_param import FilterParam as FilterParam
7
+ from .usage_report_retrieve_speech_to_text_params import (
8
+ UsageReportRetrieveSpeechToTextParams as UsageReportRetrieveSpeechToTextParams,
9
+ )
10
+ from .usage_report_retrieve_speech_to_text_response import (
11
+ UsageReportRetrieveSpeechToTextResponse as UsageReportRetrieveSpeechToTextResponse,
12
+ )
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .voice_create_params import VoiceCreateParams as VoiceCreateParams
6
+ from .voice_list_response import VoiceListResponse as VoiceListResponse
7
+ from .voice_create_response import VoiceCreateResponse as VoiceCreateResponse
8
+ from .voice_delete_response import VoiceDeleteResponse as VoiceDeleteResponse
9
+ from .messaging_create_params import MessagingCreateParams as MessagingCreateParams
10
+ from .messaging_list_response import MessagingListResponse as MessagingListResponse
11
+ from .voice_retrieve_response import VoiceRetrieveResponse as VoiceRetrieveResponse
12
+ from .batch_csv_pagination_meta import BatchCsvPaginationMeta as BatchCsvPaginationMeta
13
+ from .cdr_detailed_req_response import CdrDetailedReqResponse as CdrDetailedReqResponse
14
+ from .messaging_create_response import MessagingCreateResponse as MessagingCreateResponse
15
+ from .messaging_delete_response import MessagingDeleteResponse as MessagingDeleteResponse
16
+ from .mdr_detail_report_response import MdrDetailReportResponse as MdrDetailReportResponse
17
+ from .stt_detail_report_response import SttDetailReportResponse as SttDetailReportResponse
18
+ from .messaging_retrieve_response import MessagingRetrieveResponse as MessagingRetrieveResponse
19
+ from .speech_to_text_create_params import SpeechToTextCreateParams as SpeechToTextCreateParams
20
+ from .speech_to_text_list_response import SpeechToTextListResponse as SpeechToTextListResponse
21
+ from .speech_to_text_create_response import SpeechToTextCreateResponse as SpeechToTextCreateResponse
22
+ from .speech_to_text_delete_response import SpeechToTextDeleteResponse as SpeechToTextDeleteResponse
23
+ from .voice_retrieve_fields_response import VoiceRetrieveFieldsResponse as VoiceRetrieveFieldsResponse
24
+ from .speech_to_text_retrieve_response import SpeechToTextRetrieveResponse as SpeechToTextRetrieveResponse
@@ -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__ = ["BatchCsvPaginationMeta"]
8
+
9
+
10
+ class BatchCsvPaginationMeta(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