telnyx 5.167.0 → 5.168.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 +4 -0
- data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +16 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +17 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +17 -1
- data/lib/telnyx/models/ai/chat_completion_request.rb +125 -48
- data/lib/telnyx/models/ai/inference_embedding.rb +16 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +15 -1
- data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
- data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
- data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
- data/lib/telnyx/models/compute/logs_meta.rb +23 -0
- data/lib/telnyx/models/credential_connection.rb +4 -1
- data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
- data/lib/telnyx/models/email_message_batch_params.rb +4 -1
- data/lib/telnyx/models/email_message_batch_response.rb +1 -0
- data/lib/telnyx/models/fqdn_connection.rb +5 -2
- data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
- data/lib/telnyx/models/messaging_inbound_message_payload.rb +210 -67
- data/lib/telnyx/models/messaging_messaging_profile.rb +11 -1
- data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
- data/lib/telnyx/models/messaging_profile_features.rb +26 -0
- data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
- data/lib/telnyx/models/uac_connection.rb +4 -1
- data/lib/telnyx/models/uac_external_settings.rb +6 -2
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
- data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
- data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
- data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
- data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
- data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
- data/lib/telnyx/models.rb +8 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/ai/openai/chat.rb +2 -8
- data/lib/telnyx/resources/compute/funcs.rb +141 -0
- data/lib/telnyx/resources/compute.rb +18 -0
- data/lib/telnyx/resources/email_messages.rb +4 -2
- data/lib/telnyx/resources/messaging_profiles.rb +6 -2
- data/lib/telnyx/resources/webhooks.rb +2 -2
- data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
- data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
- data/lib/telnyx/resources/x402/credit_account.rb +8 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +23 -0
- data/rbi/telnyx/client.rbi +3 -0
- data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +29 -0
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +31 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +31 -0
- data/rbi/telnyx/models/ai/chat_completion_request.rbi +224 -92
- data/rbi/telnyx/models/ai/inference_embedding.rbi +29 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +23 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
- data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
- data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
- data/rbi/telnyx/models/credential_connection.rbi +8 -2
- data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
- data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
- data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
- data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
- data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
- data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +450 -193
- data/rbi/telnyx/models/messaging_messaging_profile.rbi +19 -0
- data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
- data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
- data/rbi/telnyx/models/messaging_profile_update_params.rbi +19 -0
- data/rbi/telnyx/models/uac_connection.rbi +8 -2
- data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
- data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
- data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
- data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
- data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
- data/rbi/telnyx/models.rbi +8 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +12 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +21 -0
- data/rbi/telnyx/resources/ai/openai/chat.rbi +9 -13
- data/rbi/telnyx/resources/compute/funcs.rbi +111 -0
- data/rbi/telnyx/resources/compute.rbi +15 -0
- data/rbi/telnyx/resources/email_messages.rbi +6 -2
- data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
- data/rbi/telnyx/resources/webhooks.rbi +6 -2
- data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
- data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
- data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
- data/sig/telnyx/models/ai/chat_completion_request.rbs +86 -44
- data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
- data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
- data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
- data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
- data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
- data/sig/telnyx/models/messaging_inbound_message_payload.rbs +207 -95
- data/sig/telnyx/models/messaging_messaging_profile.rbs +5 -0
- data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
- data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
- data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
- data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
- data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
- data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
- data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
- data/sig/telnyx/models.rbs +8 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/ai/openai/chat.rbs +1 -4
- data/sig/telnyx/resources/compute/funcs.rbs +41 -0
- data/sig/telnyx/resources/compute.rbs +9 -0
- data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
- data/sig/telnyx/resources/webhooks.rbs +6 -2
- data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
- data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
- data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
- metadata +71 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class X402
|
|
6
|
+
class CreditAccount
|
|
7
|
+
# Operations for x402 cryptocurrency payment transactions. Fund your Telnyx
|
|
8
|
+
# account using USDC stablecoin payments via the x402 protocol.
|
|
9
|
+
class Payments
|
|
10
|
+
# Returns a single x402 payment transaction by ID. The transaction must belong to
|
|
11
|
+
# the authenticated user; organization sub-users must have read permission on
|
|
12
|
+
# transactions. Returns 404 if the transaction does not exist or belongs to
|
|
13
|
+
# another user.
|
|
14
|
+
#
|
|
15
|
+
# @overload retrieve(id, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param id [String] The x402 payment transaction ID.
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
|
+
#
|
|
21
|
+
# @return [Telnyx::Models::X402::CreditAccount::PaymentRetrieveResponse]
|
|
22
|
+
#
|
|
23
|
+
# @see Telnyx::Models::X402::CreditAccount::PaymentRetrieveParams
|
|
24
|
+
def retrieve(id, params = {})
|
|
25
|
+
@client.request(
|
|
26
|
+
method: :get,
|
|
27
|
+
path: ["x402/credit_account/payments/%1$s", id],
|
|
28
|
+
model: Telnyx::Models::X402::CreditAccount::PaymentRetrieveResponse,
|
|
29
|
+
options: params[:request_options]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns a paginated list of the authenticated user's x402 payment transactions,
|
|
34
|
+
# newest first. Organization sub-users must have read permission on transactions;
|
|
35
|
+
# without it the list is empty.
|
|
36
|
+
#
|
|
37
|
+
# @overload list(page_number: nil, page_size: nil, request_options: {})
|
|
38
|
+
#
|
|
39
|
+
# @param page_number [Integer] The page number to load.
|
|
40
|
+
#
|
|
41
|
+
# @param page_size [Integer] The size of the page.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
|
+
#
|
|
45
|
+
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::X402::CreditAccount::X402TransactionRecord>]
|
|
46
|
+
#
|
|
47
|
+
# @see Telnyx::Models::X402::CreditAccount::PaymentListParams
|
|
48
|
+
def list(params = {})
|
|
49
|
+
parsed, options = Telnyx::X402::CreditAccount::PaymentListParams.dump_request(params)
|
|
50
|
+
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
51
|
+
@client.request(
|
|
52
|
+
method: :get,
|
|
53
|
+
path: "x402/credit_account/payments",
|
|
54
|
+
query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
|
|
55
|
+
page: Telnyx::Internal::DefaultFlatPagination,
|
|
56
|
+
model: Telnyx::X402::CreditAccount::X402TransactionRecord,
|
|
57
|
+
options: options
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# @api private
|
|
62
|
+
#
|
|
63
|
+
# @param client [Telnyx::Client]
|
|
64
|
+
def initialize(client:)
|
|
65
|
+
@client = client
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -6,6 +6,11 @@ module Telnyx
|
|
|
6
6
|
# Operations for x402 cryptocurrency payment transactions. Fund your Telnyx
|
|
7
7
|
# account using USDC stablecoin payments via the x402 protocol.
|
|
8
8
|
class CreditAccount
|
|
9
|
+
# Operations for x402 cryptocurrency payment transactions. Fund your Telnyx
|
|
10
|
+
# account using USDC stablecoin payments via the x402 protocol.
|
|
11
|
+
# @return [Telnyx::Resources::X402::CreditAccount::Payments]
|
|
12
|
+
attr_reader :payments
|
|
13
|
+
|
|
9
14
|
# Creates a payment quote for the specified USD amount. Returns payment details
|
|
10
15
|
# including the x402 payment requirements, network, and expiration time. The quote
|
|
11
16
|
# must be settled before it expires.
|
|
@@ -23,7 +28,7 @@ module Telnyx
|
|
|
23
28
|
parsed, options = Telnyx::X402::CreditAccountCreateQuoteParams.dump_request(params)
|
|
24
29
|
@client.request(
|
|
25
30
|
method: :post,
|
|
26
|
-
path: "
|
|
31
|
+
path: "x402/credit_account/quote",
|
|
27
32
|
body: parsed,
|
|
28
33
|
model: Telnyx::Models::X402::CreditAccountCreateQuoteResponse,
|
|
29
34
|
options: options
|
|
@@ -56,7 +61,7 @@ module Telnyx
|
|
|
56
61
|
header_params = {header_payment_signature: "payment-signature"}
|
|
57
62
|
@client.request(
|
|
58
63
|
method: :post,
|
|
59
|
-
path: "
|
|
64
|
+
path: "x402/credit_account",
|
|
60
65
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
61
66
|
body: parsed.except(*header_params.keys),
|
|
62
67
|
model: Telnyx::Models::X402::CreditAccountSettleResponse,
|
|
@@ -69,6 +74,7 @@ module Telnyx
|
|
|
69
74
|
# @param client [Telnyx::Client]
|
|
70
75
|
def initialize(client:)
|
|
71
76
|
@client = client
|
|
77
|
+
@payments = Telnyx::Resources::X402::CreditAccount::Payments.new(client: client)
|
|
72
78
|
end
|
|
73
79
|
end
|
|
74
80
|
end
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -159,6 +159,7 @@ require_relative "telnyx/models/ai/anthropic/v1_messages_params"
|
|
|
159
159
|
require_relative "telnyx/models/ai/anthropic/v1_messages_response"
|
|
160
160
|
require_relative "telnyx/models/ai/arithmetic_expression"
|
|
161
161
|
require_relative "telnyx/models/ai/assistant"
|
|
162
|
+
require_relative "telnyx/models/ai/assistant_a2_a_agent"
|
|
162
163
|
require_relative "telnyx/models/ai/assistant_chat_params"
|
|
163
164
|
require_relative "telnyx/models/ai/assistant_chat_response"
|
|
164
165
|
require_relative "telnyx/models/ai/assistant_clone_params"
|
|
@@ -791,6 +792,16 @@ require_relative "telnyx/models/comment_mark_as_read_params"
|
|
|
791
792
|
require_relative "telnyx/models/comment_mark_as_read_response"
|
|
792
793
|
require_relative "telnyx/models/comment_retrieve_params"
|
|
793
794
|
require_relative "telnyx/models/comment_retrieve_response"
|
|
795
|
+
require_relative "telnyx/models/compute/func_retrieve_logs_params"
|
|
796
|
+
require_relative "telnyx/models/compute/func_retrieve_logs_response"
|
|
797
|
+
require_relative "telnyx/models/compute/func_retrieve_metric_aggregates_params"
|
|
798
|
+
require_relative "telnyx/models/compute/func_retrieve_metric_aggregates_response"
|
|
799
|
+
require_relative "telnyx/models/compute/func_retrieve_revisions_params"
|
|
800
|
+
require_relative "telnyx/models/compute/func_retrieve_revisions_response"
|
|
801
|
+
require_relative "telnyx/models/compute/func_retrieve_ship_inspection_params"
|
|
802
|
+
require_relative "telnyx/models/compute/func_retrieve_ship_inspection_response"
|
|
803
|
+
require_relative "telnyx/models/compute/functions_observability_pagination_meta"
|
|
804
|
+
require_relative "telnyx/models/compute/logs_meta"
|
|
794
805
|
require_relative "telnyx/models/conference"
|
|
795
806
|
require_relative "telnyx/models/conference_created"
|
|
796
807
|
require_relative "telnyx/models/conference_created_webhook_event"
|
|
@@ -1668,6 +1679,7 @@ require_relative "telnyx/models/messaging_profile_create_params"
|
|
|
1668
1679
|
require_relative "telnyx/models/messaging_profile_create_response"
|
|
1669
1680
|
require_relative "telnyx/models/messaging_profile_delete_params"
|
|
1670
1681
|
require_relative "telnyx/models/messaging_profile_delete_response"
|
|
1682
|
+
require_relative "telnyx/models/messaging_profile_features"
|
|
1671
1683
|
require_relative "telnyx/models/messaging_profile_list_alphanumeric_sender_ids_params"
|
|
1672
1684
|
require_relative "telnyx/models/messaging_profile_list_params"
|
|
1673
1685
|
require_relative "telnyx/models/messaging_profile_list_phone_numbers_params"
|
|
@@ -2810,6 +2822,8 @@ require_relative "telnyx/models/whatsapp/phone_number_list_response"
|
|
|
2810
2822
|
require_relative "telnyx/models/whatsapp/phone_number_resend_verification_params"
|
|
2811
2823
|
require_relative "telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params"
|
|
2812
2824
|
require_relative "telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response"
|
|
2825
|
+
require_relative "telnyx/models/whatsapp/phone_number_retrieve_phone_number_params"
|
|
2826
|
+
require_relative "telnyx/models/whatsapp/phone_number_retrieve_phone_number_response"
|
|
2813
2827
|
require_relative "telnyx/models/whatsapp/phone_numbers/calling_setting_retrieve_params"
|
|
2814
2828
|
require_relative "telnyx/models/whatsapp/phone_numbers/calling_setting_retrieve_response"
|
|
2815
2829
|
require_relative "telnyx/models/whatsapp/phone_numbers/calling_setting_update_params"
|
|
@@ -2844,11 +2858,13 @@ require_relative "telnyx/models/whatsapp/whatsapp_template_carousel_component"
|
|
|
2844
2858
|
require_relative "telnyx/models/whatsapp/whatsapp_template_footer_component"
|
|
2845
2859
|
require_relative "telnyx/models/whatsapp/whatsapp_template_header_component"
|
|
2846
2860
|
require_relative "telnyx/models/whatsapp/whatsapp_user_data"
|
|
2861
|
+
require_relative "telnyx/models/whatsapp_account_update"
|
|
2847
2862
|
require_relative "telnyx/models/whatsapp_contact"
|
|
2848
2863
|
require_relative "telnyx/models/whatsapp_interactive"
|
|
2849
2864
|
require_relative "telnyx/models/whatsapp_location"
|
|
2850
2865
|
require_relative "telnyx/models/whatsapp_media"
|
|
2851
2866
|
require_relative "telnyx/models/whatsapp_message_content"
|
|
2867
|
+
require_relative "telnyx/models/whatsapp_message_echo"
|
|
2852
2868
|
require_relative "telnyx/models/whatsapp_message_template_delete_params"
|
|
2853
2869
|
require_relative "telnyx/models/whatsapp_message_template_retrieve_params"
|
|
2854
2870
|
require_relative "telnyx/models/whatsapp_message_template_retrieve_response"
|
|
@@ -2899,6 +2915,10 @@ require_relative "telnyx/models/wireless_error"
|
|
|
2899
2915
|
require_relative "telnyx/models/wireless_retrieve_regions_params"
|
|
2900
2916
|
require_relative "telnyx/models/wireless_retrieve_regions_response"
|
|
2901
2917
|
require_relative "telnyx/models/wireless_wireless_blocklist"
|
|
2918
|
+
require_relative "telnyx/models/x402/credit_account/payment_list_params"
|
|
2919
|
+
require_relative "telnyx/models/x402/credit_account/payment_retrieve_params"
|
|
2920
|
+
require_relative "telnyx/models/x402/credit_account/payment_retrieve_response"
|
|
2921
|
+
require_relative "telnyx/models/x402/credit_account/x402_transaction_record"
|
|
2902
2922
|
require_relative "telnyx/models/x402/credit_account_create_quote_params"
|
|
2903
2923
|
require_relative "telnyx/models/x402/credit_account_create_quote_response"
|
|
2904
2924
|
require_relative "telnyx/models/x402/credit_account_settle_params"
|
|
@@ -2980,6 +3000,8 @@ require_relative "telnyx/resources/channel_zones"
|
|
|
2980
3000
|
require_relative "telnyx/resources/charges_breakdown"
|
|
2981
3001
|
require_relative "telnyx/resources/charges_summary"
|
|
2982
3002
|
require_relative "telnyx/resources/comments"
|
|
3003
|
+
require_relative "telnyx/resources/compute"
|
|
3004
|
+
require_relative "telnyx/resources/compute/funcs"
|
|
2983
3005
|
require_relative "telnyx/resources/conferences"
|
|
2984
3006
|
require_relative "telnyx/resources/conferences/actions"
|
|
2985
3007
|
require_relative "telnyx/resources/connections"
|
|
@@ -3293,5 +3315,6 @@ require_relative "telnyx/resources/wireless_blocklists"
|
|
|
3293
3315
|
require_relative "telnyx/resources/wireless_blocklist_values"
|
|
3294
3316
|
require_relative "telnyx/resources/x402"
|
|
3295
3317
|
require_relative "telnyx/resources/x402/credit_account"
|
|
3318
|
+
require_relative "telnyx/resources/x402/credit_account/payments"
|
|
3296
3319
|
|
|
3297
3320
|
require_relative "telnyx/lib"
|
data/rbi/telnyx/client.rbi
CHANGED
|
@@ -730,6 +730,9 @@ module Telnyx
|
|
|
730
730
|
sig { returns(Telnyx::Resources::ExternalRequirements) }
|
|
731
731
|
attr_reader :external_requirements
|
|
732
732
|
|
|
733
|
+
sig { returns(Telnyx::Resources::Compute) }
|
|
734
|
+
attr_reader :compute
|
|
735
|
+
|
|
733
736
|
# @api private
|
|
734
737
|
sig { override.returns(T::Hash[String, String]) }
|
|
735
738
|
private def auth_headers
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
class AssistantA2AAgent < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Telnyx::AI::AssistantA2AAgent, Telnyx::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Identifies the agent and seeds the names of the tools derived from its card
|
|
13
|
+
# (`a2a_<name>_<skill_id>`). Characters outside `[A-Za-z0-9_]` are replaced with
|
|
14
|
+
# `_` before the tool name is built, so two agents whose names differ only in
|
|
15
|
+
# punctuation collide and are rejected.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :name
|
|
18
|
+
|
|
19
|
+
# The agent's base URL, or the URL of its agent card. At most 2,048 bytes once
|
|
20
|
+
# UTF-8 encoded. `/.well-known/agent-card.json` is appended to the path unless it
|
|
21
|
+
# already ends in `.json`. Must be an `http://` or `https://` URL for an
|
|
22
|
+
# externally reachable host: internal destinations (`localhost`, private and
|
|
23
|
+
# reserved IP ranges, `.local` domains) are rejected, and the hostname may not
|
|
24
|
+
# contain a `{{...}}` placeholder. Placeholders in the path are allowed.
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :url
|
|
27
|
+
|
|
28
|
+
# When `true`, the assistant hands the turn straight back to the model and the
|
|
29
|
+
# agent's answer is delivered into the conversation once it arrives, instead of
|
|
30
|
+
# the caller waiting for it in silence.
|
|
31
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
32
|
+
attr_reader :async
|
|
33
|
+
|
|
34
|
+
sig { params(async: T::Boolean).void }
|
|
35
|
+
attr_writer :async
|
|
36
|
+
|
|
37
|
+
# Headers sent when fetching this agent's card and on every call made to it. Use
|
|
38
|
+
# them to authenticate to the agent.
|
|
39
|
+
sig do
|
|
40
|
+
returns(T.nilable(T::Array[Telnyx::AI::AssistantA2AAgent::Header]))
|
|
41
|
+
end
|
|
42
|
+
attr_reader :headers
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
headers: T::Array[Telnyx::AI::AssistantA2AAgent::Header::OrHash]
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :headers
|
|
50
|
+
|
|
51
|
+
# Filler messages spoken while a call to this agent is in progress.
|
|
52
|
+
# `request_start` messages are spoken immediately when the call begins.
|
|
53
|
+
# `request_response_delayed` messages are spoken after `timing_ms` has elapsed
|
|
54
|
+
# only if the agent has not answered yet. Filler messages are not used when
|
|
55
|
+
# `async` is `true`.
|
|
56
|
+
sig do
|
|
57
|
+
returns(
|
|
58
|
+
T.nilable(
|
|
59
|
+
T::Array[
|
|
60
|
+
T.any(
|
|
61
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage,
|
|
62
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
attr_reader :messages
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
messages:
|
|
73
|
+
T::Array[
|
|
74
|
+
T.any(
|
|
75
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage::OrHash,
|
|
76
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage::OrHash
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
).void
|
|
80
|
+
end
|
|
81
|
+
attr_writer :messages
|
|
82
|
+
|
|
83
|
+
# How often, in milliseconds, to poll an agent task that has not finished yet.
|
|
84
|
+
# Defaults to 500.
|
|
85
|
+
sig { returns(T.nilable(Integer)) }
|
|
86
|
+
attr_reader :poll_interval_ms
|
|
87
|
+
|
|
88
|
+
sig { params(poll_interval_ms: Integer).void }
|
|
89
|
+
attr_writer :poll_interval_ms
|
|
90
|
+
|
|
91
|
+
# Total budget, in milliseconds, for one call to this agent, including any time
|
|
92
|
+
# spent polling a task that is still running. Omit to inherit the assistant's tool
|
|
93
|
+
# timeout.
|
|
94
|
+
sig { returns(T.nilable(Integer)) }
|
|
95
|
+
attr_reader :timeout_ms
|
|
96
|
+
|
|
97
|
+
sig { params(timeout_ms: Integer).void }
|
|
98
|
+
attr_writer :timeout_ms
|
|
99
|
+
|
|
100
|
+
# A remote agent, reachable over the A2A (Agent2Agent) protocol, that an assistant
|
|
101
|
+
# can delegate to. Tools are not configured here: at the start of every
|
|
102
|
+
# conversation the agent's card is fetched and one tool is derived per skill the
|
|
103
|
+
# card advertises.
|
|
104
|
+
sig do
|
|
105
|
+
params(
|
|
106
|
+
name: String,
|
|
107
|
+
url: String,
|
|
108
|
+
async: T::Boolean,
|
|
109
|
+
headers: T::Array[Telnyx::AI::AssistantA2AAgent::Header::OrHash],
|
|
110
|
+
messages:
|
|
111
|
+
T::Array[
|
|
112
|
+
T.any(
|
|
113
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage::OrHash,
|
|
114
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage::OrHash
|
|
115
|
+
)
|
|
116
|
+
],
|
|
117
|
+
poll_interval_ms: Integer,
|
|
118
|
+
timeout_ms: Integer
|
|
119
|
+
).returns(T.attached_class)
|
|
120
|
+
end
|
|
121
|
+
def self.new(
|
|
122
|
+
# Identifies the agent and seeds the names of the tools derived from its card
|
|
123
|
+
# (`a2a_<name>_<skill_id>`). Characters outside `[A-Za-z0-9_]` are replaced with
|
|
124
|
+
# `_` before the tool name is built, so two agents whose names differ only in
|
|
125
|
+
# punctuation collide and are rejected.
|
|
126
|
+
name:,
|
|
127
|
+
# The agent's base URL, or the URL of its agent card. At most 2,048 bytes once
|
|
128
|
+
# UTF-8 encoded. `/.well-known/agent-card.json` is appended to the path unless it
|
|
129
|
+
# already ends in `.json`. Must be an `http://` or `https://` URL for an
|
|
130
|
+
# externally reachable host: internal destinations (`localhost`, private and
|
|
131
|
+
# reserved IP ranges, `.local` domains) are rejected, and the hostname may not
|
|
132
|
+
# contain a `{{...}}` placeholder. Placeholders in the path are allowed.
|
|
133
|
+
url:,
|
|
134
|
+
# When `true`, the assistant hands the turn straight back to the model and the
|
|
135
|
+
# agent's answer is delivered into the conversation once it arrives, instead of
|
|
136
|
+
# the caller waiting for it in silence.
|
|
137
|
+
async: nil,
|
|
138
|
+
# Headers sent when fetching this agent's card and on every call made to it. Use
|
|
139
|
+
# them to authenticate to the agent.
|
|
140
|
+
headers: nil,
|
|
141
|
+
# Filler messages spoken while a call to this agent is in progress.
|
|
142
|
+
# `request_start` messages are spoken immediately when the call begins.
|
|
143
|
+
# `request_response_delayed` messages are spoken after `timing_ms` has elapsed
|
|
144
|
+
# only if the agent has not answered yet. Filler messages are not used when
|
|
145
|
+
# `async` is `true`.
|
|
146
|
+
messages: nil,
|
|
147
|
+
# How often, in milliseconds, to poll an agent task that has not finished yet.
|
|
148
|
+
# Defaults to 500.
|
|
149
|
+
poll_interval_ms: nil,
|
|
150
|
+
# Total budget, in milliseconds, for one call to this agent, including any time
|
|
151
|
+
# spent polling a task that is still running. Omit to inherit the assistant's tool
|
|
152
|
+
# timeout.
|
|
153
|
+
timeout_ms: nil
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
sig do
|
|
158
|
+
override.returns(
|
|
159
|
+
{
|
|
160
|
+
name: String,
|
|
161
|
+
url: String,
|
|
162
|
+
async: T::Boolean,
|
|
163
|
+
headers: T::Array[Telnyx::AI::AssistantA2AAgent::Header],
|
|
164
|
+
messages:
|
|
165
|
+
T::Array[
|
|
166
|
+
T.any(
|
|
167
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage,
|
|
168
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage
|
|
169
|
+
)
|
|
170
|
+
],
|
|
171
|
+
poll_interval_ms: Integer,
|
|
172
|
+
timeout_ms: Integer
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
def to_hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
class Header < Telnyx::Internal::Type::BaseModel
|
|
180
|
+
OrHash =
|
|
181
|
+
T.type_alias do
|
|
182
|
+
T.any(
|
|
183
|
+
Telnyx::AI::AssistantA2AAgent::Header,
|
|
184
|
+
Telnyx::Internal::AnyHash
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# HTTP header name. May only contain alphanumeric characters, hyphens, and
|
|
189
|
+
# underscores, or a `{{dynamic_variable}}` placeholder surrounded by those
|
|
190
|
+
# characters.
|
|
191
|
+
sig { returns(String) }
|
|
192
|
+
attr_accessor :name
|
|
193
|
+
|
|
194
|
+
# Header value, stored exactly as written. It may be a literal, a
|
|
195
|
+
# `{{dynamic_variable}}`, or an
|
|
196
|
+
# `{{#integration_secret}}identifier{{/integration_secret}}` section that resolves
|
|
197
|
+
# to a stored integration secret when the conversation starts. Control characters
|
|
198
|
+
# are not allowed. The encrypted `{{variable | encryption_secret_ref}}` form used
|
|
199
|
+
# for per-caller credentials is not resolved here and is rejected when the
|
|
200
|
+
# assistant is saved.
|
|
201
|
+
sig { returns(String) }
|
|
202
|
+
attr_accessor :value
|
|
203
|
+
|
|
204
|
+
# A header sent when fetching an A2A agent's card and on every call made to that
|
|
205
|
+
# agent.
|
|
206
|
+
sig { params(name: String, value: String).returns(T.attached_class) }
|
|
207
|
+
def self.new(
|
|
208
|
+
# HTTP header name. May only contain alphanumeric characters, hyphens, and
|
|
209
|
+
# underscores, or a `{{dynamic_variable}}` placeholder surrounded by those
|
|
210
|
+
# characters.
|
|
211
|
+
name:,
|
|
212
|
+
# Header value, stored exactly as written. It may be a literal, a
|
|
213
|
+
# `{{dynamic_variable}}`, or an
|
|
214
|
+
# `{{#integration_secret}}identifier{{/integration_secret}}` section that resolves
|
|
215
|
+
# to a stored integration secret when the conversation starts. Control characters
|
|
216
|
+
# are not allowed. The encrypted `{{variable | encryption_secret_ref}}` form used
|
|
217
|
+
# for per-caller credentials is not resolved here and is rejected when the
|
|
218
|
+
# assistant is saved.
|
|
219
|
+
value:
|
|
220
|
+
)
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
sig { override.returns({ name: String, value: String }) }
|
|
224
|
+
def to_hash
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
module Message
|
|
229
|
+
extend Telnyx::Internal::Type::Union
|
|
230
|
+
|
|
231
|
+
Variants =
|
|
232
|
+
T.type_alias do
|
|
233
|
+
T.any(
|
|
234
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage,
|
|
235
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage
|
|
236
|
+
)
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
class A2AAgentRequestStartMessage < Telnyx::Internal::Type::BaseModel
|
|
240
|
+
OrHash =
|
|
241
|
+
T.type_alias do
|
|
242
|
+
T.any(
|
|
243
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestStartMessage,
|
|
244
|
+
Telnyx::Internal::AnyHash
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# The text the assistant speaks.
|
|
249
|
+
sig { returns(String) }
|
|
250
|
+
attr_accessor :content
|
|
251
|
+
|
|
252
|
+
# Speak the filler message immediately when the call to the agent begins.
|
|
253
|
+
sig { returns(Symbol) }
|
|
254
|
+
attr_accessor :type
|
|
255
|
+
|
|
256
|
+
# An optional delay value. This value is ignored for `request_start` messages.
|
|
257
|
+
sig { returns(T.nilable(Integer)) }
|
|
258
|
+
attr_reader :timing_ms
|
|
259
|
+
|
|
260
|
+
sig { params(timing_ms: Integer).void }
|
|
261
|
+
attr_writer :timing_ms
|
|
262
|
+
|
|
263
|
+
sig do
|
|
264
|
+
params(content: String, timing_ms: Integer, type: Symbol).returns(
|
|
265
|
+
T.attached_class
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
def self.new(
|
|
269
|
+
# The text the assistant speaks.
|
|
270
|
+
content:,
|
|
271
|
+
# An optional delay value. This value is ignored for `request_start` messages.
|
|
272
|
+
timing_ms: nil,
|
|
273
|
+
# Speak the filler message immediately when the call to the agent begins.
|
|
274
|
+
type: :request_start
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
sig do
|
|
279
|
+
override.returns(
|
|
280
|
+
{ content: String, type: Symbol, timing_ms: Integer }
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
def to_hash
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
class A2AAgentRequestResponseDelayedMessage < Telnyx::Internal::Type::BaseModel
|
|
288
|
+
OrHash =
|
|
289
|
+
T.type_alias do
|
|
290
|
+
T.any(
|
|
291
|
+
Telnyx::AI::AssistantA2AAgent::Message::A2AAgentRequestResponseDelayedMessage,
|
|
292
|
+
Telnyx::Internal::AnyHash
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# The text the assistant speaks.
|
|
297
|
+
sig { returns(String) }
|
|
298
|
+
attr_accessor :content
|
|
299
|
+
|
|
300
|
+
# How long to wait, in milliseconds, before speaking this message.
|
|
301
|
+
sig { returns(Integer) }
|
|
302
|
+
attr_accessor :timing_ms
|
|
303
|
+
|
|
304
|
+
# Speak the filler message only if the agent has not answered yet after
|
|
305
|
+
# `timing_ms`.
|
|
306
|
+
sig { returns(Symbol) }
|
|
307
|
+
attr_accessor :type
|
|
308
|
+
|
|
309
|
+
sig do
|
|
310
|
+
params(content: String, timing_ms: Integer, type: Symbol).returns(
|
|
311
|
+
T.attached_class
|
|
312
|
+
)
|
|
313
|
+
end
|
|
314
|
+
def self.new(
|
|
315
|
+
# The text the assistant speaks.
|
|
316
|
+
content:,
|
|
317
|
+
# How long to wait, in milliseconds, before speaking this message.
|
|
318
|
+
timing_ms:,
|
|
319
|
+
# Speak the filler message only if the agent has not answered yet after
|
|
320
|
+
# `timing_ms`.
|
|
321
|
+
type: :request_response_delayed
|
|
322
|
+
)
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
sig do
|
|
326
|
+
override.returns(
|
|
327
|
+
{ content: String, timing_ms: Integer, type: Symbol }
|
|
328
|
+
)
|
|
329
|
+
end
|
|
330
|
+
def to_hash
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
sig do
|
|
335
|
+
override.returns(
|
|
336
|
+
T::Array[Telnyx::AI::AssistantA2AAgent::Message::Variants]
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
def self.variants
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
end
|
|
@@ -20,6 +20,24 @@ module Telnyx
|
|
|
20
20
|
sig { returns(String) }
|
|
21
21
|
attr_accessor :name
|
|
22
22
|
|
|
23
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
24
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
25
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
26
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
27
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
28
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
29
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
30
|
+
# capability for the conversation; it does not fail the call.
|
|
31
|
+
sig { returns(T.nilable(T::Array[Telnyx::AI::AssistantA2AAgent])) }
|
|
32
|
+
attr_reader :a2a_agents
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash]
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
attr_writer :a2a_agents
|
|
40
|
+
|
|
23
41
|
# Conversation flow as supplied by API clients (create / update).
|
|
24
42
|
#
|
|
25
43
|
# A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
|
|
@@ -336,6 +354,7 @@ module Telnyx
|
|
|
336
354
|
params(
|
|
337
355
|
instructions: String,
|
|
338
356
|
name: String,
|
|
357
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash],
|
|
339
358
|
conversation_flow: Telnyx::AI::ConversationFlowReq::OrHash,
|
|
340
359
|
description: String,
|
|
341
360
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
@@ -390,6 +409,15 @@ module Telnyx
|
|
|
390
409
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
391
410
|
instructions:,
|
|
392
411
|
name:,
|
|
412
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
413
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
414
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
415
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
416
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
417
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
418
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
419
|
+
# capability for the conversation; it does not fail the call.
|
|
420
|
+
a2a_agents: nil,
|
|
393
421
|
# Conversation flow as supplied by API clients (create / update).
|
|
394
422
|
#
|
|
395
423
|
# A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
|
|
@@ -487,6 +515,7 @@ module Telnyx
|
|
|
487
515
|
{
|
|
488
516
|
instructions: String,
|
|
489
517
|
name: String,
|
|
518
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent],
|
|
490
519
|
conversation_flow: Telnyx::AI::ConversationFlowReq,
|
|
491
520
|
description: String,
|
|
492
521
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
@@ -15,6 +15,25 @@ module Telnyx
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :assistant_id
|
|
17
17
|
|
|
18
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
19
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
20
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
21
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
22
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
23
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
24
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
25
|
+
# capability for the conversation; it does not fail the call. Omit this field to
|
|
26
|
+
# leave the assistant's agents unchanged; send an empty array to remove them all.
|
|
27
|
+
sig { returns(T.nilable(T::Array[Telnyx::AI::AssistantA2AAgent])) }
|
|
28
|
+
attr_reader :a2a_agents
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash]
|
|
33
|
+
).void
|
|
34
|
+
end
|
|
35
|
+
attr_writer :a2a_agents
|
|
36
|
+
|
|
18
37
|
# Conversation flow as supplied by API clients (create / update).
|
|
19
38
|
#
|
|
20
39
|
# A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
|
|
@@ -353,6 +372,7 @@ module Telnyx
|
|
|
353
372
|
sig do
|
|
354
373
|
params(
|
|
355
374
|
assistant_id: String,
|
|
375
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash],
|
|
356
376
|
conversation_flow: Telnyx::AI::ConversationFlowReq::OrHash,
|
|
357
377
|
description: String,
|
|
358
378
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
@@ -407,6 +427,16 @@ module Telnyx
|
|
|
407
427
|
end
|
|
408
428
|
def self.new(
|
|
409
429
|
assistant_id:,
|
|
430
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
431
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
432
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
433
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
434
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
435
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
436
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
437
|
+
# capability for the conversation; it does not fail the call. Omit this field to
|
|
438
|
+
# leave the assistant's agents unchanged; send an empty array to remove them all.
|
|
439
|
+
a2a_agents: nil,
|
|
410
440
|
# Conversation flow as supplied by API clients (create / update).
|
|
411
441
|
#
|
|
412
442
|
# A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
|
|
@@ -511,6 +541,7 @@ module Telnyx
|
|
|
511
541
|
override.returns(
|
|
512
542
|
{
|
|
513
543
|
assistant_id: String,
|
|
544
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent],
|
|
514
545
|
conversation_flow: Telnyx::AI::ConversationFlowReq,
|
|
515
546
|
description: String,
|
|
516
547
|
dynamic_variables: T::Hash[Symbol, T.anything],
|