telnyx 5.68.2 → 5.70.0

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.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +21 -5
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +8 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +8 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +8 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/conversation_add_message_params.rb +4 -4
  12. data/lib/telnyx/models/ai/inference_embedding.rb +8 -1
  13. data/lib/telnyx/models/ai/observability.rb +46 -0
  14. data/lib/telnyx/models/ai/observability_req.rb +46 -0
  15. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  16. data/lib/telnyx/models/call_dial_params.rb +24 -1
  17. data/lib/telnyx/models/calls/action_transfer_params.rb +24 -1
  18. data/lib/telnyx/models/enterprise_create_params.rb +1 -1
  19. data/lib/telnyx/models/enterprise_public.rb +1 -1
  20. data/lib/telnyx/models/enterprise_update_params.rb +1 -1
  21. data/lib/telnyx/models/enterprises/reputation/{number_create_params.rb → number_associate_params.rb} +2 -2
  22. data/lib/telnyx/models/enterprises/reputation/{number_create_response.rb → number_associate_response.rb} +5 -5
  23. data/lib/telnyx/models/enterprises/reputation/{number_delete_params.rb → number_disassociate_params.rb} +2 -2
  24. data/lib/telnyx/models/enterprises/{reputation_list_params.rb → reputation_disable_params.rb} +2 -2
  25. data/lib/telnyx/models/enterprises/{reputation_create_params.rb → reputation_enable_params.rb} +6 -6
  26. data/lib/telnyx/models/enterprises/{reputation_create_response.rb → reputation_enable_response.rb} +2 -2
  27. data/lib/telnyx/models/enterprises/{reputation_delete_all_params.rb → reputation_retrieve_params.rb} +2 -2
  28. data/lib/telnyx/models/enterprises/{reputation_list_response.rb → reputation_retrieve_response.rb} +2 -2
  29. data/lib/telnyx/models/porting_orders/phone_number_block_list_params.rb +9 -9
  30. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  31. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  32. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  33. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  34. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  35. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  36. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  37. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  38. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  39. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  40. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  41. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  42. data/lib/telnyx/models/verification.rb +1 -0
  43. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  44. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  45. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  46. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +364 -71
  47. data/lib/telnyx/models/voice_clone_create_params.rb +161 -51
  48. data/lib/telnyx/models/voice_clone_data.rb +51 -4
  49. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  50. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  51. data/lib/telnyx/models.rb +15 -0
  52. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  53. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  54. data/lib/telnyx/resources/calls/actions.rb +3 -1
  55. data/lib/telnyx/resources/calls.rb +3 -1
  56. data/lib/telnyx/resources/enterprises/reputation/numbers.rb +42 -42
  57. data/lib/telnyx/resources/enterprises/reputation.rb +61 -61
  58. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  59. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  60. data/lib/telnyx/resources/texml.rb +106 -0
  61. data/lib/telnyx/resources/verifications.rb +28 -0
  62. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  63. data/lib/telnyx/resources/voice_clones.rb +7 -27
  64. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  65. data/lib/telnyx/version.rb +1 -1
  66. data/lib/telnyx.rb +23 -8
  67. data/rbi/telnyx/client.rbi +6 -0
  68. data/rbi/telnyx/internal/util.rbi +8 -0
  69. data/rbi/telnyx/models/ai/assistant_create_params.rbi +13 -0
  70. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  71. data/rbi/telnyx/models/ai/assistant_update_params.rbi +13 -0
  72. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +13 -0
  73. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  74. data/rbi/telnyx/models/ai/conversation_add_message_params.rbi +5 -5
  75. data/rbi/telnyx/models/ai/inference_embedding.rbi +11 -0
  76. data/rbi/telnyx/models/ai/observability.rbi +90 -0
  77. data/rbi/telnyx/models/ai/observability_req.rbi +92 -0
  78. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  79. data/rbi/telnyx/models/call_dial_params.rbi +37 -0
  80. data/rbi/telnyx/models/calls/action_transfer_params.rbi +57 -0
  81. data/rbi/telnyx/models/enterprise_create_params.rbi +1 -1
  82. data/rbi/telnyx/models/enterprise_public.rbi +1 -1
  83. data/rbi/telnyx/models/enterprise_update_params.rbi +1 -1
  84. data/rbi/telnyx/models/enterprises/reputation/{number_create_params.rbi → number_associate_params.rbi} +2 -2
  85. data/rbi/telnyx/models/enterprises/reputation/{number_create_response.rbi → number_associate_response.rbi} +7 -7
  86. data/rbi/telnyx/models/enterprises/reputation/{number_delete_params.rbi → number_disassociate_params.rbi} +2 -2
  87. data/rbi/telnyx/models/enterprises/{reputation_list_params.rbi → reputation_disable_params.rbi} +2 -2
  88. data/rbi/telnyx/models/enterprises/{reputation_create_params.rbi → reputation_enable_params.rbi} +14 -14
  89. data/rbi/telnyx/models/enterprises/{reputation_create_response.rbi → reputation_enable_response.rbi} +2 -2
  90. data/rbi/telnyx/models/enterprises/{reputation_delete_all_params.rbi → reputation_retrieve_params.rbi} +2 -2
  91. data/rbi/telnyx/models/enterprises/{reputation_list_response.rbi → reputation_retrieve_response.rbi} +2 -2
  92. data/rbi/telnyx/models/porting_orders/phone_number_block_list_params.rbi +34 -34
  93. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  94. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  95. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  96. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  97. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  98. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  99. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  100. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  101. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  102. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  103. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  104. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  105. data/rbi/telnyx/models/verification.rbi +1 -0
  106. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  107. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  108. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  109. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +711 -136
  110. data/rbi/telnyx/models/voice_clone_create_params.rbi +345 -79
  111. data/rbi/telnyx/models/voice_clone_data.rbi +77 -4
  112. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  113. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  114. data/rbi/telnyx/models.rbi +19 -10
  115. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -0
  116. data/rbi/telnyx/resources/ai/assistants.rbi +4 -0
  117. data/rbi/telnyx/resources/calls/actions.rbi +5 -0
  118. data/rbi/telnyx/resources/calls.rbi +5 -0
  119. data/rbi/telnyx/resources/enterprises/reputation/numbers.rbi +34 -34
  120. data/rbi/telnyx/resources/enterprises/reputation.rbi +44 -44
  121. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  122. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  123. data/rbi/telnyx/resources/texml.rbi +164 -0
  124. data/rbi/telnyx/resources/verifications.rbi +23 -0
  125. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  126. data/rbi/telnyx/resources/voice_clones.rbi +17 -41
  127. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  128. data/sig/telnyx/client.rbs +2 -0
  129. data/sig/telnyx/internal/util.rbs +4 -0
  130. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  131. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  132. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  133. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  134. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  135. data/sig/telnyx/models/ai/conversation_add_message_params.rbs +5 -5
  136. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  137. data/sig/telnyx/models/ai/observability.rbs +58 -0
  138. data/sig/telnyx/models/ai/observability_req.rbs +58 -0
  139. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  140. data/sig/telnyx/models/call_dial_params.rbs +20 -0
  141. data/sig/telnyx/models/calls/action_transfer_params.rbs +20 -0
  142. data/sig/telnyx/models/enterprise_create_params.rbs +1 -1
  143. data/sig/telnyx/models/enterprise_public.rbs +1 -1
  144. data/sig/telnyx/models/enterprise_update_params.rbs +1 -1
  145. data/sig/telnyx/models/enterprises/reputation/{number_create_params.rbs → number_associate_params.rbs} +2 -2
  146. data/sig/telnyx/models/enterprises/reputation/{number_create_response.rbs → number_associate_response.rbs} +8 -8
  147. data/sig/telnyx/models/enterprises/reputation/{number_delete_params.rbs → number_disassociate_params.rbs} +2 -2
  148. data/sig/telnyx/models/enterprises/{reputation_list_params.rbs → reputation_disable_params.rbs} +2 -2
  149. data/sig/telnyx/models/enterprises/{reputation_create_params.rbs → reputation_enable_params.rbs} +9 -9
  150. data/sig/telnyx/models/enterprises/{reputation_create_response.rbs → reputation_enable_response.rbs} +2 -2
  151. data/sig/telnyx/models/enterprises/{reputation_delete_all_params.rbs → reputation_retrieve_params.rbs} +2 -2
  152. data/sig/telnyx/models/enterprises/{reputation_list_response.rbs → reputation_retrieve_response.rbs} +2 -2
  153. data/sig/telnyx/models/porting_orders/phone_number_block_list_params.rbs +9 -9
  154. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  155. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  156. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  157. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  158. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  159. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  160. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  161. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  162. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  163. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  164. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  165. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  166. data/sig/telnyx/models/verification.rbs +2 -1
  167. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  168. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  169. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  170. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +269 -58
  171. data/sig/telnyx/models/voice_clone_create_params.rbs +129 -44
  172. data/sig/telnyx/models/voice_clone_data.rbs +43 -0
  173. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  174. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  175. data/sig/telnyx/models.rbs +14 -0
  176. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  177. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  178. data/sig/telnyx/resources/calls/actions.rbs +1 -0
  179. data/sig/telnyx/resources/calls.rbs +1 -0
  180. data/sig/telnyx/resources/enterprises/reputation/numbers.rbs +7 -7
  181. data/sig/telnyx/resources/enterprises/reputation.rbs +8 -8
  182. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  183. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  184. data/sig/telnyx/resources/texml.rbs +44 -0
  185. data/sig/telnyx/resources/verifications.rbs +8 -0
  186. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  187. data/sig/telnyx/resources/voice_clones.rbs +2 -12
  188. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  189. metadata +71 -26
