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
@@ -0,0 +1,514 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::Texml#initiate_ai_call
6
+ class TexmlInitiateAICallParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ # @!attribute connection_id
11
+ #
12
+ # @return [String]
13
+ required :connection_id, String
14
+
15
+ # @!attribute ai_assistant_id
16
+ # The ID of the AI assistant to use for the call.
17
+ #
18
+ # @return [String]
19
+ required :ai_assistant_id, String, api_name: :AIAssistantId
20
+
21
+ # @!attribute from
22
+ # The phone number of the party initiating the call. Phone numbers are formatted
23
+ # with a `+` and country code.
24
+ #
25
+ # @return [String]
26
+ required :from, String, api_name: :From
27
+
28
+ # @!attribute to
29
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
30
+ # country code.
31
+ #
32
+ # @return [String]
33
+ required :to, String, api_name: :To
34
+
35
+ # @!attribute ai_assistant_dynamic_variables
36
+ # Key-value map of dynamic variables to pass to the AI assistant.
37
+ #
38
+ # @return [Hash{Symbol=>String}, nil]
39
+ optional :ai_assistant_dynamic_variables,
40
+ Telnyx::Internal::Type::HashOf[String],
41
+ api_name: :AIAssistantDynamicVariables
42
+
43
+ # @!attribute ai_assistant_version
44
+ # The version of the AI assistant to use.
45
+ #
46
+ # @return [String, nil]
47
+ optional :ai_assistant_version, String, api_name: :AIAssistantVersion
48
+
49
+ # @!attribute async_amd
50
+ # Select whether to perform answering machine detection in the background. By
51
+ # default execution is blocked until Answering Machine Detection is completed.
52
+ #
53
+ # @return [Boolean, nil]
54
+ optional :async_amd, Telnyx::Internal::Type::Boolean, api_name: :AsyncAmd
55
+
56
+ # @!attribute async_amd_status_callback
57
+ # URL destination for Telnyx to send AMD callback events to for the call.
58
+ #
59
+ # @return [String, nil]
60
+ optional :async_amd_status_callback, String, api_name: :AsyncAmdStatusCallback
61
+
62
+ # @!attribute async_amd_status_callback_method
63
+ # HTTP request type used for `AsyncAmdStatusCallback`.
64
+ #
65
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod, nil]
66
+ optional :async_amd_status_callback_method,
67
+ enum: -> { Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod },
68
+ api_name: :AsyncAmdStatusCallbackMethod
69
+
70
+ # @!attribute caller_id
71
+ # To be used as the caller id name (SIP From Display Name) presented to the
72
+ # destination (`To` number). The string should have a maximum of 128 characters,
73
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
74
+ # omitted, the display name will be the same as the number in the `From` field.
75
+ #
76
+ # @return [String, nil]
77
+ optional :caller_id, String, api_name: :CallerId
78
+
79
+ # @!attribute conversation_callback
80
+ # URL destination for Telnyx to send conversation callback events to.
81
+ #
82
+ # @return [String, nil]
83
+ optional :conversation_callback, String, api_name: :ConversationCallback
84
+
85
+ # @!attribute conversation_callback_method
86
+ # HTTP request type used for `ConversationCallback`.
87
+ #
88
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::ConversationCallbackMethod, nil]
89
+ optional :conversation_callback_method,
90
+ enum: -> { Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod },
91
+ api_name: :ConversationCallbackMethod
92
+
93
+ # @!attribute conversation_callbacks
94
+ # An array of URL destinations for conversation callback events.
95
+ #
96
+ # @return [Array<String>, nil]
97
+ optional :conversation_callbacks,
98
+ Telnyx::Internal::Type::ArrayOf[String],
99
+ api_name: :ConversationCallbacks
100
+
101
+ # @!attribute custom_headers
102
+ # Custom HTTP headers to be sent with the call. Each header should be an object
103
+ # with 'name' and 'value' properties.
104
+ #
105
+ # @return [Array<Telnyx::Models::TexmlInitiateAICallParams::CustomHeader>, nil]
106
+ optional :custom_headers,
107
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::TexmlInitiateAICallParams::CustomHeader] },
108
+ api_name: :CustomHeaders
109
+
110
+ # @!attribute detection_mode
111
+ # Allows you to choose between Premium and Standard detections.
112
+ #
113
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode, nil]
114
+ optional :detection_mode,
115
+ enum: -> { Telnyx::TexmlInitiateAICallParams::DetectionMode },
116
+ api_name: :DetectionMode
117
+
118
+ # @!attribute machine_detection
119
+ # Enables Answering Machine Detection.
120
+ #
121
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::MachineDetection, nil]
122
+ optional :machine_detection,
123
+ enum: -> { Telnyx::TexmlInitiateAICallParams::MachineDetection },
124
+ api_name: :MachineDetection
125
+
126
+ # @!attribute machine_detection_silence_timeout
127
+ # If initial silence duration is greater than this value, consider it a machine.
128
+ # Ignored when `premium` detection is used.
129
+ #
130
+ # @return [Integer, nil]
131
+ optional :machine_detection_silence_timeout, Integer, api_name: :MachineDetectionSilenceTimeout
132
+
133
+ # @!attribute machine_detection_speech_end_threshold
134
+ # Silence duration threshold after a greeting message or voice for it be
135
+ # considered human. Ignored when `premium` detection is used.
136
+ #
137
+ # @return [Integer, nil]
138
+ optional :machine_detection_speech_end_threshold, Integer, api_name: :MachineDetectionSpeechEndThreshold
139
+
140
+ # @!attribute machine_detection_speech_threshold
141
+ # Maximum threshold of a human greeting. If greeting longer than this value,
142
+ # considered machine. Ignored when `premium` detection is used.
143
+ #
144
+ # @return [Integer, nil]
145
+ optional :machine_detection_speech_threshold, Integer, api_name: :MachineDetectionSpeechThreshold
146
+
147
+ # @!attribute machine_detection_timeout
148
+ # Maximum timeout threshold in milliseconds for overall detection.
149
+ #
150
+ # @return [Integer, nil]
151
+ optional :machine_detection_timeout, Integer, api_name: :MachineDetectionTimeout
152
+
153
+ # @!attribute passports
154
+ # A string of passport identifiers to associate with the call.
155
+ #
156
+ # @return [String, nil]
157
+ optional :passports, String, api_name: :Passports
158
+
159
+ # @!attribute preferred_codecs
160
+ # The list of comma-separated codecs to be offered on a call.
161
+ #
162
+ # @return [String, nil]
163
+ optional :preferred_codecs, String, api_name: :PreferredCodecs
164
+
165
+ # @!attribute record
166
+ # Whether to record the entire participant's call leg. Defaults to `false`.
167
+ #
168
+ # @return [Boolean, nil]
169
+ optional :record, Telnyx::Internal::Type::Boolean, api_name: :Record
170
+
171
+ # @!attribute recording_channels
172
+ # The number of channels in the final recording. Defaults to `mono`.
173
+ #
174
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingChannels, nil]
175
+ optional :recording_channels,
176
+ enum: -> { Telnyx::TexmlInitiateAICallParams::RecordingChannels },
177
+ api_name: :RecordingChannels
178
+
179
+ # @!attribute recording_status_callback
180
+ # The URL the recording callbacks will be sent to.
181
+ #
182
+ # @return [String, nil]
183
+ optional :recording_status_callback, String, api_name: :RecordingStatusCallback
184
+
185
+ # @!attribute recording_status_callback_event
186
+ # The changes to the recording's state that should generate a call to
187
+ # `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
188
+ # Separate multiple values with a space. Defaults to `completed`.
189
+ #
190
+ # @return [String, nil]
191
+ optional :recording_status_callback_event, String, api_name: :RecordingStatusCallbackEvent
192
+
193
+ # @!attribute recording_status_callback_method
194
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
195
+ #
196
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingStatusCallbackMethod, nil]
197
+ optional :recording_status_callback_method,
198
+ enum: -> { Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod },
199
+ api_name: :RecordingStatusCallbackMethod
200
+
201
+ # @!attribute recording_timeout
202
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
203
+ # silence is detected. The timer only starts when the speech is detected. The
204
+ # minimum value is 0. The default value is 0 (infinite).
205
+ #
206
+ # @return [Integer, nil]
207
+ optional :recording_timeout, Integer, api_name: :RecordingTimeout
208
+
209
+ # @!attribute recording_track
210
+ # The audio track to record for the call. The default is `both`.
211
+ #
212
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingTrack, nil]
213
+ optional :recording_track,
214
+ enum: -> { Telnyx::TexmlInitiateAICallParams::RecordingTrack },
215
+ api_name: :RecordingTrack
216
+
217
+ # @!attribute send_recording_url
218
+ # Whether to send RecordingUrl in webhooks.
219
+ #
220
+ # @return [Boolean, nil]
221
+ optional :send_recording_url, Telnyx::Internal::Type::Boolean, api_name: :SendRecordingUrl
222
+
223
+ # @!attribute sip_auth_password
224
+ # The password to use for SIP authentication.
225
+ #
226
+ # @return [String, nil]
227
+ optional :sip_auth_password, String, api_name: :SipAuthPassword
228
+
229
+ # @!attribute sip_auth_username
230
+ # The username to use for SIP authentication.
231
+ #
232
+ # @return [String, nil]
233
+ optional :sip_auth_username, String, api_name: :SipAuthUsername
234
+
235
+ # @!attribute sip_region
236
+ # Defines the SIP region to be used for the call.
237
+ #
238
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::SipRegion, nil]
239
+ optional :sip_region, enum: -> { Telnyx::TexmlInitiateAICallParams::SipRegion }, api_name: :SipRegion
240
+
241
+ # @!attribute status_callback
242
+ # URL destination for Telnyx to send status callback events to for the call.
243
+ #
244
+ # @return [String, nil]
245
+ optional :status_callback, String, api_name: :StatusCallback
246
+
247
+ # @!attribute status_callback_event
248
+ # The call events for which Telnyx should send a webhook. Multiple events can be
249
+ # defined when separated by a space. Valid values: initiated, ringing, answered,
250
+ # completed.
251
+ #
252
+ # @return [String, nil]
253
+ optional :status_callback_event, String, api_name: :StatusCallbackEvent
254
+
255
+ # @!attribute status_callback_method
256
+ # HTTP request type used for `StatusCallback`.
257
+ #
258
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::StatusCallbackMethod, nil]
259
+ optional :status_callback_method,
260
+ enum: -> { Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod },
261
+ api_name: :StatusCallbackMethod
262
+
263
+ # @!attribute status_callbacks
264
+ # An array of URL destinations for Telnyx to send status callback events to for
265
+ # the call.
266
+ #
267
+ # @return [Array<String>, nil]
268
+ optional :status_callbacks, Telnyx::Internal::Type::ArrayOf[String], api_name: :StatusCallbacks
269
+
270
+ # @!attribute time_limit
271
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
272
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
273
+ #
274
+ # @return [Integer, nil]
275
+ optional :time_limit, Integer, api_name: :TimeLimit
276
+
277
+ # @!attribute timeout_seconds
278
+ # The number of seconds to wait for the called party to answer the call before the
279
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
280
+ # is 30 seconds.
281
+ #
282
+ # @return [Integer, nil]
283
+ optional :timeout_seconds, Integer, api_name: :Timeout
284
+
285
+ # @!attribute trim
286
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
287
+ # `trim-silence`.
288
+ #
289
+ # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::Trim, nil]
290
+ optional :trim, enum: -> { Telnyx::TexmlInitiateAICallParams::Trim }, api_name: :Trim
291
+
292
+ # @!method initialize(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: {})
293
+ # Some parameter documentations has been truncated, see
294
+ # {Telnyx::Models::TexmlInitiateAICallParams} for more details.
295
+ #
296
+ # @param connection_id [String]
297
+ #
298
+ # @param ai_assistant_id [String] The ID of the AI assistant to use for the call.
299
+ #
300
+ # @param from [String] The phone number of the party initiating the call. Phone numbers are formatted w
301
+ #
302
+ # @param to [String] The phone number of the called party. Phone numbers are formatted with a `+` and
303
+ #
304
+ # @param ai_assistant_dynamic_variables [Hash{Symbol=>String}] Key-value map of dynamic variables to pass to the AI assistant.
305
+ #
306
+ # @param ai_assistant_version [String] The version of the AI assistant to use.
307
+ #
308
+ # @param async_amd [Boolean] Select whether to perform answering machine detection in the background. By defa
309
+ #
310
+ # @param async_amd_status_callback [String] URL destination for Telnyx to send AMD callback events to for the call.
311
+ #
312
+ # @param async_amd_status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod] HTTP request type used for `AsyncAmdStatusCallback`.
313
+ #
314
+ # @param caller_id [String] To be used as the caller id name (SIP From Display Name) presented to the destin
315
+ #
316
+ # @param conversation_callback [String] URL destination for Telnyx to send conversation callback events to.
317
+ #
318
+ # @param conversation_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::ConversationCallbackMethod] HTTP request type used for `ConversationCallback`.
319
+ #
320
+ # @param conversation_callbacks [Array<String>] An array of URL destinations for conversation callback events.
321
+ #
322
+ # @param custom_headers [Array<Telnyx::Models::TexmlInitiateAICallParams::CustomHeader>] Custom HTTP headers to be sent with the call. Each header should be an object wi
323
+ #
324
+ # @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Premium and Standard detections.
325
+ #
326
+ # @param machine_detection [Symbol, Telnyx::Models::TexmlInitiateAICallParams::MachineDetection] Enables Answering Machine Detection.
327
+ #
328
+ # @param machine_detection_silence_timeout [Integer] If initial silence duration is greater than this value, consider it a machine. I
329
+ #
330
+ # @param machine_detection_speech_end_threshold [Integer] Silence duration threshold after a greeting message or voice for it be considere
331
+ #
332
+ # @param machine_detection_speech_threshold [Integer] Maximum threshold of a human greeting. If greeting longer than this value, consi
333
+ #
334
+ # @param machine_detection_timeout [Integer] Maximum timeout threshold in milliseconds for overall detection.
335
+ #
336
+ # @param passports [String] A string of passport identifiers to associate with the call.
337
+ #
338
+ # @param preferred_codecs [String] The list of comma-separated codecs to be offered on a call.
339
+ #
340
+ # @param record [Boolean] Whether to record the entire participant's call leg. Defaults to `false`.
341
+ #
342
+ # @param recording_channels [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingChannels] The number of channels in the final recording. Defaults to `mono`.
343
+ #
344
+ # @param recording_status_callback [String] The URL the recording callbacks will be sent to.
345
+ #
346
+ # @param recording_status_callback_event [String] The changes to the recording's state that should generate a call to `RecordingSt
347
+ #
348
+ # @param recording_status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingStatusCallbackMethod] HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
349
+ #
350
+ # @param recording_timeout [Integer] The number of seconds that Telnyx will wait for the recording to be stopped if s
351
+ #
352
+ # @param recording_track [Symbol, Telnyx::Models::TexmlInitiateAICallParams::RecordingTrack] The audio track to record for the call. The default is `both`.
353
+ #
354
+ # @param send_recording_url [Boolean] Whether to send RecordingUrl in webhooks.
355
+ #
356
+ # @param sip_auth_password [String] The password to use for SIP authentication.
357
+ #
358
+ # @param sip_auth_username [String] The username to use for SIP authentication.
359
+ #
360
+ # @param sip_region [Symbol, Telnyx::Models::TexmlInitiateAICallParams::SipRegion] Defines the SIP region to be used for the call.
361
+ #
362
+ # @param status_callback [String] URL destination for Telnyx to send status callback events to for the call.
363
+ #
364
+ # @param status_callback_event [String] The call events for which Telnyx should send a webhook. Multiple events can be d
365
+ #
366
+ # @param status_callback_method [Symbol, Telnyx::Models::TexmlInitiateAICallParams::StatusCallbackMethod] HTTP request type used for `StatusCallback`.
367
+ #
368
+ # @param status_callbacks [Array<String>] An array of URL destinations for Telnyx to send status callback events to for th
369
+ #
370
+ # @param time_limit [Integer] The maximum duration of the call in seconds. The minimum value is 30 and the max
371
+ #
372
+ # @param timeout_seconds [Integer] The number of seconds to wait for the called party to answer the call before the
373
+ #
374
+ # @param trim [Symbol, Telnyx::Models::TexmlInitiateAICallParams::Trim] Whether to trim any leading and trailing silence from the recording. Defaults to
375
+ #
376
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
377
+
378
+ # HTTP request type used for `AsyncAmdStatusCallback`.
379
+ module AsyncAmdStatusCallbackMethod
380
+ extend Telnyx::Internal::Type::Enum
381
+
382
+ GET = :GET
383
+ POST = :POST
384
+
385
+ # @!method self.values
386
+ # @return [Array<Symbol>]
387
+ end
388
+
389
+ # HTTP request type used for `ConversationCallback`.
390
+ module ConversationCallbackMethod
391
+ extend Telnyx::Internal::Type::Enum
392
+
393
+ GET = :GET
394
+ POST = :POST
395
+
396
+ # @!method self.values
397
+ # @return [Array<Symbol>]
398
+ end
399
+
400
+ class CustomHeader < Telnyx::Internal::Type::BaseModel
401
+ # @!attribute name
402
+ # The name of the custom header
403
+ #
404
+ # @return [String]
405
+ required :name, String
406
+
407
+ # @!attribute value
408
+ # The value of the custom header
409
+ #
410
+ # @return [String]
411
+ required :value, String
412
+
413
+ # @!method initialize(name:, value:)
414
+ # @param name [String] The name of the custom header
415
+ #
416
+ # @param value [String] The value of the custom header
417
+ end
418
+
419
+ # Allows you to choose between Premium and Standard detections.
420
+ module DetectionMode
421
+ extend Telnyx::Internal::Type::Enum
422
+
423
+ PREMIUM = :Premium
424
+ REGULAR = :Regular
425
+
426
+ # @!method self.values
427
+ # @return [Array<Symbol>]
428
+ end
429
+
430
+ # Enables Answering Machine Detection.
431
+ module MachineDetection
432
+ extend Telnyx::Internal::Type::Enum
433
+
434
+ ENABLE = :Enable
435
+ DISABLE = :Disable
436
+ DETECT_MESSAGE_END = :DetectMessageEnd
437
+
438
+ # @!method self.values
439
+ # @return [Array<Symbol>]
440
+ end
441
+
442
+ # The number of channels in the final recording. Defaults to `mono`.
443
+ module RecordingChannels
444
+ extend Telnyx::Internal::Type::Enum
445
+
446
+ MONO = :mono
447
+ DUAL = :dual
448
+
449
+ # @!method self.values
450
+ # @return [Array<Symbol>]
451
+ end
452
+
453
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
454
+ module RecordingStatusCallbackMethod
455
+ extend Telnyx::Internal::Type::Enum
456
+
457
+ GET = :GET
458
+ POST = :POST
459
+
460
+ # @!method self.values
461
+ # @return [Array<Symbol>]
462
+ end
463
+
464
+ # The audio track to record for the call. The default is `both`.
465
+ module RecordingTrack
466
+ extend Telnyx::Internal::Type::Enum
467
+
468
+ INBOUND = :inbound
469
+ OUTBOUND = :outbound
470
+ BOTH = :both
471
+
472
+ # @!method self.values
473
+ # @return [Array<Symbol>]
474
+ end
475
+
476
+ # Defines the SIP region to be used for the call.
477
+ module SipRegion
478
+ extend Telnyx::Internal::Type::Enum
479
+
480
+ US = :US
481
+ EUROPE = :Europe
482
+ CANADA = :Canada
483
+ AUSTRALIA = :Australia
484
+ MIDDLE_EAST = :"Middle East"
485
+
486
+ # @!method self.values
487
+ # @return [Array<Symbol>]
488
+ end
489
+
490
+ # HTTP request type used for `StatusCallback`.
491
+ module StatusCallbackMethod
492
+ extend Telnyx::Internal::Type::Enum
493
+
494
+ GET = :GET
495
+ POST = :POST
496
+
497
+ # @!method self.values
498
+ # @return [Array<Symbol>]
499
+ end
500
+
501
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
502
+ # `trim-silence`.
503
+ module Trim
504
+ extend Telnyx::Internal::Type::Enum
505
+
506
+ TRIM_SILENCE = :"trim-silence"
507
+ DO_NOT_TRIM = :"do-not-trim"
508
+
509
+ # @!method self.values
510
+ # @return [Array<Symbol>]
511
+ end
512
+ end
513
+ end
514
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::Texml#initiate_ai_call
6
+ class TexmlInitiateAICallResponse < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute call_sid
8
+ #
9
+ # @return [String, nil]
10
+ optional :call_sid, String
11
+
12
+ # @!attribute from
13
+ #
14
+ # @return [String, nil]
15
+ optional :from, String
16
+
17
+ # @!attribute status
18
+ #
19
+ # @return [String, nil]
20
+ optional :status, String
21
+
22
+ # @!attribute to
23
+ #
24
+ # @return [String, nil]
25
+ optional :to, String
26
+
27
+ # @!method initialize(call_sid: nil, from: nil, status: nil, to: nil)
28
+ # @param call_sid [String]
29
+ # @param from [String]
30
+ # @param status [String]
31
+ # @param to [String]
32
+ end
33
+ end
34
+ end
@@ -123,6 +123,7 @@ module Telnyx
123
123
  SMS = :sms
