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
@@ -43,6 +43,7 @@ module Telnyx
43
43
  insight_settings: Telnyx::AI::InsightSettings::OrHash,
44
44
  llm_api_key_ref: String,
45
45
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
46
+ observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
46
47
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
47
48
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
48
49
  tool_ids: T::Array[String],
@@ -100,6 +101,7 @@ module Telnyx
100
101
  # work with this integration.
101
102
  llm_api_key_ref: nil,
102
103
  messaging_settings: nil,
104
+ observability_settings: nil,
103
105
  privacy_settings: nil,
104
106
  telephony_settings: nil,
105
107
  tool_ids: nil,
@@ -150,6 +152,7 @@ module Telnyx
150
152
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
151
153
  model: String,
152
154
  name: String,
155
+ observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
153
156
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
154
157
  promote_to_main: T::Boolean,
155
158
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
@@ -209,6 +212,7 @@ module Telnyx
209
212
  # to see all of your available models,
210
213
  model: nil,
211
214
  name: nil,
215
+ observability_settings: nil,
212
216
  privacy_settings: nil,
213
217
  # Indicates whether the assistant should be promoted to the main version. Defaults
214
218
  # to true.
@@ -1963,6 +1963,7 @@ module Telnyx
1963
1963
  mute_dtmf: Telnyx::Calls::ActionTransferParams::MuteDtmf::OrSymbol,
1964
1964
  park_after_unbridge: String,
1965
1965
  preferred_codecs: String,
1966
+ privacy: Telnyx::Calls::ActionTransferParams::Privacy::OrSymbol,
1966
1967
  record: Telnyx::Calls::ActionTransferParams::Record::OrSymbol,
1967
1968
  record_channels:
1968
1969
  Telnyx::Calls::ActionTransferParams::RecordChannels::OrSymbol,
@@ -2058,6 +2059,10 @@ module Telnyx
2058
2059
  # call. The codecs supported are `G722`, `PCMU`, `PCMA`, `G729`, `OPUS`, `VP8`,
2059
2060
  # `H264`, `AMR-WB`.
2060
2061
  preferred_codecs: nil,
2062
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
2063
+ # information (name and number) will be hidden from the called party. When set to
2064
+ # `none` or omitted, caller ID will be shown normally.
2065
+ privacy: nil,
2061
2066
  # Start recording automatically after an event. Disabled by default.
2062
2067
  record: nil,
2063
2068
  # Defines which channel should be recorded ('single' or 'dual') when `record` is
@@ -53,6 +53,7 @@ module Telnyx
53
53
  park_after_unbridge: String,
54
54
  preferred_codecs: String,
55
55
  prevent_double_bridge: T::Boolean,
56
+ privacy: Telnyx::CallDialParams::Privacy::OrSymbol,
56
57
  record: Telnyx::CallDialParams::Record::OrSymbol,
57
58
  record_channels: Telnyx::CallDialParams::RecordChannels::OrSymbol,
58
59
  record_custom_file_name: String,
@@ -177,6 +178,10 @@ module Telnyx
177
178
  # Prevents bridging and hangs up the call if the target is already bridged.
178
179
  # Disabled by default.
179
180
  prevent_double_bridge: nil,
181
+ # Indicates the privacy level to be used for the call. When set to `id`, caller ID
182
+ # information (name and number) will be hidden from the called party. When set to
183
+ # `none` or omitted, caller ID will be shown normally.
184
+ privacy: nil,
180
185
  # Start recording automatically after an event. Disabled by default.
181
186
  record: nil,
182
187
  # Defines which channel should be recorded ('single' or 'dual') when `record` is
@@ -7,39 +7,6 @@ module Telnyx
7
7
  # Associate phone numbers with an enterprise for reputation monitoring and
8
8
  # retrieve reputation scores
9
9
  class Numbers