@@ -8,6 +8,170 @@ module Telnyx
8
8
  sig { returns(Telnyx::Resources::Texml::Accounts) }
9
9
  attr_reader :accounts
10
10
 
11
+ # Initiate an outbound AI call with warm-up support. Validates parameters, builds
12
+ # an internal TeXML with an AI Assistant configuration, encodes instructions into
13
+ # client state, and calls the dial API. The Twiml, Texml, and Url parameters are
14
+ # not allowed and will result in a 422 error.
15
+ sig do
16
+ params(
17
+ connection_id: String,
18
+ ai_assistant_id: String,
19
+ from: String,
20
+ to: String,
21
+ ai_assistant_dynamic_variables: T::Hash[Symbol, String],
22
+ ai_assistant_version: String,
23
+ async_amd: T::Boolean,
24
+ async_amd_status_callback: String,
25
+ async_amd_status_callback_method:
26
+ Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol,
27
+ caller_id: String,
28
+ conversation_callback: String,
29
+ conversation_callback_method:
30
+ Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol,
31
+ conversation_callbacks: T::Array[String],
32
+ custom_headers:
33
+ T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader::OrHash],
34
+ detection_mode:
35
+ Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
36
+ machine_detection:
37
+ Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
38
+ machine_detection_silence_timeout: Integer,
39
+ machine_detection_speech_end_threshold: Integer,
40
+ machine_detection_speech_threshold: Integer,
41
+ machine_detection_timeout: Integer,
42
+ passports: String,
43
+ preferred_codecs: String,
44
+ record: T::Boolean,
45
+ recording_channels:
46
+ Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol,
47
+ recording_status_callback: String,
48
+ recording_status_callback_event: String,
49
+ recording_status_callback_method:
50
+ Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol,
51
+ recording_timeout: Integer,
52
+ recording_track:
53
+ Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol,
54
+ send_recording_url: T::Boolean,
55
+ sip_auth_password: String,
56
+ sip_auth_username: String,
57
+ sip_region: Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol,
58
+ status_callback: String,
59
+ status_callback_event: String,
60
+ status_callback_method:
61
+ Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol,
62
+ status_callbacks: T::Array[String],
63
+ time_limit: Integer,
64
+ timeout_seconds: Integer,
65
+ trim: Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol,
66
+ request_options: Telnyx::RequestOptions::OrHash
67
+ ).returns(Telnyx::Models::TexmlInitiateAICallResponse)
68
+ end
69
+ def initiate_ai_call(
70
+ # The ID of the TeXML connection to use for the call.
71
+ connection_id,
72
+ # The ID of the AI assistant to use for the call.
73
+ ai_assistant_id:,
74
+ # The phone number of the party initiating the call. Phone numbers are formatted
75
+ # with a `+` and country code.
76
+ from:,
77
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
78
+ # country code.
79
+ to:,
80
+ # Key-value map of dynamic variables to pass to the AI assistant.
81
+ ai_assistant_dynamic_variables: nil,
82
+ # The version of the AI assistant to use.
83
+ ai_assistant_version: nil,
84
+ # Select whether to perform answering machine detection in the background. By
85
+ # default execution is blocked until Answering Machine Detection is completed.
86
+ async_amd: nil,
87
+ # URL destination for Telnyx to send AMD callback events to for the call.
88
+ async_amd_status_callback: nil,
89
+ # HTTP request type used for `AsyncAmdStatusCallback`.
90
+ async_amd_status_callback_method: nil,
91
+ # To be used as the caller id name (SIP From Display Name) presented to the
92
+ # destination (`To` number). The string should have a maximum of 128 characters,
93
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
94
+ # omitted, the display name will be the same as the number in the `From` field.
95
+ caller_id: nil,
96
+ # URL destination for Telnyx to send conversation callback events to.
97
+ conversation_callback: nil,
98
+ # HTTP request type used for `ConversationCallback`.
99
+ conversation_callback_method: nil,
100
+ # An array of URL destinations for conversation callback events.
101
+ conversation_callbacks: nil,
102
+ # Custom HTTP headers to be sent with the call. Each header should be an object
103
+ # with 'name' and 'value' properties.
104
+ custom_headers: nil,
105
+ # Allows you to choose between Premium and Standard detections.
106
+ detection_mode: nil,
107
+ # Enables Answering Machine Detection.
108
+ machine_detection: nil,
109
+ # If initial silence duration is greater than this value, consider it a machine.
110
+ # Ignored when `premium` detection is used.
111
+ machine_detection_silence_timeout: nil,
112
+ # Silence duration threshold after a greeting message or voice for it be
113
+ # considered human. Ignored when `premium` detection is used.
114
+ machine_detection_speech_end_threshold: nil,
115
+ # Maximum threshold of a human greeting. If greeting longer than this value,
116
+ # considered machine. Ignored when `premium` detection is used.
117
+ machine_detection_speech_threshold: nil,
118
+ # Maximum timeout threshold in milliseconds for overall detection.
119
+ machine_detection_timeout: nil,
120
+ # A string of passport identifiers to associate with the call.
121
+ passports: nil,
122
+ # The list of comma-separated codecs to be offered on a call.
123
+ preferred_codecs: nil,
124
+ # Whether to record the entire participant's call leg. Defaults to `false`.
125
+ record: nil,
126
+ # The number of channels in the final recording. Defaults to `mono`.
127
+ recording_channels: nil,
128
+ # The URL the recording callbacks will be sent to.
129
+ recording_status_callback: nil,
130
+ # The changes to the recording's state that should generate a call to
131
+ # `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
132
+ # Separate multiple values with a space. Defaults to `completed`.
133
+ recording_status_callback_event: nil,
134
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
135
+ recording_status_callback_method: nil,
136
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
137
+ # silence is detected. The timer only starts when the speech is detected. The
138
+ # minimum value is 0. The default value is 0 (infinite).
139
+ recording_timeout: nil,
140
+ # The audio track to record for the call. The default is `both`.
141
+ recording_track: nil,
142
+ # Whether to send RecordingUrl in webhooks.
143
+ send_recording_url: nil,
144
+ # The password to use for SIP authentication.
145
+ sip_auth_password: nil,
146
+ # The username to use for SIP authentication.
147
+ sip_auth_username: nil,
148
+ # Defines the SIP region to be used for the call.
149
+ sip_region: nil,
150
+ # URL destination for Telnyx to send status callback events to for the call.
151
+ status_callback: nil,
152
+ # The call events for which Telnyx should send a webhook. Multiple events can be
153
+ # defined when separated by a space. Valid values: initiated, ringing, answered,
154
+ # completed.
155
+ status_callback_event: nil,
156
+ # HTTP request type used for `StatusCallback`.
157
+ status_callback_method: nil,
158
+ # An array of URL destinations for Telnyx to send status callback events to for
159
+ # the call.
160
+ status_callbacks: nil,
161
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
162
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
163
+ time_limit: nil,
164
+ # The number of seconds to wait for the called party to answer the call before the
165
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
166
+ # is 30 seconds.
167
+ timeout_seconds: nil,
168
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
169
+ # `trim-silence`.
170
+ trim: nil,
171
+ request_options: {}
172
+ )
173
+ end
174
+
11
175
  # Create a TeXML secret which can be later used as a Dynamic Parameter for TeXML
