telnyx 5.155.0 → 5.157.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 +16 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +1 -0
- data/lib/telnyx/internal/type/union.rb +4 -4
- data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +209 -0
- data/lib/telnyx/models/ai/anthropic/v1_messages_response.rb +12 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
- data/lib/telnyx/models/ai/assistant_tool.rb +118 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rb +103 -0
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rb +54 -0
- data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
- data/lib/telnyx/models/ai/pay_tool_params.rb +46 -0
- data/lib/telnyx/models/ai/tool_create_params.rb +13 -1
- data/lib/telnyx/models/ai/tool_update_params.rb +13 -1
- data/lib/telnyx/models/ai/transcription_settings.rb +3 -3
- data/lib/telnyx/models/call_dial_params.rb +13 -1
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +3 -0
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +3 -0
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +3 -0
- data/lib/telnyx/models/calls/telnyx_voice_settings.rb +2 -1
- data/lib/telnyx/models/calls/transcription_config.rb +8 -4
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -1
- data/lib/telnyx/models/conferences/action_speak_params.rb +6 -0
- data/lib/telnyx/models/conversation_relay_embedded_config.rb +3 -0
- data/lib/telnyx/models/doc_reqs_requirement.rb +29 -4
- data/lib/telnyx/models/inbound_message.rb +278 -28
- data/lib/telnyx/models/inbound_message_webhook_event.rb +70 -3
- data/lib/telnyx/models/managed_account_list_params.rb +45 -3
- data/lib/telnyx/models/models_response.rb +0 -1
- data/lib/telnyx/models/phone_number_delete_response.rb +12 -1
- data/lib/telnyx/models/phone_number_detailed.rb +12 -1
- data/lib/telnyx/models/phone_number_slim_list_response.rb +12 -1
- data/lib/telnyx/models/requirement_list_params.rb +10 -1
- data/lib/telnyx/models/requirement_retrieve_params.rb +14 -1
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -1
- data/lib/telnyx/models/storage/cloudf_create_params.rb +56 -0
- data/lib/telnyx/models/storage/cloudf_delete_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_list_params.rb +109 -0
- data/lib/telnyx/models/storage/cloudf_list_response.rb +165 -0
- data/lib/telnyx/models/storage/cloudf_retrieve_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_update_params.rb +36 -0
- data/lib/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rb +30 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_status.rb +28 -0
- data/lib/telnyx/models/text_to_speech_generate_speech_params.rb +13 -8
- data/lib/telnyx/models/text_to_speech_retrieve_speech_params.rb +4 -4
- data/lib/telnyx/models/verify_profile.rb +2 -2
- data/lib/telnyx/models/verify_profile_create_params.rb +2 -2
- data/lib/telnyx/models/verify_profile_update_params.rb +2 -2
- data/lib/telnyx/models.rb +0 -6
- data/lib/telnyx/resources/ai/anthropic/v1.rb +91 -0
- data/lib/telnyx/resources/ai/anthropic.rb +20 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
- data/lib/telnyx/resources/ai/assistants.rb +2 -2
- data/lib/telnyx/resources/ai/chat.rb +0 -81
- data/lib/telnyx/resources/ai/conversations/conversation_insights.rb +55 -0
- data/lib/telnyx/resources/ai/conversations.rb +5 -0
- data/lib/telnyx/resources/ai/tools.rb +8 -2
- data/lib/telnyx/resources/ai.rb +3 -56
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/messages.rb +1 -32
- data/lib/telnyx/resources/requirements.rb +13 -3
- data/lib/telnyx/resources/storage/cloudfs/actions.rb +54 -0
- data/lib/telnyx/resources/storage/cloudfs.rb +187 -0
- data/lib/telnyx/resources/storage.rb +6 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +20 -7
- data/rbi/telnyx/client.rbi +1 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +314 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_response.rbi +15 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistant_tool.rbi +258 -1
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -4
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbi +188 -0
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbi +94 -0
- data/rbi/telnyx/models/ai/inference_embedding.rbi +18 -6
- data/rbi/telnyx/models/ai/pay_tool_params.rbi +71 -0
- data/rbi/telnyx/models/ai/tool_create_params.rbi +18 -0
- data/rbi/telnyx/models/ai/tool_update_params.rbi +18 -0
- data/rbi/telnyx/models/ai/transcription_settings.rbi +5 -5
- data/rbi/telnyx/models/call_dial_params.rbi +19 -0
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +6 -0
- data/rbi/telnyx/models/calls/telnyx_voice_settings.rbi +4 -2
- data/rbi/telnyx/models/calls/transcription_config.rbi +15 -7
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +2 -2
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/conversation_relay_embedded_config.rbi +6 -0
- data/rbi/telnyx/models/doc_reqs_requirement.rbi +38 -9
- data/rbi/telnyx/models/inbound_message.rbi +324 -58
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +173 -4
- data/rbi/telnyx/models/managed_account_list_params.rbi +130 -6
- data/rbi/telnyx/models/phone_number_delete_response.rbi +14 -0
- data/rbi/telnyx/models/phone_number_detailed.rbi +14 -0
- data/rbi/telnyx/models/phone_number_slim_list_response.rbi +14 -0
- data/rbi/telnyx/models/requirement_list_params.rbi +13 -0
- data/rbi/telnyx/models/requirement_retrieve_params.rbi +21 -2
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +2 -2
- data/rbi/telnyx/models/storage/cloudf_create_params.rbi +103 -0
- data/rbi/telnyx/models/storage/cloudf_delete_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_list_params.rbi +232 -0
- data/rbi/telnyx/models/storage/cloudf_list_response.rbi +327 -0
- data/rbi/telnyx/models/storage/cloudf_retrieve_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_update_params.rbi +61 -0
- data/rbi/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbi +50 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbi +229 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbi +227 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_status.rbi +57 -0
- data/rbi/telnyx/models/text_to_speech_generate_speech_params.rbi +21 -13
- data/rbi/telnyx/models/text_to_speech_retrieve_speech_params.rbi +8 -8
- data/rbi/telnyx/models/verify_profile.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_create_params.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_update_params.rbi +2 -2
- data/rbi/telnyx/models.rbi +0 -7
- data/rbi/telnyx/resources/ai/anthropic/v1.rbi +106 -0
- data/rbi/telnyx/resources/ai/anthropic.rbi +17 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -1
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -2
- data/rbi/telnyx/resources/ai/chat.rbi +0 -129
- data/rbi/telnyx/resources/ai/conversations/conversation_insights.rbi +68 -0
- data/rbi/telnyx/resources/ai/conversations.rbi +6 -0
- data/rbi/telnyx/resources/ai/tools.rbi +8 -0
- data/rbi/telnyx/resources/ai.rbi +2 -32
- data/rbi/telnyx/resources/calls/actions.rbi +21 -0
- data/rbi/telnyx/resources/calls.rbi +7 -0
- data/rbi/telnyx/resources/conferences/actions.rbi +6 -0
- data/rbi/telnyx/resources/managed_accounts.rbi +1 -1
- data/rbi/telnyx/resources/messages.rbi +1 -28
- data/rbi/telnyx/resources/requirements.rbi +8 -0
- data/rbi/telnyx/resources/storage/cloudfs/actions.rbi +46 -0
- data/rbi/telnyx/resources/storage/cloudfs.rbi +152 -0
- data/rbi/telnyx/resources/storage.rbi +5 -0
- data/rbi/telnyx/resources/text_to_speech.rbi +11 -9
- data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +175 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_response.rbs +11 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +108 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbs +74 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbs +34 -0
- data/sig/telnyx/models/ai/pay_tool_params.rbs +41 -0
- data/sig/telnyx/models/ai/tool_create_params.rbs +14 -0
- data/sig/telnyx/models/ai/tool_update_params.rbs +14 -0
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -2
- data/sig/telnyx/models/call_dial_params.rbs +7 -0
- data/sig/telnyx/models/calls/transcription_config.rbs +2 -2
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +2 -2
- data/sig/telnyx/models/doc_reqs_requirement.rbs +25 -8
- data/sig/telnyx/models/inbound_message.rbs +204 -35
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +81 -5
- data/sig/telnyx/models/managed_account_list_params.rbs +47 -3
- data/sig/telnyx/models/phone_number_delete_response.rbs +5 -0
- data/sig/telnyx/models/phone_number_detailed.rbs +5 -0
- data/sig/telnyx/models/phone_number_slim_list_response.rbs +5 -0
- data/sig/telnyx/models/requirement_list_params.rbs +8 -1
- data/sig/telnyx/models/requirement_retrieve_params.rbs +12 -2
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -2
- data/sig/telnyx/models/storage/cloudf_create_params.rbs +50 -0
- data/sig/telnyx/models/storage/cloudf_delete_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_list_params.rbs +112 -0
- data/sig/telnyx/models/storage/cloudf_list_response.rbs +163 -0
- data/sig/telnyx/models/storage/cloudf_retrieve_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_update_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_status.rbs +21 -0
- data/sig/telnyx/models.rbs +0 -6
- data/sig/telnyx/resources/ai/anthropic/v1.rbs +35 -0
- data/sig/telnyx/resources/ai/anthropic.rbs +11 -0
- data/sig/telnyx/resources/ai/chat.rbs +0 -30
- data/sig/telnyx/resources/ai/conversations/conversation_insights.rbs +20 -0
- data/sig/telnyx/resources/ai/conversations.rbs +2 -0
- data/sig/telnyx/resources/ai/tools.rbs +4 -0
- data/sig/telnyx/resources/ai.rbs +1 -8
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/messages.rbs +0 -10
- data/sig/telnyx/resources/requirements.rbs +2 -0
- data/sig/telnyx/resources/storage/cloudfs/actions.rbs +17 -0
- data/sig/telnyx/resources/storage/cloudfs.rbs +45 -0
- data/sig/telnyx/resources/storage.rbs +2 -0
- metadata +62 -23
- data/lib/telnyx/models/ai/chat_create_completion_params.rb +0 -16
- data/lib/telnyx/models/ai/chat_create_completion_response.rb +0 -10
- data/lib/telnyx/models/ai_create_response_deprecated_params.rb +0 -20
- data/lib/telnyx/models/ai_create_response_deprecated_response.rb +0 -8
- data/lib/telnyx/models/ai_retrieve_models_params.rb +0 -14
- data/lib/telnyx/models/message_send_whatsapp_params.rb +0 -71
- data/lib/telnyx/models/message_send_whatsapp_response.rb +0 -178
- data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +0 -32
- data/rbi/telnyx/models/ai/chat_create_completion_response.rbi +0 -13
- data/rbi/telnyx/models/ai_create_response_deprecated_params.rbi +0 -41
- data/rbi/telnyx/models/ai_create_response_deprecated_response.rbi +0 -11
- data/rbi/telnyx/models/ai_retrieve_models_params.rbi +0 -27
- data/rbi/telnyx/models/message_send_whatsapp_params.rbi +0 -124
- data/rbi/telnyx/models/message_send_whatsapp_response.rbi +0 -379
- data/sig/telnyx/models/ai/chat_create_completion_params.rbs +0 -17
- data/sig/telnyx/models/ai/chat_create_completion_response.rbs +0 -9
- data/sig/telnyx/models/ai_create_response_deprecated_params.rbs +0 -24
- data/sig/telnyx/models/ai_create_response_deprecated_response.rbs +0 -7
- data/sig/telnyx/models/ai_retrieve_models_params.rbs +0 -15
- data/sig/telnyx/models/message_send_whatsapp_params.rbs +0 -69
- data/sig/telnyx/models/message_send_whatsapp_response.rbs +0 -191
|
@@ -279,6 +279,7 @@ module Telnyx
|
|
|
279
279
|
T::Array[
|
|
280
280
|
T.any(
|
|
281
281
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams,
|
|
282
|
+
Telnyx::AI::AssistantTool::ClientSideTool,
|
|
282
283
|
Telnyx::AI::RetrievalTool,
|
|
283
284
|
Telnyx::AI::AssistantTool::Handoff,
|
|
284
285
|
Telnyx::AI::HangupTool,
|
|
@@ -287,7 +288,8 @@ module Telnyx
|
|
|
287
288
|
Telnyx::AI::AssistantTool::Refer,
|
|
288
289
|
Telnyx::AI::AssistantTool::SendDtmf,
|
|
289
290
|
Telnyx::AI::AssistantTool::SendMessage,
|
|
290
|
-
Telnyx::AI::AssistantTool::SkipTurn
|
|
291
|
+
Telnyx::AI::AssistantTool::SkipTurn,
|
|
292
|
+
Telnyx::AI::AssistantTool::Pay
|
|
291
293
|
)
|
|
292
294
|
]
|
|
293
295
|
)
|
|
@@ -301,6 +303,7 @@ module Telnyx
|
|
|
301
303
|
T::Array[
|
|
302
304
|
T.any(
|
|
303
305
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
306
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
304
307
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
305
308
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
306
309
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -309,7 +312,8 @@ module Telnyx
|
|
|
309
312
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
310
313
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
311
314
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
312
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
315
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
316
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
313
317
|
)
|
|
314
318
|
]
|
|
315
319
|
).void
|
|
@@ -378,6 +382,7 @@ module Telnyx
|
|
|
378
382
|
T::Array[
|
|
379
383
|
T.any(
|
|
380
384
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
385
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
381
386
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
382
387
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
383
388
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -386,7 +391,8 @@ module Telnyx
|
|
|
386
391
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
387
392
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
388
393
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
389
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
394
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
395
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
390
396
|
)
|
|
391
397
|
],
|
|
392
398
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -533,6 +539,7 @@ module Telnyx
|
|
|
533
539
|
T::Array[
|
|
534
540
|
T.any(
|
|
535
541
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams,
|
|
542
|
+
Telnyx::AI::AssistantTool::ClientSideTool,
|
|
536
543
|
Telnyx::AI::RetrievalTool,
|
|
537
544
|
Telnyx::AI::AssistantTool::Handoff,
|
|
538
545
|
Telnyx::AI::HangupTool,
|
|
@@ -541,7 +548,8 @@ module Telnyx
|
|
|
541
548
|
Telnyx::AI::AssistantTool::Refer,
|
|
542
549
|
Telnyx::AI::AssistantTool::SendDtmf,
|
|
543
550
|
Telnyx::AI::AssistantTool::SendMessage,
|
|
544
|
-
Telnyx::AI::AssistantTool::SkipTurn
|
|
551
|
+
Telnyx::AI::AssistantTool::SkipTurn,
|
|
552
|
+
Telnyx::AI::AssistantTool::Pay
|
|
545
553
|
)
|
|
546
554
|
],
|
|
547
555
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
@@ -277,6 +277,7 @@ module Telnyx
|
|
|
277
277
|
T::Array[
|
|
278
278
|
T.any(
|
|
279
279
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams,
|
|
280
|
+
Telnyx::AI::AssistantTool::ClientSideTool,
|
|
280
281
|
Telnyx::AI::RetrievalTool,
|
|
281
282
|
Telnyx::AI::AssistantTool::Handoff,
|
|
282
283
|
Telnyx::AI::HangupTool,
|
|
@@ -285,7 +286,8 @@ module Telnyx
|
|
|
285
286
|
Telnyx::AI::AssistantTool::Refer,
|
|
286
287
|
Telnyx::AI::AssistantTool::SendDtmf,
|
|
287
288
|
Telnyx::AI::AssistantTool::SendMessage,
|
|
288
|
-
Telnyx::AI::AssistantTool::SkipTurn
|
|
289
|
+
Telnyx::AI::AssistantTool::SkipTurn,
|
|
290
|
+
Telnyx::AI::AssistantTool::Pay
|
|
289
291
|
)
|
|
290
292
|
]
|
|
291
293
|
)
|
|
@@ -299,6 +301,7 @@ module Telnyx
|
|
|
299
301
|
T::Array[
|
|
300
302
|
T.any(
|
|
301
303
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
304
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
302
305
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
303
306
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
304
307
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -307,7 +310,8 @@ module Telnyx
|
|
|
307
310
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
308
311
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
309
312
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
310
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
313
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
314
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
311
315
|
)
|
|
312
316
|
]
|
|
313
317
|
).void
|
|
@@ -378,6 +382,7 @@ module Telnyx
|
|
|
378
382
|
T::Array[
|
|
379
383
|
T.any(
|
|
380
384
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
385
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
381
386
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
382
387
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
383
388
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -386,7 +391,8 @@ module Telnyx
|
|
|
386
391
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
387
392
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
388
393
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
389
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
394
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
395
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
390
396
|
)
|
|
391
397
|
],
|
|
392
398
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -526,6 +532,7 @@ module Telnyx
|
|
|
526
532
|
T::Array[
|
|
527
533
|
T.any(
|
|
528
534
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams,
|
|
535
|
+
Telnyx::AI::AssistantTool::ClientSideTool,
|
|
529
536
|
Telnyx::AI::RetrievalTool,
|
|
530
537
|
Telnyx::AI::AssistantTool::Handoff,
|
|
531
538
|
Telnyx::AI::HangupTool,
|
|
@@ -534,7 +541,8 @@ module Telnyx
|
|
|
534
541
|
Telnyx::AI::AssistantTool::Refer,
|
|
535
542
|
Telnyx::AI::AssistantTool::SendDtmf,
|
|
536
543
|
Telnyx::AI::AssistantTool::SendMessage,
|
|
537
|
-
Telnyx::AI::AssistantTool::SkipTurn
|
|
544
|
+
Telnyx::AI::AssistantTool::SkipTurn,
|
|
545
|
+
Telnyx::AI::AssistantTool::Pay
|
|
538
546
|
)
|
|
539
547
|
],
|
|
540
548
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Conversations
|
|
7
|
+
class ConversationInsightRetrieveAggregatesParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams,
|
|
15
|
+
Telnyx::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
20
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
21
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
22
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
23
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
24
|
+
# `created_at=lt.<next_day_start>`.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :created_at
|
|
27
|
+
|
|
28
|
+
sig { params(created_at: String).void }
|
|
29
|
+
attr_writer :created_at
|
|
30
|
+
|
|
31
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
32
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
33
|
+
# conversation's metadata instead of the insight result.
|
|
34
|
+
#
|
|
35
|
+
# Common fields used for over-time charts:
|
|
36
|
+
#
|
|
37
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
38
|
+
# Following, User Satisfaction).
|
|
39
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
40
|
+
# conversation.
|
|
41
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
42
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
43
|
+
# chart.
|
|
44
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
45
|
+
# (phone_call, web_chat, etc.).
|
|
46
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
47
|
+
attr_reader :group_by
|
|
48
|
+
|
|
49
|
+
sig { params(group_by: T::Array[String]).void }
|
|
50
|
+
attr_writer :group_by
|
|
51
|
+
|
|
52
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
53
|
+
# ID will be included in the aggregation.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :insight_id
|
|
56
|
+
|
|
57
|
+
sig { params(insight_id: String).void }
|
|
58
|
+
attr_writer :insight_id
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
returns(
|
|
62
|
+
T.nilable(
|
|
63
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
attr_reader :metadata
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
metadata:
|
|
72
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :metadata
|
|
76
|
+
|
|
77
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
78
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
79
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
80
|
+
# conversation insights match that combination.
|
|
81
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
82
|
+
attr_reader :show
|
|
83
|
+
|
|
84
|
+
sig { params(show: T::Array[String]).void }
|
|
85
|
+
attr_writer :show
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
created_at: String,
|
|
90
|
+
group_by: T::Array[String],
|
|
91
|
+
insight_id: String,
|
|
92
|
+
metadata:
|
|
93
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash,
|
|
94
|
+
show: T::Array[String],
|
|
95
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
96
|
+
).returns(T.attached_class)
|
|
97
|
+
end
|
|
98
|
+
def self.new(
|
|
99
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
100
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
101
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
102
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
103
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
104
|
+
# `created_at=lt.<next_day_start>`.
|
|
105
|
+
created_at: nil,
|
|
106
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
107
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
108
|
+
# conversation's metadata instead of the insight result.
|
|
109
|
+
#
|
|
110
|
+
# Common fields used for over-time charts:
|
|
111
|
+
#
|
|
112
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
113
|
+
# Following, User Satisfaction).
|
|
114
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
115
|
+
# conversation.
|
|
116
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
117
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
118
|
+
# chart.
|
|
119
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
120
|
+
# (phone_call, web_chat, etc.).
|
|
121
|
+
group_by: nil,
|
|
122
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
123
|
+
# ID will be included in the aggregation.
|
|
124
|
+
insight_id: nil,
|
|
125
|
+
metadata: nil,
|
|
126
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
127
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
128
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
129
|
+
# conversation insights match that combination.
|
|
130
|
+
show: nil,
|
|
131
|
+
request_options: {}
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
override.returns(
|
|
137
|
+
{
|
|
138
|
+
created_at: String,
|
|
139
|
+
group_by: T::Array[String],
|
|
140
|
+
insight_id: String,
|
|
141
|
+
metadata:
|
|
142
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata,
|
|
143
|
+
show: T::Array[String],
|
|
144
|
+
request_options: Telnyx::RequestOptions
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
def to_hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class Metadata < Telnyx::Internal::Type::BaseModel
|
|
152
|
+
OrHash =
|
|
153
|
+
T.type_alias do
|
|
154
|
+
T.any(
|
|
155
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata,
|
|
156
|
+
Telnyx::Internal::AnyHash
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
161
|
+
# provided, only conversation insights for the specified assistant are aggregated.
|
|
162
|
+
# Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
163
|
+
# assistant.
|
|
164
|
+
sig { returns(T.nilable(String)) }
|
|
165
|
+
attr_reader :assistant_id
|
|
166
|
+
|
|
167
|
+
sig { params(assistant_id: String).void }
|
|
168
|
+
attr_writer :assistant_id
|
|
169
|
+
|
|
170
|
+
sig { params(assistant_id: String).returns(T.attached_class) }
|
|
171
|
+
def self.new(
|
|
172
|
+
# Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
173
|
+
# provided, only conversation insights for the specified assistant are aggregated.
|
|
174
|
+
# Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
175
|
+
# assistant.
|
|
176
|
+
assistant_id: nil
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
sig { override.returns({ assistant_id: String }) }
|
|
181
|
+
def to_hash
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Conversations
|
|
7
|
+
class ConversationInsightRetrieveAggregatesResponse < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
OrHash =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(
|
|
11
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse,
|
|
12
|
+
Telnyx::Internal::AnyHash
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Aggregation result rows. Each row contains the grouped field values and a
|
|
17
|
+
# `record_count`.
|
|
18
|
+
sig do
|
|
19
|
+
returns(
|
|
20
|
+
T::Array[
|
|
21
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
attr_accessor :data
|
|
26
|
+
|
|
27
|
+
# Aggregated conversation insight counts grouped by the specified fields. Each
|
|
28
|
+
# item in `data` contains the grouped field values and a `record_count` indicating
|
|
29
|
+
# how many conversation insights match that combination.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
data:
|
|
33
|
+
T::Array[
|
|
34
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data::OrHash
|
|
35
|
+
]
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Aggregation result rows. Each row contains the grouped field values and a
|
|
40
|
+
# `record_count`.
|
|
41
|
+
data:
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
data:
|
|
49
|
+
T::Array[
|
|
50
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
59
|
+
OrHash =
|
|
60
|
+
T.type_alias do
|
|
61
|
+
T.any(
|
|
62
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data,
|
|
63
|
+
Telnyx::Internal::AnyHash
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Number of conversation insights that match this combination of grouped field
|
|
68
|
+
# values.
|
|
69
|
+
sig { returns(Integer) }
|
|
70
|
+
attr_accessor :record_count
|
|
71
|
+
|
|
72
|
+
# An aggregation row. Contains the grouped field values (keyed by the group_by
|
|
73
|
+
# field names) and a `record_count` integer. For example, when grouping by
|
|
74
|
+
# `score`, each row has a `score` value and a `record_count` of conversations with
|
|
75
|
+
# that score. When also splitting by `metadata.assistant_version_id`, each row
|
|
76
|
+
# includes both `score` and `metadata.assistant_version_id` plus their combined
|
|
77
|
+
# `record_count`.
|
|
78
|
+
sig { params(record_count: Integer).returns(T.attached_class) }
|
|
79
|
+
def self.new(
|
|
80
|
+
# Number of conversation insights that match this combination of grouped field
|
|
81
|
+
# values.
|
|
82
|
+
record_count:
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
sig { override.returns({ record_count: Integer }) }
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -269,6 +269,7 @@ module Telnyx
|
|
|
269
269
|
T::Array[
|
|
270
270
|
T.any(
|
|
271
271
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
272
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
272
273
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
273
274
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
274
275
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -277,7 +278,8 @@ module Telnyx
|
|
|
277
278
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
278
279
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
279
280
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
280
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
281
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
282
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
281
283
|
)
|
|
282
284
|
]
|
|
283
285
|
).void
|
|
@@ -363,6 +365,7 @@ module Telnyx
|
|
|
363
365
|
T::Array[
|
|
364
366
|
T.any(
|
|
365
367
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
368
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
366
369
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
367
370
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
368
371
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -371,7 +374,8 @@ module Telnyx
|
|
|
371
374
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
372
375
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
373
376
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
374
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
377
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
378
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
375
379
|
)
|
|
376
380
|
],
|
|
377
381
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -722,6 +726,7 @@ module Telnyx
|
|
|
722
726
|
T::Array[
|
|
723
727
|
T.any(
|
|
724
728
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
729
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
725
730
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
726
731
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
727
732
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -730,7 +735,8 @@ module Telnyx
|
|
|
730
735
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
731
736
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
732
737
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
733
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
738
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
739
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
734
740
|
)
|
|
735
741
|
]
|
|
736
742
|
]
|
|
@@ -814,6 +820,7 @@ module Telnyx
|
|
|
814
820
|
T::Array[
|
|
815
821
|
T.any(
|
|
816
822
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
823
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
817
824
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
818
825
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
819
826
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -822,7 +829,8 @@ module Telnyx
|
|
|
822
829
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
823
830
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
824
831
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
825
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
832
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
833
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
826
834
|
)
|
|
827
835
|
]
|
|
828
836
|
],
|
|
@@ -1071,6 +1079,7 @@ module Telnyx
|
|
|
1071
1079
|
T::Array[
|
|
1072
1080
|
T.any(
|
|
1073
1081
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
1082
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
1074
1083
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
1075
1084
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
1076
1085
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -1079,7 +1088,8 @@ module Telnyx
|
|
|
1079
1088
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
1080
1089
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
1081
1090
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
1082
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
1091
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
1092
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
1083
1093
|
)
|
|
1084
1094
|
]
|
|
1085
1095
|
).void
|
|
@@ -1115,6 +1125,7 @@ module Telnyx
|
|
|
1115
1125
|
T::Array[
|
|
1116
1126
|
T.any(
|
|
1117
1127
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
1128
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
1118
1129
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
1119
1130
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
1120
1131
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -1123,7 +1134,8 @@ module Telnyx
|
|
|
1123
1134
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
1124
1135
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
1125
1136
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
1126
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
1137
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
1138
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
1127
1139
|
)
|
|
1128
1140
|
],
|
|
1129
1141
|
type:
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
class PayToolParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Telnyx::AI::PayToolParams, Telnyx::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# The name of the pay connector configured in the Telnyx API. Must reference an
|
|
13
|
+
# existing pay connector for this organization.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :connector_name
|
|
16
|
+
|
|
17
|
+
# Default currency for payments processed by this tool.
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :currency
|
|
20
|
+
|
|
21
|
+
sig { params(currency: String).void }
|
|
22
|
+
attr_writer :currency
|
|
23
|
+
|
|
24
|
+
# Optional description of the pay tool that will be passed to the assistant.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :description
|
|
27
|
+
|
|
28
|
+
# Default payment method for payments processed by this tool.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :payment_method
|
|
31
|
+
|
|
32
|
+
sig { params(payment_method: String).void }
|
|
33
|
+
attr_writer :payment_method
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
connector_name: String,
|
|
38
|
+
currency: String,
|
|
39
|
+
description: T.nilable(String),
|
|
40
|
+
payment_method: String
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# The name of the pay connector configured in the Telnyx API. Must reference an
|
|
45
|
+
# existing pay connector for this organization.
|
|
46
|
+
connector_name:,
|
|
47
|
+
# Default currency for payments processed by this tool.
|
|
48
|
+
currency: nil,
|
|
49
|
+
# Optional description of the pay tool that will be passed to the assistant.
|
|
50
|
+
description: nil,
|
|
51
|
+
# Default payment method for payments processed by this tool.
|
|
52
|
+
payment_method: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
connector_name: String,
|
|
60
|
+
currency: String,
|
|
61
|
+
description: T.nilable(String),
|
|
62
|
+
payment_method: String
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def to_hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -18,6 +18,12 @@ module Telnyx
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :type
|
|
20
20
|
|
|
21
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
22
|
+
attr_reader :client_side_tool
|
|
23
|
+
|
|
24
|
+
sig { params(client_side_tool: T::Hash[Symbol, T.anything]).void }
|
|
25
|
+
attr_writer :client_side_tool
|
|
26
|
+
|
|
21
27
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
22
28
|
attr_reader :function
|
|
23
29
|
|
|
@@ -36,6 +42,12 @@ module Telnyx
|
|
|
36
42
|
sig { params(invite: T::Hash[Symbol, T.anything]).void }
|
|
37
43
|
attr_writer :invite
|
|
38
44
|
|
|
45
|
+
sig { returns(T.nilable(Telnyx::AI::PayToolParams)) }
|
|
46
|
+
attr_reader :pay
|
|
47
|
+
|
|
48
|
+
sig { params(pay: Telnyx::AI::PayToolParams::OrHash).void }
|
|
49
|
+
attr_writer :pay
|
|
50
|
+
|
|
39
51
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
40
52
|
attr_reader :retrieval
|
|
41
53
|
|
|
@@ -58,9 +70,11 @@ module Telnyx
|
|
|
58
70
|
params(
|
|
59
71
|
display_name: String,
|
|
60
72
|
type: String,
|
|
73
|
+
client_side_tool: T::Hash[Symbol, T.anything],
|
|
61
74
|
function: T::Hash[Symbol, T.anything],
|
|
62
75
|
handoff: T::Hash[Symbol, T.anything],
|
|
63
76
|
invite: T::Hash[Symbol, T.anything],
|
|
77
|
+
pay: Telnyx::AI::PayToolParams::OrHash,
|
|
64
78
|
retrieval: T::Hash[Symbol, T.anything],
|
|
65
79
|
timeout_ms: Integer,
|
|
66
80
|
webhook: T::Hash[Symbol, T.anything],
|
|
@@ -70,9 +84,11 @@ module Telnyx
|
|
|
70
84
|
def self.new(
|
|
71
85
|
display_name:,
|
|
72
86
|
type:,
|
|
87
|
+
client_side_tool: nil,
|
|
73
88
|
function: nil,
|
|
74
89
|
handoff: nil,
|
|
75
90
|
invite: nil,
|
|
91
|
+
pay: nil,
|
|
76
92
|
retrieval: nil,
|
|
77
93
|
timeout_ms: nil,
|
|
78
94
|
webhook: nil,
|
|
@@ -85,9 +101,11 @@ module Telnyx
|
|
|
85
101
|
{
|
|
86
102
|
display_name: String,
|
|
87
103
|
type: String,
|
|
104
|
+
client_side_tool: T::Hash[Symbol, T.anything],
|
|
88
105
|
function: T::Hash[Symbol, T.anything],
|
|
89
106
|
handoff: T::Hash[Symbol, T.anything],
|
|
90
107
|
invite: T::Hash[Symbol, T.anything],
|
|
108
|
+
pay: Telnyx::AI::PayToolParams,
|
|
91
109
|
retrieval: T::Hash[Symbol, T.anything],
|
|
92
110
|
timeout_ms: Integer,
|
|
93
111
|
webhook: T::Hash[Symbol, T.anything],
|