telnyx 5.68.2 → 5.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +21 -5
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +8 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +8 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +8 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/conversation_add_message_params.rb +4 -4
  12. data/lib/telnyx/models/ai/inference_embedding.rb +8 -1
  13. data/lib/telnyx/models/ai/observability.rb +46 -0
  14. data/lib/telnyx/models/ai/observability_req.rb +46 -0
  15. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  16. data/lib/telnyx/models/call_dial_params.rb +24 -1
  17. data/lib/telnyx/models/calls/action_transfer_params.rb +24 -1
  18. data/lib/telnyx/models/enterprise_create_params.rb +1 -1
  19. data/lib/telnyx/models/enterprise_public.rb +1 -1
  20. data/lib/telnyx/models/enterprise_update_params.rb +1 -1
  21. data/lib/telnyx/models/enterprises/reputation/{number_create_params.rb → number_associate_params.rb} +2 -2
  22. data/lib/telnyx/models/enterprises/reputation/{number_create_response.rb → number_associate_response.rb} +5 -5
  23. data/lib/telnyx/models/enterprises/reputation/{number_delete_params.rb → number_disassociate_params.rb} +2 -2
  24. data/lib/telnyx/models/enterprises/{reputation_list_params.rb → reputation_disable_params.rb} +2 -2
  25. data/lib/telnyx/models/enterprises/{reputation_create_params.rb → reputation_enable_params.rb} +6 -6
  26. data/lib/telnyx/models/enterprises/{reputation_create_response.rb → reputation_enable_response.rb} +2 -2
  27. data/lib/telnyx/models/enterprises/{reputation_delete_all_params.rb → reputation_retrieve_params.rb} +2 -2
  28. data/lib/telnyx/models/enterprises/{reputation_list_response.rb → reputation_retrieve_response.rb} +2 -2
  29. data/lib/telnyx/models/porting_orders/phone_number_block_list_params.rb +9 -9
  30. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  31. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  32. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  33. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  34. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  35. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  36. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  37. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  38. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  39. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  40. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  41. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  42. data/lib/telnyx/models/verification.rb +1 -0
  43. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  44. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  45. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  46. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +364 -71
  47. data/lib/telnyx/models/voice_clone_create_params.rb +161 -51
  48. data/lib/telnyx/models/voice_clone_data.rb +51 -4
  49. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  50. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  51. data/lib/telnyx/models.rb +15 -0
  52. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  53. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  54. data/lib/telnyx/resources/calls/actions.rb +3 -1
  55. data/lib/telnyx/resources/calls.rb +3 -1
  56. data/lib/telnyx/resources/enterprises/reputation/numbers.rb +42 -42
  57. data/lib/telnyx/resources/enterprises/reputation.rb +61 -61
  58. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  59. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  60. data/lib/telnyx/resources/texml.rb +106 -0
  61. data/lib/telnyx/resources/verifications.rb +28 -0
  62. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  63. data/lib/telnyx/resources/voice_clones.rb +7 -27
  64. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  65. data/lib/telnyx/version.rb +1 -1
  66. data/lib/telnyx.rb +23 -8
  67. data/rbi/telnyx/client.rbi +6 -0
  68. data/rbi/telnyx/internal/util.rbi +8 -0
  69. data/rbi/telnyx/models/ai/assistant_create_params.rbi +13 -0
  70. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  71. data/rbi/telnyx/models/ai/assistant_update_params.rbi +13 -0
  72. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +13 -0
  73. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  74. data/rbi/telnyx/models/ai/conversation_add_message_params.rbi +5 -5
  75. data/rbi/telnyx/models/ai/inference_embedding.rbi +11 -0
  76. data/rbi/telnyx/models/ai/observability.rbi +90 -0
  77. data/rbi/telnyx/models/ai/observability_req.rbi +92 -0
  78. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  79. data/rbi/telnyx/models/call_dial_params.rbi +37 -0
  80. data/rbi/telnyx/models/calls/action_transfer_params.rbi +57 -0
  81. data/rbi/telnyx/models/enterprise_create_params.rbi +1 -1
  82. data/rbi/telnyx/models/enterprise_public.rbi +1 -1
  83. data/rbi/telnyx/models/enterprise_update_params.rbi +1 -1
  84. data/rbi/telnyx/models/enterprises/reputation/{number_create_params.rbi → number_associate_params.rbi} +2 -2
  85. data/rbi/telnyx/models/enterprises/reputation/{number_create_response.rbi → number_associate_response.rbi} +7 -7
  86. data/rbi/telnyx/models/enterprises/reputation/{number_delete_params.rbi → number_disassociate_params.rbi} +2 -2
  87. data/rbi/telnyx/models/enterprises/{reputation_list_params.rbi → reputation_disable_params.rbi} +2 -2
  88. data/rbi/telnyx/models/enterprises/{reputation_create_params.rbi → reputation_enable_params.rbi} +14 -14
  89. data/rbi/telnyx/models/enterprises/{reputation_create_response.rbi → reputation_enable_response.rbi} +2 -2
  90. data/rbi/telnyx/models/enterprises/{reputation_delete_all_params.rbi → reputation_retrieve_params.rbi} +2 -2
  91. data/rbi/telnyx/models/enterprises/{reputation_list_response.rbi → reputation_retrieve_response.rbi} +2 -2
  92. data/rbi/telnyx/models/porting_orders/phone_number_block_list_params.rbi +34 -34
  93. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  94. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  95. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  96. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  97. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  98. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  99. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  100. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  101. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  102. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  103. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  104. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  105. data/rbi/telnyx/models/verification.rbi +1 -0
  106. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  107. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  108. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  109. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +711 -136
  110. data/rbi/telnyx/models/voice_clone_create_params.rbi +345 -79
  111. data/rbi/telnyx/models/voice_clone_data.rbi +77 -4
  112. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  113. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  114. data/rbi/telnyx/models.rbi +19 -10
  115. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -0
  116. data/rbi/telnyx/resources/ai/assistants.rbi +4 -0
  117. data/rbi/telnyx/resources/calls/actions.rbi +5 -0
  118. data/rbi/telnyx/resources/calls.rbi +5 -0
  119. data/rbi/telnyx/resources/enterprises/reputation/numbers.rbi +34 -34
  120. data/rbi/telnyx/resources/enterprises/reputation.rbi +44 -44
  121. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  122. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  123. data/rbi/telnyx/resources/texml.rbi +164 -0
  124. data/rbi/telnyx/resources/verifications.rbi +23 -0
  125. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  126. data/rbi/telnyx/resources/voice_clones.rbi +17 -41
  127. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  128. data/sig/telnyx/client.rbs +2 -0
  129. data/sig/telnyx/internal/util.rbs +4 -0
  130. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  131. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  132. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  133. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  134. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  135. data/sig/telnyx/models/ai/conversation_add_message_params.rbs +5 -5
  136. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  137. data/sig/telnyx/models/ai/observability.rbs +58 -0
  138. data/sig/telnyx/models/ai/observability_req.rbs +58 -0
  139. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  140. data/sig/telnyx/models/call_dial_params.rbs +20 -0
  141. data/sig/telnyx/models/calls/action_transfer_params.rbs +20 -0
  142. data/sig/telnyx/models/enterprise_create_params.rbs +1 -1
  143. data/sig/telnyx/models/enterprise_public.rbs +1 -1
  144. data/sig/telnyx/models/enterprise_update_params.rbs +1 -1
  145. data/sig/telnyx/models/enterprises/reputation/{number_create_params.rbs → number_associate_params.rbs} +2 -2
  146. data/sig/telnyx/models/enterprises/reputation/{number_create_response.rbs → number_associate_response.rbs} +8 -8
  147. data/sig/telnyx/models/enterprises/reputation/{number_delete_params.rbs → number_disassociate_params.rbs} +2 -2
  148. data/sig/telnyx/models/enterprises/{reputation_list_params.rbs → reputation_disable_params.rbs} +2 -2
  149. data/sig/telnyx/models/enterprises/{reputation_create_params.rbs → reputation_enable_params.rbs} +9 -9
  150. data/sig/telnyx/models/enterprises/{reputation_create_response.rbs → reputation_enable_response.rbs} +2 -2
  151. data/sig/telnyx/models/enterprises/{reputation_delete_all_params.rbs → reputation_retrieve_params.rbs} +2 -2
  152. data/sig/telnyx/models/enterprises/{reputation_list_response.rbs → reputation_retrieve_response.rbs} +2 -2
  153. data/sig/telnyx/models/porting_orders/phone_number_block_list_params.rbs +9 -9
  154. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  155. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  156. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  157. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  158. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  159. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  160. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  161. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  162. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  163. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  164. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  165. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  166. data/sig/telnyx/models/verification.rbs +2 -1
  167. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  168. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  169. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  170. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +269 -58
  171. data/sig/telnyx/models/voice_clone_create_params.rbs +129 -44
  172. data/sig/telnyx/models/voice_clone_data.rbs +43 -0
  173. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  174. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  175. data/sig/telnyx/models.rbs +14 -0
  176. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  177. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  178. data/sig/telnyx/resources/calls/actions.rbs +1 -0
  179. data/sig/telnyx/resources/calls.rbs +1 -0
  180. data/sig/telnyx/resources/enterprises/reputation/numbers.rbs +7 -7
  181. data/sig/telnyx/resources/enterprises/reputation.rbs +8 -8
  182. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  183. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  184. data/sig/telnyx/resources/texml.rbs +44 -0
  185. data/sig/telnyx/resources/verifications.rbs +8 -0
  186. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  187. data/sig/telnyx/resources/voice_clones.rbs +2 -12
  188. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  189. metadata +71 -26