12
176
  # when using Mustache Templates in your TeXML. In your TeXML you will be able to
13
177
  # use your secret name, and this name will be replaced by the actual secret value
@@ -96,6 +96,29 @@ module Telnyx
96
96
  )
97
97
  end
98
98
 
99
+ # Trigger WhatsApp verification
100
+ sig do
101
+ params(
102
+ phone_number: String,
103
+ verify_profile_id: String,
104
+ custom_code: T.nilable(String),
105
+ timeout_secs: Integer,
106
+ request_options: Telnyx::RequestOptions::OrHash
107
+ ).returns(Telnyx::CreateVerificationResponse)
108
+ end
109
+ def trigger_whatsapp_verification(
110
+ # +E164 formatted phone number.
111
+ phone_number:,
112
+ # The identifier of the associated Verify profile.
113
+ verify_profile_id:,
114
+ # Send a self-generated numeric code to the end-user
115
+ custom_code: nil,
116
+ # The number of seconds the verification code is valid for.
117
+ timeout_secs: nil,
118
+ request_options: {}
119
+ )
120
+ end
121
+
99
122
  # @api private
100
123
  sig { params(client: Telnyx::Client).returns(T.attached_class) }
101
124
  def self.new(client:)
@@ -15,6 +15,7 @@ module Telnyx
15
15
  sms: Telnyx::VerifyProfileCreateParams::SMS::OrHash,