124
124
  CALL = :call
125
125
  FLASHCALL = :flashcall
126
+ WHATSAPP = :whatsapp
126
127
 
127
128
  # @!method self.values
128
129
  # @return [Array<Symbol>]
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::Verifications#trigger_whatsapp_verification
6
+ class VerificationTriggerWhatsappVerificationParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ # @!attribute phone_number
11
+ # +E164 formatted phone number.
12
+ #
13
+ # @return [String]
14
+ required :phone_number, String
15
+
16
+ # @!attribute verify_profile_id
17
+ # The identifier of the associated Verify profile.
18
+ #
19
+ # @return [String]
20
+ required :verify_profile_id, String
21
+
22
+ # @!attribute custom_code
23
+ # Send a self-generated numeric code to the end-user
24
+ #
25
+ # @return [String, nil]
26
+ optional :custom_code, String, nil?: true
27
+
28
+ # @!attribute timeout_secs
29
+ # The number of seconds the verification code is valid for.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :timeout_secs, Integer
33
+
34
+ # @!method initialize(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {})
35
+ # @param phone_number [String] +E164 formatted phone number.
36
+ #
37
+ # @param verify_profile_id [String] The identifier of the associated Verify profile.
38
+ #
39
+ # @param custom_code [String, nil] Send a self-generated numeric code to the end-user
40
+ #
41
+ # @param timeout_secs [Integer] The number of seconds the verification code is valid for.
42
+ #
43
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
44
+ end
45
+ end
46
+ end
@@ -47,7 +47,12 @@ module Telnyx
47
47
  # @return [String, nil]