@@ -16,16 +16,18 @@ module Telnyx
16
16
  sig { returns(String) }
17
17
  attr_accessor :text
18
18
 
19
- # The duration of the audio file in seconds. This is only included if
20
- # `response_format` is set to `verbose_json`.
19
+ # The duration of the audio file in seconds. Returned by
20
+ # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
21
+ # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
21
22
  sig { returns(T.nilable(Float)) }
22
23
  attr_reader :duration
23
24
 
24
25
  sig { params(duration: Float).void }
25
26
  attr_writer :duration
26
27
 
27
- # Segments of the transcribed text and their corresponding details. This is only
28
- # included if `response_format` is set to `verbose_json`.
28
+ # Segments of the transcribed text and their corresponding details. Returned by
29
+ # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
30
+ # returned by `openai/whisper-large-v3-turbo`.
29
31
  sig do
30
32
  returns(
31
33
  T.nilable(
@@ -45,6 +47,32 @@ module Telnyx
45
47
  end
46
48
  attr_writer :segments
47
49
 
50
+ # Word-level timestamps and optional speaker labels. Only returned by
51
+ # `deepgram/nova-3` when word-level output is enabled via `model_config`.
52
+ sig do
53
+ returns(
54
+ T.nilable(
55
+ T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
56
+ )
57
+ )
58
+ end
59
+ attr_reader :words
60
+
61
+ sig do
62
+ params(
63
+ words:
64
+ T::Array[
65
+ Telnyx::Models::AI::AudioTranscribeResponse::Word::OrHash
66
+ ]
67
+ ).void
68
+ end
69
+ attr_writer :words
70
+
71
+ # Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
72
+ # `duration`, and `segments` in `verbose_json` mode.
73
+ # `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
74
+ # `text` and, depending on `model_config`, may include `words` with per-word
75
+ # timestamps and speaker labels.
48
76
  sig do
49
77
  params(
50
78
  text: String,
@@ -52,18 +80,27 @@ module Telnyx
52
80
  segments:
53
81
  T::Array[
54
82
  Telnyx::Models::AI::AudioTranscribeResponse::Segment::OrHash
83
+ ],
84
+ words:
85
+ T::Array[
86
+ Telnyx::Models::AI::AudioTranscribeResponse::Word::OrHash
55
87
  ]
56
88
  ).returns(T.attached_class)
57
89
  end
58
90
  def self.new(
59
91
  # The transcribed text for the audio file.
60
92
  text:,
61
- # The duration of the audio file in seconds. This is only included if
62
- # `response_format` is set to `verbose_json`.
93
+ # The duration of the audio file in seconds. Returned by
94
+ # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
95
+ # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
63
96
  duration: nil,
64
- # Segments of the transcribed text and their corresponding details. This is only
65
- # included if `response_format` is set to `verbose_json`.
66
- segments: nil
97
+ # Segments of the transcribed text and their corresponding details. Returned by
98
+ # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
99
+ # returned by `openai/whisper-large-v3-turbo`.
100
+ segments: nil,
101
+ # Word-level timestamps and optional speaker labels. Only returned by
102
+ # `deepgram/nova-3` when word-level output is enabled via `model_config`.
103
+ words: nil
67
104
  )
68
105
  end
69
106
 
@@ -73,7 +110,8 @@ module Telnyx
73
110
  text: String,
74
111
  duration: Float,
75
112
  segments:
76
- T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
113
+ T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment],
114
+ words: T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
77
115
  }