16
16
  webhook_failover_url: String,
17
17
  webhook_url: String,
18
+ whatsapp: Telnyx::VerifyProfileCreateParams::Whatsapp::OrHash,
18
19
  request_options: Telnyx::RequestOptions::OrHash
19
20
  ).returns(Telnyx::VerifyProfileData)
20
21
  end
@@ -27,6 +28,7 @@ module Telnyx
27
28
  sms: nil,
28
29
  webhook_failover_url: nil,
29
30
  webhook_url: nil,
31
+ whatsapp: nil,
30
32
  request_options: {}
31
33
  )
32
34
  end
@@ -57,6 +59,7 @@ module Telnyx
57
59
  sms: Telnyx::VerifyProfileUpdateParams::SMS::OrHash,
58
60
  webhook_failover_url: String,
59
61
  webhook_url: String,
62
+ whatsapp: Telnyx::VerifyProfileUpdateParams::Whatsapp::OrHash,
60
63
  request_options: Telnyx::RequestOptions::OrHash
61
64
  ).returns(Telnyx::VerifyProfileData)
62
65
  end
@@ -71,6 +74,7 @@ module Telnyx
71
74
  sms: nil,
72
75
  webhook_failover_url: nil,
73
76
  webhook_url: nil,
77
+ whatsapp: nil,
74
78
  request_options: {}
