telnyx 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +4 -0
- data/lib/telnyx/internal/type/union.rb +1 -1
- data/lib/telnyx/models/ai/assistant.rb +39 -4
- data/lib/telnyx/models/ai/assistant_create_params.rb +187 -6
- data/lib/telnyx/models/ai/assistant_imports_params.rb +10 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +400 -3
- data/lib/telnyx/models/ai/assistant_update_params.rb +187 -6
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +189 -6
- data/lib/telnyx/models/ai/bucket_ids.rb +7 -1
- data/lib/telnyx/models/ai/chat_create_completion_params.rb +4 -4
- data/lib/telnyx/models/ai/inference_embedding.rb +187 -6
- data/lib/telnyx/models/ai/messaging_settings.rb +10 -1
- data/lib/telnyx/models/ai/retrieval_tool.rb +3 -3
- data/lib/telnyx/models/ai/telephony_settings.rb +142 -1
- data/lib/telnyx/models/ai/transfer_tool.rb +46 -3
- data/lib/telnyx/models/ai/voice_settings.rb +1 -1
- data/lib/telnyx/models/ai/webhook_tool.rb +256 -3
- data/lib/telnyx/models/call_control_application_list_params.rb +16 -18
- data/lib/telnyx/models/call_event_list_params.rb +16 -18
- data/lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb +289 -0
- data/lib/telnyx/models/calls/action_add_ai_assistant_messages_response.rb +18 -0
- data/lib/telnyx/models/calls/action_start_noise_suppression_params.rb +7 -4
- data/lib/telnyx/models/conference_list_params.rb +16 -18
- data/lib/telnyx/models/conference_list_participants_params.rb +16 -18
- data/lib/telnyx/models/connection_list_active_calls_params.rb +16 -18
- data/lib/telnyx/models/fax_create_params.rb +10 -1
- data/lib/telnyx/models/messaging_10dlc/brand_retrieve_sms_otp_status_params.rb +1 -9
- data/lib/telnyx/models/messaging_profile.rb +11 -1
- data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
- data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
- data/lib/telnyx/models/messaging_tollfree/verification/tf_verification_request.rb +14 -1
- data/lib/telnyx/models/messaging_tollfree/verification/verification_request_egress.rb +17 -1
- data/lib/telnyx/models/messaging_tollfree/verification/verification_request_status.rb +17 -1
- data/lib/telnyx/models/organizations/user_get_groups_report_params.rb +32 -0
- data/lib/telnyx/models/organizations/user_get_groups_report_response.rb +132 -0
- data/lib/telnyx/models/organizations/user_list_params.rb +73 -0
- data/lib/telnyx/models/organizations/user_list_response.rb +118 -0
- data/lib/telnyx/models/organizations/user_retrieve_params.rb +29 -0
- data/lib/telnyx/models/organizations/user_retrieve_response.rb +129 -0
- data/lib/telnyx/models/organizations/users/action_remove_params.rb +18 -0
- data/lib/telnyx/models/organizations/users/action_remove_response.rb +133 -0
- data/lib/telnyx/models/private_wireless_gateway_status.rb +3 -2
- data/lib/telnyx/models/queues/call_list_params.rb +16 -18
- data/lib/telnyx/models/sim_card_list_params.rb +11 -3
- data/lib/telnyx/models/texml/accounts/queue_list_params.rb +64 -0
- data/lib/telnyx/models/texml/accounts/queue_list_response.rb +155 -0
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +1 -7
- data/lib/telnyx/models/unwrap_webhook_event.rb +1 -7
- data/lib/telnyx/models.rb +2 -6
- data/lib/telnyx/resources/ai/assistants/tools.rb +2 -2
- data/lib/telnyx/resources/ai/assistants/versions.rb +18 -16
- data/lib/telnyx/resources/ai/assistants.rb +15 -9
- data/lib/telnyx/resources/ai/clusters.rb +1 -1
- data/lib/telnyx/resources/ai/embeddings.rb +1 -1
- data/lib/telnyx/resources/bundle_pricing/user_bundles.rb +1 -1
- data/lib/telnyx/resources/call_control_applications.rb +8 -4
- data/lib/telnyx/resources/call_events.rb +8 -4
- data/lib/telnyx/resources/calls/actions.rb +31 -0
- data/lib/telnyx/resources/conferences.rb +16 -8
- data/lib/telnyx/resources/connections.rb +8 -4
- data/lib/telnyx/resources/faxes.rb +3 -1
- data/lib/telnyx/resources/messages.rb +1 -1
- data/lib/telnyx/resources/messaging_10dlc/brand.rb +10 -14
- data/lib/telnyx/resources/messaging_profiles/autoresp_configs.rb +6 -6
- data/lib/telnyx/resources/messaging_profiles.rb +6 -2
- data/lib/telnyx/resources/messaging_tollfree/verification/requests.rb +6 -2
- data/lib/telnyx/resources/operator_connect/actions.rb +1 -1
- data/lib/telnyx/resources/organizations/users/actions.rb +38 -0
- data/lib/telnyx/resources/organizations/users.rb +114 -0
- data/lib/telnyx/resources/organizations.rb +18 -0
- data/lib/telnyx/resources/phone_numbers/jobs.rb +1 -1
- data/lib/telnyx/resources/queues/calls.rb +8 -4
- data/lib/telnyx/resources/sim_cards/actions.rb +6 -6
- data/lib/telnyx/resources/texml/accounts/calls/recordings.rb +1 -1
- data/lib/telnyx/resources/texml/accounts/queues.rb +41 -0
- data/lib/telnyx/resources/usage_reports.rb +2 -2
- data/lib/telnyx/resources/webhooks.rb +2 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +15 -69
- data/rbi/telnyx/client.rbi +3 -0
- data/rbi/telnyx/models/ai/assistant.rbi +91 -5
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +449 -14
- data/rbi/telnyx/models/ai/assistant_imports_params.rbi +13 -0
- data/rbi/telnyx/models/ai/assistant_tool.rbi +910 -2
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +449 -14
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +454 -17
- data/rbi/telnyx/models/ai/bucket_ids.rbi +6 -0
- data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +6 -13
- data/rbi/telnyx/models/ai/inference_embedding.rbi +447 -13
- data/rbi/telnyx/models/ai/messaging_settings.rbi +13 -0
- data/rbi/telnyx/models/ai/retrieval_tool.rbi +4 -8
- data/rbi/telnyx/models/ai/telephony_settings.rbi +347 -3
- data/rbi/telnyx/models/ai/transfer_tool.rbi +87 -6
- data/rbi/telnyx/models/ai/voice_settings.rbi +2 -2
- data/rbi/telnyx/models/ai/webhook_tool.rbi +584 -8
- data/rbi/telnyx/models/call_control_application_list_params.rbi +23 -35
- data/rbi/telnyx/models/call_event_list_params.rbi +23 -35
- data/rbi/telnyx/models/calls/action_add_ai_assistant_messages_params.rbi +583 -0
- data/rbi/telnyx/models/calls/action_add_ai_assistant_messages_response.rbi +39 -0
- data/rbi/telnyx/models/calls/action_start_noise_suppression_params.rbi +14 -6
- data/rbi/telnyx/models/conference_list_params.rbi +23 -35
- data/rbi/telnyx/models/conference_list_participants_params.rbi +23 -35
- data/rbi/telnyx/models/connection_list_active_calls_params.rbi +23 -35
- data/rbi/telnyx/models/fax_create_params.rbi +13 -0
- data/rbi/telnyx/models/messaging_10dlc/brand_retrieve_sms_otp_status_params.rbi +5 -21
- data/rbi/telnyx/models/messaging_profile.rbi +15 -0
- data/rbi/telnyx/models/messaging_profile_create_params.rbi +15 -0
- data/rbi/telnyx/models/messaging_profile_update_params.rbi +15 -0
- data/rbi/telnyx/models/messaging_tollfree/verification/tf_verification_request.rbi +12 -0
- data/rbi/telnyx/models/messaging_tollfree/verification/verification_request_egress.rbi +10 -0
- data/rbi/telnyx/models/messaging_tollfree/verification/verification_request_status.rbi +10 -0
- data/rbi/telnyx/models/organizations/user_get_groups_report_params.rbi +93 -0
- data/rbi/telnyx/models/organizations/user_get_groups_report_response.rbi +253 -0
- data/rbi/telnyx/models/organizations/user_list_params.rbi +152 -0
- data/rbi/telnyx/models/organizations/user_list_response.rbi +231 -0
- data/rbi/telnyx/models/organizations/user_retrieve_params.rbi +55 -0
- data/rbi/telnyx/models/organizations/user_retrieve_response.rbi +275 -0
- data/rbi/telnyx/models/organizations/users/action_remove_params.rbi +34 -0
- data/rbi/telnyx/models/organizations/users/action_remove_response.rbi +282 -0
- data/rbi/telnyx/models/private_wireless_gateway_status.rbi +4 -2
- data/rbi/telnyx/models/queues/call_list_params.rbi +23 -35
- data/rbi/telnyx/models/sim_card_list_params.rbi +14 -3
- data/rbi/telnyx/models/texml/accounts/queue_list_params.rbi +103 -0
- data/rbi/telnyx/models/texml/accounts/queue_list_response.rbi +269 -0
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +0 -3
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +0 -3
- data/rbi/telnyx/models.rbi +2 -6
- data/rbi/telnyx/resources/ai/assistants/tools.rbi +2 -2
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +26 -19
- data/rbi/telnyx/resources/ai/assistants.rbi +32 -14
- data/rbi/telnyx/resources/ai/chat.rbi +1 -1
- data/rbi/telnyx/resources/ai/clusters.rbi +1 -1
- data/rbi/telnyx/resources/ai/embeddings.rbi +1 -1
- data/rbi/telnyx/resources/bundle_pricing/user_bundles.rbi +1 -1
- data/rbi/telnyx/resources/call_control_applications.rbi +7 -1
- data/rbi/telnyx/resources/call_events.rbi +5 -1
- data/rbi/telnyx/resources/calls/actions.rbi +37 -2
- data/rbi/telnyx/resources/conferences.rbi +10 -2
- data/rbi/telnyx/resources/connections.rbi +5 -1
- data/rbi/telnyx/resources/faxes.rbi +4 -0
- data/rbi/telnyx/resources/messages.rbi +1 -1
- data/rbi/telnyx/resources/messaging_10dlc/brand.rbi +8 -11
- data/rbi/telnyx/resources/messaging_profiles/autoresp_configs.rbi +6 -6
- data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
- data/rbi/telnyx/resources/messaging_tollfree/verification/requests.rbi +10 -0
- data/rbi/telnyx/resources/operator_connect/actions.rbi +1 -1
- data/rbi/telnyx/resources/organizations/users/actions.rbi +32 -0
- data/rbi/telnyx/resources/organizations/users.rbi +88 -0
- data/rbi/telnyx/resources/organizations.rbi +15 -0
- data/rbi/telnyx/resources/phone_numbers/jobs.rbi +1 -1
- data/rbi/telnyx/resources/queues/calls.rbi +5 -1
- data/rbi/telnyx/resources/sim_cards/actions.rbi +6 -6
- data/rbi/telnyx/resources/sim_cards.rbi +1 -1
- data/rbi/telnyx/resources/texml/accounts/calls/recordings.rbi +1 -1
- data/rbi/telnyx/resources/texml/accounts/queues.rbi +32 -0
- data/rbi/telnyx/resources/usage_reports.rbi +2 -2
- data/rbi/telnyx/resources/webhooks.rbi +0 -6
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/ai/assistant.rbs +44 -1
- data/sig/telnyx/models/ai/assistant_create_params.rbs +176 -1
- data/sig/telnyx/models/ai/assistant_imports_params.rbs +8 -1
- data/sig/telnyx/models/ai/assistant_tool.rbs +367 -2
- data/sig/telnyx/models/ai/assistant_update_params.rbs +176 -1
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +178 -3
- data/sig/telnyx/models/ai/chat_create_completion_params.rbs +4 -7
- data/sig/telnyx/models/ai/inference_embedding.rbs +178 -3
- data/sig/telnyx/models/ai/messaging_settings.rbs +7 -0
- data/sig/telnyx/models/ai/retrieval_tool.rbs +4 -4
- data/sig/telnyx/models/ai/telephony_settings.rbs +133 -4
- data/sig/telnyx/models/ai/transfer_tool.rbs +42 -4
- data/sig/telnyx/models/ai/webhook_tool.rbs +241 -4
- data/sig/telnyx/models/call_control_application_list_params.rbs +17 -26
- data/sig/telnyx/models/call_event_list_params.rbs +18 -27
- data/sig/telnyx/models/calls/action_add_ai_assistant_messages_params.rbs +240 -0
- data/sig/telnyx/models/calls/action_add_ai_assistant_messages_response.rbs +20 -0
- data/sig/telnyx/models/calls/action_start_noise_suppression_params.rbs +2 -1
- data/sig/telnyx/models/conference_list_params.rbs +17 -26
- data/sig/telnyx/models/conference_list_participants_params.rbs +17 -26
- data/sig/telnyx/models/connection_list_active_calls_params.rbs +20 -27
- data/sig/telnyx/models/fax_create_params.rbs +7 -0
- data/sig/telnyx/models/messaging_10dlc/brand_retrieve_sms_otp_status_params.rbs +3 -13
- data/sig/telnyx/models/messaging_profile.rbs +7 -0
- data/sig/telnyx/models/messaging_profile_create_params.rbs +7 -0
- data/sig/telnyx/models/messaging_profile_update_params.rbs +7 -0
- data/sig/telnyx/models/messaging_tollfree/verification/tf_verification_request.rbs +5 -0
- data/sig/telnyx/models/messaging_tollfree/verification/verification_request_egress.rbs +5 -0
- data/sig/telnyx/models/messaging_tollfree/verification/verification_request_status.rbs +5 -0
- data/sig/telnyx/models/organizations/user_get_groups_report_params.rbs +43 -0
- data/sig/telnyx/models/organizations/user_get_groups_report_response.rbs +104 -0
- data/sig/telnyx/models/organizations/user_list_params.rbs +72 -0
- data/sig/telnyx/models/organizations/user_list_response.rbs +99 -0
- data/sig/telnyx/models/organizations/user_retrieve_params.rbs +27 -0
- data/sig/telnyx/models/organizations/user_retrieve_response.rbs +118 -0
- data/sig/telnyx/models/organizations/users/action_remove_params.rbs +19 -0
- data/sig/telnyx/models/organizations/users/action_remove_response.rbs +122 -0
- data/sig/telnyx/models/queues/call_list_params.rbs +20 -27
- data/sig/telnyx/models/sim_card_list_params.rbs +7 -0
- data/sig/telnyx/models/texml/accounts/queue_list_params.rbs +60 -0
- data/sig/telnyx/models/texml/accounts/queue_list_response.rbs +152 -0
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +0 -3
- data/sig/telnyx/models/unwrap_webhook_event.rbs +0 -3
- data/sig/telnyx/models.rbs +2 -6
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +3 -0
- data/sig/telnyx/resources/call_control_applications.rbs +3 -1
- data/sig/telnyx/resources/call_events.rbs +3 -1
- data/sig/telnyx/resources/calls/actions.rbs +8 -0
- data/sig/telnyx/resources/conferences.rbs +6 -2
- data/sig/telnyx/resources/connections.rbs +3 -1
- data/sig/telnyx/resources/faxes.rbs +1 -0
- data/sig/telnyx/resources/messaging_10dlc/brand.rbs +1 -2
- data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
- data/sig/telnyx/resources/messaging_tollfree/verification/requests.rbs +2 -0
- data/sig/telnyx/resources/organizations/users/actions.rbs +16 -0
- data/sig/telnyx/resources/organizations/users.rbs +31 -0
- data/sig/telnyx/resources/organizations.rbs +9 -0
- data/sig/telnyx/resources/queues/calls.rbs +3 -1
- data/sig/telnyx/resources/texml/accounts/queues.rbs +10 -0
- data/sig/telnyx/resources/webhooks.rbs +0 -6
- metadata +47 -20
- data/lib/telnyx/models/ai/inference_embedding_bucket_ids.rb +0 -31
- data/lib/telnyx/models/ai/inference_embedding_transfer_tool_params.rb +0 -93
- data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +0 -265
- data/lib/telnyx/models/streaming_failed_webhook_event.rb +0 -15
- data/lib/telnyx/models/streaming_started_webhook_event.rb +0 -15
- data/lib/telnyx/models/streaming_stopped_webhook_event.rb +0 -15
- data/rbi/telnyx/models/ai/inference_embedding_bucket_ids.rbi +0 -54
- data/rbi/telnyx/models/ai/inference_embedding_transfer_tool_params.rbi +0 -185
- data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +0 -621
- data/rbi/telnyx/models/streaming_failed_webhook_event.rbi +0 -30
- data/rbi/telnyx/models/streaming_started_webhook_event.rbi +0 -30
- data/rbi/telnyx/models/streaming_stopped_webhook_event.rbi +0 -30
- data/sig/telnyx/models/ai/inference_embedding_bucket_ids.rbs +0 -26
- data/sig/telnyx/models/ai/inference_embedding_transfer_tool_params.rbs +0 -75
- data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +0 -242
- data/sig/telnyx/models/streaming_failed_webhook_event.rbs +0 -15
- data/sig/telnyx/models/streaming_started_webhook_event.rbs +0 -16
- data/sig/telnyx/models/streaming_stopped_webhook_event.rbs +0 -16
|
@@ -70,6 +70,35 @@ module Telnyx
|
|
|
70
70
|
sig { params(time_limit_secs: Integer).void }
|
|
71
71
|
attr_writer :time_limit_secs
|
|
72
72
|
|
|
73
|
+
# Maximum duration in seconds of end user silence on the call. When this limit is
|
|
74
|
+
# reached the assistant will be stopped. This limit does not apply to portions of
|
|
75
|
+
# a call without an active assistant (for instance, a call transferred to a human
|
|
76
|
+
# representative).
|
|
77
|
+
sig { returns(T.nilable(Integer)) }
|
|
78
|
+
attr_reader :user_idle_timeout_secs
|
|
79
|
+
|
|
80
|
+
sig { params(user_idle_timeout_secs: Integer).void }
|
|
81
|
+
attr_writer :user_idle_timeout_secs
|
|
82
|
+
|
|
83
|
+
# Configuration for voicemail detection (AMD - Answering Machine Detection) on
|
|
84
|
+
# outgoing calls. These settings only apply if AMD is enabled on the Dial command.
|
|
85
|
+
# See
|
|
86
|
+
# [TeXML Dial documentation](https://developers.telnyx.com/api-reference/texml-rest-commands/initiate-an-outbound-call)
|
|
87
|
+
# for enabling AMD. Recommended settings: MachineDetection=Enable, AsyncAmd=true,
|
|
88
|
+
# DetectionMode=Premium.
|
|
89
|
+
sig do
|
|
90
|
+
returns(T.nilable(Telnyx::AI::TelephonySettings::VoicemailDetection))
|
|
91
|
+
end
|
|
92
|
+
attr_reader :voicemail_detection
|
|
93
|
+
|
|
94
|
+
sig do
|
|
95
|
+
params(
|
|
96
|
+
voicemail_detection:
|
|
97
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OrHash
|
|
98
|
+
).void
|
|
99
|
+
end
|
|
100
|
+
attr_writer :voicemail_detection
|
|
101
|
+
|
|
73
102
|
sig do
|
|
74
103
|
params(
|
|
75
104
|
default_texml_app_id: String,
|
|
@@ -78,7 +107,10 @@ module Telnyx
|
|
|
78
107
|
noise_suppression_config:
|
|
79
108
|
Telnyx::AI::TelephonySettings::NoiseSuppressionConfig::OrHash,
|
|
80
109
|
supports_unauthenticated_web_calls: T::Boolean,
|
|
81
|
-
time_limit_secs: Integer
|
|
110
|
+
time_limit_secs: Integer,
|
|
111
|
+
user_idle_timeout_secs: Integer,
|
|
112
|
+
voicemail_detection:
|
|
113
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OrHash
|
|
82
114
|
).returns(T.attached_class)
|
|
83
115
|
end
|
|
84
116
|
def self.new(
|
|
@@ -99,7 +131,19 @@ module Telnyx
|
|
|
99
131
|
# When this limit is reached the assistant will be stopped. This limit does not
|
|
100
132
|
# apply to portions of a call without an active assistant (for instance, a call
|
|
101
133
|
# transferred to a human representative).
|
|
102
|
-
time_limit_secs: nil
|
|
134
|
+
time_limit_secs: nil,
|
|
135
|
+
# Maximum duration in seconds of end user silence on the call. When this limit is
|
|
136
|
+
# reached the assistant will be stopped. This limit does not apply to portions of
|
|
137
|
+
# a call without an active assistant (for instance, a call transferred to a human
|
|
138
|
+
# representative).
|
|
139
|
+
user_idle_timeout_secs: nil,
|
|
140
|
+
# Configuration for voicemail detection (AMD - Answering Machine Detection) on
|
|
141
|
+
# outgoing calls. These settings only apply if AMD is enabled on the Dial command.
|
|
142
|
+
# See
|
|
143
|
+
# [TeXML Dial documentation](https://developers.telnyx.com/api-reference/texml-rest-commands/initiate-an-outbound-call)
|
|
144
|
+
# for enabling AMD. Recommended settings: MachineDetection=Enable, AsyncAmd=true,
|
|
145
|
+
# DetectionMode=Premium.
|
|
146
|
+
voicemail_detection: nil
|
|
103
147
|
)
|
|
104
148
|
end
|
|
105
149
|
|
|
@@ -112,7 +156,10 @@ module Telnyx
|
|
|
112
156
|
noise_suppression_config:
|
|
113
157
|
Telnyx::AI::TelephonySettings::NoiseSuppressionConfig,
|
|
114
158
|
supports_unauthenticated_web_calls: T::Boolean,
|
|
115
|
-
time_limit_secs: Integer
|
|
159
|
+
time_limit_secs: Integer,
|
|
160
|
+
user_idle_timeout_secs: Integer,
|
|
161
|
+
voicemail_detection:
|
|
162
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection
|
|
116
163
|
}
|
|
117
164
|
)
|
|
118
165
|
end
|
|
@@ -130,6 +177,11 @@ module Telnyx
|
|
|
130
177
|
end
|
|
131
178
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
132
179
|
|
|
180
|
+
KRISP =
|
|
181
|
+
T.let(
|
|
182
|
+
:krisp,
|
|
183
|
+
Telnyx::AI::TelephonySettings::NoiseSuppression::TaggedSymbol
|
|
184
|
+
)
|
|
133
185
|
DEEPFILTERNET =
|
|
134
186
|
T.let(
|
|
135
187
|
:deepfilternet,
|
|
@@ -245,6 +297,298 @@ module Telnyx
|
|
|
245
297
|
end
|
|
246
298
|
end
|
|
247
299
|
end
|
|
300
|
+
|
|
301
|
+
class VoicemailDetection < Telnyx::Internal::Type::BaseModel
|
|
302
|
+
OrHash =
|
|
303
|
+
T.type_alias do
|
|
304
|
+
T.any(
|
|
305
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection,
|
|
306
|
+
Telnyx::Internal::AnyHash
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Action to take when voicemail is detected.
|
|
311
|
+
sig do
|
|
312
|
+
returns(
|
|
313
|
+
T.nilable(
|
|
314
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected
|
|
315
|
+
)
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
attr_reader :on_voicemail_detected
|
|
319
|
+
|
|
320
|
+
sig do
|
|
321
|
+
params(
|
|
322
|
+
on_voicemail_detected:
|
|
323
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::OrHash
|
|
324
|
+
).void
|
|
325
|
+
end
|
|
326
|
+
attr_writer :on_voicemail_detected
|
|
327
|
+
|
|
328
|
+
# Configuration for voicemail detection (AMD - Answering Machine Detection) on
|
|
329
|
+
# outgoing calls. These settings only apply if AMD is enabled on the Dial command.
|
|
330
|
+
# See
|
|
331
|
+
# [TeXML Dial documentation](https://developers.telnyx.com/api-reference/texml-rest-commands/initiate-an-outbound-call)
|
|
332
|
+
# for enabling AMD. Recommended settings: MachineDetection=Enable, AsyncAmd=true,
|
|
333
|
+
# DetectionMode=Premium.
|
|
334
|
+
sig do
|
|
335
|
+
params(
|
|
336
|
+
on_voicemail_detected:
|
|
337
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::OrHash
|
|
338
|
+
).returns(T.attached_class)
|
|
339
|
+
end
|
|
340
|
+
def self.new(
|
|
341
|
+
# Action to take when voicemail is detected.
|
|
342
|
+
on_voicemail_detected: nil
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
sig do
|
|
347
|
+
override.returns(
|
|
348
|
+
{
|
|
349
|
+
on_voicemail_detected:
|
|
350
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
def to_hash
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
class OnVoicemailDetected < Telnyx::Internal::Type::BaseModel
|
|
358
|
+
OrHash =
|
|
359
|
+
T.type_alias do
|
|
360
|
+
T.any(
|
|
361
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected,
|
|
362
|
+
Telnyx::Internal::AnyHash
|
|
363
|
+
)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# The action to take when voicemail is detected.
|
|
367
|
+
sig do
|
|
368
|
+
returns(
|
|
369
|
+
T.nilable(
|
|
370
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::OrSymbol
|
|
371
|
+
)
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
attr_reader :action
|
|
375
|
+
|
|
376
|
+
sig do
|
|
377
|
+
params(
|
|
378
|
+
action:
|
|
379
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::OrSymbol
|
|
380
|
+
).void
|
|
381
|
+
end
|
|
382
|
+
attr_writer :action
|
|
383
|
+
|
|
384
|
+
# Configuration for the voicemail message to leave. Only applicable when action is
|
|
385
|
+
# 'leave_message_and_stop_assistant'.
|
|
386
|
+
sig do
|
|
387
|
+
returns(
|
|
388
|
+
T.nilable(
|
|
389
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage
|
|
390
|
+
)
|
|
391
|
+
)
|
|
392
|
+
end
|
|
393
|
+
attr_reader :voicemail_message
|
|
394
|
+
|
|
395
|
+
sig do
|
|
396
|
+
params(
|
|
397
|
+
voicemail_message:
|
|
398
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::OrHash
|
|
399
|
+
).void
|
|
400
|
+
end
|
|
401
|
+
attr_writer :voicemail_message
|
|
402
|
+
|
|
403
|
+
# Action to take when voicemail is detected.
|
|
404
|
+
sig do
|
|
405
|
+
params(
|
|
406
|
+
action:
|
|
407
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::OrSymbol,
|
|
408
|
+
voicemail_message:
|
|
409
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::OrHash
|
|
410
|
+
).returns(T.attached_class)
|
|
411
|
+
end
|
|
412
|
+
def self.new(
|
|
413
|
+
# The action to take when voicemail is detected.
|
|
414
|
+
action: nil,
|
|
415
|
+
# Configuration for the voicemail message to leave. Only applicable when action is
|
|
416
|
+
# 'leave_message_and_stop_assistant'.
|
|
417
|
+
voicemail_message: nil
|
|
418
|
+
)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
sig do
|
|
422
|
+
override.returns(
|
|
423
|
+
{
|
|
424
|
+
action:
|
|
425
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::OrSymbol,
|
|
426
|
+
voicemail_message:
|
|
427
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
end
|
|
431
|
+
def to_hash
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# The action to take when voicemail is detected.
|
|
435
|
+
module Action
|
|
436
|
+
extend Telnyx::Internal::Type::Enum
|
|
437
|
+
|
|
438
|
+
TaggedSymbol =
|
|
439
|
+
T.type_alias do
|
|
440
|
+
T.all(
|
|
441
|
+
Symbol,
|
|
442
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action
|
|
443
|
+
)
|
|
444
|
+
end
|
|
445
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
446
|
+
|
|
447
|
+
STOP_ASSISTANT =
|
|
448
|
+
T.let(
|
|
449
|
+
:stop_assistant,
|
|
450
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::TaggedSymbol
|
|
451
|
+
)
|
|
452
|
+
LEAVE_MESSAGE_AND_STOP_ASSISTANT =
|
|
453
|
+
T.let(
|
|
454
|
+
:leave_message_and_stop_assistant,
|
|
455
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::TaggedSymbol
|
|
456
|
+
)
|
|
457
|
+
CONTINUE_ASSISTANT =
|
|
458
|
+
T.let(
|
|
459
|
+
:continue_assistant,
|
|
460
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::TaggedSymbol
|
|
461
|
+
)
|
|
462
|
+
|
|
463
|
+
sig do
|
|
464
|
+
override.returns(
|
|
465
|
+
T::Array[
|
|
466
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::Action::TaggedSymbol
|
|
467
|
+
]
|
|
468
|
+
)
|
|
469
|
+
end
|
|
470
|
+
def self.values
|
|
471
|
+
end
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
class VoicemailMessage < Telnyx::Internal::Type::BaseModel
|
|
475
|
+
OrHash =
|
|
476
|
+
T.type_alias do
|
|
477
|
+
T.any(
|
|
478
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage,
|
|
479
|
+
Telnyx::Internal::AnyHash
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
# The specific message to leave as voicemail. Only applicable when type is
|
|
484
|
+
# 'message'.
|
|
485
|
+
sig { returns(T.nilable(String)) }
|
|
486
|
+
attr_reader :message
|
|
487
|
+
|
|
488
|
+
sig { params(message: String).void }
|
|
489
|
+
attr_writer :message
|
|
490
|
+
|
|
491
|
+
# The prompt to use for generating the voicemail message. Only applicable when
|
|
492
|
+
# type is 'prompt'.
|
|
493
|
+
sig { returns(T.nilable(String)) }
|
|
494
|
+
attr_reader :prompt
|
|
495
|
+
|
|
496
|
+
sig { params(prompt: String).void }
|
|
497
|
+
attr_writer :prompt
|
|
498
|
+
|
|
499
|
+
# The type of voicemail message. Use 'prompt' to have the assistant generate a
|
|
500
|
+
# message based on a prompt, or 'message' to leave a specific message.
|
|
501
|
+
sig do
|
|
502
|
+
returns(
|
|
503
|
+
T.nilable(
|
|
504
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::OrSymbol
|
|
505
|
+
)
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
attr_reader :type
|
|
509
|
+
|
|
510
|
+
sig do
|
|
511
|
+
params(
|
|
512
|
+
type:
|
|
513
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::OrSymbol
|
|
514
|
+
).void
|
|
515
|
+
end
|
|
516
|
+
attr_writer :type
|
|
517
|
+
|
|
518
|
+
# Configuration for the voicemail message to leave. Only applicable when action is
|
|
519
|
+
# 'leave_message_and_stop_assistant'.
|
|
520
|
+
sig do
|
|
521
|
+
params(
|
|
522
|
+
message: String,
|
|
523
|
+
prompt: String,
|
|
524
|
+
type:
|
|
525
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::OrSymbol
|
|
526
|
+
).returns(T.attached_class)
|
|
527
|
+
end
|
|
528
|
+
def self.new(
|
|
529
|
+
# The specific message to leave as voicemail. Only applicable when type is
|
|
530
|
+
# 'message'.
|
|
531
|
+
message: nil,
|
|
532
|
+
# The prompt to use for generating the voicemail message. Only applicable when
|
|
533
|
+
# type is 'prompt'.
|
|
534
|
+
prompt: nil,
|
|
535
|
+
# The type of voicemail message. Use 'prompt' to have the assistant generate a
|
|
536
|
+
# message based on a prompt, or 'message' to leave a specific message.
|
|
537
|
+
type: nil
|
|
538
|
+
)
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
sig do
|
|
542
|
+
override.returns(
|
|
543
|
+
{
|
|
544
|
+
message: String,
|
|
545
|
+
prompt: String,
|
|
546
|
+
type:
|
|
547
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::OrSymbol
|
|
548
|
+
}
|
|
549
|
+
)
|
|
550
|
+
end
|
|
551
|
+
def to_hash
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# The type of voicemail message. Use 'prompt' to have the assistant generate a
|
|
555
|
+
# message based on a prompt, or 'message' to leave a specific message.
|
|
556
|
+
module Type
|
|
557
|
+
extend Telnyx::Internal::Type::Enum
|
|
558
|
+
|
|
559
|
+
TaggedSymbol =
|
|
560
|
+
T.type_alias do
|
|
561
|
+
T.all(
|
|
562
|
+
Symbol,
|
|
563
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type
|
|
564
|
+
)
|
|
565
|
+
end
|
|
566
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
567
|
+
|
|
568
|
+
PROMPT =
|
|
569
|
+
T.let(
|
|
570
|
+
:prompt,
|
|
571
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::TaggedSymbol
|
|
572
|
+
)
|
|
573
|
+
MESSAGE =
|
|
574
|
+
T.let(
|
|
575
|
+
:message,
|
|
576
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::TaggedSymbol
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
sig do
|
|
580
|
+
override.returns(
|
|
581
|
+
T::Array[
|
|
582
|
+
Telnyx::AI::TelephonySettings::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type::TaggedSymbol
|
|
583
|
+
]
|
|
584
|
+
)
|
|
585
|
+
end
|
|
586
|
+
def self.values
|
|
587
|
+
end
|
|
588
|
+
end
|
|
589
|
+
end
|
|
590
|
+
end
|
|
591
|
+
end
|
|
248
592
|
end
|
|
249
593
|
end
|
|
250
594
|
end
|
|
@@ -9,13 +9,11 @@ module Telnyx
|
|
|
9
9
|
T.any(Telnyx::AI::TransferTool, Telnyx::Internal::AnyHash)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
sig { returns(Telnyx::AI::
|
|
12
|
+
sig { returns(Telnyx::AI::TransferTool::Transfer) }
|
|
13
13
|
attr_reader :transfer
|
|
14
14
|
|
|
15
15
|
sig do
|
|
16
|
-
params(
|
|
17
|
-
transfer: Telnyx::AI::InferenceEmbeddingTransferToolParams::OrHash
|
|
18
|
-
).void
|
|
16
|
+
params(transfer: Telnyx::AI::TransferTool::Transfer::OrHash).void
|
|
19
17
|
end
|
|
20
18
|
attr_writer :transfer
|
|
21
19
|
|
|
@@ -24,7 +22,7 @@ module Telnyx
|
|
|
24
22
|
|
|
25
23
|
sig do
|
|
26
24
|
params(
|
|
27
|
-
transfer: Telnyx::AI::
|
|
25
|
+
transfer: Telnyx::AI::TransferTool::Transfer::OrHash,
|
|
28
26
|
type: Telnyx::AI::TransferTool::Type::OrSymbol
|
|
29
27
|
).returns(T.attached_class)
|
|
30
28
|
end
|
|
@@ -34,7 +32,7 @@ module Telnyx
|
|
|
34
32
|
sig do
|
|
35
33
|
override.returns(
|
|
36
34
|
{
|
|
37
|
-
transfer: Telnyx::AI::
|
|
35
|
+
transfer: Telnyx::AI::TransferTool::Transfer,
|
|
38
36
|
type: Telnyx::AI::TransferTool::Type::OrSymbol
|
|
39
37
|
}
|
|
40
38
|
)
|
|
@@ -42,6 +40,89 @@ module Telnyx
|
|
|
42
40
|
def to_hash
|
|
43
41
|
end
|
|
44
42
|
|
|
43
|
+
class Transfer < Telnyx::Internal::Type::BaseModel
|
|
44
|
+
OrHash =
|
|
45
|
+
T.type_alias do
|
|
46
|
+
T.any(
|
|
47
|
+
Telnyx::AI::TransferTool::Transfer,
|
|
48
|
+
Telnyx::Internal::AnyHash
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Number or SIP URI placing the call.
|
|
53
|
+
sig { returns(String) }
|
|
54
|
+
attr_accessor :from
|
|
55
|
+
|
|
56
|
+
# The different possible targets of the transfer. The assistant will be able to
|
|
57
|
+
# choose one of the targets to transfer the call to.
|
|
58
|
+
sig { returns(T::Array[Telnyx::AI::TransferTool::Transfer::Target]) }
|
|
59
|
+
attr_accessor :targets
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
from: String,
|
|
64
|
+
targets:
|
|
65
|
+
T::Array[Telnyx::AI::TransferTool::Transfer::Target::OrHash]
|
|
66
|
+
).returns(T.attached_class)
|
|
67
|
+
end
|
|
68
|
+
def self.new(
|
|
69
|
+
# Number or SIP URI placing the call.
|
|
70
|
+
from:,
|
|
71
|
+
# The different possible targets of the transfer. The assistant will be able to
|
|
72
|
+
# choose one of the targets to transfer the call to.
|
|
73
|
+
targets:
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
override.returns(
|
|
79
|
+
{
|
|
80
|
+
from: String,
|
|
81
|
+
targets: T::Array[Telnyx::AI::TransferTool::Transfer::Target]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
def to_hash
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class Target < Telnyx::Internal::Type::BaseModel
|
|
89
|
+
OrHash =
|
|
90
|
+
T.type_alias do
|
|
91
|
+
T.any(
|
|
92
|
+
Telnyx::AI::TransferTool::Transfer::Target,
|
|
93
|
+
Telnyx::Internal::AnyHash
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# The name of the target.
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_reader :name
|
|
100
|
+
|
|
101
|
+
sig { params(name: String).void }
|
|
102
|
+
attr_writer :name
|
|
103
|
+
|
|
104
|
+
# The destination number or SIP URI of the call.
|
|
105
|
+
sig { returns(T.nilable(String)) }
|
|
106
|
+
attr_reader :to
|
|
107
|
+
|
|
108
|
+
sig { params(to: String).void }
|
|
109
|
+
attr_writer :to
|
|
110
|
+
|
|
111
|
+
sig { params(name: String, to: String).returns(T.attached_class) }
|
|
112
|
+
def self.new(
|
|
113
|
+
# The name of the target.
|
|
114
|
+
name: nil,
|
|
115
|
+
# The destination number or SIP URI of the call.
|
|
116
|
+
to: nil
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
sig { override.returns({ name: String, to: String }) }
|
|
121
|
+
def to_hash
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
45
126
|
module Type
|
|
46
127
|
extend Telnyx::Internal::Type::Enum
|
|
47
128
|
|
|
@@ -13,7 +13,7 @@ module Telnyx
|
|
|
13
13
|
# [available voices](https://developers.telnyx.com/api/call-control/list-text-to-speech-voices)
|
|
14
14
|
# via our voices API. To use ElevenLabs, you must reference your ElevenLabs API
|
|
15
15
|
# key as an integration secret under the `api_key_ref` field. See
|
|
16
|
-
# [integration secrets documentation](https://developers.telnyx.com/api
|
|
16
|
+
# [integration secrets documentation](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
17
17
|
# for details. For Telnyx voices, use `Telnyx.<model_id>.<voice_id>` (e.g.
|
|
18
18
|
# Telnyx.KokoroTTS.af_heart)
|
|
19
19
|
sig { returns(String) }
|
|
@@ -131,7 +131,7 @@ module Telnyx
|
|
|
131
131
|
# [available voices](https://developers.telnyx.com/api/call-control/list-text-to-speech-voices)
|
|
132
132
|
# via our voices API. To use ElevenLabs, you must reference your ElevenLabs API
|
|
133
133
|
# key as an integration secret under the `api_key_ref` field. See
|
|
134
|
-
# [integration secrets documentation](https://developers.telnyx.com/api
|
|
134
|
+
# [integration secrets documentation](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
135
135
|
# for details. For Telnyx voices, use `Telnyx.<model_id>.<voice_id>` (e.g.
|
|
136
136
|
# Telnyx.KokoroTTS.af_heart)
|
|
137
137
|
voice:,
|