10
- # Associate one or more phone numbers with an enterprise for Number Reputation
11
- # monitoring.
12
- #
13
- # **Validations:**
14
- #
15
- # - Phone numbers must be in E.164 format (e.g., `+16035551234`)
16
- # - Phone numbers must be in-service and belong to your account (verified via
17
- # Warehouse)
18
- # - Phone numbers must be US local numbers
19
- # - Phone numbers cannot already be associated with any enterprise
20
- #
21
- # **Note:** This operation is atomic — if any number fails validation, the entire
22
- # request fails.
23
- #
24
- # **Maximum:** 100 phone numbers per request.
25
- sig do
26
- params(
27
- enterprise_id: String,
28
- phone_numbers: T::Array[String],
29
- request_options: Telnyx::RequestOptions::OrHash
30
- ).returns(
31
- Telnyx::Models::Enterprises::Reputation::NumberCreateResponse
32
- )
33
- end
34
- def create(
35
- # Unique identifier of the enterprise (UUID)
36
- enterprise_id,
37
- # List of phone numbers to associate for reputation monitoring (max 100)
38
- phone_numbers:,
39
- request_options: {}
40
- )
41
- end
42
-
43
10
  # Get detailed reputation data for a specific phone number associated with an
44
11
  # enterprise.
45
12
  #
@@ -111,6 +78,39 @@ module Telnyx
111
78
  )
112
79
  end
113
80
 
81
+ # Associate one or more phone numbers with an enterprise for Number Reputation
82
+ # monitoring.
83
+ #
84
+ # **Validations:**
85
+ #
86
+ # - Phone numbers must be in E.164 format (e.g., `+16035551234`)
87
+ # - Phone numbers must be in-service and belong to your account (verified via
88
+ # Warehouse)
89
+ # - Phone numbers must be US local numbers
90
+ # - Phone numbers cannot already be associated with any enterprise
91
+ #
92
+ # **Note:** This operation is atomic — if any number fails validation, the entire
93
+ # request fails.
94
+ #
95
+ # **Maximum:** 100 phone numbers per request.
96
+ sig do
97
+ params(
98
+ enterprise_id: String,
99
+ phone_numbers: T::Array[String],
100
+ request_options: Telnyx::RequestOptions::OrHash
101
+ ).returns(
102
+ Telnyx::Models::Enterprises::Reputation::NumberAssociateResponse
103
+ )
104
+ end
105
+ def associate(
106
+ # Unique identifier of the enterprise (UUID)
107
+ enterprise_id,
108
+ # List of phone numbers to associate for reputation monitoring (max 100)
109
+ phone_numbers:,
110
+ request_options: {}
111
+ )
112
+ end
113
+
114
114
  # Remove a phone number from Number Reputation monitoring for an enterprise.
115
115
  #
116
116
  # The number will no longer be tracked and reputation data will no longer be
@@ -122,7 +122,7 @@ module Telnyx
122
122
  request_options: Telnyx::RequestOptions::OrHash
123
123
  ).void
124
124
  end