75
79
  )
76
80
  end
@@ -9,25 +9,17 @@ module Telnyx
9
9
  # design. The clone can then be used for text-to-speech synthesis.
10
10
  sig do
11
11
  params(
12
- gender: Telnyx::VoiceCloneCreateParams::Gender::OrSymbol,
13
- language: String,
14
- name: String,
15
- voice_design_id: String,
16
- provider: Telnyx::VoiceCloneCreateParams::Provider::OrSymbol,
12
+ body:
13
+ T.any(
14
+ Telnyx::VoiceCloneCreateParams::Body::TelnyxDesignClone::OrHash,
15
+ Telnyx::VoiceCloneCreateParams::Body::MinimaxDesignClone::OrHash
16
+ ),
17
17
  request_options: Telnyx::RequestOptions::OrHash
18
18
  ).returns(Telnyx::Models::VoiceCloneCreateResponse)
19
19
  end
20
20
  def create(
21
- # Gender of the voice clone.
22
- gender:,
23
- # ISO 639-1 language code for the clone (e.g. `en`, `fr`, `de`).
24
- language:,
25
- # Name for the voice clone.
26
- name:,
27
- # UUID of the source voice design to clone.
28
- voice_design_id:,
29
- # Voice synthesis provider. Case-insensitive. Defaults to `telnyx`.
30
- provider: nil,
21
+ # Request body for creating a voice clone from an existing voice design.
22
+ body:,
31
23
  request_options: {}
32
24
  )
33
25
  end
@@ -97,38 +89,22 @@ module Telnyx
97
89
 
98
90
  # Creates a new voice clone by uploading an audio file directly. Supported
99
91
  # formats: WAV, MP3, FLAC, OGG, M4A. For best results, provide 5–10 seconds of
100
- # clear speech. Maximum file size: 2MB.
92
+ # clear speech. Maximum file size: 5MB for Telnyx, 20MB for Minimax.
101
93
  sig do
102
94
  params(
103
- audio_file: Telnyx::Internal::FileInput,
104
- language: String,
105
- name: String,
106
- gender: Telnyx::VoiceCloneCreateFromUploadParams::Gender::OrSymbol,
107
- label: String,
108
- provider:
109
- Telnyx::VoiceCloneCreateFromUploadParams::Provider::OrSymbol,
110
- ref_text: String,
95
+ body:
96
+ T.any(
97
+ Telnyx::VoiceCloneCreateFromUploadParams::Body::TelnyxQwen3TtsClone::OrHash,
98
+ Telnyx::VoiceCloneCreateFromUploadParams::Body::TelnyxUltraClone::OrHash,
99
+ Telnyx::VoiceCloneCreateFromUploadParams::Body::MinimaxClone::OrHash
100
+ ),
111
101
  request_options: Telnyx::RequestOptions::OrHash
112
102
  ).returns(Telnyx::Models::VoiceCloneCreateFromUploadResponse)
113
103
  end
114
104
  def create_from_upload(
115
- # Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
116
- # For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
117
- # size: 5MB for Telnyx, 20MB for Minimax.
118
- audio_file:,
119
- # ISO 639-1 language code (e.g. `en`, `fr`) or `auto` for automatic detection.
120
- language:,
121
- # Name for the voice clone.
122
- name:,
123
- # Gender of the voice clone.
124
- gender: nil,
125
- # Optional custom label describing the voice style. If omitted, falls back to the
126
- # source design's prompt text.
127
- label: nil,
128
- # Voice synthesis provider. Case-insensitive. Defaults to `telnyx`.
129
- provider: nil,
130
- # Optional transcript of the audio file. Providing this improves clone quality.
131
- ref_text: nil,
105
+ # Multipart form data for creating a voice clone from a direct audio upload.
106
+ # Maximum file size: 5MB for Telnyx, 20MB for Minimax.
107
+ body:,
132
108
  request_options: {}
133
109
  )
134
110
  end
@@ -41,17 +41,17 @@ module Telnyx
41
41
  # Update a Wireless Blocklist.
42
42
  sig do
43
43
  params(
44
+ id: String,
44
45
  name: String,
45
- type: Telnyx::WirelessBlocklistUpdateParams::Type::OrSymbol,
46
46
  values: T::Array[String],
47
47
  request_options: Telnyx::RequestOptions::OrHash
48
48
  ).returns(Telnyx::Models::WirelessBlocklistUpdateResponse)
49
49
  end
