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
|
@@ -52,7 +52,12 @@ module Telnyx
|
|
|
52
52
|
# @return [String, nil]
|
|
53
53
|
optional :webhook_url, String
|
|
54
54
|
|
|
55
|
-
# @!
|
|
55
|
+
# @!attribute whatsapp
|
|
56
|
+
#
|
|
57
|
+
# @return [Telnyx::Models::VerifyProfileUpdateParams::Whatsapp, nil]
|
|
58
|
+
optional :whatsapp, -> { Telnyx::VerifyProfileUpdateParams::Whatsapp }
|
|
59
|
+
|
|
60
|
+
# @!method initialize(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: {})
|
|
56
61
|
# @param verify_profile_id [String]
|
|
57
62
|
# @param call [Telnyx::Models::VerifyProfileUpdateParams::Call]
|
|
58
63
|
# @param flashcall [Telnyx::Models::VerifyProfileUpdateParams::Flashcall]
|
|
@@ -62,6 +67,7 @@ module Telnyx
|
|
|
62
67
|
# @param sms [Telnyx::Models::VerifyProfileUpdateParams::SMS]
|
|
63
68
|
# @param webhook_failover_url [String]
|
|
64
69
|
# @param webhook_url [String]
|
|
70
|
+
# @param whatsapp [Telnyx::Models::VerifyProfileUpdateParams::Whatsapp]
|
|
65
71
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
66
72
|
|
|
67
73
|
class Call < Telnyx::Internal::Type::BaseModel
|
|
@@ -272,6 +278,42 @@ module Telnyx
|
|
|
272
278
|
#
|
|
273
279
|
# @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
|
|
274
280
|
end
|
|
281
|
+
|
|
282
|
+
class Whatsapp < Telnyx::Internal::Type::BaseModel
|
|
283
|
+
# @!attribute app_name
|
|
284
|
+
# The name that identifies the application requesting 2fa in the verification
|
|
285
|
+
# message.
|
|
286
|
+
#
|
|
287
|
+
# @return [String, nil]
|
|
288
|
+
optional :app_name, String
|
|
289
|
+
|
|
290
|
+
# @!attribute default_verification_timeout_secs
|
|
291
|
+
# For every request that is initiated via this Verify profile, this sets the
|
|
292
|
+
# number of seconds before a verification request code expires. Once the
|
|
293
|
+
# verification request expires, the user cannot use the code to verify their
|
|
294
|
+
# identity.
|
|
295
|
+
#
|
|
296
|
+
# @return [Integer, nil]
|
|
297
|
+
optional :default_verification_timeout_secs, Integer
|
|
298
|
+
|
|
299
|
+
# @!attribute whitelisted_destinations
|
|
300
|
+
# Enabled country destinations to send verification codes. The elements in the
|
|
301
|
+
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
302
|
+
# destinations will be allowed.
|
|
303
|
+
#
|
|
304
|
+
# @return [Array<String>, nil]
|
|
305
|
+
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
306
|
+
|
|
307
|
+
# @!method initialize(app_name: nil, default_verification_timeout_secs: nil, whitelisted_destinations: nil)
|
|
308
|
+
# Some parameter documentations has been truncated, see
|
|
309
|
+
# {Telnyx::Models::VerifyProfileUpdateParams::Whatsapp} for more details.
|
|
310
|
+
#
|
|
311
|
+
# @param app_name [String] The name that identifies the application requesting 2fa in the verification mess
|
|
312
|
+
#
|
|
313
|
+
# @param default_verification_timeout_secs [Integer] For every request that is initiated via this Verify profile, this sets the numbe
|
|
314
|
+
#
|
|
315
|
+
# @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
|
|
316
|
+
end
|
|
275
317
|
end
|
|
276
318
|
end
|
|
277
319
|
end
|
|
@@ -49,6 +49,19 @@ module Telnyx
|
|
|
49
49
|
# @return [Telnyx::Models::WhatsappMedia, nil]
|
|
50
50
|
optional :sticker, -> { Telnyx::WhatsappMedia }
|
|
51
51
|
|
|
52
|
+
# @!attribute template
|
|
53
|
+
# Template message object. Provide either template_id or name + language to
|
|
54
|
+
# identify the template.
|
|
55
|
+
#
|
|
56
|
+
# @return [Telnyx::Models::WhatsappMessageContent::Template, nil]
|
|
57
|
+
optional :template, -> { Telnyx::WhatsappMessageContent::Template }
|
|
58
|
+
|
|
59
|
+
# @!attribute text
|
|
60
|
+
# Text message content. Can only be sent within a 24-hour customer service window.
|
|
61
|
+
#
|
|
62
|
+
# @return [Telnyx::Models::WhatsappMessageContent::Text, nil]
|
|
63
|
+
optional :text, -> { Telnyx::WhatsappMessageContent::Text }
|
|
64
|
+
|
|
52
65
|
# @!attribute type
|
|
53
66
|
#
|
|
54
67
|
# @return [Symbol, Telnyx::Models::WhatsappMessageContent::Type, nil]
|
|
@@ -59,7 +72,10 @@ module Telnyx
|
|
|
59
72
|
# @return [Telnyx::Models::WhatsappMedia, nil]
|
|
60
73
|
optional :video, -> { Telnyx::WhatsappMedia }
|
|
61
74
|
|
|
62
|
-
# @!method initialize(audio: nil, biz_opaque_callback_data: nil, contacts: nil, document: nil, image: nil, interactive: nil, location: nil, reaction: nil, sticker: nil, type: nil, video: nil)
|
|
75
|
+
# @!method initialize(audio: nil, biz_opaque_callback_data: nil, contacts: nil, document: nil, image: nil, interactive: nil, location: nil, reaction: nil, sticker: nil, template: nil, text: nil, type: nil, video: nil)
|
|
76
|
+
# Some parameter documentations has been truncated, see
|
|
77
|
+
# {Telnyx::Models::WhatsappMessageContent} for more details.
|
|
78
|
+
#
|
|
63
79
|
# @param audio [Telnyx::Models::WhatsappMedia]
|
|
64
80
|
#
|
|
65
81
|
# @param biz_opaque_callback_data [String] custom data to return with status update
|
|
@@ -78,10 +94,188 @@ module Telnyx
|
|
|
78
94
|
#
|
|
79
95
|
# @param sticker [Telnyx::Models::WhatsappMedia]
|
|
80
96
|
#
|
|
97
|
+
# @param template [Telnyx::Models::WhatsappMessageContent::Template] Template message object. Provide either template_id or name + language to identi
|
|
98
|
+
#
|
|
99
|
+
# @param text [Telnyx::Models::WhatsappMessageContent::Text] Text message content. Can only be sent within a 24-hour customer service window.
|
|
100
|
+
#
|
|
81
101
|
# @param type [Symbol, Telnyx::Models::WhatsappMessageContent::Type]
|
|
82
102
|
#
|
|
83
103
|
# @param video [Telnyx::Models::WhatsappMedia]
|
|
84
104
|
|
|
105
|
+
# @see Telnyx::Models::WhatsappMessageContent#template
|
|
106
|
+
class Template < Telnyx::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute components
|
|
108
|
+
# Template parameter values for header, body, and button components.
|
|
109
|
+
#
|
|
110
|
+
# @return [Array<Telnyx::Models::WhatsappMessageContent::Template::Component>, nil]
|
|
111
|
+
optional :components,
|
|
112
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::WhatsappMessageContent::Template::Component] }
|
|
113
|
+
|
|
114
|
+
# @!attribute language
|
|
115
|
+
# Template language. Required unless template_id is provided.
|
|
116
|
+
#
|
|
117
|
+
# @return [Telnyx::Models::WhatsappMessageContent::Template::Language, nil]
|
|
118
|
+
optional :language, -> { Telnyx::WhatsappMessageContent::Template::Language }
|
|
119
|
+
|
|
120
|
+
# @!attribute name
|
|
121
|
+
# Template name as registered with Meta. Required unless template_id is provided.
|
|
122
|
+
#
|
|
123
|
+
# @return [String, nil]
|
|
124
|
+
optional :name, String
|
|
125
|
+
|
|
126
|
+
# @!attribute template_id
|
|
127
|
+
# Telnyx template ID (the id field from template list/get responses). When
|
|
128
|
+
# provided, name and language are resolved automatically.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :template_id, String
|
|
132
|
+
|
|
133
|
+
# @!method initialize(components: nil, language: nil, name: nil, template_id: nil)
|
|
134
|
+
# Some parameter documentations has been truncated, see
|
|
135
|
+
# {Telnyx::Models::WhatsappMessageContent::Template} for more details.
|
|
136
|
+
#
|
|
137
|
+
# Template message object. Provide either template_id or name + language to
|
|
138
|
+
# identify the template.
|
|
139
|
+
#
|
|
140
|
+
# @param components [Array<Telnyx::Models::WhatsappMessageContent::Template::Component>] Template parameter values for header, body, and button components.
|
|
141
|
+
#
|
|
142
|
+
# @param language [Telnyx::Models::WhatsappMessageContent::Template::Language] Template language. Required unless template_id is provided.
|
|
143
|
+
#
|
|
144
|
+
# @param name [String] Template name as registered with Meta. Required unless template_id is provided.
|
|
145
|
+
#
|
|
146
|
+
# @param template_id [String] Telnyx template ID (the id field from template list/get responses). When provide
|
|
147
|
+
|
|
148
|
+
class Component < Telnyx::Internal::Type::BaseModel
|
|
149
|
+
# @!attribute index
|
|
150
|
+
# Button index (required for button components)
|
|
151
|
+
#
|
|
152
|
+
# @return [Integer, nil]
|
|
153
|
+
optional :index, Integer
|
|
154
|
+
|
|
155
|
+
# @!attribute parameters
|
|
156
|
+
#
|
|
157
|
+
# @return [Array<Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter>, nil]
|
|
158
|
+
optional :parameters,
|
|
159
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::WhatsappMessageContent::Template::Component::Parameter] }
|
|
160
|
+
|
|
161
|
+
# @!attribute sub_type
|
|
162
|
+
#
|
|
163
|
+
# @return [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::SubType, nil]
|
|
164
|
+
optional :sub_type, enum: -> { Telnyx::WhatsappMessageContent::Template::Component::SubType }
|
|
165
|
+
|
|
166
|
+
# @!attribute type
|
|
167
|
+
#
|
|
168
|
+
# @return [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Type, nil]
|
|
169
|
+
optional :type, enum: -> { Telnyx::WhatsappMessageContent::Template::Component::Type }
|
|
170
|
+
|
|
171
|
+
# @!method initialize(index: nil, parameters: nil, sub_type: nil, type: nil)
|
|
172
|
+
# @param index [Integer] Button index (required for button components)
|
|
173
|
+
#
|
|
174
|
+
# @param parameters [Array<Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter>]
|
|
175
|
+
#
|
|
176
|
+
# @param sub_type [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::SubType]
|
|
177
|
+
#
|
|
178
|
+
# @param type [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Type]
|
|
179
|
+
|
|
180
|
+
class Parameter < Telnyx::Internal::Type::BaseModel
|
|
181
|
+
# @!attribute text
|
|
182
|
+
#
|
|
183
|
+
# @return [String, nil]
|
|
184
|
+
optional :text, String
|
|
185
|
+
|
|
186
|
+
# @!attribute type
|
|
187
|
+
#
|
|
188
|
+
# @return [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter::Type, nil]
|
|
189
|
+
optional :type, enum: -> { Telnyx::WhatsappMessageContent::Template::Component::Parameter::Type }
|
|
190
|
+
|
|
191
|
+
# @!method initialize(text: nil, type: nil)
|
|
192
|
+
# @param text [String]
|
|
193
|
+
# @param type [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter::Type]
|
|
194
|
+
|
|
195
|
+
# @see Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter#type
|
|
196
|
+
module Type
|
|
197
|
+
extend Telnyx::Internal::Type::Enum
|
|
198
|
+
|
|
199
|
+
TEXT = :text
|
|
200
|
+
IMAGE = :image
|
|
201
|
+
VIDEO = :video
|
|
202
|
+
DOCUMENT = :document
|
|
203
|
+
CURRENCY = :currency
|
|
204
|
+
DATE_TIME = :date_time
|
|
205
|
+
|
|
206
|
+
# @!method self.values
|
|
207
|
+
# @return [Array<Symbol>]
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# @see Telnyx::Models::WhatsappMessageContent::Template::Component#sub_type
|
|
212
|
+
module SubType
|
|
213
|
+
extend Telnyx::Internal::Type::Enum
|
|
214
|
+
|
|
215
|
+
QUICK_REPLY = :quick_reply
|
|
216
|
+
URL = :url
|
|
217
|
+
|
|
218
|
+
# @!method self.values
|
|
219
|
+
# @return [Array<Symbol>]
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# @see Telnyx::Models::WhatsappMessageContent::Template::Component#type
|
|
223
|
+
module Type
|
|
224
|
+
extend Telnyx::Internal::Type::Enum
|
|
225
|
+
|
|
226
|
+
HEADER = :header
|
|
227
|
+
BODY = :body
|
|
228
|
+
BUTTON = :button
|
|
229
|
+
|
|
230
|
+
# @!method self.values
|
|
231
|
+
# @return [Array<Symbol>]
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# @see Telnyx::Models::WhatsappMessageContent::Template#language
|
|
236
|
+
class Language < Telnyx::Internal::Type::BaseModel
|
|
237
|
+
# @!attribute code
|
|
238
|
+
# Language code (e.g. en_US)
|
|
239
|
+
#
|
|
240
|
+
# @return [String]
|
|
241
|
+
required :code, String
|
|
242
|
+
|
|
243
|
+
# @!attribute policy
|
|
244
|
+
#
|
|
245
|
+
# @return [String, nil]
|
|
246
|
+
optional :policy, String
|
|
247
|
+
|
|
248
|
+
# @!method initialize(code:, policy: nil)
|
|
249
|
+
# Template language. Required unless template_id is provided.
|
|
250
|
+
#
|
|
251
|
+
# @param code [String] Language code (e.g. en_US)
|
|
252
|
+
#
|
|
253
|
+
# @param policy [String]
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# @see Telnyx::Models::WhatsappMessageContent#text
|
|
258
|
+
class Text < Telnyx::Internal::Type::BaseModel
|
|
259
|
+
# @!attribute body
|
|
260
|
+
# The text message body.
|
|
261
|
+
#
|
|
262
|
+
# @return [String]
|
|
263
|
+
required :body, String
|
|
264
|
+
|
|
265
|
+
# @!attribute preview_url
|
|
266
|
+
# Whether to show a URL preview in the message.
|
|
267
|
+
#
|
|
268
|
+
# @return [Boolean, nil]
|
|
269
|
+
optional :preview_url, Telnyx::Internal::Type::Boolean
|
|
270
|
+
|
|
271
|
+
# @!method initialize(body:, preview_url: nil)
|
|
272
|
+
# Text message content. Can only be sent within a 24-hour customer service window.
|
|
273
|
+
#
|
|
274
|
+
# @param body [String] The text message body.
|
|
275
|
+
#
|
|
276
|
+
# @param preview_url [Boolean] Whether to show a URL preview in the message.
|
|
277
|
+
end
|
|
278
|
+
|
|
85
279
|
# @see Telnyx::Models::WhatsappMessageContent#type
|
|
86
280
|
module Type
|
|
87
281
|
extend Telnyx::Internal::Type::Enum
|
|
@@ -96,6 +290,7 @@ module Telnyx
|
|
|
96
290
|
TEMPLATE = :template
|
|
97
291
|
REACTION = :reaction
|
|
98
292
|
CONTACTS = :contacts
|
|
293
|
+
TEXT = :text
|
|
99
294
|
|
|
100
295
|
# @!method self.values
|
|
101
296
|
# @return [Array<Symbol>]
|
|
@@ -7,44 +7,31 @@ module Telnyx
|
|
|
7
7
|
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Telnyx::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute name
|
|
11
16
|
# The name of the Wireless Blocklist.
|
|
12
17
|
#
|
|
13
18
|
# @return [String, nil]
|
|
14
19
|
optional :name, String
|
|
15
20
|
|
|
16
|
-
# @!attribute type
|
|
17
|
-
# The type of wireless blocklist.
|
|
18
|
-
#
|
|
19
|
-
# @return [Symbol, Telnyx::Models::WirelessBlocklistUpdateParams::Type, nil]
|
|
20
|
-
optional :type, enum: -> { Telnyx::WirelessBlocklistUpdateParams::Type }
|
|
21
|
-
|
|
22
21
|
# @!attribute values
|
|
23
22
|
# Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
24
23
|
#
|
|
25
24
|
# @return [Array<String>, nil]
|
|
26
25
|
optional :values, Telnyx::Internal::Type::ArrayOf[String]
|
|
27
26
|
|
|
28
|
-
# @!method initialize(name: nil,
|
|
29
|
-
# @param
|
|
27
|
+
# @!method initialize(id:, name: nil, values: nil, request_options: {})
|
|
28
|
+
# @param id [String]
|
|
30
29
|
#
|
|
31
|
-
# @param
|
|
30
|
+
# @param name [String] The name of the Wireless Blocklist.
|
|
32
31
|
#
|
|
33
32
|
# @param values [Array<String>] Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
34
33
|
#
|
|
35
34
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
-
|
|
37
|
-
# The type of wireless blocklist.
|
|
38
|
-
module Type
|
|
39
|
-
extend Telnyx::Internal::Type::Enum
|
|
40
|
-
|
|
41
|
-
COUNTRY = :country
|
|
42
|
-
MCC = :mcc
|
|
43
|
-
PLMN = :plmn
|
|
44
|
-
|
|
45
|
-
# @!method self.values
|
|
46
|
-
# @return [Array<Symbol>]
|
|
47
|
-
end
|
|
48
35
|
end
|
|
49
36
|
end
|
|
50
37
|
end
|
data/lib/telnyx/models.rb
CHANGED
|
@@ -1239,6 +1239,16 @@ module Telnyx
|
|
|
1239
1239
|
|
|
1240
1240
|
PrivateWirelessGatewayStatus = Telnyx::Models::PrivateWirelessGatewayStatus
|
|
1241
1241
|
|
|
1242
|
+
PronunciationDictCreateParams = Telnyx::Models::PronunciationDictCreateParams
|
|
1243
|
+
|
|
1244
|
+
PronunciationDictDeleteParams = Telnyx::Models::PronunciationDictDeleteParams
|
|
1245
|
+
|
|
1246
|
+
PronunciationDictListParams = Telnyx::Models::PronunciationDictListParams
|
|
1247
|
+
|
|
1248
|
+
PronunciationDictRetrieveParams = Telnyx::Models::PronunciationDictRetrieveParams
|
|
1249
|
+
|
|
1250
|
+
PronunciationDictUpdateParams = Telnyx::Models::PronunciationDictUpdateParams
|
|
1251
|
+
|
|
1242
1252
|
PublicInternetGatewayCreateParams = Telnyx::Models::PublicInternetGatewayCreateParams
|
|
1243
1253
|
|
|
1244
1254
|
PublicInternetGatewayDeleteParams = Telnyx::Models::PublicInternetGatewayDeleteParams
|
|
@@ -1554,6 +1564,8 @@ module Telnyx
|
|
|
1554
1564
|
|
|
1555
1565
|
TexmlApplicationUpdateParams = Telnyx::Models::TexmlApplicationUpdateParams
|
|
1556
1566
|
|
|
1567
|
+
TexmlInitiateAICallParams = Telnyx::Models::TexmlInitiateAICallParams
|
|
1568
|
+
|
|
1557
1569
|
TexmlSecretsParams = Telnyx::Models::TexmlSecretsParams
|
|
1558
1570
|
|
|
1559
1571
|
TextToSpeechGenerateParams = Telnyx::Models::TextToSpeechGenerateParams
|
|
@@ -1622,6 +1634,9 @@ module Telnyx
|
|
|
1622
1634
|
|
|
1623
1635
|
VerificationTriggerSMSParams = Telnyx::Models::VerificationTriggerSMSParams
|
|
1624
1636
|
|
|
1637
|
+
VerificationTriggerWhatsappVerificationParams =
|
|
1638
|
+
Telnyx::Models::VerificationTriggerWhatsappVerificationParams
|
|
1639
|
+
|
|
1625
1640
|
VerifiedNumber = Telnyx::Models::VerifiedNumber
|
|
1626
1641
|
|
|
1627
1642
|
VerifiedNumberCreateParams = Telnyx::Models::VerifiedNumberCreateParams
|
|
@@ -43,7 +43,7 @@ module Telnyx
|
|
|
43
43
|
# Updates the configuration of a specific assistant version. Can not update main
|
|
44
44
|
# version
|
|
45
45
|
#
|
|
46
|
-
# @overload update(version_id, assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
46
|
+
# @overload update(version_id, assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
47
47
|
#
|
|
48
48
|
# @param version_id [String] Path param
|
|
49
49
|
#
|
|
@@ -71,6 +71,8 @@ module Telnyx
|
|
|
71
71
|
#
|
|
72
72
|
# @param name [String] Body param
|
|
73
73
|
#
|
|
74
|
+
# @param observability_settings [Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings] Body param
|
|
75
|
+
#
|
|
74
76
|
# @param privacy_settings [Telnyx::Models::AI::PrivacySettings] Body param
|
|
75
77
|
#
|
|
76
78
|
# @param telephony_settings [Telnyx::Models::AI::TelephonySettings] Body param
|
|
@@ -34,7 +34,7 @@ module Telnyx
|
|
|
34
34
|
#
|
|
35
35
|
# Create a new AI Assistant.
|
|
36
36
|
#
|
|
37
|
-
# @overload create(instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
37
|
+
# @overload create(instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, observability_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
38
38
|
#
|
|
39
39
|
# @param instructions [String] System instructions for the assistant. These may be templated with [dynamic vari
|
|
40
40
|
#
|
|
@@ -58,6 +58,8 @@ module Telnyx
|
|
|
58
58
|
#
|
|
59
59
|
# @param messaging_settings [Telnyx::Models::AI::MessagingSettings]
|
|
60
60
|
#
|
|
61
|
+
# @param observability_settings [Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings]
|
|
62
|
+
#
|
|
61
63
|
# @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
|
|
62
64
|
#
|
|
63
65
|
# @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
|
|
@@ -119,7 +121,7 @@ module Telnyx
|
|
|
119
121
|
#
|
|
120
122
|
# Update an AI Assistant's attributes.
|
|
121
123
|
#
|
|
122
|
-
# @overload update(assistant_id, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, privacy_settings: nil, promote_to_main: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
124
|
+
# @overload update(assistant_id, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, privacy_settings: nil, promote_to_main: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
123
125
|
#
|
|
124
126
|
# @param assistant_id [String]
|
|
125
127
|
#
|
|
@@ -145,6 +147,8 @@ module Telnyx
|
|
|
145
147
|
#
|
|
146
148
|
# @param name [String]
|
|
147
149
|
#
|
|
150
|
+
# @param observability_settings [Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings]
|
|
151
|
+
#
|
|
148
152
|
# @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
|
|
149
153
|
#
|
|
150
154
|
# @param promote_to_main [Boolean] Indicates whether the assistant should be promoted to the main version. Defaults
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries
|
|
6
|
+
# contain alias items (text replacement) and phoneme items (IPA pronunciation
|
|
7
|
+
# notation) that control how specific words are spoken.
|
|
8
|
+
class PronunciationDicts
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {Telnyx::Models::PronunciationDictCreateParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Create a new pronunciation dictionary for the authenticated organization. Each
|
|
13
|
+
# dictionary contains a list of items that control how specific words are spoken.
|
|
14
|
+
# Items can be alias type (text replacement) or phoneme type (IPA pronunciation
|
|
15
|
+
# notation).
|
|
16
|
+
#
|
|
17
|
+
# As an alternative to providing items directly as JSON, you can upload a
|
|
18
|
+
# dictionary file (PLS/XML or plain text format, max 1MB) using
|
|
19
|
+
# multipart/form-data. PLS files use the standard W3C Pronunciation Lexicon
|
|
20
|
+
# Specification XML format. Text files use a line-based format: `word=alias` for
|
|
21
|
+
# aliases, `word:/phoneme/` for IPA phonemes.
|
|
22
|
+
#
|
|
23
|
+
# Limits:
|
|
24
|
+
#
|
|
25
|
+
# - Maximum 50 dictionaries per organization
|
|
26
|
+
# - Maximum 100 items per dictionary
|
|
27
|
+
# - Text: max 200 characters
|
|
28
|
+
# - Alias/phoneme value: max 500 characters
|
|
29
|
+
# - File upload: max 1MB (1,048,576 bytes)
|
|
30
|
+
#
|
|
31
|
+
# @overload create(items:, name:, request_options: {})
|
|
32
|
+
#
|
|
33
|
+
# @param items [Array<Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme>] List of pronunciation items (alias or phoneme type). At least one item is requir
|
|
34
|
+
#
|
|
35
|
+
# @param name [String] Human-readable name. Must be unique within the organization.
|
|
36
|
+
#
|
|
37
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
38
|
+
#
|
|
39
|
+
# @return [Telnyx::Models::PronunciationDictCreateResponse]
|
|
40
|
+
#
|
|
41
|
+
# @see Telnyx::Models::PronunciationDictCreateParams
|
|
42
|
+
def create(params)
|
|
43
|
+
parsed, options = Telnyx::PronunciationDictCreateParams.dump_request(params)
|
|
44
|
+
@client.request(
|
|
45
|
+
method: :post,
|
|
46
|
+
path: "pronunciation_dicts",
|
|
47
|
+
body: parsed,
|
|
48
|
+
model: Telnyx::Models::PronunciationDictCreateResponse,
|
|
49
|
+
options: options
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Retrieve a single pronunciation dictionary by ID.
|
|
54
|
+
#
|
|
55
|
+
# @overload retrieve(id, request_options: {})
|
|
56
|
+
#
|
|
57
|
+
# @param id [String] The UUID of the pronunciation dictionary.
|
|
58
|
+
#
|
|
59
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
60
|
+
#
|
|
61
|
+
# @return [Telnyx::Models::PronunciationDictRetrieveResponse]
|
|
62
|
+
#
|
|
63
|
+
# @see Telnyx::Models::PronunciationDictRetrieveParams
|
|
64
|
+
def retrieve(id, params = {})
|
|
65
|
+
@client.request(
|
|
66
|
+
method: :get,
|
|
67
|
+
path: ["pronunciation_dicts/%1$s", id],
|
|
68
|
+
model: Telnyx::Models::PronunciationDictRetrieveResponse,
|
|
69
|
+
options: params[:request_options]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Update the name and/or items of an existing pronunciation dictionary. Uses
|
|
74
|
+
# optimistic locking — if the dictionary was modified concurrently, the request
|
|
75
|
+
# returns 409 Conflict.
|
|
76
|
+
#
|
|
77
|
+
# @overload update(id, items: nil, name: nil, request_options: {})
|
|
78
|
+
#
|
|
79
|
+
# @param id [String] The UUID of the pronunciation dictionary.
|
|
80
|
+
#
|
|
81
|
+
# @param items [Array<Telnyx::Models::PronunciationDictUpdateParams::Item::Alias, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme>] Updated list of pronunciation items (alias or phoneme type).
|
|
82
|
+
#
|
|
83
|
+
# @param name [String] Updated dictionary name.
|
|
84
|
+
#
|
|
85
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
86
|
+
#
|
|
87
|
+
# @return [Telnyx::Models::PronunciationDictUpdateResponse]
|
|
88
|
+
#
|
|
89
|
+
# @see Telnyx::Models::PronunciationDictUpdateParams
|
|
90
|
+
def update(id, params = {})
|
|
91
|
+
parsed, options = Telnyx::PronunciationDictUpdateParams.dump_request(params)
|
|
92
|
+
@client.request(
|
|
93
|
+
method: :patch,
|
|
94
|
+
path: ["pronunciation_dicts/%1$s", id],
|
|
95
|
+
body: parsed,
|
|
96
|
+
model: Telnyx::Models::PronunciationDictUpdateResponse,
|
|
97
|
+
options: options
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List all pronunciation dictionaries for the authenticated organization. Results
|
|
102
|
+
# are paginated using offset-based pagination.
|
|
103
|
+
#
|
|
104
|
+
# @overload list(page_number: nil, page_size: nil, request_options: {})
|
|
105
|
+
#
|
|
106
|
+
# @param page_number [Integer] Page number (1-based). Defaults to 1.
|
|
107
|
+
#
|
|
108
|
+
# @param page_size [Integer] Number of results per page. Defaults to 20, maximum 250.
|
|
109
|
+
#
|
|
110
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
111
|
+
#
|
|
112
|
+
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PronunciationDictListResponse>]
|
|
113
|
+
#
|
|
114
|
+
# @see Telnyx::Models::PronunciationDictListParams
|
|
115
|
+
def list(params = {})
|
|
116
|
+
parsed, options = Telnyx::PronunciationDictListParams.dump_request(params)
|
|
117
|
+
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
118
|
+
@client.request(
|
|
119
|
+
method: :get,
|
|
120
|
+
path: "pronunciation_dicts",
|
|
121
|
+
query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
|
|
122
|
+
page: Telnyx::Internal::DefaultFlatPagination,
|
|
123
|
+
model: Telnyx::Models::PronunciationDictListResponse,
|
|
124
|
+
options: options
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Permanently delete a pronunciation dictionary.
|
|
129
|
+
#
|
|
130
|
+
# @overload delete(id, request_options: {})
|
|
131
|
+
#
|
|
132
|
+
# @param id [String] The UUID of the pronunciation dictionary.
|
|
133
|
+
#
|
|
134
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
135
|
+
#
|
|
136
|
+
# @return [nil]
|
|
137
|
+
#
|
|
138
|
+
# @see Telnyx::Models::PronunciationDictDeleteParams
|
|
139
|
+
def delete(id, params = {})
|
|
140
|
+
@client.request(
|
|
141
|
+
method: :delete,
|
|
142
|
+
path: ["pronunciation_dicts/%1$s", id],
|
|
143
|
+
model: NilClass,
|
|
144
|
+
options: params[:request_options]
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @api private
|
|
149
|
+
#
|
|
150
|
+
# @param client [Telnyx::Client]
|
|
151
|
+
def initialize(client:)
|
|
152
|
+
@client = client
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|