125
- def delete(
125
+ def disassociate(
126
126
  # Phone number in E.164 format
127
127
  phone_number,
128
128
  # Unique identifier of the enterprise (UUID)
@@ -11,6 +11,47 @@ module Telnyx
11
11
  sig { returns(Telnyx::Resources::Enterprises::Reputation::Numbers) }
12
12
  attr_reader :numbers
13
13
 
14
+ # Retrieve the current Number Reputation settings for an enterprise.
15
+ #
16
+ # Returns the enrollment status (`pending`, `approved`, `rejected`, `deleted`),
17
+ # check frequency, and any rejection reasons.
18
+ #
19
+ # Returns `404` if reputation has not been enabled for this enterprise.
20
+ sig do
21
+ params(
22
+ enterprise_id: String,
23
+ request_options: Telnyx::RequestOptions::OrHash
24
+ ).returns(Telnyx::Models::Enterprises::ReputationRetrieveResponse)
25
+ end
26
+ def retrieve(
27
+ # Unique identifier of the enterprise (UUID)
28
+ enterprise_id,
29
+ request_options: {}
30
+ )
31
+ end
32
+
33
+ # Disable Number Reputation for an enterprise.
34
+ #
35
+ # This will:
36
+ #
37
+ # - Delete the reputation settings record
38
+ # - Log the deletion for audit purposes
39
+ # - Stop all future automated reputation checks
40
+ #
41
+ # **Note:** Can only be performed on `approved` reputation settings.
42
+ sig do
43
+ params(
44
+ enterprise_id: String,
45
+ request_options: Telnyx::RequestOptions::OrHash
46
+ ).void
47
+ end
48
+ def disable(
49
+ # Unique identifier of the enterprise (UUID)
50
+ enterprise_id,
51
+ request_options: {}
52
+ )
53
+ end
54
+
14
55
  # Enable Number Reputation service for an enterprise.
15
56
  #
16
57
  # **Requirements:**
@@ -41,11 +82,11 @@ module Telnyx
41
82
  enterprise_id: String,
42
83
  loa_document_id: String,
43
84
  check_frequency:
44
- Telnyx::Enterprises::ReputationCreateParams::CheckFrequency::OrSymbol,
85
+ Telnyx::Enterprises::ReputationEnableParams::CheckFrequency::OrSymbol,
45
86
  request_options: Telnyx::RequestOptions::OrHash
46
- ).returns(Telnyx::Models::Enterprises::ReputationCreateResponse)
87
+ ).returns(Telnyx::Models::Enterprises::ReputationEnableResponse)
47
88
  end
