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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +18 -4
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
  12. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  13. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  14. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  15. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  16. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  17. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  18. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  20. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  21. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  22. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  23. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  24. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  25. data/lib/telnyx/models/verification.rb +1 -0
  26. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  27. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  28. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  29. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  30. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  31. data/lib/telnyx/models.rb +15 -0
  32. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  33. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  34. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  35. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  36. data/lib/telnyx/resources/texml.rb +106 -0
  37. data/lib/telnyx/resources/verifications.rb +28 -0
  38. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  39. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  40. data/lib/telnyx/version.rb +1 -1
  41. data/lib/telnyx.rb +13 -0
  42. data/rbi/telnyx/client.rbi +6 -0
  43. data/rbi/telnyx/internal/util.rbi +8 -0
  44. data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
  45. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  46. data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
  47. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
  48. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  49. data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
  50. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  51. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  52. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  53. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  54. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  55. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  56. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  57. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  58. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  59. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  60. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  61. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  62. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  63. data/rbi/telnyx/models/verification.rbi +1 -0
  64. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  65. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  66. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  67. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  68. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  69. data/rbi/telnyx/models.rbi +19 -10
  70. data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
  71. data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
  72. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  73. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  74. data/rbi/telnyx/resources/texml.rbi +164 -0
  75. data/rbi/telnyx/resources/verifications.rbi +23 -0
  76. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  77. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  78. data/sig/telnyx/client.rbs +2 -0
  79. data/sig/telnyx/internal/util.rbs +4 -0
  80. data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
  81. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  82. data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
  83. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
  84. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  85. data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
  86. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  87. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  88. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  89. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  90. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  91. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  92. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  93. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  94. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  95. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  96. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  97. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  98. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  99. data/sig/telnyx/models/verification.rbs +2 -1
  100. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  101. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  102. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  103. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  104. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  105. data/sig/telnyx/models.rbs +14 -0
  106. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  107. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  108. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  109. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  110. data/sig/telnyx/resources/texml.rbs +44 -0
  111. data/sig/telnyx/resources/verifications.rbs +8 -0
  112. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  113. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  114. metadata +41 -2