78
116
  )
79
117
  end
@@ -130,6 +168,81 @@ module Telnyx
130
168
  def to_hash
131
169
  end
132
170
  end
171
+
172
+ class Word < Telnyx::Internal::Type::BaseModel
173
+ OrHash =
174
+ T.type_alias do
175
+ T.any(
176
+ Telnyx::Models::AI::AudioTranscribeResponse::Word,
177
+ Telnyx::Internal::AnyHash
178
+ )
179
+ end
180
+
181
+ # End time of the word in seconds.
182
+ sig { returns(Float) }
183
+ attr_accessor :end_
184
+
185
+ # Start time of the word in seconds.
186
+ sig { returns(Float) }
187
+ attr_accessor :start
188
+
189
+ # The transcribed word.
190
+ sig { returns(String) }
191
+ attr_accessor :word
192
+
193
+ # Confidence score for the word (0.0 to 1.0).
194
+ sig { returns(T.nilable(Float)) }
195
+ attr_reader :confidence
196
+
197
+ sig { params(confidence: Float).void }
198
+ attr_writer :confidence
199
+
200
+ # Speaker index. Only present when diarization is enabled via `model_config`.
201
+ sig { returns(T.nilable(Integer)) }
202
+ attr_reader :speaker
203
+
204
+ sig { params(speaker: Integer).void }
205
+ attr_writer :speaker
206
+
207
+ # Word-level timing detail. Only present when using `deepgram/nova-3` with
208
+ # `model_config` options that enable word timestamps.
209
+ sig do
210
+ params(
211
+ end_: Float,
212
+ start: Float,
213
+ word: String,
214
+ confidence: Float,
215
+ speaker: Integer
216
+ ).returns(T.attached_class)
217
+ end
218
+ def self.new(
219
+ # End time of the word in seconds.
220
+ end_:,
221
+ # Start time of the word in seconds.
222
+ start:,
223
+ # The transcribed word.
224
+ word:,
225
+ # Confidence score for the word (0.0 to 1.0).
226
+ confidence: nil,
227
+ # Speaker index. Only present when diarization is enabled via `model_config`.
228
+ speaker: nil
229
+ )
230
+ end
231
+
232
+ sig do
233
+ override.returns(
234
+ {
235
+ end_: Float,
236
+ start: Float,
237
+ word: String,
238
+ confidence: Float,
239
+ speaker: Integer
240
+ }
241
+ )
242
+ end
243
+ def to_hash
244
+ end
245
+ end
133
246
  end