50
50
  def update(
51
+ # Identifies the wireless blocklist.
52
+ id,
51
53
  # The name of the Wireless Blocklist.
52
54
  name: nil,
53
- # The type of wireless blocklist.
54
- type: nil,
55
55
  # Values to block. The values here depend on the `type` of Wireless Blocklist.
56
56
  values: nil,
57
57
  request_options: {}
@@ -340,6 +340,8 @@ module Telnyx
340
340
 
341
341
  attr_reader terms_of_service: Telnyx::Resources::TermsOfService
342
342
 
343
+ attr_reader pronunciation_dicts: Telnyx::Resources::PronunciationDicts
344
+
343
345
  private def auth_headers: -> ::Hash[String, String]
344
346
 
345
347
  private def bearer_auth: -> ::Hash[String, String]
@@ -45,8 +45,12 @@ module Telnyx
45
45
  -> top?
46
46
  } -> top?
47
47
 
48
+ RFC_3986_NOT_PCHARS: Regexp
49
+
48
50
  def self?.uri_origin: (URI::Generic uri) -> String
49
51
 
52
+ def self?.encode_path: (String | Integer path) -> String
53
+
50
54
  def self?.interpolate_path: (String | ::Array[String] path) -> String
51
55
 
52
56
  def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
@@ -14,6 +14,7 @@ module Telnyx
14
14
  insight_settings: Telnyx::AI::InsightSettings,
15
15
  llm_api_key_ref: String,
16
16
  messaging_settings: Telnyx::AI::MessagingSettings,
17
+ observability_settings: Telnyx::AI::ObservabilityReq,
17
18
  privacy_settings: Telnyx::AI::PrivacySettings,
18
19
  telephony_settings: Telnyx::AI::TelephonySettings,
19
20
  tool_ids: ::Array[String],
@@ -72,6 +73,12 @@ module Telnyx
72
73
  Telnyx::AI::MessagingSettings
73
74
  ) -> Telnyx::AI::MessagingSettings
74
75
 
76
+ attr_reader observability_settings: Telnyx::AI::ObservabilityReq?
77
+
78
+ def observability_settings=: (
79
+ Telnyx::AI::ObservabilityReq
80
+ ) -> Telnyx::AI::ObservabilityReq
81
+
75
82
  attr_reader privacy_settings: Telnyx::AI::PrivacySettings?
76
83
 
