telnyx 5.168.0 → 5.169.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 +7 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +40 -0
- data/lib/telnyx/internal/type/union.rb +6 -6
- data/lib/telnyx/models/ai/assistant_create_params.rb +6 -6
- data/lib/telnyx/models/ai/assistant_tool.rb +285 -12
- data/lib/telnyx/models/ai/assistant_update_params.rb +20 -9
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +20 -9
- data/lib/telnyx/models/ai/audio_transcribe_params.rb +33 -13
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +34 -56
- data/lib/telnyx/models/ai/audio_transcription_response_word.rb +74 -0
- data/lib/telnyx/models/ai/chat_completion_request.rb +3 -26
- data/lib/telnyx/models/ai/flow_node.rb +2 -2
- data/lib/telnyx/models/ai/inference_embedding.rb +13 -10
- data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +10 -1
- data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +21 -1
- data/lib/telnyx/models/ai/openai/function_definition.rb +31 -0
- data/lib/telnyx/models/ai/post_conversation_settings.rb +4 -4
- data/lib/telnyx/models/ai/post_conversation_settings_req.rb +4 -4
- data/lib/telnyx/models/ai/privacy_settings.rb +20 -1
- data/lib/telnyx/models/ai/retrieval_tool.rb +21 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +86 -16
- data/lib/telnyx/models/ai/tool_node.rb +2 -2
- data/lib/telnyx/models/ai/transcription_settings.rb +12 -4
- data/lib/telnyx/models/ai/transcription_settings_config.rb +12 -11
- data/lib/telnyx/models/ai/typesafe/v1_systemone_params.rb +268 -0
- data/lib/telnyx/models/ai/typesafe/v1_systemone_response.rb +222 -0
- data/lib/telnyx/models/bot_challenge_create_params.rb +38 -0
- data/lib/telnyx/models/bot_challenge_create_response.rb +87 -0
- data/lib/telnyx/models/bot_session_list_params.rb +34 -0
- data/lib/telnyx/models/bot_session_list_response.rb +32 -0
- data/lib/telnyx/models/bot_signup_create_params.rb +103 -0
- data/lib/telnyx/models/bot_signup_resend_magic_link_params.rb +22 -0
- data/lib/telnyx/models/call_dial_params.rb +75 -7
- data/lib/telnyx/models/calls/action_transfer_params.rb +75 -7
- data/lib/telnyx/models/calls/transcription_config.rb +14 -3
- data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +6 -3
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -0
- data/lib/telnyx/models/compute/funcs/export_create_params.rb +62 -0
- data/lib/telnyx/models/compute/funcs/export_delete_all_params.rb +24 -0
- data/lib/telnyx/models/compute/funcs/export_list_params.rb +24 -0
- data/lib/telnyx/models/compute/funcs/func_log_export_config_response.rb +113 -0
- data/lib/telnyx/models/connection_retrieve_count_params.rb +14 -0
- data/lib/telnyx/models/connection_retrieve_count_response.rb +215 -0
- data/lib/telnyx/models/detail_record_list_params.rb +19 -2
- data/lib/telnyx/models/inbound_message_webhook_event.rb +3 -70
- data/lib/telnyx/models/machine_payment_account_credit_params.rb +29 -0
- data/lib/telnyx/models/machine_payment_account_credit_response.rb +223 -0
- data/lib/telnyx/models/message_retrieve_group_messages_response.rb +3 -3
- data/lib/telnyx/models/message_retrieve_response.rb +4 -4
- data/lib/telnyx/models/message_schedule_response.rb +3 -3
- data/lib/telnyx/models/message_send_group_mms_response.rb +3 -3
- data/lib/telnyx/models/message_send_long_code_response.rb +3 -3
- data/lib/telnyx/models/message_send_number_pool_response.rb +3 -3
- data/lib/telnyx/models/message_send_response.rb +3 -3
- data/lib/telnyx/models/message_send_short_code_response.rb +3 -3
- data/lib/telnyx/models/messaging_inbound_message.rb +71 -0
- data/lib/telnyx/models/messaging_inbound_message_payload.rb +216 -13
- data/lib/telnyx/models/messaging_outbound_message_payload.rb +42 -2
- data/lib/telnyx/models/noise_suppression_engine_list_params.rb +14 -0
- data/lib/telnyx/models/noise_suppression_engine_list_response.rb +50 -0
- data/lib/telnyx/models/number_order_status_update.rb +15 -3
- data/lib/telnyx/models/number_order_status_update_webhook_event.rb +15 -3
- data/lib/telnyx/models/outbound_message.rb +1 -0
- data/lib/telnyx/models/outbound_message_payload.rb +45 -5
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -0
- data/lib/telnyx/models/success_response.rb +27 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +246 -3
- data/lib/telnyx/models/texml/accounts/conferences/participant_participants_params.rb +82 -1
- data/lib/telnyx/models/texml/call_create_params.rb +78 -0
- data/lib/telnyx/models/texml/call_create_response.rb +55 -0
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +76 -1
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +2 -2
- data/lib/telnyx/models.rb +18 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
- data/lib/telnyx/resources/ai/assistants.rb +2 -2
- data/lib/telnyx/resources/ai/audio.rb +2 -2
- data/lib/telnyx/resources/ai/typesafe/v1.rb +62 -0
- data/lib/telnyx/resources/ai/typesafe.rb +22 -0
- data/lib/telnyx/resources/ai.rb +4 -0
- data/lib/telnyx/resources/bot_challenge.rb +53 -0
- data/lib/telnyx/resources/bot_sessions.rb +57 -0
- data/lib/telnyx/resources/bot_signup.rb +97 -0
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/resources/calls.rb +1 -1
- data/lib/telnyx/resources/compute/funcs/export.rb +105 -0
- data/lib/telnyx/resources/compute/funcs.rb +4 -0
- data/lib/telnyx/resources/connections.rb +20 -0
- data/lib/telnyx/resources/detail_records.rb +1 -1
- data/lib/telnyx/resources/email_messages.rb +5 -3
- data/lib/telnyx/resources/machine_payments.rb +73 -0
- data/lib/telnyx/resources/noise_suppression_engines.rb +37 -0
- data/lib/telnyx/resources/texml/accounts/conferences/participants.rb +15 -1
- data/lib/telnyx/resources/texml/calls.rb +57 -0
- data/lib/telnyx/resources/texml.rb +20 -1
- data/lib/telnyx/resources/voice_clones.rb +4 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +33 -0
- data/rbi/telnyx/client.rbi +35 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +16 -12
- data/rbi/telnyx/models/ai/assistant_tool.rbi +423 -20
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +42 -16
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +42 -16
- data/rbi/telnyx/models/ai/audio_transcribe_params.rbi +71 -20
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +63 -97
- data/rbi/telnyx/models/ai/audio_transcription_response_word.rbi +108 -0
- data/rbi/telnyx/models/ai/chat_completion_request.rbi +4 -58
- data/rbi/telnyx/models/ai/flow_node.rbi +4 -2
- data/rbi/telnyx/models/ai/inference_embedding.rbi +24 -16
- data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +10 -0
- data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +29 -3
- data/rbi/telnyx/models/ai/openai/function_definition.rbi +56 -0
- data/rbi/telnyx/models/ai/post_conversation_settings.rbi +4 -4
- data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +4 -4
- data/rbi/telnyx/models/ai/privacy_settings.rbi +43 -3
- data/rbi/telnyx/models/ai/retrieval_tool.rbi +29 -3
- data/rbi/telnyx/models/ai/telephony_settings.rbi +174 -20
- data/rbi/telnyx/models/ai/tool_node.rbi +4 -2
- data/rbi/telnyx/models/ai/transcription_settings.rbi +25 -6
- data/rbi/telnyx/models/ai/transcription_settings_config.rbi +18 -16
- data/rbi/telnyx/models/ai/typesafe/v1_systemone_params.rbi +504 -0
- data/rbi/telnyx/models/ai/typesafe/v1_systemone_response.rbi +348 -0
- data/rbi/telnyx/models/bot_challenge_create_params.rbi +68 -0
- data/rbi/telnyx/models/bot_challenge_create_response.rbi +169 -0
- data/rbi/telnyx/models/bot_session_list_params.rbi +53 -0
- data/rbi/telnyx/models/bot_session_list_response.rbi +64 -0
- data/rbi/telnyx/models/bot_signup_create_params.rbi +179 -0
- data/rbi/telnyx/models/bot_signup_resend_magic_link_params.rbi +43 -0
- data/rbi/telnyx/models/call_dial_params.rbi +111 -10
- data/rbi/telnyx/models/calls/action_transfer_params.rbi +111 -10
- data/rbi/telnyx/models/calls/transcription_config.rbi +29 -5
- data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +11 -3
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +5 -0
- data/rbi/telnyx/models/compute/funcs/export_create_params.rbi +84 -0
- data/rbi/telnyx/models/compute/funcs/export_delete_all_params.rbi +42 -0
- data/rbi/telnyx/models/compute/funcs/export_list_params.rbi +42 -0
- data/rbi/telnyx/models/compute/funcs/func_log_export_config_response.rbi +227 -0
- data/rbi/telnyx/models/connection_retrieve_count_params.rbi +30 -0
- data/rbi/telnyx/models/connection_retrieve_count_response.rbi +353 -0
- data/rbi/telnyx/models/detail_record_list_params.rbi +30 -2
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +4 -173
- data/rbi/telnyx/models/machine_payment_account_credit_params.rbi +51 -0
- data/rbi/telnyx/models/machine_payment_account_credit_response.rbi +446 -0
- data/rbi/telnyx/models/message_retrieve_group_messages_response.rbi +6 -12
- data/rbi/telnyx/models/message_retrieve_response.rbi +3 -3
- data/rbi/telnyx/models/message_schedule_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_group_mms_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_long_code_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_number_pool_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_short_code_response.rbi +4 -6
- data/rbi/telnyx/models/messaging_inbound_message.rbi +152 -0
- data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +477 -15
- data/rbi/telnyx/models/messaging_outbound_message_payload.rbi +90 -16
- data/rbi/telnyx/models/noise_suppression_engine_list_params.rbi +30 -0
- data/rbi/telnyx/models/noise_suppression_engine_list_response.rbi +94 -0
- data/rbi/telnyx/models/number_order_status_update.rbi +34 -3
- data/rbi/telnyx/models/number_order_status_update_webhook_event.rbi +39 -3
- data/rbi/telnyx/models/outbound_message.rbi +5 -0
- data/rbi/telnyx/models/outbound_message_payload.rbi +74 -4
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +5 -0
- data/rbi/telnyx/models/success_response.rbi +36 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +339 -0
- data/rbi/telnyx/models/texml/accounts/conferences/participant_participants_params.rbi +111 -0
- data/rbi/telnyx/models/texml/call_create_params.rbi +124 -0
- data/rbi/telnyx/models/texml/call_create_response.rbi +98 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +103 -0
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +4 -4
- data/rbi/telnyx/models.rbi +21 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +19 -7
- data/rbi/telnyx/resources/ai/assistants.rbi +25 -12
- data/rbi/telnyx/resources/ai/audio.rbi +20 -9
- data/rbi/telnyx/resources/ai/typesafe/v1.rbi +61 -0
- data/rbi/telnyx/resources/ai/typesafe.rbi +19 -0
- data/rbi/telnyx/resources/ai.rbi +3 -0
- data/rbi/telnyx/resources/bot_challenge.rbi +45 -0
- data/rbi/telnyx/resources/bot_sessions.rbi +45 -0
- data/rbi/telnyx/resources/bot_signup.rbi +87 -0
- data/rbi/telnyx/resources/calls/actions.rbi +6 -5
- data/rbi/telnyx/resources/calls.rbi +6 -5
- data/rbi/telnyx/resources/compute/funcs/export.rbi +86 -0
- data/rbi/telnyx/resources/compute/funcs.rbi +3 -0
- data/rbi/telnyx/resources/connections.rbi +11 -0
- data/rbi/telnyx/resources/detail_records.rbi +12 -1
- data/rbi/telnyx/resources/email_messages.rbi +5 -3
- data/rbi/telnyx/resources/machine_payments.rbi +64 -0
- data/rbi/telnyx/resources/noise_suppression_engines.rbi +26 -0
- data/rbi/telnyx/resources/texml/accounts/conferences/participants.rbi +32 -0
- data/rbi/telnyx/resources/texml/calls.rbi +50 -0
- data/rbi/telnyx/resources/texml.rbi +36 -0
- data/rbi/telnyx/resources/voice_clones.rbi +4 -2
- data/sig/telnyx/client.rbs +10 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +162 -23
- data/sig/telnyx/models/ai/audio_transcribe_params.rbs +10 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +29 -43
- data/sig/telnyx/models/ai/audio_transcription_response_word.rbs +60 -0
- data/sig/telnyx/models/ai/chat_completion_request.rbs +4 -35
- data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +5 -0
- data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +10 -3
- data/sig/telnyx/models/ai/openai/function_definition.rbs +34 -0
- data/sig/telnyx/models/ai/privacy_settings.rbs +11 -3
- data/sig/telnyx/models/ai/retrieval_tool.rbs +10 -3
- data/sig/telnyx/models/ai/telephony_settings.rbs +52 -4
- data/sig/telnyx/models/ai/transcription_settings.rbs +4 -0
- data/sig/telnyx/models/ai/typesafe/v1_systemone_params.rbs +195 -0
- data/sig/telnyx/models/ai/typesafe/v1_systemone_response.rbs +141 -0
- data/sig/telnyx/models/bot_challenge_create_params.rbs +42 -0
- data/sig/telnyx/models/bot_challenge_create_response.rbs +72 -0
- data/sig/telnyx/models/bot_session_list_params.rbs +28 -0
- data/sig/telnyx/models/bot_session_list_response.rbs +26 -0
- data/sig/telnyx/models/bot_signup_create_params.rbs +89 -0
- data/sig/telnyx/models/bot_signup_resend_magic_link_params.rbs +20 -0
- data/sig/telnyx/models/call_dial_params.rbs +49 -0
- data/sig/telnyx/models/calls/action_transfer_params.rbs +49 -0
- data/sig/telnyx/models/calls/transcription_config.rbs +4 -0
- data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +3 -1
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +3 -1
- data/sig/telnyx/models/compute/funcs/export_create_params.rbs +50 -0
- data/sig/telnyx/models/compute/funcs/export_delete_all_params.rbs +27 -0
- data/sig/telnyx/models/compute/funcs/export_list_params.rbs +27 -0
- data/sig/telnyx/models/compute/funcs/func_log_export_config_response.rbs +115 -0
- data/sig/telnyx/models/connection_retrieve_count_params.rbs +15 -0
- data/sig/telnyx/models/connection_retrieve_count_response.rbs +169 -0
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +6 -79
- data/sig/telnyx/models/machine_payment_account_credit_params.rbs +23 -0
- data/sig/telnyx/models/machine_payment_account_credit_response.rbs +164 -0
- data/sig/telnyx/models/message_retrieve_group_messages_response.rbs +6 -8
- data/sig/telnyx/models/message_retrieve_response.rbs +1 -2
- data/sig/telnyx/models/message_schedule_response.rbs +6 -7
- data/sig/telnyx/models/message_send_group_mms_response.rbs +6 -6
- data/sig/telnyx/models/message_send_long_code_response.rbs +6 -6
- data/sig/telnyx/models/message_send_number_pool_response.rbs +6 -6
- data/sig/telnyx/models/message_send_response.rbs +6 -7
- data/sig/telnyx/models/message_send_short_code_response.rbs +6 -6
- data/sig/telnyx/models/messaging_inbound_message.rbs +76 -0
- data/sig/telnyx/models/messaging_inbound_message_payload.rbs +235 -6
- data/sig/telnyx/models/messaging_outbound_message_payload.rbs +39 -1
- data/sig/telnyx/models/noise_suppression_engine_list_params.rbs +15 -0
- data/sig/telnyx/models/noise_suppression_engine_list_response.rbs +43 -0
- data/sig/telnyx/models/number_order_status_update.rbs +14 -4
- data/sig/telnyx/models/number_order_status_update_webhook_event.rbs +14 -4
- data/sig/telnyx/models/outbound_message.rbs +2 -1
- data/sig/telnyx/models/outbound_message_payload.rbs +45 -7
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -0
- data/sig/telnyx/models/success_response.rbs +15 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +159 -0
- data/sig/telnyx/models/texml/accounts/conferences/participant_participants_params.rbs +49 -0
- data/sig/telnyx/models/texml/call_create_params.rbs +72 -0
- data/sig/telnyx/models/texml/call_create_response.rbs +47 -0
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +49 -0
- data/sig/telnyx/models.rbs +18 -0
- data/sig/telnyx/resources/ai/typesafe/v1.rbs +17 -0
- data/sig/telnyx/resources/ai/typesafe.rbs +11 -0
- data/sig/telnyx/resources/ai.rbs +2 -0
- data/sig/telnyx/resources/bot_challenge.rbs +14 -0
- data/sig/telnyx/resources/bot_sessions.rbs +13 -0
- data/sig/telnyx/resources/bot_signup.rbs +24 -0
- data/sig/telnyx/resources/compute/funcs/export.rbs +30 -0
- data/sig/telnyx/resources/compute/funcs.rbs +2 -0
- data/sig/telnyx/resources/connections.rbs +4 -0
- data/sig/telnyx/resources/machine_payments.rbs +12 -0
- data/sig/telnyx/resources/noise_suppression_engines.rbs +11 -0
- data/sig/telnyx/resources/texml/accounts/conferences/participants.rbs +7 -0
- data/sig/telnyx/resources/texml/calls.rbs +19 -0
- data/sig/telnyx/resources/texml.rbs +9 -0
- metadata +101 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Typesafe
|
|
7
|
+
# Beta API for evaluating shared context with typed questions and structured
|
|
8
|
+
# answers. Telnyx manages model selection.
|
|
9
|
+
class V1
|
|
10
|
+
# **Beta API.** Telnyx controls model selection.
|
|
11
|
+
#
|
|
12
|
+
# Evaluate shared context using named choice, noul (yes/no), and score questions.
|
|
13
|
+
# Returns TypeSafe System One-compatible answer shapes, an opaque compatibility
|
|
14
|
+
# identifier, and token usage. See the
|
|
15
|
+
# [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
|
|
16
|
+
# for examples and compatibility limits.
|
|
17
|
+
#
|
|
18
|
+
# The supported request subset requires instructions for every question, string
|
|
19
|
+
# descriptions for criteria (or null for choice descriptions), 1–64 questions, and
|
|
20
|
+
# 2–64 options for choice and score questions. The SDK-supplied model value is
|
|
21
|
+
# ignored and cannot select a model. Other unknown fields are rejected. The
|
|
22
|
+
# endpoint is synchronous and does not stream.
|
|
23
|
+
#
|
|
24
|
+
# Use the TypeSafe Python SDK with base_url set to
|
|
25
|
+
# https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
|
|
26
|
+
# /v1/systemone. Compatibility covers this operation and the documented request
|
|
27
|
+
# subset; it does not include TypeSafe model listing. Scores describe relative
|
|
28
|
+
# preference, not calibrated correctness.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
questions:
|
|
32
|
+
T::Hash[
|
|
33
|
+
Symbol,
|
|
34
|
+
T.any(
|
|
35
|
+
Telnyx::AI::Typesafe::V1SystemoneParams::Question::Choice::OrHash,
|
|
36
|
+
Telnyx::AI::Typesafe::V1SystemoneParams::Question::Noul::OrHash,
|
|
37
|
+
Telnyx::AI::Typesafe::V1SystemoneParams::Question::Score::OrHash
|
|
38
|
+
)
|
|
39
|
+
],
|
|
40
|
+
state: Telnyx::AI::Typesafe::V1SystemoneParams::State::Variants,
|
|
41
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
42
|
+
).returns(Telnyx::Models::AI::Typesafe::V1SystemoneResponse)
|
|
43
|
+
end
|
|
44
|
+
def systemone(
|
|
45
|
+
# Between 1 and 64 named questions. Each key identifies the corresponding answer.
|
|
46
|
+
questions:,
|
|
47
|
+
# Shared context evaluated by every question.
|
|
48
|
+
state:,
|
|
49
|
+
request_options: {}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @api private
|
|
54
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
55
|
+
def self.new(client:)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Typesafe
|
|
7
|
+
# Beta API for evaluating shared context with typed questions and structured
|
|
8
|
+
# answers. Telnyx manages model selection.
|
|
9
|
+
sig { returns(Telnyx::Resources::AI::Typesafe::V1) }
|
|
10
|
+
attr_reader :v1
|
|
11
|
+
|
|
12
|
+
# @api private
|
|
13
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
14
|
+
def self.new(client:)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -55,6 +55,9 @@ module Telnyx
|
|
|
55
55
|
sig { returns(Telnyx::Resources::AI::Knowledge) }
|
|
56
56
|
attr_reader :knowledge
|
|
57
57
|
|
|
58
|
+
sig { returns(Telnyx::Resources::AI::Typesafe) }
|
|
59
|
+
attr_reader :typesafe
|
|
60
|
+
|
|
58
61
|
# Performs semantic vector search across conversation history records.
|
|
59
62
|
#
|
|
60
63
|
# **How it works:**
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA
|
|
6
|
+
# challenge designed to be easy for LLMs and hard for humans, registers an
|
|
7
|
+
# account, and signs in by consuming a magic link emailed to the account owner.
|
|
8
|
+
# All endpoints are public and unauthenticated; signup endpoints are additionally
|
|
9
|
+
# gated by the freemium feature flags and per-country availability.
|
|
10
|
+
class BotChallenge
|
|
11
|
+
# Generates a reverse-CAPTCHA challenge used to gate the bot signup flow. A random
|
|
12
|
+
# active problem is selected from the pool; math problems are returned obfuscated
|
|
13
|
+
# (case randomization, symbol injection, spacing noise) with an unobfuscated
|
|
14
|
+
# rounding instruction appended, while string and binary problems are returned
|
|
15
|
+
# as-is. The response contains a single-use nonce, the problem text, and the
|
|
16
|
+
# current terms-and-conditions and privacy-policy URLs, which must be echoed back
|
|
17
|
+
# on the signup request. Challenges expire after a short window (10 minutes by
|
|
18
|
+
# default) and can only be answered once. This endpoint is public and
|
|
19
|
+
# unauthenticated.
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
llm_model_name: String,
|
|
23
|
+
llm_parameter_count: String,
|
|
24
|
+
llm_quantization: String,
|
|
25
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
26
|
+
).returns(Telnyx::Models::BotChallengeCreateResponse)
|
|
27
|
+
end
|
|
28
|
+
def create(
|
|
29
|
+
# Name of the LLM the client is using.
|
|
30
|
+
llm_model_name: nil,
|
|
31
|
+
# Parameter count of the client LLM.
|
|
32
|
+
llm_parameter_count: nil,
|
|
33
|
+
# Quantization of the client LLM.
|
|
34
|
+
llm_quantization: nil,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @api private
|
|
40
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
41
|
+
def self.new(client:)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA
|
|
6
|
+
# challenge designed to be easy for LLMs and hard for humans, registers an
|
|
7
|
+
# account, and signs in by consuming a magic link emailed to the account owner.
|
|
8
|
+
# All endpoints are public and unauthenticated; signup endpoints are additionally
|
|
9
|
+
# gated by the freemium feature flags and per-country availability.
|
|
10
|
+
class BotSessions
|
|
11
|
+
# Consumes the one-time portal redirect (magic link) token emailed during bot
|
|
12
|
+
# signup and returns an API session. The token is a UUIDv7 that encodes its
|
|
13
|
+
# creation time; it expires after a configurable validity window (15 minutes by
|
|
14
|
+
# default) and is cleared on first use. Although the action creates a session, the
|
|
15
|
+
# route uses the GET verb because it is opened from an email link. On first use
|
|
16
|
+
# the account is also initialized. For bot signup (freemium) accounts the response
|
|
17
|
+
# is a minimal envelope containing only the `api_v2_token`; accounts that are
|
|
18
|
+
# permitted to use magic links but are not freemium accounts may instead receive
|
|
19
|
+
# an extended session payload when additional steps (such as two-factor
|
|
20
|
+
# authentication or identity verification) are required. This endpoint is public;
|
|
21
|
+
# the magic link token in the query string is the credential.
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
email: String,
|
|
25
|
+
portal_redirect_token: String,
|
|
26
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
27
|
+
).returns(Telnyx::Models::BotSessionListResponse)
|
|
28
|
+
end
|
|
29
|
+
def list(
|
|
30
|
+
# Email address associated with the magic link token.
|
|
31
|
+
email:,
|
|
32
|
+
# Single-use portal redirect (magic link) token, a UUIDv7 sent to the account
|
|
33
|
+
# owner's email.
|
|
34
|
+
portal_redirect_token:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @api private
|
|
40
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
41
|
+
def self.new(client:)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA
|
|
6
|
+
# challenge designed to be easy for LLMs and hard for humans, registers an
|
|
7
|
+
# account, and signs in by consuming a magic link emailed to the account owner.
|
|
8
|
+
# All endpoints are public and unauthenticated; signup endpoints are additionally
|
|
9
|
+
# gated by the freemium feature flags and per-country availability.
|
|
10
|
+
class BotSignup
|
|
11
|
+
# Creates a freemium Telnyx account through the agentic signup flow. The request
|
|
12
|
+
# must carry a valid answer to a previously issued bot challenge
|
|
13
|
+
# (`bot_challenge_nonce` and `bot_challenge_answer`), accept the terms of service,
|
|
14
|
+
# and echo the exact terms-and-conditions and privacy-policy URLs returned by the
|
|
15
|
+
# challenge endpoint. When EU consent enforcement is enabled,
|
|
16
|
+
# `terms_of_service_eu` and `terms_and_conditions_eu_url` are also required. On
|
|
17
|
+
# success a one-time sign-in (magic) link is emailed to the address provided; if
|
|
18
|
+
# the email address belongs to an existing account, a sign-in link is sent instead
|
|
19
|
+
# of creating a duplicate account. `email` may only be omitted when
|
|
20
|
+
# placeholder-email registration is enabled server-side. This endpoint is public
|
|
21
|
+
# and unauthenticated, gated by the freemium feature flags and per-country
|
|
22
|
+
# availability, and subject to per-IP and per-domain registration limits.
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
bot_challenge_answer: String,
|
|
26
|
+
bot_challenge_nonce: String,
|
|
27
|
+
privacy_policy_url: String,
|
|
28
|
+
terms_and_conditions_url: String,
|
|
29
|
+
terms_of_service:
|
|
30
|
+
Telnyx::BotSignupCreateParams::TermsOfService::OrBoolean,
|
|
31
|
+
email: String,
|
|
32
|
+
terms_and_conditions_eu_url: String,
|
|
33
|
+
terms_of_service_eu:
|
|
34
|
+
Telnyx::BotSignupCreateParams::TermsOfServiceEu::OrBoolean,
|
|
35
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
36
|
+
).returns(Telnyx::SuccessResponse)
|
|
37
|
+
end
|
|
38
|
+
def create(
|
|
39
|
+
# Answer to the issued bot challenge.
|
|
40
|
+
bot_challenge_answer:,
|
|
41
|
+
# Nonce from a previously issued bot challenge.
|
|
42
|
+
bot_challenge_nonce:,
|
|
43
|
+
# Must exactly match the privacy-policy URL returned by the challenge endpoint.
|
|
44
|
+
privacy_policy_url:,
|
|
45
|
+
# Must exactly match the terms-and-conditions URL returned by the challenge
|
|
46
|
+
# endpoint.
|
|
47
|
+
terms_and_conditions_url:,
|
|
48
|
+
# Must be true to accept the terms of service.
|
|
49
|
+
terms_of_service:,
|
|
50
|
+
# Email address for the new account. The magic link is sent here. May only be
|
|
51
|
+
# omitted when placeholder-email registration is enabled server-side.
|
|
52
|
+
email: nil,
|
|
53
|
+
# EU terms-and-conditions URL. Required when EU consent enforcement is enabled.
|
|
54
|
+
terms_and_conditions_eu_url: nil,
|
|
55
|
+
# EU terms-of-service acceptance. Required when EU consent enforcement is enabled.
|
|
56
|
+
terms_of_service_eu: nil,
|
|
57
|
+
request_options: {}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Resends the one-time sign-in (magic) link for an eligible bot signup account.
|
|
62
|
+
# Eligibility (account exists, was registered through bot signup, is active, and
|
|
63
|
+
# has not exceeded the resend limit or rate window) is evaluated server-side; the
|
|
64
|
+
# response is intentionally uniform and does not reveal whether the account exists
|
|
65
|
+
# or whether a link was actually sent. This endpoint is public and
|
|
66
|
+
# unauthenticated, gated by the freemium feature flags and per-country
|
|
67
|
+
# availability.
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
email: String,
|
|
71
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
72
|
+
).returns(Telnyx::SuccessResponse)
|
|
73
|
+
end
|
|
74
|
+
def resend_magic_link(
|
|
75
|
+
# Email address of the bot signup account to resend the magic link to.
|
|
76
|
+
email:,
|
|
77
|
+
request_options: {}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @api private
|
|
82
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
83
|
+
def self.new(client:)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -2374,11 +2374,12 @@ module Telnyx
|
|
|
2374
2374
|
command_id: nil,
|
|
2375
2375
|
# Custom headers to be added to the SIP INVITE.
|
|
2376
2376
|
custom_headers: nil,
|
|
2377
|
-
# The number
|
|
2378
|
-
#
|
|
2379
|
-
#
|
|
2380
|
-
#
|
|
2381
|
-
# you
|
|
2377
|
+
# The `to` number of an active inbound call, in +E164 format. Telnyx checks
|
|
2378
|
+
# whether there is currently an active inbound call where `to` matches this
|
|
2379
|
+
# `diversion` value and `from` matches the `from` number supplied for this
|
|
2380
|
+
# request. If such a call exists, the `from` number is treated as verified (since
|
|
2381
|
+
# it is already on an active inbound call to you) and can be used as the caller id
|
|
2382
|
+
# for this outbound call.
|
|
2382
2383
|
diversion: nil,
|
|
2383
2384
|
# If set to false, early media will not be passed to the originating leg.
|
|
2384
2385
|
early_media: nil,
|
|
@@ -198,11 +198,12 @@ module Telnyx
|
|
|
198
198
|
# webhook.
|
|
199
199
|
deepfake_detection: nil,
|
|
200
200
|
dialogflow_config: nil,
|
|
201
|
-
# The number
|
|
202
|
-
#
|
|
203
|
-
#
|
|
204
|
-
#
|
|
205
|
-
# you
|
|
201
|
+
# The `to` number of an active inbound call, in +E164 format. Telnyx checks
|
|
202
|
+
# whether there is currently an active inbound call where `to` matches this
|
|
203
|
+
# `diversion` value and `from` matches the `from` number supplied for this
|
|
204
|
+
# request. If such a call exists, the `from` number is treated as verified (since
|
|
205
|
+
# it is already on an active inbound call to you) and can be used as the caller id
|
|
206
|
+
# for this outbound call.
|
|
206
207
|
diversion: nil,
|
|
207
208
|
# Enables Dialogflow for the current call. The default value is false.
|
|
208
209
|
enable_dialogflow: nil,
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Compute
|
|
6
|
+
class Funcs
|
|
7
|
+
class Export
|
|
8
|
+
# Configures the external OTLP endpoint a function's runtime and/or invocation
|
|
9
|
+
# logs are pushed to as they happen. This operation is a **full replace, not a
|
|
10
|
+
# patch**: `endpoint`, `headers`, `runtime_export_enabled`, and
|
|
11
|
+
# `invocation_export_enabled` are all required on every call — omitting any of
|
|
12
|
+
# them is a 422, not "keep the current value". Headers are encrypted at rest and
|
|
13
|
+
# never returned in any response.
|
|
14
|
+
#
|
|
15
|
+
# The endpoint must be an HTTPS URL. When export is configured, new log records
|
|
16
|
+
# are converted to OTLP log records and delivered continuously; export never
|
|
17
|
+
# bypasses platform log storage, and delivery retries with a bounded policy while
|
|
18
|
+
# the destination is unreachable. Only logs generated after configuration are
|
|
19
|
+
# exported — there is no historical replay.
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
endpoint: String,
|
|
24
|
+
headers: T::Hash[Symbol, String],
|
|
25
|
+
invocation_export_enabled: T::Boolean,
|
|
26
|
+
runtime_export_enabled: T::Boolean,
|
|
27
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
28
|
+
).returns(Telnyx::Compute::Funcs::FuncLogExportConfigResponse)
|
|
29
|
+
end
|
|
30
|
+
def create(
|
|
31
|
+
# Function ID
|
|
32
|
+
id,
|
|
33
|
+
# HTTPS URL to push logs to
|
|
34
|
+
endpoint:,
|
|
35
|
+
# Headers attached to every export push, as key-value pairs (e.g. an auth token
|
|
36
|
+
# the collector expects). Required even when empty — {} means "no headers".
|
|
37
|
+
# Encrypted at rest; never returned.
|
|
38
|
+
headers:,
|
|
39
|
+
# Export invocation records (one per HTTP request) to this destination
|
|
40
|
+
invocation_export_enabled:,
|
|
41
|
+
# Export runtime logs (function stdout/stderr) to this destination
|
|
42
|
+
runtime_export_enabled:,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns the function's configured log export destination and which log types are
|
|
48
|
+
# exported. Headers are never returned. Returns 404 (error code 10005) when no
|
|
49
|
+
# destination is configured for the function.
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
id: String,
|
|
53
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
54
|
+
).returns(Telnyx::Compute::Funcs::FuncLogExportConfigResponse)
|
|
55
|
+
end
|
|
56
|
+
def list(
|
|
57
|
+
# Function ID
|
|
58
|
+
id,
|
|
59
|
+
request_options: {}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Stops exporting a function's logs and removes its destination configuration.
|
|
64
|
+
# Idempotent: deleting when nothing is configured succeeds.
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
id: String,
|
|
68
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
69
|
+
).void
|
|
70
|
+
end
|
|
71
|
+
def delete_all(
|
|
72
|
+
# Function ID
|
|
73
|
+
id,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
80
|
+
def self.new(client:)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -4,6 +4,9 @@ module Telnyx
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Compute
|
|
6
6
|
class Funcs
|
|
7
|
+
sig { returns(Telnyx::Resources::Compute::Funcs::Export) }
|
|
8
|
+
attr_reader :export
|
|
9
|
+
|
|
7
10
|
# Returns logs oldest first. `type=runtime` (default) returns function
|
|
8
11
|
# stdout/stderr. `type=invocations` returns one platform-generated record per HTTP
|
|
9
12
|
# request served.
|
|
@@ -78,6 +78,17 @@ module Telnyx
|
|
|
78
78
|
)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# Returns the number of connections associated with the authenticated user,
|
|
82
|
+
# grouped by connection type, together with the connection limits that apply to
|
|
83
|
+
# the user. Forward-only connections are excluded from the counts.
|
|
84
|
+
sig do
|
|
85
|
+
params(request_options: Telnyx::RequestOptions::OrHash).returns(
|
|
86
|
+
Telnyx::Models::ConnectionRetrieveCountResponse
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
def retrieve_count(request_options: {})
|
|
90
|
+
end
|
|
91
|
+
|
|
81
92
|
# @api private
|
|
82
93
|
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
83
94
|
def self.new(client:)
|
|
@@ -21,10 +21,21 @@ module Telnyx
|
|
|
21
21
|
def list(
|
|
22
22
|
# Filter records on a given record attribute and value. <br/>Example:
|
|
23
23
|
# filter[status]=delivered. <br/>Required: filter[record_type] must be specified.
|
|
24
|
+
# <br/>The valid filter fields depend on the record_type: filtering by a field
|
|
25
|
+
# that does not exist for the selected record_type is rejected with a 400 error.
|
|
26
|
+
# Call-control and sip-trunking records use started_at, finished_at and
|
|
27
|
+
# answered_at (they have no created_at); messaging records use created_at. To list
|
|
28
|
+
# the fields available for a record_type, use the /v2/detail_records/options
|
|
29
|
+
# endpoint.
|
|
24
30
|
filter: nil,
|
|
25
31
|
page_number: nil,
|
|
26
32
|
page_size: nil,
|
|
27
|
-
# Specifies the sort order for results. <br/>Example: sort=-created_at
|
|
33
|
+
# Specifies the sort order for results. <br/>Example: sort=-created_at <br/>The
|
|
34
|
+
# valid sort fields depend on the record_type: sort by a field that does not exist
|
|
35
|
+
# for the selected record_type is rejected with a 400 error. Call-control and
|
|
36
|
+
# sip-trunking records use started_at, finished_at and answered_at (they have no
|
|
37
|
+
# created_at); messaging records use created_at. To list the fields available for
|
|
38
|
+
# a record_type, use the /v2/detail_records/options endpoint.
|
|
28
39
|
sort: nil,
|
|
29
40
|
request_options: {}
|
|
30
41
|
)
|
|
@@ -210,9 +210,11 @@ module Telnyx
|
|
|
210
210
|
)
|
|
211
211
|
end
|
|
212
212
|
|
|
213
|
-
# Creates up to 1,000 email messages in a single request.
|
|
214
|
-
#
|
|
215
|
-
#
|
|
213
|
+
# Creates up to 1,000 email messages in a single request. Request-wide admission
|
|
214
|
+
# checks run first and can reject the whole batch before message creation. After
|
|
215
|
+
# those checks pass, each message is validated and sent independently; item-level
|
|
216
|
+
# failures do not affect other messages, and the processed batch returns 207
|
|
217
|
+
# Multi-Status.
|
|
216
218
|
sig do
|
|
217
219
|
params(
|
|
218
220
|
messages: T::Array[Telnyx::EmailMessageBatchParams::Message::OrHash],
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Machine payment (MPP) account-credit operations. Fund your Telnyx account
|
|
6
|
+
# programmatically from a machine or agent using the Machine Payment Protocol, an
|
|
7
|
+
# HTTP-402 flow settled via Stripe or Tempo.
|
|
8
|
+
class MachinePayments
|
|
9
|
+
# Creates an account credit using the Machine Payment Protocol (MPP), an HTTP-402
|
|
10
|
+
# payment flow for machines and agents.
|
|
11
|
+
#
|
|
12
|
+
# The flow has two steps. First, send an authenticated request with the
|
|
13
|
+
# `amount_usd` to credit; the response is `402 Payment Required` with one or more
|
|
14
|
+
# payment challenges (for example separate Tempo and Stripe challenges) in the
|
|
15
|
+
# `WWW-Authenticate` header. Second, retry the request with an
|
|
16
|
+
# `Authorization: Payment ...` credential constructed from the challenge; on
|
|
17
|
+
# success the response includes the credited transaction and a `Payment-Receipt`
|
|
18
|
+
# header.
|
|
19
|
+
#
|
|
20
|
+
# The credited account is never chosen by the request body: the initial request
|
|
21
|
+
# credits the account of the authenticated user, and a paid retry credits the
|
|
22
|
+
# account bound to the verified payment credential. The amount must be within the
|
|
23
|
+
# configured bounds (by default between 5.00 and 500.00 USD).
|
|
24
|
+
#
|
|
25
|
+
# Successful paid retries are idempotent — when Rails reaches its
|
|
26
|
+
# duplicate-transaction lookup for an already-recorded payment, it returns the
|
|
27
|
+
# existing transaction with `created: false` instead of crediting the account
|
|
28
|
+
# again. This deduplication applies to successful fulfillment: re-sending the same
|
|
29
|
+
# Stripe credential may instead be rejected by the upstream provider as an
|
|
30
|
+
# idempotent replay and return `402 Payment Required` rather than the existing
|
|
31
|
+
# transaction.
|
|
32
|
+
#
|
|
33
|
+
# > **Warning: the payment credential is bound to a specific Telnyx account ID.**
|
|
34
|
+
# > A payment is captured before the bound account is validated. If the credential
|
|
35
|
+
# > names an account that is missing, suspended, blocked, cancelled, dormant, or
|
|
36
|
+
# > ineligible for the tier, the payment is captured but **no account is
|
|
37
|
+
# > credited**. If the credential names a different but eligible account, that
|
|
38
|
+
# > account is credited — the service does not compare it against the payer's
|
|
39
|
+
# > account. There is **no automatic refund**: if the captured payment does not
|
|
40
|
+
# > credit the intended account, contact Telnyx support for remediation.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
amount_usd: String,
|
|
44
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
45
|
+
).returns(Telnyx::Models::MachinePaymentAccountCreditResponse)
|
|
46
|
+
end
|
|
47
|
+
def account_credit(
|
|
48
|
+
# Amount to credit in USD, as a decimal string with up to two fractional digits
|
|
49
|
+
# (by default between 5.00 and 500.00). The request body is required on the
|
|
50
|
+
# initial challenge request and remains required on a paid retry, where you
|
|
51
|
+
# re-send the identical body plus the payment credential — the credential, not the
|
|
52
|
+
# body, selects the payment, and the retried body is not re-validated.
|
|
53
|
+
amount_usd:,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @api private
|
|
59
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
60
|
+
def self.new(client:)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Noise suppression engines that can be selected when configuring noise
|
|
6
|
+
# suppression on voice connections.
|
|
7
|
+
class NoiseSuppressionEngines
|
|
8
|
+
# Returns all noise suppression engines available to the authenticated user.
|
|
9
|
+
# Engines gated behind a feature flag are included only when the flag is enabled
|
|
10
|
+
# for the user's account. Results are not paginated; the number of engines is
|
|
11
|
+
# expected to remain small.
|
|
12
|
+
sig do
|
|
13
|
+
params(request_options: Telnyx::RequestOptions::OrHash).returns(
|
|
14
|
+
Telnyx::Models::NoiseSuppressionEngineListResponse
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
def list(request_options: {})
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @api private
|
|
21
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
22
|
+
def self.new(client:)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -159,8 +159,15 @@ module Telnyx
|
|
|
159
159
|
label: String,
|
|
160
160
|
machine_detection:
|
|
161
161
|
Telnyx::Texml::Accounts::Conferences::ParticipantParticipantsParams::MachineDetection::OrSymbol,
|
|
162
|
+
machine_detection_beep_max_frequency: Integer,
|
|
163
|
+
machine_detection_beep_min_frequency: Integer,
|
|
164
|
+
machine_detection_beep_min_tone_duration: Integer,
|
|
162
165
|
machine_detection_beep_profile:
|
|
163
166
|
Telnyx::Texml::Accounts::Conferences::ParticipantParticipantsParams::MachineDetectionBeepProfile::OrSymbol,
|
|
167
|
+
machine_detection_beep_spectral_confirmation: T::Boolean,
|
|
168
|
+
machine_detection_beep_spectral_min_purity: Float,
|
|
169
|
+
machine_detection_beep_spectral_reject_fax_cng: T::Boolean,
|
|
170
|
+
machine_detection_beep_spectral_window: Integer,
|
|
164
171
|
machine_detection_silence_timeout: Integer,
|
|
165
172
|
machine_detection_speech_end_threshold: Integer,
|
|
166
173
|
machine_detection_speech_threshold: Integer,
|
|
@@ -283,11 +290,36 @@ module Telnyx
|
|
|
283
290
|
# is identified. Use `DetectMessageEnd`, if you would like to leave a message on
|
|
284
291
|
# an answering machine.
|
|
285
292
|
machine_detection: nil,
|
|
293
|
+
# Body param: Highest frequency, in Hz, that a tone can reach and still be treated
|
|
294
|
+
# as a beep. Only used when MachineDetection is enabled.
|
|
295
|
+
machine_detection_beep_max_frequency: nil,
|
|
296
|
+
# Body param: Lowest frequency, in Hz, that a tone must reach to be treated as a
|
|
297
|
+
# beep. Raising it above 480 excludes North American ringback (440 + 480 Hz),
|
|
298
|
+
# which can otherwise be reported as a beep when the `freq_only` profile is in
|
|
299
|
+
# use. Only used when MachineDetection is enabled.
|
|
300
|
+
machine_detection_beep_min_frequency: nil,
|
|
301
|
+
# Body param: Shortest tone, in milliseconds, that can be treated as a beep.
|
|
302
|
+
# Raising it rejects brief tones such as call-progress blips. Only used when
|
|
303
|
+
# MachineDetection is enabled.
|
|
304
|
+
machine_detection_beep_min_tone_duration: nil,
|
|
286
305
|
# Body param: Selects which detectors must validate a beep. `both` requires the
|
|
287
306
|
# amplitude and frequency detectors to agree. `freq_only` uses the frequency
|
|
288
307
|
# detector alone, for beeps whose volume is too unsteady for the default profile.
|
|
289
308
|
# Only used when MachineDetection is enabled.
|
|
290
309
|
machine_detection_beep_profile: nil,
|
|
310
|
+
# Body param: When enabled, a candidate beep must pass an additional spectral
|
|
311
|
+
# check before it is reported. Only used when MachineDetection is enabled.
|
|
312
|
+
machine_detection_beep_spectral_confirmation: nil,
|
|
313
|
+
# Body param: Minimum spectral purity, from 0 to 1, for a tone to be treated as a
|
|
314
|
+
# beep. Raising it rejects mixed tones such as ringback, which combines two
|
|
315
|
+
# frequencies. Only used when MachineDetection is enabled.
|
|
316
|
+
machine_detection_beep_spectral_min_purity: nil,
|
|
317
|
+
# Body param: When enabled, the fax CNG tone is rejected rather than reported as a
|
|
318
|
+
# beep. Only used when MachineDetection is enabled.
|
|
319
|
+
machine_detection_beep_spectral_reject_fax_cng: nil,
|
|
320
|
+
# Body param: Length of the spectral confirmation window, in milliseconds. Only
|
|
321
|
+
# used when MachineDetection is enabled.
|
|
322
|
+
machine_detection_beep_spectral_window: nil,
|
|
291
323
|
# Body param: If initial silence duration is greater than this value, consider it
|
|
292
324
|
# a machine. Ignored when `premium` detection is used.
|
|
293
325
|
machine_detection_silence_timeout: nil,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Texml
|
|
6
|
+
# TeXML REST Commands
|
|
7
|
+
class Calls
|
|
8
|
+
# Initiate an outbound TeXML call using a TeXML application connection ID, not an
|
|
9
|
+
# account SID. Request parameter names are case-sensitive. From and To are
|
|
10
|
+
# required; Texml supplies inline instructions and Url overrides the application
|
|
11
|
+
# XML request URL. When neither is supplied, the application configuration
|
|
12
|
+
# supplies the instructions. The response is a flat call object without a data
|
|
13
|
+
# wrapper.
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
connection_id: String,
|
|
17
|
+
from: String,
|
|
18
|
+
to: String,
|
|
19
|
+
method_: Telnyx::Texml::CallCreateParams::Method::OrSymbol,
|
|
20
|
+
texml: String,
|
|
21
|
+
url: String,
|
|
22
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
23
|
+
).returns(Telnyx::Models::Texml::CallCreateResponse)
|
|
24
|
+
end
|
|
25
|
+
def create(
|
|
26
|
+
# The ID of the connection holding the TeXML application to call from.
|
|
27
|
+
connection_id,
|
|
28
|
+
# The E.164-formatted phone number or SIP URI to present as the caller.
|
|
29
|
+
from:,
|
|
30
|
+
# The E.164-formatted phone number or SIP URI to call.
|
|
31
|
+
to:,
|
|
32
|
+
# HTTP method used to retrieve TeXML instructions from Url.
|
|
33
|
+
method_: nil,
|
|
34
|
+
# Inline TeXML instructions to execute when the call is answered.
|
|
35
|
+
texml: nil,
|
|
36
|
+
# The URL from which to retrieve TeXML instructions. Overrides the TeXML
|
|
37
|
+
# application XML request URL.
|
|
38
|
+
url: nil,
|
|
39
|
+
request_options: {}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# @api private
|
|
44
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
45
|
+
def self.new(client:)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|