134
247
  end
135
248
  end
@@ -160,12 +160,12 @@ module Telnyx
160
160
  Integer,
161
161
  T::Boolean,
162
162
  T::Array[
163
- Telnyx::AI::ConversationAddMessageParams::Metadata::UnionMember3::Variants
163
+ Telnyx::AI::ConversationAddMessageParams::Metadata::MetadataArrayValue::Variants
164
164
  ]
165
165
  )
166
166
  end
167
167
 
168
- module UnionMember3
168
+ module MetadataArrayValue
169
169
  extend Telnyx::Internal::Type::Union
170
170
 
171
171
  Variants = T.type_alias { T.any(String, Integer, T::Boolean) }
@@ -173,7 +173,7 @@ module Telnyx
173
173
  sig do
174
174
  override.returns(
175
175
  T::Array[
176
- Telnyx::AI::ConversationAddMessageParams::Metadata::UnionMember3::Variants
176
+ Telnyx::AI::ConversationAddMessageParams::Metadata::MetadataArrayValue::Variants
177
177
  ]
178
178
  )
179
179
  end
@@ -191,11 +191,11 @@ module Telnyx
191
191
  def self.variants
192
192
  end
193
193
 
194
- UnionMember3Array =
194
+ MetadataArrayValueArray =
195
195
  T.let(
196
196
  Telnyx::Internal::Type::ArrayOf[
197
197
  union:
198
- Telnyx::AI::ConversationAddMessageParams::Metadata::UnionMember3
198
+ Telnyx::AI::ConversationAddMessageParams::Metadata::MetadataArrayValue
199
199
  ],
200
200
  Telnyx::Internal::Type::Converter
201
201
  )
@@ -111,6 +111,14 @@ module Telnyx
111
111
  end
112
112
  attr_writer :messaging_settings
113
113
 