@@ -0,0 +1,57 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class PronunciationDictListParams < Telnyx::Internal::Type::BaseModel
6
+ extend Telnyx::Internal::Type::RequestParameters::Converter
7
+ include Telnyx::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Telnyx::PronunciationDictListParams, Telnyx::Internal::AnyHash)
12
+ end
13
+
14
+ # Page number (1-based). Defaults to 1.
15
+ sig { returns(T.nilable(Integer)) }
16
+ attr_reader :page_number
17
+
18
+ sig { params(page_number: Integer).void }
19
+ attr_writer :page_number
20
+
21
+ # Number of results per page. Defaults to 20, maximum 250.
22
+ sig { returns(T.nilable(Integer)) }
23
+ attr_reader :page_size
24
+
25
+ sig { params(page_size: Integer).void }
26
+ attr_writer :page_size
27
+
28
+ sig do
29
+ params(
30
+ page_number: Integer,
31
+ page_size: Integer,
32
+ request_options: Telnyx::RequestOptions::OrHash
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ # Page number (1-based). Defaults to 1.
37
+ page_number: nil,
38
+ # Number of results per page. Defaults to 20, maximum 250.
39
+ page_size: nil,
40
+ request_options: {}
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ page_number: Integer,
48
+ page_size: Integer,
49
+ request_options: Telnyx::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,353 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class PronunciationDictListResponse < Telnyx::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Telnyx::Models::PronunciationDictListResponse,
10
+ Telnyx::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Unique identifier for the pronunciation dictionary.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :id
17
+
18
+ sig { params(id: String).void }
19
+ attr_writer :id
20
+
21
+ # ISO 8601 timestamp with millisecond precision.
22
+ sig { returns(T.nilable(Time)) }
23
+ attr_reader :created_at
24
+
25
+ sig { params(created_at: Time).void }
26
+ attr_writer :created_at
27
+
28
+ # List of pronunciation items (alias or phoneme type).
29
+ sig do
30
+ returns(
31
+ T.nilable(
32
+ T::Array[
33
+ Telnyx::Models::PronunciationDictListResponse::Item::Variants
34
+ ]
35
+ )
36
+ )
37
+ end
38
+ attr_reader :items
39
+
40
+ sig do
41
+ params(
42
+ items:
43
+ T::Array[
44
+ T.any(
45
+ Telnyx::Models::PronunciationDictListResponse::Item::Alias::OrHash,
46
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::OrHash
47
+ )
48
+ ]
49
+ ).void
50
+ end
51
+ attr_writer :items
52
+
53
+ # Human-readable name for the dictionary. Must be unique within the organization.
54
+ sig { returns(T.nilable(String)) }
55
+ attr_reader :name
56
+
57
+ sig { params(name: String).void }
58
+ attr_writer :name
59
+
60
+ # Identifies the resource type.
61
+ sig do
62
+ returns(
63
+ T.nilable(
64
+ Telnyx::Models::PronunciationDictListResponse::RecordType::TaggedSymbol
65
+ )
66
+ )
67
+ end
68
+ attr_reader :record_type
69
+
70
+ sig do
71
+ params(
72
+ record_type:
73
+ Telnyx::Models::PronunciationDictListResponse::RecordType::OrSymbol
74
+ ).void
75
+ end
76
+ attr_writer :record_type
77
+
78
+ # ISO 8601 timestamp with millisecond precision.
79
+ sig { returns(T.nilable(Time)) }
80
+ attr_reader :updated_at
81
+
82
+ sig { params(updated_at: Time).void }
83
+ attr_writer :updated_at
84
+
85
+ # Auto-incrementing version number. Increases by 1 on each update. Used for
86
+ # optimistic concurrency control and cache invalidation.
87
+ sig { returns(T.nilable(Integer)) }
88
+ attr_reader :version
89
+
90
+ sig { params(version: Integer).void }
91
+ attr_writer :version
92
+
93
+ # A pronunciation dictionary record.
94
+ sig do
95
+ params(
96
+ id: String,
97
+ created_at: Time,
98
+ items:
99
+ T::Array[
100
+ T.any(
101
+ Telnyx::Models::PronunciationDictListResponse::Item::Alias::OrHash,
102
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::OrHash
103
+ )
104
+ ],
105
+ name: String,
106
+ record_type:
107
+ Telnyx::Models::PronunciationDictListResponse::RecordType::OrSymbol,
108
+ updated_at: Time,
109
+ version: Integer
110
+ ).returns(T.attached_class)
111
+ end
112
+ def self.new(
113
+ # Unique identifier for the pronunciation dictionary.
114
+ id: nil,
115
+ # ISO 8601 timestamp with millisecond precision.
116
+ created_at: nil,
117
+ # List of pronunciation items (alias or phoneme type).
118
+ items: nil,
119
+ # Human-readable name for the dictionary. Must be unique within the organization.
120
+ name: nil,
121
+ # Identifies the resource type.
122
+ record_type: nil,
123
+ # ISO 8601 timestamp with millisecond precision.
124
+ updated_at: nil,
125
+ # Auto-incrementing version number. Increases by 1 on each update. Used for
126
+ # optimistic concurrency control and cache invalidation.
127
+ version: nil
128
+ )
129
+ end
130
+
131
+ sig do
132
+ override.returns(
133
+ {
134
+ id: String,
135
+ created_at: Time,
136
+ items:
137
+ T::Array[
138
+ Telnyx::Models::PronunciationDictListResponse::Item::Variants
139
+ ],
140
+ name: String,
141
+ record_type:
142
+ Telnyx::Models::PronunciationDictListResponse::RecordType::TaggedSymbol,
143
+ updated_at: Time,
144
+ version: Integer
145
+ }
146
+ )
147
+ end
148
+ def to_hash
149
+ end
150
+
151
+ # A single pronunciation dictionary item. Use type 'alias' to replace matched text
152
+ # with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
153
+ # notation.
154
+ module Item
155
+ extend Telnyx::Internal::Type::Union
156
+
157
+ Variants =
158
+ T.type_alias do
159
+ T.any(
160
+ Telnyx::Models::PronunciationDictListResponse::Item::Alias,
161
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme
162
+ )
163
+ end
164
+
165
+ class Alias < Telnyx::Internal::Type::BaseModel
166
+ OrHash =
167
+ T.type_alias do
168
+ T.any(
169
+ Telnyx::Models::PronunciationDictListResponse::Item::Alias,
170
+ Telnyx::Internal::AnyHash
171
+ )
172
+ end
173
+
174
+ # The replacement text that will be spoken instead.
175
+ sig { returns(String) }
176
+ attr_accessor :alias_
177
+
178
+ # The text to match in the input. Case-insensitive matching is used during
179
+ # synthesis.
180
+ sig { returns(String) }
181
+ attr_accessor :text
182
+
183
+ # The item type.
184
+ sig { returns(Symbol) }
185
+ attr_accessor :type
186
+
187
+ # An alias pronunciation item. When the `text` value is found in input, it is
188
+ # replaced with the `alias` before speech synthesis.
189
+ sig do
190
+ params(alias_: String, text: String, type: Symbol).returns(
191
+ T.attached_class
192
+ )
193
+ end
194
+ def self.new(
195
+ # The replacement text that will be spoken instead.
196
+ alias_:,
197
+ # The text to match in the input. Case-insensitive matching is used during
198
+ # synthesis.
199
+ text:,
200
+ # The item type.
201
+ type: :alias
202
+ )
203
+ end
204
+
205
+ sig do
206
+ override.returns({ alias_: String, text: String, type: Symbol })
207
+ end
208
+ def to_hash
209
+ end
210
+ end
211
+
212
+ class Phoneme < Telnyx::Internal::Type::BaseModel
213
+ OrHash =
214
+ T.type_alias do
215
+ T.any(
216
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme,
217
+ Telnyx::Internal::AnyHash
218
+ )
219
+ end
220
+
221
+ # The phonetic alphabet used for the phoneme notation.
222
+ sig do
223
+ returns(
224
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet::TaggedSymbol
225
+ )
226
+ end
227
+ attr_accessor :alphabet
228
+
229
+ # The phoneme notation representing the desired pronunciation.
230
+ sig { returns(String) }
231
+ attr_accessor :phoneme
232
+
233
+ # The text to match in the input. Case-insensitive matching is used during
234
+ # synthesis.
235
+ sig { returns(String) }
236
+ attr_accessor :text
237
+
238
+ # The item type.
239
+ sig { returns(Symbol) }
240
+ attr_accessor :type
241
+
242
+ # A phoneme pronunciation item. When the `text` value is found in input, it is
243
+ # pronounced using the specified IPA phoneme notation.
244
+ sig do
245
+ params(
246
+ alphabet:
247
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet::OrSymbol,
248
+ phoneme: String,
249
+ text: String,
250
+ type: Symbol
251
+ ).returns(T.attached_class)
252
+ end
253
+ def self.new(
254
+ # The phonetic alphabet used for the phoneme notation.
255
+ alphabet:,
256
+ # The phoneme notation representing the desired pronunciation.
257
+ phoneme:,
258
+ # The text to match in the input. Case-insensitive matching is used during
259
+ # synthesis.
260
+ text:,
261
+ # The item type.
262
+ type: :phoneme
263
+ )
264
+ end
265
+
266
+ sig do
267
+ override.returns(
268
+ {
269
+ alphabet:
270
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet::TaggedSymbol,
271
+ phoneme: String,
272
+ text: String,
273
+ type: Symbol
274
+ }
275
+ )
276
+ end
277
+ def to_hash
278
+ end
279
+
280
+ # The phonetic alphabet used for the phoneme notation.
281
+ module Alphabet
282
+ extend Telnyx::Internal::Type::Enum
283
+
284
+ TaggedSymbol =
285
+ T.type_alias do
286
+ T.all(
287
+ Symbol,
288
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet
289
+ )
290
+ end
291
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
292
+
293
+ IPA =
294
+ T.let(
295
+ :ipa,
296
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet::TaggedSymbol
297
+ )
298
+
299
+ sig do
300
+ override.returns(
301
+ T::Array[
302
+ Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet::TaggedSymbol
303
+ ]
304
+ )
305
+ end
306
+ def self.values
307
+ end
308
+ end
309
+ end
310
+
311
+ sig do
312
+ override.returns(
313
+ T::Array[
314
+ Telnyx::Models::PronunciationDictListResponse::Item::Variants
315
+ ]
316
+ )
317
+ end
318
+ def self.variants
319
+ end
320
+ end
321
+
322
+ # Identifies the resource type.
323
+ module RecordType
324
+ extend Telnyx::Internal::Type::Enum
325
+
326
+ TaggedSymbol =
327
+ T.type_alias do
328
+ T.all(
329
+ Symbol,
330
+ Telnyx::Models::PronunciationDictListResponse::RecordType
331
+ )
332
+ end
333
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
334
+
335
+ PRONUNCIATION_DICT =
336
+ T.let(
337
+ :pronunciation_dict,
338
+ Telnyx::Models::PronunciationDictListResponse::RecordType::TaggedSymbol
339
+ )
340
+
341
+ sig do
342
+ override.returns(
343
+ T::Array[
344
+ Telnyx::Models::PronunciationDictListResponse::RecordType::TaggedSymbol
345
+ ]
346
+ )
347
+ end
348
+ def self.values
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class PronunciationDictRetrieveParams < Telnyx::Internal::Type::BaseModel
6
+ extend Telnyx::Internal::Type::RequestParameters::Converter
7
+ include Telnyx::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Telnyx::PronunciationDictRetrieveParams,
13
+ Telnyx::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ sig do
21
+ params(
22
+ id: String,
23
+ request_options: Telnyx::RequestOptions::OrHash
24
+ ).returns(T.attached_class)
25
+ end
26
+ def self.new(id:, request_options: {})
27
+ end
28
+
29
+ sig do
30
+ override.returns(
31
+ { id: String, request_options: Telnyx::RequestOptions }
32
+ )
33
+ end
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end