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
|
@@ -12,17 +12,702 @@ module Telnyx
|
|
|
12
12
|
Variants =
|
|
13
13
|
T.type_alias do
|
|
14
14
|
T.any(
|
|
15
|
-
Telnyx::AI::
|
|
15
|
+
Telnyx::AI::AssistantTool::Webhook,
|
|
16
16
|
Telnyx::AI::RetrievalTool,
|
|
17
17
|
Telnyx::AI::AssistantTool::Handoff,
|
|
18
18
|
Telnyx::AI::HangupTool,
|
|
19
|
-
Telnyx::AI::
|
|
19
|
+
Telnyx::AI::AssistantTool::Transfer,
|
|
20
20
|
Telnyx::AI::AssistantTool::Refer,
|
|
21
21
|
Telnyx::AI::AssistantTool::SendDtmf,
|
|
22
22
|
Telnyx::AI::AssistantTool::SendMessage
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
class Webhook < Telnyx::Internal::Type::BaseModel
|
|
27
|
+
OrHash =
|
|
28
|
+
T.type_alias do
|
|
29
|
+
T.any(
|
|
30
|
+
Telnyx::AI::AssistantTool::Webhook,
|
|
31
|
+
Telnyx::Internal::AnyHash
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { returns(Symbol) }
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
38
|
+
sig { returns(Telnyx::AI::AssistantTool::Webhook::Webhook) }
|
|
39
|
+
attr_reader :webhook
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
webhook: Telnyx::AI::AssistantTool::Webhook::Webhook::OrHash
|
|
44
|
+
).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :webhook
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
webhook: Telnyx::AI::AssistantTool::Webhook::Webhook::OrHash,
|
|
51
|
+
type: Symbol
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(webhook:, type: :webhook)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
type: Symbol,
|
|
61
|
+
webhook: Telnyx::AI::AssistantTool::Webhook::Webhook
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class Webhook < Telnyx::Internal::Type::BaseModel
|
|
69
|
+
OrHash =
|
|
70
|
+
T.type_alias do
|
|
71
|
+
T.any(
|
|
72
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook,
|
|
73
|
+
Telnyx::Internal::AnyHash
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# The description of the tool.
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
attr_accessor :description
|
|
80
|
+
|
|
81
|
+
# The name of the tool.
|
|
82
|
+
sig { returns(String) }
|
|
83
|
+
attr_accessor :name
|
|
84
|
+
|
|
85
|
+
# The URL of the external tool to be called. This URL is going to be used by the
|
|
86
|
+
# assistant. The URL can be templated like: `https://example.com/api/v1/{id}`,
|
|
87
|
+
# where `{id}` is a placeholder for a value that will be provided by the assistant
|
|
88
|
+
# if `path_parameters` are provided with the `id` attribute.
|
|
89
|
+
sig { returns(String) }
|
|
90
|
+
attr_accessor :url
|
|
91
|
+
|
|
92
|
+
# If async, the assistant will move forward without waiting for your server to
|
|
93
|
+
# respond.
|
|
94
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
95
|
+
attr_reader :async
|
|
96
|
+
|
|
97
|
+
sig { params(async: T::Boolean).void }
|
|
98
|
+
attr_writer :async
|
|
99
|
+
|
|
100
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
101
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
102
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
103
|
+
# for documentation about the format
|
|
104
|
+
sig do
|
|
105
|
+
returns(
|
|
106
|
+
T.nilable(
|
|
107
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters
|
|
108
|
+
)
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
attr_reader :body_parameters
|
|
112
|
+
|
|
113
|
+
sig do
|
|
114
|
+
params(
|
|
115
|
+
body_parameters:
|
|
116
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::OrHash
|
|
117
|
+
).void
|
|
118
|
+
end
|
|
119
|
+
attr_writer :body_parameters
|
|
120
|
+
|
|
121
|
+
# The headers to be sent to the external tool.
|
|
122
|
+
sig do
|
|
123
|
+
returns(
|
|
124
|
+
T.nilable(
|
|
125
|
+
T::Array[Telnyx::AI::AssistantTool::Webhook::Webhook::Header]
|
|
126
|
+
)
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
attr_reader :headers
|
|
130
|
+
|
|
131
|
+
sig do
|
|
132
|
+
params(
|
|
133
|
+
headers:
|
|
134
|
+
T::Array[
|
|
135
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Header::OrHash
|
|
136
|
+
]
|
|
137
|
+
).void
|
|
138
|
+
end
|
|
139
|
+
attr_writer :headers
|
|
140
|
+
|
|
141
|
+
# The HTTP method to be used when calling the external tool.
|
|
142
|
+
sig do
|
|
143
|
+
returns(
|
|
144
|
+
T.nilable(
|
|
145
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::OrSymbol
|
|
146
|
+
)
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
attr_reader :method_
|
|
150
|
+
|
|
151
|
+
sig do
|
|
152
|
+
params(
|
|
153
|
+
method_:
|
|
154
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::OrSymbol
|
|
155
|
+
).void
|
|
156
|
+
end
|
|
157
|
+
attr_writer :method_
|
|
158
|
+
|
|
159
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
160
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
161
|
+
# URL contains a placeholder for a value. See the
|
|
162
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
163
|
+
# documentation about the format
|
|
164
|
+
sig do
|
|
165
|
+
returns(
|
|
166
|
+
T.nilable(
|
|
167
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters
|
|
168
|
+
)
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
attr_reader :path_parameters
|
|
172
|
+
|
|
173
|
+
sig do
|
|
174
|
+
params(
|
|
175
|
+
path_parameters:
|
|
176
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::OrHash
|
|
177
|
+
).void
|
|
178
|
+
end
|
|
179
|
+
attr_writer :path_parameters
|
|
180
|
+
|
|
181
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
182
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
183
|
+
# request. See the
|
|
184
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
185
|
+
# documentation about the format
|
|
186
|
+
sig do
|
|
187
|
+
returns(
|
|
188
|
+
T.nilable(
|
|
189
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters
|
|
190
|
+
)
|
|
191
|
+
)
|
|
192
|
+
end
|
|
193
|
+
attr_reader :query_parameters
|
|
194
|
+
|
|
195
|
+
sig do
|
|
196
|
+
params(
|
|
197
|
+
query_parameters:
|
|
198
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::OrHash
|
|
199
|
+
).void
|
|
200
|
+
end
|
|
201
|
+
attr_writer :query_parameters
|
|
202
|
+
|
|
203
|
+
# The maximum number of milliseconds to wait for the webhook to respond. Only
|
|
204
|
+
# applicable when async is false.
|
|
205
|
+
sig { returns(T.nilable(Integer)) }
|
|
206
|
+
attr_reader :timeout_ms
|
|
207
|
+
|
|
208
|
+
sig { params(timeout_ms: Integer).void }
|
|
209
|
+
attr_writer :timeout_ms
|
|
210
|
+
|
|
211
|
+
sig do
|
|
212
|
+
params(
|
|
213
|
+
description: String,
|
|
214
|
+
name: String,
|
|
215
|
+
url: String,
|
|
216
|
+
async: T::Boolean,
|
|
217
|
+
body_parameters:
|
|
218
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::OrHash,
|
|
219
|
+
headers:
|
|
220
|
+
T::Array[
|
|
221
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Header::OrHash
|
|
222
|
+
],
|
|
223
|
+
method_:
|
|
224
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::OrSymbol,
|
|
225
|
+
path_parameters:
|
|
226
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::OrHash,
|
|
227
|
+
query_parameters:
|
|
228
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::OrHash,
|
|
229
|
+
timeout_ms: Integer
|
|
230
|
+
).returns(T.attached_class)
|
|
231
|
+
end
|
|
232
|
+
def self.new(
|
|
233
|
+
# The description of the tool.
|
|
234
|
+
description:,
|
|
235
|
+
# The name of the tool.
|
|
236
|
+
name:,
|
|
237
|
+
# The URL of the external tool to be called. This URL is going to be used by the
|
|
238
|
+
# assistant. The URL can be templated like: `https://example.com/api/v1/{id}`,
|
|
239
|
+
# where `{id}` is a placeholder for a value that will be provided by the assistant
|
|
240
|
+
# if `path_parameters` are provided with the `id` attribute.
|
|
241
|
+
url:,
|
|
242
|
+
# If async, the assistant will move forward without waiting for your server to
|
|
243
|
+
# respond.
|
|
244
|
+
async: nil,
|
|
245
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
246
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
247
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
248
|
+
# for documentation about the format
|
|
249
|
+
body_parameters: nil,
|
|
250
|
+
# The headers to be sent to the external tool.
|
|
251
|
+
headers: nil,
|
|
252
|
+
# The HTTP method to be used when calling the external tool.
|
|
253
|
+
method_: nil,
|
|
254
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
255
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
256
|
+
# URL contains a placeholder for a value. See the
|
|
257
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
258
|
+
# documentation about the format
|
|
259
|
+
path_parameters: nil,
|
|
260
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
261
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
262
|
+
# request. See the
|
|
263
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
264
|
+
# documentation about the format
|
|
265
|
+
query_parameters: nil,
|
|
266
|
+
# The maximum number of milliseconds to wait for the webhook to respond. Only
|
|
267
|
+
# applicable when async is false.
|
|
268
|
+
timeout_ms: nil
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
sig do
|
|
273
|
+
override.returns(
|
|
274
|
+
{
|
|
275
|
+
description: String,
|
|
276
|
+
name: String,
|
|
277
|
+
url: String,
|
|
278
|
+
async: T::Boolean,
|
|
279
|
+
body_parameters:
|
|
280
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters,
|
|
281
|
+
headers:
|
|
282
|
+
T::Array[
|
|
283
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Header
|
|
284
|
+
],
|
|
285
|
+
method_:
|
|
286
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::OrSymbol,
|
|
287
|
+
path_parameters:
|
|
288
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters,
|
|
289
|
+
query_parameters:
|
|
290
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters,
|
|
291
|
+
timeout_ms: Integer
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
def to_hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
class BodyParameters < Telnyx::Internal::Type::BaseModel
|
|
299
|
+
OrHash =
|
|
300
|
+
T.type_alias do
|
|
301
|
+
T.any(
|
|
302
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters,
|
|
303
|
+
Telnyx::Internal::AnyHash
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# The properties of the body parameters.
|
|
308
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
309
|
+
attr_reader :properties
|
|
310
|
+
|
|
311
|
+
sig { params(properties: T::Hash[Symbol, T.anything]).void }
|
|
312
|
+
attr_writer :properties
|
|
313
|
+
|
|
314
|
+
# The required properties of the body parameters.
|
|
315
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
316
|
+
attr_reader :required
|
|
317
|
+
|
|
318
|
+
sig { params(required: T::Array[String]).void }
|
|
319
|
+
attr_writer :required
|
|
320
|
+
|
|
321
|
+
sig do
|
|
322
|
+
returns(
|
|
323
|
+
T.nilable(
|
|
324
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::OrSymbol
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
attr_reader :type
|
|
329
|
+
|
|
330
|
+
sig do
|
|
331
|
+
params(
|
|
332
|
+
type:
|
|
333
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::OrSymbol
|
|
334
|
+
).void
|
|
335
|
+
end
|
|
336
|
+
attr_writer :type
|
|
337
|
+
|
|
338
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
339
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
340
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
341
|
+
# for documentation about the format
|
|
342
|
+
sig do
|
|
343
|
+
params(
|
|
344
|
+
properties: T::Hash[Symbol, T.anything],
|
|
345
|
+
required: T::Array[String],
|
|
346
|
+
type:
|
|
347
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::OrSymbol
|
|
348
|
+
).returns(T.attached_class)
|
|
349
|
+
end
|
|
350
|
+
def self.new(
|
|
351
|
+
# The properties of the body parameters.
|
|
352
|
+
properties: nil,
|
|
353
|
+
# The required properties of the body parameters.
|
|
354
|
+
required: nil,
|
|
355
|
+
type: nil
|
|
356
|
+
)
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
sig do
|
|
360
|
+
override.returns(
|
|
361
|
+
{
|
|
362
|
+
properties: T::Hash[Symbol, T.anything],
|
|
363
|
+
required: T::Array[String],
|
|
364
|
+
type:
|
|
365
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::OrSymbol
|
|
366
|
+
}
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
def to_hash
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
module Type
|
|
373
|
+
extend Telnyx::Internal::Type::Enum
|
|
374
|
+
|
|
375
|
+
TaggedSymbol =
|
|
376
|
+
T.type_alias do
|
|
377
|
+
T.all(
|
|
378
|
+
Symbol,
|
|
379
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type
|
|
380
|
+
)
|
|
381
|
+
end
|
|
382
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
383
|
+
|
|
384
|
+
OBJECT =
|
|
385
|
+
T.let(
|
|
386
|
+
:object,
|
|
387
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::TaggedSymbol
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
sig do
|
|
391
|
+
override.returns(
|
|
392
|
+
T::Array[
|
|
393
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::BodyParameters::Type::TaggedSymbol
|
|
394
|
+
]
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
def self.values
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
class Header < Telnyx::Internal::Type::BaseModel
|
|
403
|
+
OrHash =
|
|
404
|
+
T.type_alias do
|
|
405
|
+
T.any(
|
|
406
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Header,
|
|
407
|
+
Telnyx::Internal::AnyHash
|
|
408
|
+
)
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
sig { returns(T.nilable(String)) }
|
|
412
|
+
attr_reader :name
|
|
413
|
+
|
|
414
|
+
sig { params(name: String).void }
|
|
415
|
+
attr_writer :name
|
|
416
|
+
|
|
417
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
418
|
+
# For example you can use
|
|
419
|
+
# `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
|
|
420
|
+
# value of the integration secret as the bearer token.
|
|
421
|
+
# [Telnyx signature headers](https://developers.telnyx.com/docs/voice/programmable-voice/voice-api-webhooks)
|
|
422
|
+
# will be automatically added to the request.
|
|
423
|
+
sig { returns(T.nilable(String)) }
|
|
424
|
+
attr_reader :value
|
|
425
|
+
|
|
426
|
+
sig { params(value: String).void }
|
|
427
|
+
attr_writer :value
|
|
428
|
+
|
|
429
|
+
sig do
|
|
430
|
+
params(name: String, value: String).returns(T.attached_class)
|
|
431
|
+
end
|
|
432
|
+
def self.new(
|
|
433
|
+
name: nil,
|
|
434
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
435
|
+
# For example you can use
|
|
436
|
+
# `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
|
|
437
|
+
# value of the integration secret as the bearer token.
|
|
438
|
+
# [Telnyx signature headers](https://developers.telnyx.com/docs/voice/programmable-voice/voice-api-webhooks)
|
|
439
|
+
# will be automatically added to the request.
|
|
440
|
+
value: nil
|
|
441
|
+
)
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
sig { override.returns({ name: String, value: String }) }
|
|
445
|
+
def to_hash
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# The HTTP method to be used when calling the external tool.
|
|
450
|
+
module Method
|
|
451
|
+
extend Telnyx::Internal::Type::Enum
|
|
452
|
+
|
|
453
|
+
TaggedSymbol =
|
|
454
|
+
T.type_alias do
|
|
455
|
+
T.all(
|
|
456
|
+
Symbol,
|
|
457
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method
|
|
458
|
+
)
|
|
459
|
+
end
|
|
460
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
461
|
+
|
|
462
|
+
GET =
|
|
463
|
+
T.let(
|
|
464
|
+
:GET,
|
|
465
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
466
|
+
)
|
|
467
|
+
POST =
|
|
468
|
+
T.let(
|
|
469
|
+
:POST,
|
|
470
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
471
|
+
)
|
|
472
|
+
PUT =
|
|
473
|
+
T.let(
|
|
474
|
+
:PUT,
|
|
475
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
476
|
+
)
|
|
477
|
+
DELETE =
|
|
478
|
+
T.let(
|
|
479
|
+
:DELETE,
|
|
480
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
481
|
+
)
|
|
482
|
+
PATCH =
|
|
483
|
+
T.let(
|
|
484
|
+
:PATCH,
|
|
485
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
sig do
|
|
489
|
+
override.returns(
|
|
490
|
+
T::Array[
|
|
491
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::Method::TaggedSymbol
|
|
492
|
+
]
|
|
493
|
+
)
|
|
494
|
+
end
|
|
495
|
+
def self.values
|
|
496
|
+
end
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
class PathParameters < Telnyx::Internal::Type::BaseModel
|
|
500
|
+
OrHash =
|
|
501
|
+
T.type_alias do
|
|
502
|
+
T.any(
|
|
503
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters,
|
|
504
|
+
Telnyx::Internal::AnyHash
|
|
505
|
+
)
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# The properties of the path parameters.
|
|
509
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
510
|
+
attr_reader :properties
|
|
511
|
+
|
|
512
|
+
sig { params(properties: T::Hash[Symbol, T.anything]).void }
|
|
513
|
+
attr_writer :properties
|
|
514
|
+
|
|
515
|
+
# The required properties of the path parameters.
|
|
516
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
517
|
+
attr_reader :required
|
|
518
|
+
|
|
519
|
+
sig { params(required: T::Array[String]).void }
|
|
520
|
+
attr_writer :required
|
|
521
|
+
|
|
522
|
+
sig do
|
|
523
|
+
returns(
|
|
524
|
+
T.nilable(
|
|
525
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::OrSymbol
|
|
526
|
+
)
|
|
527
|
+
)
|
|
528
|
+
end
|
|
529
|
+
attr_reader :type
|
|
530
|
+
|
|
531
|
+
sig do
|
|
532
|
+
params(
|
|
533
|
+
type:
|
|
534
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::OrSymbol
|
|
535
|
+
).void
|
|
536
|
+
end
|
|
537
|
+
attr_writer :type
|
|
538
|
+
|
|
539
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
540
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
541
|
+
# URL contains a placeholder for a value. See the
|
|
542
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
543
|
+
# documentation about the format
|
|
544
|
+
sig do
|
|
545
|
+
params(
|
|
546
|
+
properties: T::Hash[Symbol, T.anything],
|
|
547
|
+
required: T::Array[String],
|
|
548
|
+
type:
|
|
549
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::OrSymbol
|
|
550
|
+
).returns(T.attached_class)
|
|
551
|
+
end
|
|
552
|
+
def self.new(
|
|
553
|
+
# The properties of the path parameters.
|
|
554
|
+
properties: nil,
|
|
555
|
+
# The required properties of the path parameters.
|
|
556
|
+
required: nil,
|
|
557
|
+
type: nil
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
sig do
|
|
562
|
+
override.returns(
|
|
563
|
+
{
|
|
564
|
+
properties: T::Hash[Symbol, T.anything],
|
|
565
|
+
required: T::Array[String],
|
|
566
|
+
type:
|
|
567
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::OrSymbol
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
end
|
|
571
|
+
def to_hash
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
module Type
|
|
575
|
+
extend Telnyx::Internal::Type::Enum
|
|
576
|
+
|
|
577
|
+
TaggedSymbol =
|
|
578
|
+
T.type_alias do
|
|
579
|
+
T.all(
|
|
580
|
+
Symbol,
|
|
581
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type
|
|
582
|
+
)
|
|
583
|
+
end
|
|
584
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
585
|
+
|
|
586
|
+
OBJECT =
|
|
587
|
+
T.let(
|
|
588
|
+
:object,
|
|
589
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::TaggedSymbol
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
sig do
|
|
593
|
+
override.returns(
|
|
594
|
+
T::Array[
|
|
595
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::PathParameters::Type::TaggedSymbol
|
|
596
|
+
]
|
|
597
|
+
)
|
|
598
|
+
end
|
|
599
|
+
def self.values
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
class QueryParameters < Telnyx::Internal::Type::BaseModel
|
|
605
|
+
OrHash =
|
|
606
|
+
T.type_alias do
|
|
607
|
+
T.any(
|
|
608
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters,
|
|
609
|
+
Telnyx::Internal::AnyHash
|
|
610
|
+
)
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# The properties of the query parameters.
|
|
614
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
615
|
+
attr_reader :properties
|
|
616
|
+
|
|
617
|
+
sig { params(properties: T::Hash[Symbol, T.anything]).void }
|
|
618
|
+
attr_writer :properties
|
|
619
|
+
|
|
620
|
+
# The required properties of the query parameters.
|
|
621
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
622
|
+
attr_reader :required
|
|
623
|
+
|
|
624
|
+
sig { params(required: T::Array[String]).void }
|
|
625
|
+
attr_writer :required
|
|
626
|
+
|
|
627
|
+
sig do
|
|
628
|
+
returns(
|
|
629
|
+
T.nilable(
|
|
630
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::OrSymbol
|
|
631
|
+
)
|
|
632
|
+
)
|
|
633
|
+
end
|
|
634
|
+
attr_reader :type
|
|
635
|
+
|
|
636
|
+
sig do
|
|
637
|
+
params(
|
|
638
|
+
type:
|
|
639
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::OrSymbol
|
|
640
|
+
).void
|
|
641
|
+
end
|
|
642
|
+
attr_writer :type
|
|
643
|
+
|
|
644
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
645
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
646
|
+
# request. See the
|
|
647
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
648
|
+
# documentation about the format
|
|
649
|
+
sig do
|
|
650
|
+
params(
|
|
651
|
+
properties: T::Hash[Symbol, T.anything],
|
|
652
|
+
required: T::Array[String],
|
|
653
|
+
type:
|
|
654
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::OrSymbol
|
|
655
|
+
).returns(T.attached_class)
|
|
656
|
+
end
|
|
657
|
+
def self.new(
|
|
658
|
+
# The properties of the query parameters.
|
|
659
|
+
properties: nil,
|
|
660
|
+
# The required properties of the query parameters.
|
|
661
|
+
required: nil,
|
|
662
|
+
type: nil
|
|
663
|
+
)
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
sig do
|
|
667
|
+
override.returns(
|
|
668
|
+
{
|
|
669
|
+
properties: T::Hash[Symbol, T.anything],
|
|
670
|
+
required: T::Array[String],
|
|
671
|
+
type:
|
|
672
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::OrSymbol
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
end
|
|
676
|
+
def to_hash
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
module Type
|
|
680
|
+
extend Telnyx::Internal::Type::Enum
|
|
681
|
+
|
|
682
|
+
TaggedSymbol =
|
|
683
|
+
T.type_alias do
|
|
684
|
+
T.all(
|
|
685
|
+
Symbol,
|
|
686
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type
|
|
687
|
+
)
|
|
688
|
+
end
|
|
689
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
690
|
+
|
|
691
|
+
OBJECT =
|
|
692
|
+
T.let(
|
|
693
|
+
:object,
|
|
694
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::TaggedSymbol
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
sig do
|
|
698
|
+
override.returns(
|
|
699
|
+
T::Array[
|
|
700
|
+
Telnyx::AI::AssistantTool::Webhook::Webhook::QueryParameters::Type::TaggedSymbol
|
|
701
|
+
]
|
|
702
|
+
)
|
|
703
|
+
end
|
|
704
|
+
def self.values
|
|
705
|
+
end
|
|
706
|
+
end
|
|
707
|
+
end
|
|
708
|
+
end
|
|
709
|
+
end
|
|
710
|
+
|
|
26
711
|
class Handoff < Telnyx::Internal::Type::BaseModel
|
|
27
712
|
OrHash =
|
|
28
713
|
T.type_alias do
|
|
@@ -215,6 +900,229 @@ module Telnyx
|
|
|
215
900
|
end
|
|
216
901
|
end
|
|
217
902
|
|
|
903
|
+
class Transfer < Telnyx::Internal::Type::BaseModel
|
|
904
|
+
OrHash =
|
|
905
|
+
T.type_alias do
|
|
906
|
+
T.any(
|
|
907
|
+
Telnyx::AI::AssistantTool::Transfer,
|
|
908
|
+
Telnyx::Internal::AnyHash
|
|
909
|
+
)
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
sig { returns(Telnyx::AI::AssistantTool::Transfer::Transfer) }
|
|
913
|
+
attr_reader :transfer
|
|
914
|
+
|
|
915
|
+
sig do
|
|
916
|
+
params(
|
|
917
|
+
transfer: Telnyx::AI::AssistantTool::Transfer::Transfer::OrHash
|
|
918
|
+
).void
|
|
919
|
+
end
|
|
920
|
+
attr_writer :transfer
|
|
921
|
+
|
|
922
|
+
sig { returns(Symbol) }
|
|
923
|
+
attr_accessor :type
|
|
924
|
+
|
|
925
|
+
sig do
|
|
926
|
+
params(
|
|
927
|
+
transfer: Telnyx::AI::AssistantTool::Transfer::Transfer::OrHash,
|
|
928
|
+
type: Symbol
|
|
929
|
+
).returns(T.attached_class)
|
|
930
|
+
end
|
|
931
|
+
def self.new(transfer:, type: :transfer)
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
sig do
|
|
935
|
+
override.returns(
|
|
936
|
+
{
|
|
937
|
+
transfer: Telnyx::AI::AssistantTool::Transfer::Transfer,
|
|
938
|
+
type: Symbol
|
|
939
|
+
}
|
|
940
|
+
)
|
|
941
|
+
end
|
|
942
|
+
def to_hash
|
|
943
|
+
end
|
|
944
|
+
|
|
945
|
+
class Transfer < Telnyx::Internal::Type::BaseModel
|
|
946
|
+
OrHash =
|
|
947
|
+
T.type_alias do
|
|
948
|
+
T.any(
|
|
949
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer,
|
|
950
|
+
Telnyx::Internal::AnyHash
|
|
951
|
+
)
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# Number or SIP URI placing the call.
|
|
955
|
+
sig { returns(String) }
|
|
956
|
+
attr_accessor :from
|
|
957
|
+
|
|
958
|
+
# The different possible targets of the transfer. The assistant will be able to
|
|
959
|
+
# choose one of the targets to transfer the call to.
|
|
960
|
+
sig do
|
|
961
|
+
returns(
|
|
962
|
+
T::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target]
|
|
963
|
+
)
|
|
964
|
+
end
|
|
965
|
+
attr_accessor :targets
|
|
966
|
+
|
|
967
|
+
# Custom headers to be added to the SIP INVITE for the transfer command.
|
|
968
|
+
sig do
|
|
969
|
+
returns(
|
|
970
|
+
T.nilable(
|
|
971
|
+
T::Array[
|
|
972
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader
|
|
973
|
+
]
|
|
974
|
+
)
|
|
975
|
+
)
|
|
976
|
+
end
|
|
977
|
+
attr_reader :custom_headers
|
|
978
|
+
|
|
979
|
+
sig do
|
|
980
|
+
params(
|
|
981
|
+
custom_headers:
|
|
982
|
+
T::Array[
|
|
983
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader::OrHash
|
|
984
|
+
]
|
|
985
|
+
).void
|
|
986
|
+
end
|
|
987
|
+
attr_writer :custom_headers
|
|
988
|
+
|
|
989
|
+
# Natural language instructions for your agent for how to provide context for the
|
|
990
|
+
# transfer recipient.
|
|
991
|
+
sig { returns(T.nilable(String)) }
|
|
992
|
+
attr_reader :warm_transfer_instructions
|
|
993
|
+
|
|
994
|
+
sig { params(warm_transfer_instructions: String).void }
|
|
995
|
+
attr_writer :warm_transfer_instructions
|
|
996
|
+
|
|
997
|
+
sig do
|
|
998
|
+
params(
|
|
999
|
+
from: String,
|
|
1000
|
+
targets:
|
|
1001
|
+
T::Array[
|
|
1002
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::Target::OrHash
|
|
1003
|
+
],
|
|
1004
|
+
custom_headers:
|
|
1005
|
+
T::Array[
|
|
1006
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader::OrHash
|
|
1007
|
+
],
|
|
1008
|
+
warm_transfer_instructions: String
|
|
1009
|
+
).returns(T.attached_class)
|
|
1010
|
+
end
|
|
1011
|
+
def self.new(
|
|
1012
|
+
# Number or SIP URI placing the call.
|
|
1013
|
+
from:,
|
|
1014
|
+
# The different possible targets of the transfer. The assistant will be able to
|
|
1015
|
+
# choose one of the targets to transfer the call to.
|
|
1016
|
+
targets:,
|
|
1017
|
+
# Custom headers to be added to the SIP INVITE for the transfer command.
|
|
1018
|
+
custom_headers: nil,
|
|
1019
|
+
# Natural language instructions for your agent for how to provide context for the
|
|
1020
|
+
# transfer recipient.
|
|
1021
|
+
warm_transfer_instructions: nil
|
|
1022
|
+
)
|
|
1023
|
+
end
|
|
1024
|
+
|
|
1025
|
+
sig do
|
|
1026
|
+
override.returns(
|
|
1027
|
+
{
|
|
1028
|
+
from: String,
|
|
1029
|
+
targets:
|
|
1030
|
+
T::Array[
|
|
1031
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::Target
|
|
1032
|
+
],
|
|
1033
|
+
custom_headers:
|
|
1034
|
+
T::Array[
|
|
1035
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader
|
|
1036
|
+
],
|
|
1037
|
+
warm_transfer_instructions: String
|
|
1038
|
+
}
|
|
1039
|
+
)
|
|
1040
|
+
end
|
|
1041
|
+
def to_hash
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
class Target < Telnyx::Internal::Type::BaseModel
|
|
1045
|
+
OrHash =
|
|
1046
|
+
T.type_alias do
|
|
1047
|
+
T.any(
|
|
1048
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::Target,
|
|
1049
|
+
Telnyx::Internal::AnyHash
|
|
1050
|
+
)
|
|
1051
|
+
end
|
|
1052
|
+
|
|
1053
|
+
# The name of the target.
|
|
1054
|
+
sig { returns(T.nilable(String)) }
|
|
1055
|
+
attr_reader :name
|
|
1056
|
+
|
|
1057
|
+
sig { params(name: String).void }
|
|
1058
|
+
attr_writer :name
|
|
1059
|
+
|
|
1060
|
+
# The destination number or SIP URI of the call.
|
|
1061
|
+
sig { returns(T.nilable(String)) }
|
|
1062
|
+
attr_reader :to
|
|
1063
|
+
|
|
1064
|
+
sig { params(to: String).void }
|
|
1065
|
+
attr_writer :to
|
|
1066
|
+
|
|
1067
|
+
sig { params(name: String, to: String).returns(T.attached_class) }
|
|
1068
|
+
def self.new(
|
|
1069
|
+
# The name of the target.
|
|
1070
|
+
name: nil,
|
|
1071
|
+
# The destination number or SIP URI of the call.
|
|
1072
|
+
to: nil
|
|
1073
|
+
)
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
sig { override.returns({ name: String, to: String }) }
|
|
1077
|
+
def to_hash
|
|
1078
|
+
end
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
class CustomHeader < Telnyx::Internal::Type::BaseModel
|
|
1082
|
+
OrHash =
|
|
1083
|
+
T.type_alias do
|
|
1084
|
+
T.any(
|
|
1085
|
+
Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader,
|
|
1086
|
+
Telnyx::Internal::AnyHash
|
|
1087
|
+
)
|
|
1088
|
+
end
|
|
1089
|
+
|
|
1090
|
+
sig { returns(T.nilable(String)) }
|
|
1091
|
+
attr_reader :name
|
|
1092
|
+
|
|
1093
|
+
sig { params(name: String).void }
|
|
1094
|
+
attr_writer :name
|
|
1095
|
+
|
|
1096
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
1097
|
+
# For example you can use
|
|
1098
|
+
# `{{#integration_secret}}test-secret{{/integration_secret}}` to pass the value of
|
|
1099
|
+
# the integration secret.
|
|
1100
|
+
sig { returns(T.nilable(String)) }
|
|
1101
|
+
attr_reader :value
|
|
1102
|
+
|
|
1103
|
+
sig { params(value: String).void }
|
|
1104
|
+
attr_writer :value
|
|
1105
|
+
|
|
1106
|
+
sig do
|
|
1107
|
+
params(name: String, value: String).returns(T.attached_class)
|
|
1108
|
+
end
|
|
1109
|
+
def self.new(
|
|
1110
|
+
name: nil,
|
|
1111
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
1112
|
+
# For example you can use
|
|
1113
|
+
# `{{#integration_secret}}test-secret{{/integration_secret}}` to pass the value of
|
|
1114
|
+
# the integration secret.
|
|
1115
|
+
value: nil
|
|
1116
|
+
)
|
|
1117
|
+
end
|
|
1118
|
+
|
|
1119
|
+
sig { override.returns({ name: String, value: String }) }
|
|
1120
|
+
def to_hash
|
|
1121
|
+
end
|
|
1122
|
+
end
|
|
1123
|
+
end
|
|
1124
|
+
end
|
|
1125
|
+
|
|
218
1126
|
class Refer < Telnyx::Internal::Type::BaseModel
|
|
219
1127
|
OrHash =
|
|
220
1128
|
T.type_alias do
|