telnyx 5.68.2 → 5.69.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +7 -0
- data/lib/telnyx/internal/util.rb +18 -4
- data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
- data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
- data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
- data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
- data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
- data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
- data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
- data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
- data/lib/telnyx/models/verification.rb +1 -0
- data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
- data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
- data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
- data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
- data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
- data/lib/telnyx/models.rb +15 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
- data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
- data/lib/telnyx/resources/texml.rb +106 -0
- data/lib/telnyx/resources/verifications.rb +28 -0
- data/lib/telnyx/resources/verify_profiles.rb +5 -2
- data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +13 -0
- data/rbi/telnyx/client.rbi +6 -0
- data/rbi/telnyx/internal/util.rbi +8 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
- data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
- data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
- data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
- data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
- data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
- data/rbi/telnyx/models/verification.rbi +1 -0
- data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
- data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
- data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
- data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
- data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
- data/rbi/telnyx/models.rbi +19 -10
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
- data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
- data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
- data/rbi/telnyx/resources/texml.rbi +164 -0
- data/rbi/telnyx/resources/verifications.rbi +23 -0
- data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
- data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/internal/util.rbs +4 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
- data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
- data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
- data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
- data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
- data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
- data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
- data/sig/telnyx/models/verification.rbs +2 -1
- data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
- data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
- data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
- data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
- data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
- data/sig/telnyx/models.rbs +14 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
- data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
- data/sig/telnyx/resources/texml.rbs +44 -0
- data/sig/telnyx/resources/verifications.rbs +8 -0
- data/sig/telnyx/resources/verify_profiles.rbs +2 -0
- data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
- metadata +41 -2
|
@@ -99,95 +99,14 @@ module Telnyx
|
|
|
99
99
|
)
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
# Some parameter documentations has been truncated, see
|
|
103
|
-
# {Telnyx::Models::Texml::Accounts::CallCallsParams} for more details.
|
|
104
|
-
#
|
|
105
102
|
# Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request
|
|
106
103
|
# URL configured for the connection in the Mission Control Portal.
|
|
107
104
|
#
|
|
108
|
-
# @overload calls(account_sid,
|
|
105
|
+
# @overload calls(account_sid, body:, request_options: {})
|
|
109
106
|
#
|
|
110
107
|
# @param account_sid [String] The id of the account the resource belongs to.
|
|
111
108
|
#
|
|
112
|
-
# @param
|
|
113
|
-
#
|
|
114
|
-
# @param from [String] The phone number of the party that initiated the call. Phone numbers are formatt
|
|
115
|
-
#
|
|
116
|
-
# @param to [String] The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
117
|
-
#
|
|
118
|
-
# @param async_amd [Boolean] Select whether to perform answering machine detection in the background. By defa
|
|
119
|
-
#
|
|
120
|
-
# @param async_amd_status_callback [String] URL destination for Telnyx to send AMD callback events to for the call.
|
|
121
|
-
#
|
|
122
|
-
# @param async_amd_status_callback_method [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod] HTTP request type used for `AsyncAmdStatusCallback`. The default value is inheri
|
|
123
|
-
#
|
|
124
|
-
# @param caller_id [String] To be used as the caller id name (SIP From Display Name) presented to the destin
|
|
125
|
-
#
|
|
126
|
-
# @param cancel_playback_on_detect_message_end [Boolean] Whether to cancel ongoing playback on `greeting ended` detection. Defaults to `t
|
|
127
|
-
#
|
|
128
|
-
# @param cancel_playback_on_machine_detection [Boolean] Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
129
|
-
#
|
|
130
|
-
# @param custom_headers [Array<Telnyx::Models::Texml::Accounts::CallCallsParams::CustomHeader>] Custom HTTP headers to be sent with the call. Each header should be an object wi
|
|
131
|
-
#
|
|
132
|
-
# @param detection_mode [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::DetectionMode] Allows you to chose between Premium and Standard detections.
|
|
133
|
-
#
|
|
134
|
-
# @param fallback_url [String] A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
135
|
-
#
|
|
136
|
-
# @param machine_detection [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::MachineDetection] Enables Answering Machine Detection.
|
|
137
|
-
#
|
|
138
|
-
# @param machine_detection_silence_timeout [Integer] If initial silence duration is greater than this value, consider it a machine. I
|
|
139
|
-
#
|
|
140
|
-
# @param machine_detection_speech_end_threshold [Integer] Silence duration threshold after a greeting message or voice for it be considere
|
|
141
|
-
#
|
|
142
|
-
# @param machine_detection_speech_threshold [Integer] Maximum threshold of a human greeting. If greeting longer than this value, consi
|
|
143
|
-
#
|
|
144
|
-
# @param machine_detection_timeout [Integer] Maximum timeout threshold in milliseconds for overall detection.
|
|
145
|
-
#
|
|
146
|
-
# @param preferred_codecs [String] The list of comma-separated codecs to be offered on a call.
|
|
147
|
-
#
|
|
148
|
-
# @param record [Boolean] Whether to record the entire participant's call leg. Defaults to `false`.
|
|
149
|
-
#
|
|
150
|
-
# @param recording_channels [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::RecordingChannels] The number of channels in the final recording. Defaults to `mono`.
|
|
151
|
-
#
|
|
152
|
-
# @param recording_status_callback [String] The URL the recording callbacks will be sent to.
|
|
153
|
-
#
|
|
154
|
-
# @param recording_status_callback_event [String] The changes to the recording's state that should generate a call to `RecoridngSt
|
|
155
|
-
#
|
|
156
|
-
# @param recording_status_callback_method [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod] HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
157
|
-
#
|
|
158
|
-
# @param recording_timeout [Integer] The number of seconds that Telnyx will wait for the recording to be stopped if s
|
|
159
|
-
#
|
|
160
|
-
# @param recording_track [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::RecordingTrack] The audio track to record for the call. The default is `both`.
|
|
161
|
-
#
|
|
162
|
-
# @param send_recording_url [Boolean] Whether to send RecordingUrl in webhooks.
|
|
163
|
-
#
|
|
164
|
-
# @param sip_auth_password [String] The password to use for SIP authentication.
|
|
165
|
-
#
|
|
166
|
-
# @param sip_auth_username [String] The username to use for SIP authentication.
|
|
167
|
-
#
|
|
168
|
-
# @param sip_region [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::SipRegion] Defines the SIP region to be used for the call.
|
|
169
|
-
#
|
|
170
|
-
# @param status_callback [String] URL destination for Telnyx to send status callback events to for the call.
|
|
171
|
-
#
|
|
172
|
-
# @param status_callback_event [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::StatusCallbackEvent] The call events for which Telnyx should send a webhook. Multiple events can be d
|
|
173
|
-
#
|
|
174
|
-
# @param status_callback_method [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::StatusCallbackMethod] HTTP request type used for `StatusCallback`.
|
|
175
|
-
#
|
|
176
|
-
# @param supervise_call_sid [String] The call control ID of the existing call to supervise. When provided, the create
|
|
177
|
-
#
|
|
178
|
-
# @param supervising_role [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::SupervisingRole] The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
179
|
-
#
|
|
180
|
-
# @param texml [String] TeXML to be used as instructions for the call. If provided, the call will execut
|
|
181
|
-
#
|
|
182
|
-
# @param time_limit [Integer] The maximum duration of the call in seconds. The minimum value is 30 and the max
|
|
183
|
-
#
|
|
184
|
-
# @param timeout_seconds [Integer] The number of seconds to wait for the called party to answer the call before the
|
|
185
|
-
#
|
|
186
|
-
# @param trim [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::Trim] Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
187
|
-
#
|
|
188
|
-
# @param url [String] The URL from which Telnyx will retrieve the TeXML call instructions.
|
|
189
|
-
#
|
|
190
|
-
# @param url_method [Symbol, Telnyx::Models::Texml::Accounts::CallCallsParams::URLMethod] HTTP request type used for `Url`. The default value is inherited from TeXML Appl
|
|
109
|
+
# @param body [Telnyx::Models::Texml::Accounts::CallCallsParams::Body::WithURL, Telnyx::Models::Texml::Accounts::CallCallsParams::Body::WithTeXml, Telnyx::Models::Texml::Accounts::CallCallsParams::Body::ApplicationDefault]
|
|
191
110
|
#
|
|
192
111
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
193
112
|
#
|
|
@@ -199,7 +118,7 @@ module Telnyx
|
|
|
199
118
|
@client.request(
|
|
200
119
|
method: :post,
|
|
201
120
|
path: ["texml/Accounts/%1$s/Calls", account_sid],
|
|
202
|
-
body: parsed,
|
|
121
|
+
body: parsed[:body],
|
|
203
122
|
model: Telnyx::Models::Texml::Accounts::CallCallsResponse,
|
|
204
123
|
options: options
|
|
205
124
|
)
|
|
@@ -8,6 +8,112 @@ module Telnyx
|
|
|
8
8
|
# @return [Telnyx::Resources::Texml::Accounts]
|
|
9
9
|
attr_reader :accounts
|
|
10
10
|
|
|
11
|
+
# Some parameter documentations has been truncated, see
|
|
12
|
+
# {Telnyx::Models::TexmlInitiateAICallParams} for more details.
|
|
13
|
+
#
|
|
14
|
+
# Initiate an outbound AI call with warm-up support. Validates parameters, builds
|
|
15
|
+
# an internal TeXML with an AI Assistant configuration, encodes instructions into
|
|
16
|
+
# client state, and calls the dial API. The Twiml, Texml, and Url parameters are
|
|
17
|
+
# not allowed and will result in a 422 error.
|
|
18
|
+
#
|
|
19
|
+
# @overload initiate_ai_call(connection_id, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {})
|
|
20
|
+
#
|
|
21
|
+
# @param connection_id [String] The ID of the TeXML connection to use for the call.
|
|
22
|
+
#
|
|
23
|
+
# @param ai_assistant_id [String] The ID of the AI assistant to use for the call.
|
|
24
|
+
#
|
|
25
|
+
# @param from [String] The phone number of the party initiating the call. Phone numbers are formatted w
|
|
26
|
+
#
|
|
27
|
+
# @param to [String] The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
28
|
+
#
|
|
29
|
+
# @param ai_assistant_dynamic_variables [Hash{Symbol=>String}] Key-value map of dynamic variables to pass to the AI assistant.
|
|
30
|
+
#
|
|
31
|
+
# @param ai_assistant_version [String] The version of the AI assistant to use.
|
|
32
|
+
#
|
|
33
|
+
# @param async_amd [Boolean] Select whether to perform answering machine detection in the background. By defa
|
|
34
|
+
#
|
|
35
|
+
# @param async_amd_status_callback [String] URL destination for Telnyx to send AMD callback events to for the call.
|
|
36
|
+
#
|
|
37
|
+
# @param async_amd_status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod] HTTP request type used for `AsyncAmdStatusCallback`.
|
|
38
|
+
#
|
|
39
|
+
# @param caller_id [String] To be used as the caller id name (SIP From Display Name) presented to the destin
|
|
40
|
+
#
|
|
41
|
+
# @param conversation_callback [String] URL destination for Telnyx to send conversation callback events to.
|
|
42
|
+
#
|
|
43
|
+
# @param conversation_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::ConversationCallbackMethod] HTTP request type used for `ConversationCallback`.
|
|
44
|
+
#
|
|
45
|
+
# @param conversation_callbacks [Array<String>] An array of URL destinations for conversation callback events.
|
|
46
|
+
#
|
|
47
|
+
# @param custom_headers [Array<Telnyx::Models::TexmlInitiateAICallParams::CustomHeader>] Custom HTTP headers to be sent with the call. Each header should be an object wi
|
|
48
|
+
#
|
|
49
|
+
# @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Premium and Standard detections.
|
|
50
|
+
#
|
|
51
|
+
# @param machine_detection [Symbol, Telnyx::Models::TexmlInitiateAICallParams::MachineDetection] Enables Answering Machine Detection.
|
|
52
|
+
#
|
|
53
|
+
# @param machine_detection_silence_timeout [Integer] If initial silence duration is greater than this value, consider it a machine. I
|
|
54
|
+
#
|
|
55
|
+
# @param machine_detection_speech_end_threshold [Integer] Silence duration threshold after a greeting message or voice for it be considere
|
|
56
|
+
#
|
|
57
|
+
# @param machine_detection_speech_threshold [Integer] Maximum threshold of a human greeting. If greeting longer than this value, consi
|
|
58
|
+
#
|
|
59
|
+
# @param machine_detection_timeout [Integer] Maximum timeout threshold in milliseconds for overall detection.
|
|
60
|
+
#
|
|
61
|
+
# @param passports [String] A string of passport identifiers to associate with the call.
|
|
62
|
+
#
|
|
63
|
+
# @param preferred_codecs [String] The list of comma-separated codecs to be offered on a call.
|
|
64
|
+
#
|
|
65
|
+
# @param record [Boolean] Whether to record the entire participant's call leg. Defaults to `false`.
|
|
66
|
+
#
|
|
67
|
+
# @param recording_channels [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingChannels] The number of channels in the final recording. Defaults to `mono`.
|
|
68
|
+
#
|
|
69
|
+
# @param recording_status_callback [String] The URL the recording callbacks will be sent to.
|
|
70
|
+
#
|
|
71
|
+
# @param recording_status_callback_event [String] The changes to the recording's state that should generate a call to `RecordingSt
|
|
72
|
+
#
|
|
73
|
+
# @param recording_status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingStatusCallbackMethod] HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
74
|
+
#
|
|
75
|
+
# @param recording_timeout [Integer] The number of seconds that Telnyx will wait for the recording to be stopped if s
|
|
76
|
+
#
|
|
77
|
+
# @param recording_track [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingTrack] The audio track to record for the call. The default is `both`.
|
|
78
|
+
#
|
|
79
|
+
# @param send_recording_url [Boolean] Whether to send RecordingUrl in webhooks.
|
|
80
|
+
#
|
|
81
|
+
# @param sip_auth_password [String] The password to use for SIP authentication.
|
|
82
|
+
#
|
|
83
|
+
# @param sip_auth_username [String] The username to use for SIP authentication.
|
|
84
|
+
#
|
|
85
|
+
# @param sip_region [Symbol, Telnyx::Models::TexmlInitiateAICallParams::SipRegion] Defines the SIP region to be used for the call.
|
|
86
|
+
#
|
|
87
|
+
# @param status_callback [String] URL destination for Telnyx to send status callback events to for the call.
|
|
88
|
+
#
|
|
89
|
+
# @param status_callback_event [String] The call events for which Telnyx should send a webhook. Multiple events can be d
|
|
90
|
+
#
|
|
91
|
+
# @param status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::StatusCallbackMethod] HTTP request type used for `StatusCallback`.
|
|
92
|
+
#
|
|
93
|
+
# @param status_callbacks [Array<String>] An array of URL destinations for Telnyx to send status callback events to for th
|
|
94
|
+
#
|
|
95
|
+
# @param time_limit [Integer] The maximum duration of the call in seconds. The minimum value is 30 and the max
|
|
96
|
+
#
|
|
97
|
+
# @param timeout_seconds [Integer] The number of seconds to wait for the called party to answer the call before the
|
|
98
|
+
#
|
|
99
|
+
# @param trim [Symbol, Telnyx::Models::TexmlInitiateAICallParams::Trim] Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
100
|
+
#
|
|
101
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
102
|
+
#
|
|
103
|
+
# @return [Telnyx::Models::TexmlInitiateAICallResponse]
|
|
104
|
+
#
|
|
105
|
+
# @see Telnyx::Models::TexmlInitiateAICallParams
|
|
106
|
+
def initiate_ai_call(connection_id, params)
|
|
107
|
+
parsed, options = Telnyx::TexmlInitiateAICallParams.dump_request(params)
|
|
108
|
+
@client.request(
|
|
109
|
+
method: :post,
|
|
110
|
+
path: ["texml/ai_calls/%1$s", connection_id],
|
|
111
|
+
body: parsed,
|
|
112
|
+
model: Telnyx::Models::TexmlInitiateAICallResponse,
|
|
113
|
+
options: options
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
|
|
11
117
|
# Some parameter documentations has been truncated, see
|
|
12
118
|
# {Telnyx::Models::TexmlSecretsParams} for more details.
|
|
13
119
|
#
|
|
@@ -119,6 +119,34 @@ module Telnyx
|
|
|
119
119
|
)
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
+
# Trigger WhatsApp verification
|
|
123
|
+
#
|
|
124
|
+
# @overload trigger_whatsapp_verification(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {})
|
|
125
|
+
#
|
|
126
|
+
# @param phone_number [String] +E164 formatted phone number.
|
|
127
|
+
#
|
|
128
|
+
# @param verify_profile_id [String] The identifier of the associated Verify profile.
|
|
129
|
+
#
|
|
130
|
+
# @param custom_code [String, nil] Send a self-generated numeric code to the end-user
|
|
131
|
+
#
|
|
132
|
+
# @param timeout_secs [Integer] The number of seconds the verification code is valid for.
|
|
133
|
+
#
|
|
134
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
135
|
+
#
|
|
136
|
+
# @return [Telnyx::Models::CreateVerificationResponse]
|
|
137
|
+
#
|
|
138
|
+
# @see Telnyx::Models::VerificationTriggerWhatsappVerificationParams
|
|
139
|
+
def trigger_whatsapp_verification(params)
|
|
140
|
+
parsed, options = Telnyx::VerificationTriggerWhatsappVerificationParams.dump_request(params)
|
|
141
|
+
@client.request(
|
|
142
|
+
method: :post,
|
|
143
|
+
path: "verifications/whatsapp",
|
|
144
|
+
body: parsed,
|
|
145
|
+
model: Telnyx::CreateVerificationResponse,
|
|
146
|
+
options: options
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
122
150
|
# @api private
|
|
123
151
|
#
|
|
124
152
|
# @param client [Telnyx::Client]
|
|
@@ -6,7 +6,7 @@ module Telnyx
|
|
|
6
6
|
class VerifyProfiles
|
|
7
7
|
# Creates a new Verify profile to associate verifications with.
|
|
8
8
|
#
|
|
9
|
-
# @overload create(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {})
|
|
9
|
+
# @overload create(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param name [String]
|
|
12
12
|
# @param call [Telnyx::Models::VerifyProfileCreateParams::Call]
|
|
@@ -16,6 +16,7 @@ module Telnyx
|
|
|
16
16
|
# @param sms [Telnyx::Models::VerifyProfileCreateParams::SMS]
|
|
17
17
|
# @param webhook_failover_url [String]
|
|
18
18
|
# @param webhook_url [String]
|
|
19
|
+
# @param whatsapp [Telnyx::Models::VerifyProfileCreateParams::Whatsapp]
|
|
19
20
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
21
|
#
|
|
21
22
|
# @return [Telnyx::Models::VerifyProfileData]
|
|
@@ -54,7 +55,7 @@ module Telnyx
|
|
|
54
55
|
|
|
55
56
|
# Update Verify profile
|
|
56
57
|
#
|
|
57
|
-
# @overload update(verify_profile_id, call: nil, flashcall: nil, language: nil, name: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {})
|
|
58
|
+
# @overload update(verify_profile_id, call: nil, flashcall: nil, language: nil, name: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
|
|
58
59
|
#
|
|
59
60
|
# @param verify_profile_id [String] The identifier of the Verify profile to update.
|
|
60
61
|
#
|
|
@@ -74,6 +75,8 @@ module Telnyx
|
|
|
74
75
|
#
|
|
75
76
|
# @param webhook_url [String]
|
|
76
77
|
#
|
|
78
|
+
# @param whatsapp [Telnyx::Models::VerifyProfileUpdateParams::Whatsapp]
|
|
79
|
+
#
|
|
77
80
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
78
81
|
#
|
|
79
82
|
# @return [Telnyx::Models::VerifyProfileData]
|
|
@@ -52,11 +52,11 @@ module Telnyx
|
|
|
52
52
|
|
|
53
53
|
# Update a Wireless Blocklist.
|
|
54
54
|
#
|
|
55
|
-
# @overload update(
|
|
55
|
+
# @overload update(id, name: nil, values: nil, request_options: {})
|
|
56
56
|
#
|
|
57
|
-
# @param
|
|
57
|
+
# @param id [String] Identifies the wireless blocklist.
|
|
58
58
|
#
|
|
59
|
-
# @param
|
|
59
|
+
# @param name [String] The name of the Wireless Blocklist.
|
|
60
60
|
#
|
|
61
61
|
# @param values [Array<String>] Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
62
62
|
#
|
|
@@ -65,11 +65,11 @@ module Telnyx
|
|
|
65
65
|
# @return [Telnyx::Models::WirelessBlocklistUpdateResponse]
|
|
66
66
|
#
|
|
67
67
|
# @see Telnyx::Models::WirelessBlocklistUpdateParams
|
|
68
|
-
def update(params = {})
|
|
68
|
+
def update(id, params = {})
|
|
69
69
|
parsed, options = Telnyx::WirelessBlocklistUpdateParams.dump_request(params)
|
|
70
70
|
@client.request(
|
|
71
71
|
method: :patch,
|
|
72
|
-
path: "wireless_blocklists",
|
|
72
|
+
path: ["wireless_blocklists/%1$s", id],
|
|
73
73
|
body: parsed,
|
|
74
74
|
model: Telnyx::Models::WirelessBlocklistUpdateResponse,
|
|
75
75
|
options: options
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -1751,6 +1751,15 @@ require_relative "telnyx/models/private_wireless_gateway_list_params"
|
|
|
1751
1751
|
require_relative "telnyx/models/private_wireless_gateway_retrieve_params"
|
|
1752
1752
|
require_relative "telnyx/models/private_wireless_gateway_retrieve_response"
|
|
1753
1753
|
require_relative "telnyx/models/private_wireless_gateway_status"
|
|
1754
|
+
require_relative "telnyx/models/pronunciation_dict_create_params"
|
|
1755
|
+
require_relative "telnyx/models/pronunciation_dict_create_response"
|
|
1756
|
+
require_relative "telnyx/models/pronunciation_dict_delete_params"
|
|
1757
|
+
require_relative "telnyx/models/pronunciation_dict_list_params"
|
|
1758
|
+
require_relative "telnyx/models/pronunciation_dict_list_response"
|
|
1759
|
+
require_relative "telnyx/models/pronunciation_dict_retrieve_params"
|
|
1760
|
+
require_relative "telnyx/models/pronunciation_dict_retrieve_response"
|
|
1761
|
+
require_relative "telnyx/models/pronunciation_dict_update_params"
|
|
1762
|
+
require_relative "telnyx/models/pronunciation_dict_update_response"
|
|
1754
1763
|
require_relative "telnyx/models/public_internet_gateway_create_params"
|
|
1755
1764
|
require_relative "telnyx/models/public_internet_gateway_create_response"
|
|
1756
1765
|
require_relative "telnyx/models/public_internet_gateway_delete_params"
|
|
@@ -2145,6 +2154,8 @@ require_relative "telnyx/models/texml_application_retrieve_params"
|
|
|
2145
2154
|
require_relative "telnyx/models/texml_application_retrieve_response"
|
|
2146
2155
|
require_relative "telnyx/models/texml_application_update_params"
|
|
2147
2156
|
require_relative "telnyx/models/texml_application_update_response"
|
|
2157
|
+
require_relative "telnyx/models/texml_initiate_ai_call_params"
|
|
2158
|
+
require_relative "telnyx/models/texml_initiate_ai_call_response"
|
|
2148
2159
|
require_relative "telnyx/models/texml_secrets_params"
|
|
2149
2160
|
require_relative "telnyx/models/texml_secrets_response"
|
|
2150
2161
|
require_relative "telnyx/models/text_to_speech_generate_params"
|
|
@@ -2198,6 +2209,7 @@ require_relative "telnyx/models/verifications/verify_meta"
|
|
|
2198
2209
|
require_relative "telnyx/models/verification_trigger_call_params"
|
|
2199
2210
|
require_relative "telnyx/models/verification_trigger_flashcall_params"
|
|
2200
2211
|
require_relative "telnyx/models/verification_trigger_sms_params"
|
|
2212
|
+
require_relative "telnyx/models/verification_trigger_whatsapp_verification_params"
|
|
2201
2213
|
require_relative "telnyx/models/verified_number"
|
|
2202
2214
|
require_relative "telnyx/models/verified_number_create_params"
|
|
2203
2215
|
require_relative "telnyx/models/verified_number_create_response"
|
|
@@ -2577,6 +2589,7 @@ require_relative "telnyx/resources/portouts/events"
|
|
|
2577
2589
|
require_relative "telnyx/resources/portouts/reports"
|
|
2578
2590
|
require_relative "telnyx/resources/portouts/supporting_documents"
|
|
2579
2591
|
require_relative "telnyx/resources/private_wireless_gateways"
|
|
2592
|
+
require_relative "telnyx/resources/pronunciation_dicts"
|
|
2580
2593
|
require_relative "telnyx/resources/public_internet_gateways"
|
|
2581
2594
|
require_relative "telnyx/resources/queues"
|
|
2582
2595
|
require_relative "telnyx/resources/queues/calls"
|
data/rbi/telnyx/client.rbi
CHANGED
|
@@ -648,6 +648,12 @@ module Telnyx
|
|
|
648
648
|
sig { returns(Telnyx::Resources::TermsOfService) }
|
|
649
649
|
attr_reader :terms_of_service
|
|
650
650
|
|
|
651
|
+
# Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries
|
|
652
|
+
# contain alias items (text replacement) and phoneme items (IPA pronunciation
|
|
653
|
+
# notation) that control how specific words are spoken.
|
|
654
|
+
sig { returns(Telnyx::Resources::PronunciationDicts) }
|
|
655
|
+
attr_reader :pronunciation_dicts
|
|
656
|
+
|
|
651
657
|
# @api private
|
|
652
658
|
sig { override.returns(T::Hash[String, String]) }
|
|
653
659
|
private def auth_headers
|
|
@@ -148,12 +148,20 @@ module Telnyx
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -100,6 +100,21 @@ module Telnyx
|
|
|
100
100
|
end
|
|
101
101
|
attr_writer :messaging_settings
|
|
102
102
|
|
|
103
|
+
sig do
|
|
104
|
+
returns(
|
|
105
|
+
T.nilable(Telnyx::AI::AssistantCreateParams::ObservabilitySettings)
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
attr_reader :observability_settings
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
observability_settings:
|
|
113
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::OrHash
|
|
114
|
+
).void
|
|
115
|
+
end
|
|
116
|
+
attr_writer :observability_settings
|
|
117
|
+
|
|
103
118
|
sig { returns(T.nilable(Telnyx::AI::PrivacySettings)) }
|
|
104
119
|
attr_reader :privacy_settings
|
|
105
120
|
|
|
@@ -201,6 +216,8 @@ module Telnyx
|
|
|
201
216
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
202
217
|
llm_api_key_ref: String,
|
|
203
218
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
219
|
+
observability_settings:
|
|
220
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::OrHash,
|
|
204
221
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
205
222
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
206
223
|
tool_ids: T::Array[String],
|
|
@@ -258,6 +275,7 @@ module Telnyx
|
|
|
258
275
|
# work with this integration.
|
|
259
276
|
llm_api_key_ref: nil,
|
|
260
277
|
messaging_settings: nil,
|
|
278
|
+
observability_settings: nil,
|
|
261
279
|
privacy_settings: nil,
|
|
262
280
|
telephony_settings: nil,
|
|
263
281
|
tool_ids: nil,
|
|
@@ -286,6 +304,8 @@ module Telnyx
|
|
|
286
304
|
insight_settings: Telnyx::AI::InsightSettings,
|
|
287
305
|
llm_api_key_ref: String,
|
|
288
306
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
307
|
+
observability_settings:
|
|
308
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings,
|
|
289
309
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
290
310
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
291
311
|
tool_ids: T::Array[String],
|
|
@@ -313,6 +333,116 @@ module Telnyx
|
|
|
313
333
|
end
|
|
314
334
|
def to_hash
|
|
315
335
|
end
|
|
336
|
+
|
|
337
|
+
class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
|
|
338
|
+
OrHash =
|
|
339
|
+
T.type_alias do
|
|
340
|
+
T.any(
|
|
341
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings,
|
|
342
|
+
Telnyx::Internal::AnyHash
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
sig { returns(T.nilable(String)) }
|
|
347
|
+
attr_reader :host
|
|
348
|
+
|
|
349
|
+
sig { params(host: String).void }
|
|
350
|
+
attr_writer :host
|
|
351
|
+
|
|
352
|
+
sig { returns(T.nilable(String)) }
|
|
353
|
+
attr_reader :public_key_ref
|
|
354
|
+
|
|
355
|
+
sig { params(public_key_ref: String).void }
|
|
356
|
+
attr_writer :public_key_ref
|
|
357
|
+
|
|
358
|
+
sig { returns(T.nilable(String)) }
|
|
359
|
+
attr_reader :secret_key_ref
|
|
360
|
+
|
|
361
|
+
sig { params(secret_key_ref: String).void }
|
|
362
|
+
attr_writer :secret_key_ref
|
|
363
|
+
|
|
364
|
+
sig do
|
|
365
|
+
returns(
|
|
366
|
+
T.nilable(
|
|
367
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::OrSymbol
|
|
368
|
+
)
|
|
369
|
+
)
|
|
370
|
+
end
|
|
371
|
+
attr_reader :status
|
|
372
|
+
|
|
373
|
+
sig do
|
|
374
|
+
params(
|
|
375
|
+
status:
|
|
376
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::OrSymbol
|
|
377
|
+
).void
|
|
378
|
+
end
|
|
379
|
+
attr_writer :status
|
|
380
|
+
|
|
381
|
+
sig do
|
|
382
|
+
params(
|
|
383
|
+
host: String,
|
|
384
|
+
public_key_ref: String,
|
|
385
|
+
secret_key_ref: String,
|
|
386
|
+
status:
|
|
387
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::OrSymbol
|
|
388
|
+
).returns(T.attached_class)
|
|
389
|
+
end
|
|
390
|
+
def self.new(
|
|
391
|
+
host: nil,
|
|
392
|
+
public_key_ref: nil,
|
|
393
|
+
secret_key_ref: nil,
|
|
394
|
+
status: nil
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
sig do
|
|
399
|
+
override.returns(
|
|
400
|
+
{
|
|
401
|
+
host: String,
|
|
402
|
+
public_key_ref: String,
|
|
403
|
+
secret_key_ref: String,
|
|
404
|
+
status:
|
|
405
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::OrSymbol
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
end
|
|
409
|
+
def to_hash
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
module Status
|
|
413
|
+
extend Telnyx::Internal::Type::Enum
|
|
414
|
+
|
|
415
|
+
TaggedSymbol =
|
|
416
|
+
T.type_alias do
|
|
417
|
+
T.all(
|
|
418
|
+
Symbol,
|
|
419
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status
|
|
420
|
+
)
|
|
421
|
+
end
|
|
422
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
423
|
+
|
|
424
|
+
ENABLED =
|
|
425
|
+
T.let(
|
|
426
|
+
:enabled,
|
|
427
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::TaggedSymbol
|
|
428
|
+
)
|
|
429
|
+
DISABLED =
|
|
430
|
+
T.let(
|
|
431
|
+
:disabled,
|
|
432
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::TaggedSymbol
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
sig do
|
|
436
|
+
override.returns(
|
|
437
|
+
T::Array[
|
|
438
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status::TaggedSymbol
|
|
439
|
+
]
|
|
440
|
+
)
|
|
441
|
+
end
|
|
442
|
+
def self.values
|
|
443
|
+
end
|
|
444
|
+
end
|
|
445
|
+
end
|
|
316
446
|
end
|
|
317
447
|
end
|
|
318
448
|
end
|
|
@@ -1769,18 +1769,28 @@ module Telnyx
|
|
|
1769
1769
|
)
|
|
1770
1770
|
end
|
|
1771
1771
|
|
|
1772
|
-
sig { returns(
|
|
1773
|
-
|
|
1772
|
+
sig { returns(Telnyx::AI::AssistantTool::SendMessage::SendMessage) }
|
|
1773
|
+
attr_reader :send_message
|
|
1774
|
+
|
|
1775
|
+
sig do
|
|
1776
|
+
params(
|
|
1777
|
+
send_message:
|
|
1778
|
+
Telnyx::AI::AssistantTool::SendMessage::SendMessage::OrHash
|
|
1779
|
+
).void
|
|
1780
|
+
end
|
|
1781
|
+
attr_writer :send_message
|
|
1774
1782
|
|
|
1775
1783
|
sig { returns(Symbol) }
|
|
1776
1784
|
attr_accessor :type
|
|
1777
1785
|
|
|
1778
1786
|
# The send_message tool allows the assistant to send SMS or MMS messages to the
|
|
1779
1787
|
# end user. The 'to' and 'from' addresses are automatically determined from the
|
|
1780
|
-
# conversation context, and the message text is generated by the assistant
|
|
1788
|
+
# conversation context, and the message text is generated by the assistant unless
|
|
1789
|
+
# a message_template is provided for runtime variable substitution.
|
|
1781
1790
|
sig do
|
|
1782
1791
|
params(
|
|
1783
|
-
send_message:
|
|
1792
|
+
send_message:
|
|
1793
|
+
Telnyx::AI::AssistantTool::SendMessage::SendMessage::OrHash,
|
|
1784
1794
|
type: Symbol
|
|
1785
1795
|
).returns(T.attached_class)
|
|
1786
1796
|
end
|
|
@@ -1789,11 +1799,52 @@ module Telnyx
|
|
|
1789
1799
|
|
|
1790
1800
|
sig do
|
|
1791
1801
|
override.returns(
|
|
1792
|
-
{
|
|
1802
|
+
{
|
|
1803
|
+
send_message:
|
|
1804
|
+
Telnyx::AI::AssistantTool::SendMessage::SendMessage,
|
|
1805
|
+
type: Symbol
|
|
1806
|
+
}
|
|
1793
1807
|
)
|
|
1794
1808
|
end
|
|
1795
1809
|
def to_hash
|
|
1796
1810
|
end
|
|
1811
|
+
|
|
1812
|
+
class SendMessage < Telnyx::Internal::Type::BaseModel
|
|
1813
|
+
OrHash =
|
|
1814
|
+
T.type_alias do
|
|
1815
|
+
T.any(
|
|
1816
|
+
Telnyx::AI::AssistantTool::SendMessage::SendMessage,
|
|
1817
|
+
Telnyx::Internal::AnyHash
|
|
1818
|
+
)
|
|
1819
|
+
end
|
|
1820
|
+
|
|
1821
|
+
# Optional message template with dynamic variable support using mustache syntax
|
|
1822
|
+
# (e.g., {{variable_name}}). When set, the assistant will use this template for
|
|
1823
|
+
# the SMS body instead of generating one. Dynamic variables like
|
|
1824
|
+
# {{telnyx_end_user_target}}, {{telnyx_agent_target}}, and custom webhook-provided
|
|
1825
|
+
# variables will be resolved at runtime.
|
|
1826
|
+
sig { returns(T.nilable(String)) }
|
|
1827
|
+
attr_accessor :message_template
|
|
1828
|
+
|
|
1829
|
+
sig do
|
|
1830
|
+
params(message_template: T.nilable(String)).returns(
|
|
1831
|
+
T.attached_class
|
|
1832
|
+
)
|
|
1833
|
+
end
|
|
1834
|
+
def self.new(
|
|
1835
|
+
# Optional message template with dynamic variable support using mustache syntax
|
|
1836
|
+
# (e.g., {{variable_name}}). When set, the assistant will use this template for
|
|
1837
|
+
# the SMS body instead of generating one. Dynamic variables like
|
|
1838
|
+
# {{telnyx_end_user_target}}, {{telnyx_agent_target}}, and custom webhook-provided
|
|
1839
|
+
# variables will be resolved at runtime.
|
|
1840
|
+
message_template: nil
|
|
1841
|
+
)
|
|
1842
|
+
end
|
|
1843
|
+
|
|
1844
|
+
sig { override.returns({ message_template: T.nilable(String) }) }
|
|
1845
|
+
def to_hash
|
|
1846
|
+
end
|
|
1847
|
+
end
|
|
1797
1848
|
end
|
|
1798
1849
|
|
|
1799
1850
|
class SkipTurn < Telnyx::Internal::Type::BaseModel
|