114
+ sig { returns(T.nilable(Telnyx::AI::Observability)) }
115
+ attr_reader :observability_settings
116
+
117
+ sig do
118
+ params(observability_settings: Telnyx::AI::Observability::OrHash).void
119
+ end
120
+ attr_writer :observability_settings
121
+
114
122
  sig { returns(T.nilable(Telnyx::AI::PrivacySettings)) }
115
123
  attr_reader :privacy_settings
116
124
 
@@ -192,6 +200,7 @@ module Telnyx
192
200
  insight_settings: Telnyx::AI::InsightSettings::OrHash,
193
201
  llm_api_key_ref: String,
194
202
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
203
+ observability_settings: Telnyx::AI::Observability::OrHash,
195
204
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
196
205
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
197
206
  tools:
@@ -250,6 +259,7 @@ module Telnyx
250
259
  # work with this integration.
251
260
  llm_api_key_ref: nil,
252
261
  messaging_settings: nil,
262
+ observability_settings: nil,
253
263
  privacy_settings: nil,
254
264
  telephony_settings: nil,
255
265
  # The tools that the assistant can use. These may be templated with
@@ -280,6 +290,7 @@ module Telnyx
280
290
  insight_settings: Telnyx::AI::InsightSettings,
281
291
  llm_api_key_ref: String,
282
292
  messaging_settings: Telnyx::AI::MessagingSettings,
293
+ observability_settings: Telnyx::AI::Observability,
283
294
  privacy_settings: Telnyx::AI::PrivacySettings,
284
295
  telephony_settings: Telnyx::AI::TelephonySettings,
285
296
  tools: T::Array[Telnyx::AI::AssistantTool::Variants],