77
84
  def privacy_settings=: (
@@ -124,6 +131,7 @@ module Telnyx
124
131
  ?insight_settings: Telnyx::AI::InsightSettings,
125
132
  ?llm_api_key_ref: String,
126
133
  ?messaging_settings: Telnyx::AI::MessagingSettings,
134
+ ?observability_settings: Telnyx::AI::ObservabilityReq,
127
135
  ?privacy_settings: Telnyx::AI::PrivacySettings,
128
136
  ?telephony_settings: Telnyx::AI::TelephonySettings,
129
137
  ?tool_ids: ::Array[String],
@@ -146,6 +154,7 @@ module Telnyx
146
154
  insight_settings: Telnyx::AI::InsightSettings,
147
155
  llm_api_key_ref: String,
148
156
  messaging_settings: Telnyx::AI::MessagingSettings,
157
+ observability_settings: Telnyx::AI::ObservabilityReq,
149
158
  privacy_settings: Telnyx::AI::PrivacySettings,
150
159
  telephony_settings: Telnyx::AI::TelephonySettings,
151
160
  tool_ids: ::Array[String],
@@ -720,22 +720,35 @@ module Telnyx
720
720
  end
721
721
 
722
722
  type send_message =
723
- { send_message: ::Hash[Symbol, top], type: :send_message }
723
+ {
724
+ send_message: Telnyx::AI::AssistantTool::SendMessage::SendMessage,
725
+ type: :send_message
726
+ }
724
727
 
725
728
  class SendMessage < Telnyx::Internal::Type::BaseModel
726
- attr_accessor send_message: ::Hash[Symbol, top]
729
+ attr_accessor send_message: Telnyx::AI::AssistantTool::SendMessage::SendMessage
727
730
 
728
731
  attr_accessor type: :send_message
729
732
 
730
733
  def initialize: (
731
- send_message: ::Hash[Symbol, top],
734
+ send_message: Telnyx::AI::AssistantTool::SendMessage::SendMessage,
732
735
  ?type: :send_message
733
736
  ) -> void
734
737
 
735
738
  def to_hash: -> {
736
- send_message: ::Hash[Symbol, top],
739
+ send_message: Telnyx::AI::AssistantTool::SendMessage::SendMessage,
737
740
  type: :send_message
738
741
  }
742
+
743
+ type send_message = { message_template: String? }
744
+
745
+ class SendMessage < Telnyx::Internal::Type::BaseModel
746
+ attr_accessor message_template: String?
747
+
748
+ def initialize: (?message_template: String?) -> void
749
+
750
+ def to_hash: -> { message_template: String? }
751
+ end
739
752
  end
740
753
 
741
754
  type skip_turn =
@@ -15,6 +15,7 @@ module Telnyx
15
15
  messaging_settings: Telnyx::AI::MessagingSettings,
16
16
  model: String,
17
17
  name: String,
18
+ observability_settings: Telnyx::AI::ObservabilityReq,
18
19
  privacy_settings: Telnyx::AI::PrivacySettings,
19
20
  promote_to_main: bool,
20
21
  telephony_settings: Telnyx::AI::TelephonySettings,
@@ -82,6 +83,12 @@ module Telnyx
82
83
 
83
84
  def name=: (String) -> String
84
85
 
86
+ attr_reader observability_settings: Telnyx::AI::ObservabilityReq?
87
+
88
+ def observability_settings=: (
89
+ Telnyx::AI::ObservabilityReq
90
+ ) -> Telnyx::AI::ObservabilityReq
91
+
85
92
  attr_reader privacy_settings: Telnyx::AI::PrivacySettings?
86
93
 
87
94
  def privacy_settings=: (
@@ -139,6 +146,7 @@ module Telnyx
139
146
  ?messaging_settings: Telnyx::AI::MessagingSettings,
140
147
  ?model: String,
141
148
  ?name: String,
149
+ ?observability_settings: Telnyx::AI::ObservabilityReq,
142
150
  ?privacy_settings: Telnyx::AI::PrivacySettings,
143
151
  ?promote_to_main: bool,
144
152
  ?telephony_settings: Telnyx::AI::TelephonySettings,
@@ -163,6 +171,7 @@ module Telnyx
163
171
  messaging_settings: Telnyx::AI::MessagingSettings,
164
172
  model: String,
165
173
  name: String,
174
+ observability_settings: Telnyx::AI::ObservabilityReq,
166
175
  privacy_settings: Telnyx::AI::PrivacySettings,
167
176
  promote_to_main: bool,
168
177
  telephony_settings: Telnyx::AI::TelephonySettings,
@@ -17,6 +17,7 @@ module Telnyx
17
17
  messaging_settings: Telnyx::AI::MessagingSettings,
18
18
  model: String,
19
19
  name: String,
20
+ observability_settings: Telnyx::AI::ObservabilityReq,
20
21
  privacy_settings: Telnyx::AI::PrivacySettings,
21
22
  telephony_settings: Telnyx::AI::TelephonySettings,
22
23
  tool_ids: ::Array[String],
@@ -77,6 +78,12 @@ module Telnyx
77
78
 
78
79
  def name=: (String) -> String
79
80
 
81
+ attr_reader observability_settings: Telnyx::AI::ObservabilityReq?
82
+
83
+ def observability_settings=: (
84
+ Telnyx::AI::ObservabilityReq
85
+ ) -> Telnyx::AI::ObservabilityReq
86
+
80
87
  attr_reader privacy_settings: Telnyx::AI::PrivacySettings?
81
88
 
82
89
  def privacy_settings=: (
@@ -129,6 +136,7 @@ module Telnyx
129
136
  ?messaging_settings: Telnyx::AI::MessagingSettings,
130
137
  ?model: String,
131
138
  ?name: String,
139
+ ?observability_settings: Telnyx::AI::ObservabilityReq,
132
140
  ?privacy_settings: Telnyx::AI::PrivacySettings,
133
141
  ?telephony_settings: Telnyx::AI::TelephonySettings,
134
142
  ?tool_ids: ::Array[String],
@@ -150,6 +158,7 @@ module Telnyx
150
158
  messaging_settings: Telnyx::AI::MessagingSettings,
151
159
  model: String,
152
160
  name: String,
161
+ observability_settings: Telnyx::AI::ObservabilityReq,
153
162
  privacy_settings: Telnyx::AI::PrivacySettings,
154
163
  telephony_settings: Telnyx::AI::TelephonySettings,
155
164
  tool_ids: ::Array[String],
@@ -5,7 +5,8 @@ module Telnyx
5
5
  {
6
6
  text: String,
7
7
  duration: Float,
8
- segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
8
+ segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment],
9
+ words: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
9
10
  }
10
11
 
11
12
  class AudioTranscribeResponse < Telnyx::Internal::Type::BaseModel
@@ -21,16 +22,24 @@ module Telnyx
21
22
  ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
22
23
  ) -> ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
23
24
 
25
+ attr_reader words: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]?
26
+
27
+ def words=: (
28
+ ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
29
+ ) -> ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
30
+
24
31
  def initialize: (
25
32
  text: String,
26
33
  ?duration: Float,
27
- ?segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
34
+ ?segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment],
35
+ ?words: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
28
36
  ) -> void
29
37
 
30
38
  def to_hash: -> {
31
39
  text: String,
32
40
  duration: Float,
33
- segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
41
+ segments: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment],
42
+ words: ::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
34
43
  }
35
44
 
36
45
  type segment = { id: Float, end_: Float, start: Float, text: String }
@@ -53,6 +62,47 @@ module Telnyx
53
62
 
