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,20 +12,16 @@ module Telnyx
|
|
|
12
12
|
sig { returns(Telnyx::AI::WebhookTool::Type::OrSymbol) }
|
|
13
13
|
attr_accessor :type
|
|
14
14
|
|
|
15
|
-
sig { returns(Telnyx::AI::
|
|
15
|
+
sig { returns(Telnyx::AI::WebhookTool::Webhook) }
|
|
16
16
|
attr_reader :webhook
|
|
17
17
|
|
|
18
|
-
sig
|
|
19
|
-
params(
|
|
20
|
-
webhook: Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash
|
|
21
|
-
).void
|
|
22
|
-
end
|
|
18
|
+
sig { params(webhook: Telnyx::AI::WebhookTool::Webhook::OrHash).void }
|
|
23
19
|
attr_writer :webhook
|
|
24
20
|
|
|
25
21
|
sig do
|
|
26
22
|
params(
|
|
27
23
|
type: Telnyx::AI::WebhookTool::Type::OrSymbol,
|
|
28
|
-
webhook: Telnyx::AI::
|
|
24
|
+
webhook: Telnyx::AI::WebhookTool::Webhook::OrHash
|
|
29
25
|
).returns(T.attached_class)
|
|
30
26
|
end
|
|
31
27
|
def self.new(type:, webhook:)
|
|
@@ -35,7 +31,7 @@ module Telnyx
|
|
|
35
31
|
override.returns(
|
|
36
32
|
{
|
|
37
33
|
type: Telnyx::AI::WebhookTool::Type::OrSymbol,
|
|
38
|
-
webhook: Telnyx::AI::
|
|
34
|
+
webhook: Telnyx::AI::WebhookTool::Webhook
|
|
39
35
|
}
|
|
40
36
|
)
|
|
41
37
|
end
|
|
@@ -59,6 +55,586 @@ module Telnyx
|
|
|
59
55
|
def self.values
|
|
60
56
|
end
|
|
61
57
|
end
|
|
58
|
+
|
|
59
|
+
class Webhook < Telnyx::Internal::Type::BaseModel
|
|
60
|
+
OrHash =
|
|
61
|
+
T.type_alias do
|
|
62
|
+
T.any(Telnyx::AI::WebhookTool::Webhook, Telnyx::Internal::AnyHash)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# The description of the tool.
|
|
66
|
+
sig { returns(String) }
|
|
67
|
+
attr_accessor :description
|
|
68
|
+
|
|
69
|
+
# The name of the tool.
|
|
70
|
+
sig { returns(String) }
|
|
71
|
+
attr_accessor :name
|
|
72
|
+
|
|
73
|
+
# The URL of the external tool to be called. This URL is going to be used by the
|
|
74
|
+
# assistant. The URL can be templated like: `https://example.com/api/v1/{id}`,
|
|
75
|
+
# where `{id}` is a placeholder for a value that will be provided by the assistant
|
|
76
|
+
# if `path_parameters` are provided with the `id` attribute.
|
|
77
|
+
sig { returns(String) }
|
|
78
|
+
attr_accessor :url
|
|
79
|
+
|
|
80
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
81
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
82
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
83
|
+
# for documentation about the format
|
|
84
|
+
sig do
|
|
85
|
+
returns(T.nilable(Telnyx::AI::WebhookTool::Webhook::BodyParameters))
|
|
86
|
+
end
|
|
87
|
+
attr_reader :body_parameters
|
|
88
|
+
|
|
89
|
+
sig do
|
|
90
|
+
params(
|
|
91
|
+
body_parameters:
|
|
92
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::OrHash
|
|
93
|
+
).void
|
|
94
|
+
end
|
|
95
|
+
attr_writer :body_parameters
|
|
96
|
+
|
|
97
|
+
# The headers to be sent to the external tool.
|
|
98
|
+
sig do
|
|
99
|
+
returns(
|
|
100
|
+
T.nilable(T::Array[Telnyx::AI::WebhookTool::Webhook::Header])
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
attr_reader :headers
|
|
104
|
+
|
|
105
|
+
sig do
|
|
106
|
+
params(
|
|
107
|
+
headers:
|
|
108
|
+
T::Array[Telnyx::AI::WebhookTool::Webhook::Header::OrHash]
|
|
109
|
+
).void
|
|
110
|
+
end
|
|
111
|
+
attr_writer :headers
|
|
112
|
+
|
|
113
|
+
# The HTTP method to be used when calling the external tool.
|
|
114
|
+
sig do
|
|
115
|
+
returns(
|
|
116
|
+
T.nilable(Telnyx::AI::WebhookTool::Webhook::Method::OrSymbol)
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
attr_reader :method_
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
params(
|
|
123
|
+
method_: Telnyx::AI::WebhookTool::Webhook::Method::OrSymbol
|
|
124
|
+
).void
|
|
125
|
+
end
|
|
126
|
+
attr_writer :method_
|
|
127
|
+
|
|
128
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
129
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
130
|
+
# URL contains a placeholder for a value. See the
|
|
131
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
132
|
+
# documentation about the format
|
|
133
|
+
sig do
|
|
134
|
+
returns(T.nilable(Telnyx::AI::WebhookTool::Webhook::PathParameters))
|
|
135
|
+
end
|
|
136
|
+
attr_reader :path_parameters
|
|
137
|
+
|
|
138
|
+
sig do
|
|
139
|
+
params(
|
|
140
|
+
path_parameters:
|
|
141
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::OrHash
|
|
142
|
+
).void
|
|
143
|
+
end
|
|
144
|
+
attr_writer :path_parameters
|
|
145
|
+
|
|
146
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
147
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
148
|
+
# request. See the
|
|
149
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
150
|
+
# documentation about the format
|
|
151
|
+
sig do
|
|
152
|
+
returns(
|
|
153
|
+
T.nilable(Telnyx::AI::WebhookTool::Webhook::QueryParameters)
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
attr_reader :query_parameters
|
|
157
|
+
|
|
158
|
+
sig do
|
|
159
|
+
params(
|
|
160
|
+
query_parameters:
|
|
161
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::OrHash
|
|
162
|
+
).void
|
|
163
|
+
end
|
|
164
|
+
attr_writer :query_parameters
|
|
165
|
+
|
|
166
|
+
sig do
|
|
167
|
+
params(
|
|
168
|
+
description: String,
|
|
169
|
+
name: String,
|
|
170
|
+
url: String,
|
|
171
|
+
body_parameters:
|
|
172
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::OrHash,
|
|
173
|
+
headers:
|
|
174
|
+
T::Array[Telnyx::AI::WebhookTool::Webhook::Header::OrHash],
|
|
175
|
+
method_: Telnyx::AI::WebhookTool::Webhook::Method::OrSymbol,
|
|
176
|
+
path_parameters:
|
|
177
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::OrHash,
|
|
178
|
+
query_parameters:
|
|
179
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::OrHash
|
|
180
|
+
).returns(T.attached_class)
|
|
181
|
+
end
|
|
182
|
+
def self.new(
|
|
183
|
+
# The description of the tool.
|
|
184
|
+
description:,
|
|
185
|
+
# The name of the tool.
|
|
186
|
+
name:,
|
|
187
|
+
# The URL of the external tool to be called. This URL is going to be used by the
|
|
188
|
+
# assistant. The URL can be templated like: `https://example.com/api/v1/{id}`,
|
|
189
|
+
# where `{id}` is a placeholder for a value that will be provided by the assistant
|
|
190
|
+
# if `path_parameters` are provided with the `id` attribute.
|
|
191
|
+
url:,
|
|
192
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
193
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
194
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
195
|
+
# for documentation about the format
|
|
196
|
+
body_parameters: nil,
|
|
197
|
+
# The headers to be sent to the external tool.
|
|
198
|
+
headers: nil,
|
|
199
|
+
# The HTTP method to be used when calling the external tool.
|
|
200
|
+
method_: nil,
|
|
201
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
202
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
203
|
+
# URL contains a placeholder for a value. See the
|
|
204
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
205
|
+
# documentation about the format
|
|
206
|
+
path_parameters: nil,
|
|
207
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
208
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
209
|
+
# request. See the
|
|
210
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
211
|
+
# documentation about the format
|
|
212
|
+
query_parameters: nil
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
sig do
|
|
217
|
+
override.returns(
|
|
218
|
+
{
|
|
219
|
+
description: String,
|
|
220
|
+
name: String,
|
|
221
|
+
url: String,
|
|
222
|
+
body_parameters:
|
|
223
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters,
|
|
224
|
+
headers: T::Array[Telnyx::AI::WebhookTool::Webhook::Header],
|
|
225
|
+
method_: Telnyx::AI::WebhookTool::Webhook::Method::OrSymbol,
|
|
226
|
+
path_parameters:
|
|
227
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters,
|
|
228
|
+
query_parameters:
|
|
229
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
def to_hash
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
class BodyParameters < Telnyx::Internal::Type::BaseModel
|
|
237
|
+
OrHash =
|
|
238
|
+
T.type_alias do
|
|
239
|
+
T.any(
|
|
240
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters,
|
|
241
|
+
Telnyx::Internal::AnyHash
|
|
242
|
+
)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# The properties of the body parameters.
|
|
246
|
+
sig { returns(T.nilable(T.anything)) }
|
|
247
|
+
attr_reader :properties
|
|
248
|
+
|
|
249
|
+
sig { params(properties: T.anything).void }
|
|
250
|
+
attr_writer :properties
|
|
251
|
+
|
|
252
|
+
# The required properties of the body parameters.
|
|
253
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
254
|
+
attr_reader :required
|
|
255
|
+
|
|
256
|
+
sig { params(required: T::Array[String]).void }
|
|
257
|
+
attr_writer :required
|
|
258
|
+
|
|
259
|
+
sig do
|
|
260
|
+
returns(
|
|
261
|
+
T.nilable(
|
|
262
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::OrSymbol
|
|
263
|
+
)
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
attr_reader :type
|
|
267
|
+
|
|
268
|
+
sig do
|
|
269
|
+
params(
|
|
270
|
+
type:
|
|
271
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::OrSymbol
|
|
272
|
+
).void
|
|
273
|
+
end
|
|
274
|
+
attr_writer :type
|
|
275
|
+
|
|
276
|
+
# The body parameters the webhook tool accepts, described as a JSON Schema object.
|
|
277
|
+
# These parameters will be passed to the webhook as the body of the request. See
|
|
278
|
+
# the [JSON Schema reference](https://json-schema.org/understanding-json-schema)
|
|
279
|
+
# for documentation about the format
|
|
280
|
+
sig do
|
|
281
|
+
params(
|
|
282
|
+
properties: T.anything,
|
|
283
|
+
required: T::Array[String],
|
|
284
|
+
type:
|
|
285
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::OrSymbol
|
|
286
|
+
).returns(T.attached_class)
|
|
287
|
+
end
|
|
288
|
+
def self.new(
|
|
289
|
+
# The properties of the body parameters.
|
|
290
|
+
properties: nil,
|
|
291
|
+
# The required properties of the body parameters.
|
|
292
|
+
required: nil,
|
|
293
|
+
type: nil
|
|
294
|
+
)
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
sig do
|
|
298
|
+
override.returns(
|
|
299
|
+
{
|
|
300
|
+
properties: T.anything,
|
|
301
|
+
required: T::Array[String],
|
|
302
|
+
type:
|
|
303
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::OrSymbol
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
def to_hash
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
module Type
|
|
311
|
+
extend Telnyx::Internal::Type::Enum
|
|
312
|
+
|
|
313
|
+
TaggedSymbol =
|
|
314
|
+
T.type_alias do
|
|
315
|
+
T.all(
|
|
316
|
+
Symbol,
|
|
317
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type
|
|
318
|
+
)
|
|
319
|
+
end
|
|
320
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
321
|
+
|
|
322
|
+
OBJECT =
|
|
323
|
+
T.let(
|
|
324
|
+
:object,
|
|
325
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::TaggedSymbol
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
sig do
|
|
329
|
+
override.returns(
|
|
330
|
+
T::Array[
|
|
331
|
+
Telnyx::AI::WebhookTool::Webhook::BodyParameters::Type::TaggedSymbol
|
|
332
|
+
]
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
def self.values
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
class Header < Telnyx::Internal::Type::BaseModel
|
|
341
|
+
OrHash =
|
|
342
|
+
T.type_alias do
|
|
343
|
+
T.any(
|
|
344
|
+
Telnyx::AI::WebhookTool::Webhook::Header,
|
|
345
|
+
Telnyx::Internal::AnyHash
|
|
346
|
+
)
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
sig { returns(T.nilable(String)) }
|
|
350
|
+
attr_reader :name
|
|
351
|
+
|
|
352
|
+
sig { params(name: String).void }
|
|
353
|
+
attr_writer :name
|
|
354
|
+
|
|
355
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
356
|
+
# For example you can use
|
|
357
|
+
# `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
|
|
358
|
+
# value of the integration secret as the bearer token.
|
|
359
|
+
sig { returns(T.nilable(String)) }
|
|
360
|
+
attr_reader :value
|
|
361
|
+
|
|
362
|
+
sig { params(value: String).void }
|
|
363
|
+
attr_writer :value
|
|
364
|
+
|
|
365
|
+
sig do
|
|
366
|
+
params(name: String, value: String).returns(T.attached_class)
|
|
367
|
+
end
|
|
368
|
+
def self.new(
|
|
369
|
+
name: nil,
|
|
370
|
+
# The value of the header. Note that we support mustache templating for the value.
|
|
371
|
+
# For example you can use
|
|
372
|
+
# `Bearer {{#integration_secret}}test-secret{{/integration_secret}}` to pass the
|
|
373
|
+
# value of the integration secret as the bearer token.
|
|
374
|
+
value: nil
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
sig { override.returns({ name: String, value: String }) }
|
|
379
|
+
def to_hash
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# The HTTP method to be used when calling the external tool.
|
|
384
|
+
module Method
|
|
385
|
+
extend Telnyx::Internal::Type::Enum
|
|
386
|
+
|
|
387
|
+
TaggedSymbol =
|
|
388
|
+
T.type_alias do
|
|
389
|
+
T.all(Symbol, Telnyx::AI::WebhookTool::Webhook::Method)
|
|
390
|
+
end
|
|
391
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
392
|
+
|
|
393
|
+
GET =
|
|
394
|
+
T.let(
|
|
395
|
+
:GET,
|
|
396
|
+
Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol
|
|
397
|
+
)
|
|
398
|
+
POST =
|
|
399
|
+
T.let(
|
|
400
|
+
:POST,
|
|
401
|
+
Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol
|
|
402
|
+
)
|
|
403
|
+
PUT =
|
|
404
|
+
T.let(
|
|
405
|
+
:PUT,
|
|
406
|
+
Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol
|
|
407
|
+
)
|
|
408
|
+
DELETE =
|
|
409
|
+
T.let(
|
|
410
|
+
:DELETE,
|
|
411
|
+
Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol
|
|
412
|
+
)
|
|
413
|
+
PATCH =
|
|
414
|
+
T.let(
|
|
415
|
+
:PATCH,
|
|
416
|
+
Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
sig do
|
|
420
|
+
override.returns(
|
|
421
|
+
T::Array[Telnyx::AI::WebhookTool::Webhook::Method::TaggedSymbol]
|
|
422
|
+
)
|
|
423
|
+
end
|
|
424
|
+
def self.values
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
class PathParameters < Telnyx::Internal::Type::BaseModel
|
|
429
|
+
OrHash =
|
|
430
|
+
T.type_alias do
|
|
431
|
+
T.any(
|
|
432
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters,
|
|
433
|
+
Telnyx::Internal::AnyHash
|
|
434
|
+
)
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# The properties of the path parameters.
|
|
438
|
+
sig { returns(T.nilable(T.anything)) }
|
|
439
|
+
attr_reader :properties
|
|
440
|
+
|
|
441
|
+
sig { params(properties: T.anything).void }
|
|
442
|
+
attr_writer :properties
|
|
443
|
+
|
|
444
|
+
# The required properties of the path parameters.
|
|
445
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
446
|
+
attr_reader :required
|
|
447
|
+
|
|
448
|
+
sig { params(required: T::Array[String]).void }
|
|
449
|
+
attr_writer :required
|
|
450
|
+
|
|
451
|
+
sig do
|
|
452
|
+
returns(
|
|
453
|
+
T.nilable(
|
|
454
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::OrSymbol
|
|
455
|
+
)
|
|
456
|
+
)
|
|
457
|
+
end
|
|
458
|
+
attr_reader :type
|
|
459
|
+
|
|
460
|
+
sig do
|
|
461
|
+
params(
|
|
462
|
+
type:
|
|
463
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::OrSymbol
|
|
464
|
+
).void
|
|
465
|
+
end
|
|
466
|
+
attr_writer :type
|
|
467
|
+
|
|
468
|
+
# The path parameters the webhook tool accepts, described as a JSON Schema object.
|
|
469
|
+
# These parameters will be passed to the webhook as the path of the request if the
|
|
470
|
+
# URL contains a placeholder for a value. See the
|
|
471
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
472
|
+
# documentation about the format
|
|
473
|
+
sig do
|
|
474
|
+
params(
|
|
475
|
+
properties: T.anything,
|
|
476
|
+
required: T::Array[String],
|
|
477
|
+
type:
|
|
478
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::OrSymbol
|
|
479
|
+
).returns(T.attached_class)
|
|
480
|
+
end
|
|
481
|
+
def self.new(
|
|
482
|
+
# The properties of the path parameters.
|
|
483
|
+
properties: nil,
|
|
484
|
+
# The required properties of the path parameters.
|
|
485
|
+
required: nil,
|
|
486
|
+
type: nil
|
|
487
|
+
)
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
sig do
|
|
491
|
+
override.returns(
|
|
492
|
+
{
|
|
493
|
+
properties: T.anything,
|
|
494
|
+
required: T::Array[String],
|
|
495
|
+
type:
|
|
496
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::OrSymbol
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
end
|
|
500
|
+
def to_hash
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
module Type
|
|
504
|
+
extend Telnyx::Internal::Type::Enum
|
|
505
|
+
|
|
506
|
+
TaggedSymbol =
|
|
507
|
+
T.type_alias do
|
|
508
|
+
T.all(
|
|
509
|
+
Symbol,
|
|
510
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
514
|
+
|
|
515
|
+
OBJECT =
|
|
516
|
+
T.let(
|
|
517
|
+
:object,
|
|
518
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::TaggedSymbol
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
sig do
|
|
522
|
+
override.returns(
|
|
523
|
+
T::Array[
|
|
524
|
+
Telnyx::AI::WebhookTool::Webhook::PathParameters::Type::TaggedSymbol
|
|
525
|
+
]
|
|
526
|
+
)
|
|
527
|
+
end
|
|
528
|
+
def self.values
|
|
529
|
+
end
|
|
530
|
+
end
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
class QueryParameters < Telnyx::Internal::Type::BaseModel
|
|
534
|
+
OrHash =
|
|
535
|
+
T.type_alias do
|
|
536
|
+
T.any(
|
|
537
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters,
|
|
538
|
+
Telnyx::Internal::AnyHash
|
|
539
|
+
)
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
# The properties of the query parameters.
|
|
543
|
+
sig { returns(T.nilable(T.anything)) }
|
|
544
|
+
attr_reader :properties
|
|
545
|
+
|
|
546
|
+
sig { params(properties: T.anything).void }
|
|
547
|
+
attr_writer :properties
|
|
548
|
+
|
|
549
|
+
# The required properties of the query parameters.
|
|
550
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
551
|
+
attr_reader :required
|
|
552
|
+
|
|
553
|
+
sig { params(required: T::Array[String]).void }
|
|
554
|
+
attr_writer :required
|
|
555
|
+
|
|
556
|
+
sig do
|
|
557
|
+
returns(
|
|
558
|
+
T.nilable(
|
|
559
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::OrSymbol
|
|
560
|
+
)
|
|
561
|
+
)
|
|
562
|
+
end
|
|
563
|
+
attr_reader :type
|
|
564
|
+
|
|
565
|
+
sig do
|
|
566
|
+
params(
|
|
567
|
+
type:
|
|
568
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::OrSymbol
|
|
569
|
+
).void
|
|
570
|
+
end
|
|
571
|
+
attr_writer :type
|
|
572
|
+
|
|
573
|
+
# The query parameters the webhook tool accepts, described as a JSON Schema
|
|
574
|
+
# object. These parameters will be passed to the webhook as the query of the
|
|
575
|
+
# request. See the
|
|
576
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
577
|
+
# documentation about the format
|
|
578
|
+
sig do
|
|
579
|
+
params(
|
|
580
|
+
properties: T.anything,
|
|
581
|
+
required: T::Array[String],
|
|
582
|
+
type:
|
|
583
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::OrSymbol
|
|
584
|
+
).returns(T.attached_class)
|
|
585
|
+
end
|
|
586
|
+
def self.new(
|
|
587
|
+
# The properties of the query parameters.
|
|
588
|
+
properties: nil,
|
|
589
|
+
# The required properties of the query parameters.
|
|
590
|
+
required: nil,
|
|
591
|
+
type: nil
|
|
592
|
+
)
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
sig do
|
|
596
|
+
override.returns(
|
|
597
|
+
{
|
|
598
|
+
properties: T.anything,
|
|
599
|
+
required: T::Array[String],
|
|
600
|
+
type:
|
|
601
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::OrSymbol
|
|
602
|
+
}
|
|
603
|
+
)
|
|
604
|
+
end
|
|
605
|
+
def to_hash
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
module Type
|
|
609
|
+
extend Telnyx::Internal::Type::Enum
|
|
610
|
+
|
|
611
|
+
TaggedSymbol =
|
|
612
|
+
T.type_alias do
|
|
613
|
+
T.all(
|
|
614
|
+
Symbol,
|
|
615
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type
|
|
616
|
+
)
|
|
617
|
+
end
|
|
618
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
619
|
+
|
|
620
|
+
OBJECT =
|
|
621
|
+
T.let(
|
|
622
|
+
:object,
|
|
623
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::TaggedSymbol
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
sig do
|
|
627
|
+
override.returns(
|
|
628
|
+
T::Array[
|
|
629
|
+
Telnyx::AI::WebhookTool::Webhook::QueryParameters::Type::TaggedSymbol
|
|
630
|
+
]
|
|
631
|
+
)
|
|
632
|
+
end
|
|
633
|
+
def self.values
|
|
634
|
+
end
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
end
|
|
62
638
|
end
|
|
63
639
|
end
|
|
64
640
|
end
|