48
- def create(
89
+ def enable(
49
90
  # Unique identifier of the enterprise (UUID)
50
91
  enterprise_id,
51
92
  # ID of the signed Letter of Authorization (LOA) document uploaded to the document
@@ -57,47 +98,6 @@ module Telnyx
57
98
  )
58
99
  end
59
100
 
60
- # Retrieve the current Number Reputation settings for an enterprise.
61
- #
62
- # Returns the enrollment status (`pending`, `approved`, `rejected`, `deleted`),
63
- # check frequency, and any rejection reasons.
64
- #
65
- # Returns `404` if reputation has not been enabled for this enterprise.
66
- sig do
67
- params(
68
- enterprise_id: String,
69
- request_options: Telnyx::RequestOptions::OrHash
70
- ).returns(Telnyx::Models::Enterprises::ReputationListResponse)
71
- end
72
- def list(
73
- # Unique identifier of the enterprise (UUID)
74
- enterprise_id,
75
- request_options: {}
76
- )
77
- end
78
-
79
- # Disable Number Reputation for an enterprise.
80
- #
81
- # This will:
82
- #
83
- # - Delete the reputation settings record
84
- # - Log the deletion for audit purposes
85
- # - Stop all future automated reputation checks
86
- #
87
- # **Note:** Can only be performed on `approved` reputation settings.
88
- sig do
89
- params(
90
- enterprise_id: String,
91
- request_options: Telnyx::RequestOptions::OrHash
92
- ).void
93
- end
94
- def delete_all(
95
- # Unique identifier of the enterprise (UUID)
96
- enterprise_id,
97
- request_options: {}
98
- )
99
- end
100
-
101
101
  # Update how often reputation data is automatically refreshed.
102
102
  #
103
103
  # **Note:** The enterprise must have `approved` reputation settings. Updating
@@ -0,0 +1,131 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ # Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries
6
+ # contain alias items (text replacement) and phoneme items (IPA pronunciation
7
+ # notation) that control how specific words are spoken.
8
+ class PronunciationDicts
9
+ # Create a new pronunciation dictionary for the authenticated organization. Each
10
+ # dictionary contains a list of items that control how specific words are spoken.
11
+ # Items can be alias type (text replacement) or phoneme type (IPA pronunciation
12
+ # notation).
13
+ #
14
+ # As an alternative to providing items directly as JSON, you can upload a
15
+ # dictionary file (PLS/XML or plain text format, max 1MB) using
16
+ # multipart/form-data. PLS files use the standard W3C Pronunciation Lexicon
17
+ # Specification XML format. Text files use a line-based format: `word=alias` for
18
+ # aliases, `word:/phoneme/` for IPA phonemes.
19
+ #
20
+ # Limits:
21
+ #
22
+ # - Maximum 50 dictionaries per organization
23
+ # - Maximum 100 items per dictionary
24
+ # - Text: max 200 characters
25
+ # - Alias/phoneme value: max 500 characters
26
+ # - File upload: max 1MB (1,048,576 bytes)
27
+ sig do
28
+ params(
29
+ items:
30
+ T::Array[
31
+ T.any(
32
+ Telnyx::PronunciationDictCreateParams::Item::Alias::OrHash,
33
+ Telnyx::PronunciationDictCreateParams::Item::Phoneme::OrHash
34
+ )
35
+ ],
36
+ name: String,
37
+ request_options: Telnyx::RequestOptions::OrHash
38
+ ).returns(Telnyx::Models::PronunciationDictCreateResponse)
39
+ end
40
+ def create(
41
+ # List of pronunciation items (alias or phoneme type). At least one item is
42
+ # required.
43
+ items:,
44
+ # Human-readable name. Must be unique within the organization.
45
+ name:,
46
+ request_options: {}
47
+ )
48
+ end
49
+
50
+ # Retrieve a single pronunciation dictionary by ID.
51
+ sig do
52
+ params(
53
+ id: String,
54
+ request_options: Telnyx::RequestOptions::OrHash
55
+ ).returns(Telnyx::Models::PronunciationDictRetrieveResponse)
56
+ end
57
+ def retrieve(
58
+ # The UUID of the pronunciation dictionary.
59
+ id,
60
+ request_options: {}
61
+ )
62
+ end
63
+
64
+ # Update the name and/or items of an existing pronunciation dictionary. Uses
65
+ # optimistic locking — if the dictionary was modified concurrently, the request
66
+ # returns 409 Conflict.
67
+ sig do
68
+ params(
69
+ id: String,
70
+ items:
71
+ T::Array[
72
+ T.any(
73
+ Telnyx::PronunciationDictUpdateParams::Item::Alias::OrHash,
74
+ Telnyx::PronunciationDictUpdateParams::Item::Phoneme::OrHash
75
+ )
76
+ ],
77
+ name: String,
78
+ request_options: Telnyx::RequestOptions::OrHash
79
+ ).returns(Telnyx::Models::PronunciationDictUpdateResponse)
80
+ end
81
+ def update(
82
+ # The UUID of the pronunciation dictionary.
83
+ id,
84
+ # Updated list of pronunciation items (alias or phoneme type).
85
+ items: nil,
86
+ # Updated dictionary name.
87
+ name: nil,
88
+ request_options: {}
89
+ )
90
+ end
91
+
92
+ # List all pronunciation dictionaries for the authenticated organization. Results
93
+ # are paginated using offset-based pagination.
94
+ sig do
95
+ params(
96
+ page_number: Integer,
97
+ page_size: Integer,
98
+ request_options: Telnyx::RequestOptions::OrHash
99
+ ).returns(
100
+ Telnyx::Internal::DefaultFlatPagination[
101
+ Telnyx::Models::PronunciationDictListResponse
102
+ ]
103
+ )
104
+ end
105
+ def list(
106
+ # Page number (1-based). Defaults to 1.
107
+ page_number: nil,
108
+ # Number of results per page. Defaults to 20, maximum 250.
109
+ page_size: nil,
110
+ request_options: {}
111
+ )
112
+ end
113
+
114
+ # Permanently delete a pronunciation dictionary.
115
+ sig do
116
+ params(id: String, request_options: Telnyx::RequestOptions::OrHash).void
117
+ end
118
+ def delete(
119
+ # The UUID of the pronunciation dictionary.
120
+ id,
121
+ request_options: {}
122
+ )
123
+ end
124
+
125
+ # @api private
126
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
127
+ def self.new(client:)
128
+ end
129
+ end
130
+ end
131
+ end
@@ -95,175 +95,19 @@ module Telnyx
95
95
  sig do
96
96
  params(
97
97
  account_sid: String,
98
- application_sid: String,
99
- from: String,
100
- to: String,
101
- async_amd: T::Boolean,
102
- async_amd_status_callback: String,
103
- async_amd_status_callback_method:
104
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol,
105
- caller_id: String,
106
- cancel_playback_on_detect_message_end: T::Boolean,
107
- cancel_playback_on_machine_detection: T::Boolean,
108
- custom_headers:
109
- T::Array[
110
- Telnyx::Texml::Accounts::CallCallsParams::CustomHeader::OrHash
111
- ],
112
- detection_mode:
113
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol,
114
- fallback_url: String,
115
- machine_detection:
116
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol,
117
- machine_detection_silence_timeout: Integer,
118
- machine_detection_speech_end_threshold: Integer,
119
- machine_detection_speech_threshold: Integer,
120
- machine_detection_timeout: Integer,
121
- preferred_codecs: String,
122
- record: T::Boolean,
123
- recording_channels:
124
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol,
125
- recording_status_callback: String,
126
- recording_status_callback_event: String,
127
- recording_status_callback_method:
128
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol,
129
- recording_timeout: Integer,
130
- recording_track:
131
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol,
132
- send_recording_url: T::Boolean,
133
- sip_auth_password: String,
134
- sip_auth_username: String,
135
- sip_region:
136
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol,
137
- status_callback: String,
138
- status_callback_event:
139
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol,
140
- status_callback_method:
141
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol,
142
- supervise_call_sid: String,
143
- supervising_role:
144
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol,
145
- texml: String,
146
- time_limit: Integer,
147
- timeout_seconds: Integer,
148
- trim: Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol,
149
- url: String,
150
- url_method:
151
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol,
98
+ body:
99
+ T.any(
100
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::OrHash,
101
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::OrHash,
102
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::OrHash
103
+ ),
152
104
  request_options: Telnyx::RequestOptions::OrHash
153
105
  ).returns(Telnyx::Models::Texml::Accounts::CallCallsResponse)
154
106
  end
155
107
  def calls(
156
108
  # The id of the account the resource belongs to.
157
109
  account_sid,
158
- # The ID of the TeXML Application.
159
- application_sid:,
160
- # The phone number of the party that initiated the call. Phone numbers are
161
- # formatted with a `+` and country code.
162
- from:,
163
- # The phone number of the called party. Phone numbers are formatted with a `+` and
164
- # country code.
165
- to:,
166
- # Select whether to perform answering machine detection in the background. By
167
- # default execution is blocked until Answering Machine Detection is completed.
168
- async_amd: nil,
169
- # URL destination for Telnyx to send AMD callback events to for the call.
170
- async_amd_status_callback: nil,
171
- # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
172
- # inherited from TeXML Application setting.
173
- async_amd_status_callback_method: nil,
174
- # To be used as the caller id name (SIP From Display Name) presented to the
175
- # destination (`To` number). The string should have a maximum of 128 characters,
176
- # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
177
- # ommited, the display name will be the same as the number in the `From` field.
178
- caller_id: nil,
179
- # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
180
- # `true`.
181
- cancel_playback_on_detect_message_end: nil,
182
- # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
183
- cancel_playback_on_machine_detection: nil,
184
- # Custom HTTP headers to be sent with the call. Each header should be an object
185
- # with 'name' and 'value' properties.
186
- custom_headers: nil,
187
- # Allows you to chose between Premium and Standard detections.
188
- detection_mode: nil,
189
- # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
190
- # `Url` is not responding.
191
- fallback_url: nil,
192
- # Enables Answering Machine Detection.
193
- machine_detection: nil,
194
- # If initial silence duration is greater than this value, consider it a machine.
195
- # Ignored when `premium` detection is used.
196
- machine_detection_silence_timeout: nil,
197
- # Silence duration threshold after a greeting message or voice for it be
198
- # considered human. Ignored when `premium` detection is used.
199
- machine_detection_speech_end_threshold: nil,
200
- # Maximum threshold of a human greeting. If greeting longer than this value,
201
- # considered machine. Ignored when `premium` detection is used.
202
- machine_detection_speech_threshold: nil,
203
- # Maximum timeout threshold in milliseconds for overall detection.
204
- machine_detection_timeout: nil,
205
- # The list of comma-separated codecs to be offered on a call.
206
- preferred_codecs: nil,
207
- # Whether to record the entire participant's call leg. Defaults to `false`.
208
- record: nil,
209
- # The number of channels in the final recording. Defaults to `mono`.
210
- recording_channels: nil,
211
- # The URL the recording callbacks will be sent to.
212
- recording_status_callback: nil,
213
- # The changes to the recording's state that should generate a call to
214
- # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
215
- # Separate multiple values with a space. Defaults to `completed`.
216
- recording_status_callback_event: nil,
217
- # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
218
- recording_status_callback_method: nil,
219
- # The number of seconds that Telnyx will wait for the recording to be stopped if
220
- # silence is detected. The timer only starts when the speech is detected. Please
221
- # note that the transcription is used to detect silence and the related charge
222
- # will be applied. The minimum value is 0. The default value is 0 (infinite)
223
- recording_timeout: nil,
224
- # The audio track to record for the call. The default is `both`.
225
- recording_track: nil,
226
- # Whether to send RecordingUrl in webhooks.
227
- send_recording_url: nil,
228
- # The password to use for SIP authentication.
229
- sip_auth_password: nil,
230
- # The username to use for SIP authentication.
231
- sip_auth_username: nil,
232
- # Defines the SIP region to be used for the call.
233
- sip_region: nil,
234
- # URL destination for Telnyx to send status callback events to for the call.
235
- status_callback: nil,
236
- # The call events for which Telnyx should send a webhook. Multiple events can be
237
- # defined when separated by a space.
238
- status_callback_event: nil,
239
- # HTTP request type used for `StatusCallback`.
240
- status_callback_method: nil,
241
- # The call control ID of the existing call to supervise. When provided, the
242
- # created leg will be added to the specified call in supervising mode. Status
243
- # callbacks and action callbacks will NOT be sent for the supervising leg.
244
- supervise_call_sid: nil,
245
- # The supervising role for the new leg. Determines the audio behavior: barge (hear
246
- # both sides), whisper (only hear supervisor), monitor (hear both sides but
247
- # supervisor muted). Default: barge
248
- supervising_role: nil,
249
- # TeXML to be used as instructions for the call. If provided, the call will
250
- # execute these instructions instead of fetching from the Url.
251
- texml: nil,
252
- # The maximum duration of the call in seconds. The minimum value is 30 and the
253
- # maximum value is 14400 (4 hours). Default is 14400 seconds.
254
- time_limit: nil,
255
- # The number of seconds to wait for the called party to answer the call before the
256
- # call is canceled. The minimum value is 5 and the maximum value is 120. Default
257
- # is 30 seconds.
258
- timeout_seconds: nil,
259
- # Whether to trim any leading and trailing silence from the recording. Defaults to
260
- # `trim-silence`.
261
- trim: nil,
262
- # The URL from which Telnyx will retrieve the TeXML call instructions.
263
- url: nil,
264
- # HTTP request type used for `Url`. The default value is inherited from TeXML
265
- # Application setting.
266
- url_method: nil,
110
+ body:,
267
111
  request_options: {}
268
112
  )
269
113
  end