54
63
  def to_hash: -> { id: Float, end_: Float, start: Float, text: String }
55
64
  end
65
+
66
+ type word =
67
+ {
68
+ end_: Float,
69
+ start: Float,
70
+ word: String,
71
+ confidence: Float,
72
+ speaker: Integer
73
+ }
74
+
75
+ class Word < Telnyx::Internal::Type::BaseModel
76
+ attr_accessor end_: Float
77
+
78
+ attr_accessor start: Float
79
+
80
+ attr_accessor word: String
81
+
82
+ attr_reader confidence: Float?
83
+
84
+ def confidence=: (Float) -> Float
85
+
86
+ attr_reader speaker: Integer?
87
+
88
+ def speaker=: (Integer) -> Integer
89
+
90
+ def initialize: (
91
+ end_: Float,
92
+ start: Float,
93
+ word: String,
94
+ ?confidence: Float,
95
+ ?speaker: Integer
96
+ ) -> void
97
+
98
+ def to_hash: -> {
99
+ end_: Float,
100
+ start: Float,
101
+ word: String,
102
+ confidence: Float,
103
+ speaker: Integer
104
+ }
105
+ end
56
106
  end
57
107
  end
58
108
  end
@@ -87,22 +87,22 @@ module Telnyx
87
87
  String
88
88
  | Integer
89
89
  | bool
90
- | ::Array[Telnyx::Models::AI::ConversationAddMessageParams::Metadata::union_member3]
90
+ | ::Array[Telnyx::Models::AI::ConversationAddMessageParams::Metadata::metadata_array_value]
91
91
 
92
92
  module Metadata
93
93
  extend Telnyx::Internal::Type::Union
94
94
 
95
- type union_member3 = String | Integer | bool
95
+ type metadata_array_value = String | Integer | bool
96
96
 
97
- module UnionMember3
97
+ module MetadataArrayValue
98
98
  extend Telnyx::Internal::Type::Union
99
99
 
100
- def self?.variants: -> ::Array[Telnyx::Models::AI::ConversationAddMessageParams::Metadata::union_member3]
100
+ def self?.variants: -> ::Array[Telnyx::Models::AI::ConversationAddMessageParams::Metadata::metadata_array_value]
101
101
  end
102
102
 
103
103
  def self?.variants: -> ::Array[Telnyx::Models::AI::ConversationAddMessageParams::metadata]
104
104
 
105
- UnionMember3Array: Telnyx::Internal::Type::Converter
105
+ MetadataArrayValueArray: Telnyx::Internal::Type::Converter
106
106
  end
107
107
 
108
108
  type tool_choice = String | ::Hash[Symbol, top]
@@ -17,6 +17,7 @@ module Telnyx
17
17
  insight_settings: Telnyx::AI::InsightSettings,
18
18
  llm_api_key_ref: String,
19
19
  messaging_settings: Telnyx::AI::MessagingSettings,
20
+ observability_settings: Telnyx::AI::Observability,
20
21
  privacy_settings: Telnyx::AI::PrivacySettings,
21
22
  telephony_settings: Telnyx::AI::TelephonySettings,
22
23
  tools: ::Array[Telnyx::Models::AI::assistant_tool],
@@ -80,6 +81,12 @@ module Telnyx
80
81
  Telnyx::AI::MessagingSettings
81
82
  ) -> Telnyx::AI::MessagingSettings
82
83
 
84
+ attr_reader observability_settings: Telnyx::AI::Observability?
85
+
86
+ def observability_settings=: (
87
+ Telnyx::AI::Observability
88
+ ) -> Telnyx::AI::Observability
89
+
83
90
  attr_reader privacy_settings: Telnyx::AI::PrivacySettings?
84
91
 
85
92
  def privacy_settings=: (
@@ -131,6 +138,7 @@ module Telnyx
131
138
  ?insight_settings: Telnyx::AI::InsightSettings,
132
139
  ?llm_api_key_ref: String,
133
140
  ?messaging_settings: Telnyx::AI::MessagingSettings,
141
+ ?observability_settings: Telnyx::AI::Observability,
134
142
  ?privacy_settings: Telnyx::AI::PrivacySettings,
135
143
  ?telephony_settings: Telnyx::AI::TelephonySettings,
136
144
  ?tools: ::Array[Telnyx::Models::AI::assistant_tool],
@@ -154,6 +162,7 @@ module Telnyx
154
162
  insight_settings: Telnyx::AI::InsightSettings,
155
163
  llm_api_key_ref: String,
156
164
  messaging_settings: Telnyx::AI::MessagingSettings,
165
+ observability_settings: Telnyx::AI::Observability,
157
166
  privacy_settings: Telnyx::AI::PrivacySettings,
158
167
  telephony_settings: Telnyx::AI::TelephonySettings,
159
168
  tools: ::Array[Telnyx::Models::AI::assistant_tool],