48
48
  optional :webhook_url, String
49
49
 
50
- # @!method initialize(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {})
50
+ # @!attribute whatsapp
51
+ #
52
+ # @return [Telnyx::Models::VerifyProfileCreateParams::Whatsapp, nil]
53
+ optional :whatsapp, -> { Telnyx::VerifyProfileCreateParams::Whatsapp }
54
+
55
+ # @!method initialize(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
51
56
  # @param name [String]
52
57
  # @param call [Telnyx::Models::VerifyProfileCreateParams::Call]
53
58
  # @param flashcall [Telnyx::Models::VerifyProfileCreateParams::Flashcall]
@@ -56,6 +61,7 @@ module Telnyx
56
61
  # @param sms [Telnyx::Models::VerifyProfileCreateParams::SMS]
57
62
  # @param webhook_failover_url [String]
58
63
  # @param webhook_url [String]
64
+ # @param whatsapp [Telnyx::Models::VerifyProfileCreateParams::Whatsapp]
59
65
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
60
66
 
61
67
  class Call < Telnyx::Internal::Type::BaseModel
@@ -266,6 +272,42 @@ module Telnyx
266
272
  #
267
273
  # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
268
274
  end
275
+
276
+ class Whatsapp < Telnyx::Internal::Type::BaseModel
277
+ # @!attribute app_name
278
+ # The name that identifies the application requesting 2fa in the verification
279
+ # message.
280
+ #
281
+ # @return [String, nil]
282
+ optional :app_name, String
283
+
284
+ # @!attribute default_verification_timeout_secs
285
+ # For every request that is initiated via this Verify profile, this sets the
286
+ # number of seconds before a verification request code expires. Once the
287
+ # verification request expires, the user cannot use the code to verify their
288
+ # identity.
289
+ #
290
+ # @return [Integer, nil]
291
+ optional :default_verification_timeout_secs, Integer
292
+
293
+ # @!attribute whitelisted_destinations
294
+ # Enabled country destinations to send verification codes. The elements in the
295
+ # list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
296
+ # destinations will be allowed.
297
+ #
298
+ # @return [Array<String>, nil]
299
+ optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
300
+
301
+ # @!method initialize(app_name: nil, default_verification_timeout_secs: nil, whitelisted_destinations: nil)
302
+ # Some parameter documentations has been truncated, see
303
+ # {Telnyx::Models::VerifyProfileCreateParams::Whatsapp} for more details.
304
+ #
305
+ # @param app_name [String] The name that identifies the application requesting 2fa in the verification mess
306
+ #
307
+ # @param default_verification_timeout_secs [Integer] For every request that is initiated via this Verify profile, this sets the numbe
308
+ #
309
+ # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
310
+ end
269
311
  end
270
312
  end
271
313
  end