@@ -0,0 +1,90 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class Observability < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Telnyx::AI::Observability, Telnyx::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :host
14
+
15
+ sig { params(host: String).void }
16
+ attr_writer :host
17
+
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :public_key_ref
20
+
21
+ sig { params(public_key_ref: String).void }
22
+ attr_writer :public_key_ref
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :secret_key_ref
26
+
27
+ sig { params(secret_key_ref: String).void }
28
+ attr_writer :secret_key_ref
29
+
30
+ sig do
31
+ returns(T.nilable(Telnyx::AI::Observability::Status::TaggedSymbol))
32
+ end
33
+ attr_reader :status
34
+
35
+ sig { params(status: Telnyx::AI::Observability::Status::OrSymbol).void }
36
+ attr_writer :status
37
+
38
+ sig do
39
+ params(
40
+ host: String,
41
+ public_key_ref: String,
42
+ secret_key_ref: String,
43
+ status: Telnyx::AI::Observability::Status::OrSymbol
44
+ ).returns(T.attached_class)
45
+ end
46
+ def self.new(
47
+ host: nil,
48
+ public_key_ref: nil,
49
+ secret_key_ref: nil,
50
+ status: nil
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ host: String,
58
+ public_key_ref: String,
59
+ secret_key_ref: String,
60
+ status: Telnyx::AI::Observability::Status::TaggedSymbol
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+
67
+ module Status
68
+ extend Telnyx::Internal::Type::Enum
69
+
70
+ TaggedSymbol =
71
+ T.type_alias { T.all(Symbol, Telnyx::AI::Observability::Status) }
72
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
73
+
74
+ ENABLED =
75
+ T.let(:enabled, Telnyx::AI::Observability::Status::TaggedSymbol)
76
+ DISABLED =
77
+ T.let(:disabled, Telnyx::AI::Observability::Status::TaggedSymbol)
78
+
79
+ sig do
80
+ override.returns(
81
+ T::Array[Telnyx::AI::Observability::Status::TaggedSymbol]
82
+ )
83
+ end
84
+ def self.values
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class ObservabilityReq < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Telnyx::AI::ObservabilityReq, Telnyx::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :host
14
+
15
+ sig { params(host: String).void }
16
+ attr_writer :host
17
+
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :public_key_ref
20
+
21
+ sig { params(public_key_ref: String).void }
22
+ attr_writer :public_key_ref
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :secret_key_ref
26
+
27
+ sig { params(secret_key_ref: String).void }
28
+ attr_writer :secret_key_ref
29
+
30
+ sig do
31
+ returns(T.nilable(Telnyx::AI::ObservabilityReq::Status::OrSymbol))
32
+ end
33
+ attr_reader :status
34
+
35
+ sig do
36
+ params(status: Telnyx::AI::ObservabilityReq::Status::OrSymbol).void
37
+ end
38
+ attr_writer :status
39
+
40
+ sig do
41
+ params(
42
+ host: String,
43
+ public_key_ref: String,
44
+ secret_key_ref: String,
45
+ status: Telnyx::AI::ObservabilityReq::Status::OrSymbol
46
+ ).returns(T.attached_class)
47
+ end
48
+ def self.new(
49
+ host: nil,
50
+ public_key_ref: nil,
51
+ secret_key_ref: nil,
52
+ status: nil
53
+ )
54
+ end
55
+
56
+ sig do
57
+ override.returns(
58
+ {
59
+ host: String,
60
+ public_key_ref: String,
61
+ secret_key_ref: String,
62
+ status: Telnyx::AI::ObservabilityReq::Status::OrSymbol
63
+ }
64
+ )
65
+ end
66
+ def to_hash
67
+ end
68
+
69
+ module Status
70
+ extend Telnyx::Internal::Type::Enum
71
+
72
+ TaggedSymbol =
73
+ T.type_alias { T.all(Symbol, Telnyx::AI::ObservabilityReq::Status) }
74
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
75
+
76
+ ENABLED =
77
+ T.let(:enabled, Telnyx::AI::ObservabilityReq::Status::TaggedSymbol)
78
+ DISABLED =
79
+ T.let(:disabled, Telnyx::AI::ObservabilityReq::Status::TaggedSymbol)
80
+
81
+ sig do
82
+ override.returns(
83
+ T::Array[Telnyx::AI::ObservabilityReq::Status::TaggedSymbol]
84
+ )
85
+ end
86
+ def self.values
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -345,6 +345,14 @@ module Telnyx
345
345
  end
346
346
  attr_writer :channels
347
347
 
348
+ # Whether call recording is enabled. When set to false, calls will not be recorded
349
+ # regardless of other recording configuration.
350
+ sig { returns(T.nilable(T::Boolean)) }
351
+ attr_reader :enabled
352
+
353
+ sig { params(enabled: T::Boolean).void }
354
+ attr_writer :enabled
355
+
348
356
  # The format of the recording file.
349
357
  sig do
350
358
  returns(
@@ -368,6 +376,7 @@ module Telnyx
368
376
  params(
369
377
  channels:
370
378
  Telnyx::AI::TelephonySettings::RecordingSettings::Channels::OrSymbol,
379
+ enabled: T::Boolean,
371
380
  file_format:
372
381
  Telnyx::AI::TelephonySettings::RecordingSettings::Format::OrSymbol
373
382
  ).returns(T.attached_class)
@@ -375,6 +384,9 @@ module Telnyx
375
384
  def self.new(
376
385
  # The number of channels for the recording. 'single' for mono, 'dual' for stereo.
377
386
  channels: nil,
387
+ # Whether call recording is enabled. When set to false, calls will not be recorded
388
+ # regardless of other recording configuration.
389
+ enabled: nil,
378
390
  # The format of the recording file.
379
391
  file_format: nil
380
392
  )
@@ -385,6 +397,7 @@ module Telnyx
385
397
  {
386
398
  channels:
387
399
  Telnyx::AI::TelephonySettings::RecordingSettings::Channels::OrSymbol,
400
+ enabled: T::Boolean,
388
401
  file_format:
389
402
  Telnyx::AI::TelephonySettings::RecordingSettings::Format::OrSymbol
390
403
  }
@@ -224,6 +224,15 @@ module Telnyx
224
224
  sig { params(prevent_double_bridge: T::Boolean).void }
225
225
  attr_writer :prevent_double_bridge
226
226
 
227
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
228
+ # information (name and number) will be hidden from the called party. When set to
229
+ # `none` or omitted, caller ID will be shown normally.
230
+ sig { returns(T.nilable(Telnyx::CallDialParams::Privacy::OrSymbol)) }
231
+ attr_reader :privacy
232
+
233
+ sig { params(privacy: Telnyx::CallDialParams::Privacy::OrSymbol).void }
234
+ attr_writer :privacy
235
+
227
236
  # Start recording automatically after an event. Disabled by default.
228
237
  sig { returns(T.nilable(Telnyx::CallDialParams::Record::OrSymbol)) }
229
238
  attr_reader :record
@@ -570,6 +579,7 @@ module Telnyx
570
579
  park_after_unbridge: String,
571
580
  preferred_codecs: String,
572
581
  prevent_double_bridge: T::Boolean,
582
+ privacy: Telnyx::CallDialParams::Privacy::OrSymbol,
573
583
  record: Telnyx::CallDialParams::Record::OrSymbol,
574
584
  record_channels: Telnyx::CallDialParams::RecordChannels::OrSymbol,
575
585
  record_custom_file_name: String,
@@ -694,6 +704,10 @@ module Telnyx
694
704
  # Prevents bridging and hangs up the call if the target is already bridged.
695
705
  # Disabled by default.
696
706
  prevent_double_bridge: nil,
707
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
708
+ # information (name and number) will be hidden from the called party. When set to
709
+ # `none` or omitted, caller ID will be shown normally.
710
+ privacy: nil,
697
711
  # Start recording automatically after an event. Disabled by default.
698
712
  record: nil,
699
713
  # Defines which channel should be recorded ('single' or 'dual') when `record` is
@@ -818,6 +832,7 @@ module Telnyx
818
832
  park_after_unbridge: String,
819
833
  preferred_codecs: String,
820
834
  prevent_double_bridge: T::Boolean,
835
+ privacy: Telnyx::CallDialParams::Privacy::OrSymbol,
821
836
  record: Telnyx::CallDialParams::Record::OrSymbol,
822
837
  record_channels: Telnyx::CallDialParams::RecordChannels::OrSymbol,
823
838
  record_custom_file_name: String,
@@ -1479,6 +1494,28 @@ module Telnyx
1479
1494
  end
1480
1495
  end
1481
1496
 
1497
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
1498
+ # information (name and number) will be hidden from the called party. When set to
1499
+ # `none` or omitted, caller ID will be shown normally.
1500
+ module Privacy
1501
+ extend Telnyx::Internal::Type::Enum
1502
+
1503
+ TaggedSymbol =
1504
+ T.type_alias { T.all(Symbol, Telnyx::CallDialParams::Privacy) }
1505
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1506
+
1507
+ ID = T.let(:id, Telnyx::CallDialParams::Privacy::TaggedSymbol)
1508
+ NONE = T.let(:none, Telnyx::CallDialParams::Privacy::TaggedSymbol)
1509
+
1510
+ sig do
1511
+ override.returns(
1512
+ T::Array[Telnyx::CallDialParams::Privacy::TaggedSymbol]
1513
+ )
1514
+ end
1515
+ def self.values
1516
+ end
1517
+ end
1518
+
1482
1519
  # Start recording automatically after an event. Disabled by default.
1483
1520
  module Record
1484
1521
  extend Telnyx::Internal::Type::Enum
@@ -188,6 +188,23 @@ module Telnyx
188
188
  sig { params(preferred_codecs: String).void }
189
189
  attr_writer :preferred_codecs
190
190
 
191
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
192
+ # information (name and number) will be hidden from the called party. When set to
193
+ # `none` or omitted, caller ID will be shown normally.
194
+ sig do
195
+ returns(
196
+ T.nilable(Telnyx::Calls::ActionTransferParams::Privacy::OrSymbol)
197
+ )
198
+ end
199
+ attr_reader :privacy
200
+
201
+ sig do
202
+ params(
203
+ privacy: Telnyx::Calls::ActionTransferParams::Privacy::OrSymbol
204
+ ).void
205
+ end
206
+ attr_writer :privacy
207
+
191
208
  # Start recording automatically after an event. Disabled by default.
192
209
  sig do
193
210
  returns(
@@ -500,6 +517,7 @@ module Telnyx
500
517
  mute_dtmf: Telnyx::Calls::ActionTransferParams::MuteDtmf::OrSymbol,
501
518
  park_after_unbridge: String,
502
519
  preferred_codecs: String,
520
+ privacy: Telnyx::Calls::ActionTransferParams::Privacy::OrSymbol,
503
521
  record: Telnyx::Calls::ActionTransferParams::Record::OrSymbol,
504
522
  record_channels:
505
523
  Telnyx::Calls::ActionTransferParams::RecordChannels::OrSymbol,
@@ -594,6 +612,10 @@ module Telnyx
594
612
  # call. The codecs supported are `G722`, `PCMU`, `PCMA`, `G729`, `OPUS`, `VP8`,
595
613
  # `H264`, `AMR-WB`.
596
614
  preferred_codecs: nil,
615
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
616
+ # information (name and number) will be hidden from the called party. When set to
617
+ # `none` or omitted, caller ID will be shown normally.
618
+ privacy: nil,
597
619
  # Start recording automatically after an event. Disabled by default.
598
620
  record: nil,
599
621
  # Defines which channel should be recorded ('single' or 'dual') when `record` is
@@ -692,6 +714,7 @@ module Telnyx
692
714
  Telnyx::Calls::ActionTransferParams::MuteDtmf::OrSymbol,
693
715
  park_after_unbridge: String,
694
716
  preferred_codecs: String,
717
+ privacy: Telnyx::Calls::ActionTransferParams::Privacy::OrSymbol,
695
718
  record: Telnyx::Calls::ActionTransferParams::Record::OrSymbol,
696
719
  record_channels:
697
720
  Telnyx::Calls::ActionTransferParams::RecordChannels::OrSymbol,
@@ -1024,6 +1047,40 @@ module Telnyx
1024
1047
  end
1025
1048
  end
1026
1049
 
1050
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
1051
+ # information (name and number) will be hidden from the called party. When set to
1052
+ # `none` or omitted, caller ID will be shown normally.
1053
+ module Privacy
1054
+ extend Telnyx::Internal::Type::Enum
1055
+
1056
+ TaggedSymbol =
1057
+ T.type_alias do
1058
+ T.all(Symbol, Telnyx::Calls::ActionTransferParams::Privacy)
1059
+ end
1060
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1061
+
1062
+ ID =
1063
+ T.let(
1064
+ :id,
1065
+ Telnyx::Calls::ActionTransferParams::Privacy::TaggedSymbol
1066
+ )
1067
+ NONE =
1068
+ T.let(
1069
+ :none,
1070
+ Telnyx::Calls::ActionTransferParams::Privacy::TaggedSymbol
1071
+ )
1072
+
1073
+ sig do
1074
+ override.returns(
1075
+ T::Array[
1076
+ Telnyx::Calls::ActionTransferParams::Privacy::TaggedSymbol
1077
+ ]
1078
+ )
1079
+ end
1080
+ def self.values
1081
+ end
1082
+ end
1083
+
1027
1084
  # Start recording automatically after an event. Disabled by default.
1028
1085
  module Record
1029
1086
  extend Telnyx::Internal::Type::Enum
@@ -287,7 +287,7 @@ module Telnyx
287
287
  :"2001-10000",
288
288
  Telnyx::EnterpriseCreateParams::NumberOfEmployees::TaggedSymbol
289
289
  )
290
- NUMBER_OF_EMPLOYEES_10001 =
290
+ NUMBER_OF_EMPLOYEES_10001_PLUS =
291
291
  T.let(
292
292
  :"10001+",
293
293
  Telnyx::EnterpriseCreateParams::NumberOfEmployees::TaggedSymbol
@@ -314,7 +314,7 @@ module Telnyx
314
314
  :"2001-10000",
315
315
  Telnyx::EnterprisePublic::NumberOfEmployees::TaggedSymbol
316
316
  )
317
- NUMBER_OF_EMPLOYEES_10001 =
317
+ NUMBER_OF_EMPLOYEES_10001_PLUS =
318
318
  T.let(
319
319
  :"10001+",
320
320
  Telnyx::EnterprisePublic::NumberOfEmployees::TaggedSymbol
@@ -279,7 +279,7 @@ module Telnyx
279
279
  :"2001-10000",
280
280
  Telnyx::EnterpriseUpdateParams::NumberOfEmployees::TaggedSymbol
281
281
  )
282
- NUMBER_OF_EMPLOYEES_10001 =
282
+ NUMBER_OF_EMPLOYEES_10001_PLUS =
283
283
  T.let(
284
284
  :"10001+",
285
285
  Telnyx::EnterpriseUpdateParams::NumberOfEmployees::TaggedSymbol
@@ -4,14 +4,14 @@ module Telnyx
4
4
  module Models
5
5
  module Enterprises
6
6
  module Reputation
7
- class NumberCreateParams < Telnyx::Internal::Type::BaseModel
7
+ class NumberAssociateParams < Telnyx::Internal::Type::BaseModel
8
8
  extend Telnyx::Internal::Type::RequestParameters::Converter
9
9
  include Telnyx::Internal::Type::RequestParameters
10
10
 
11
11
  OrHash =
12
12
  T.type_alias do
13
13
  T.any(
14
- Telnyx::Enterprises::Reputation::NumberCreateParams,
14
+ Telnyx::Enterprises::Reputation::NumberAssociateParams,
15
15
  Telnyx::Internal::AnyHash
16
16
  )
17
17
  end