telnyx 5.111.0 → 5.112.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 +8 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +178 -9
- data/lib/telnyx/models/ai/assistant_tool.rb +14 -14
- data/lib/telnyx/models/ai/assistant_update_params.rb +178 -9
- data/lib/telnyx/models/ai/assistants/canary_deploy.rb +123 -3
- data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +125 -3
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +179 -9
- data/lib/telnyx/models/ai/inference_embedding.rb +177 -9
- data/lib/telnyx/models/ai/openai_list_models_response.rb +210 -3
- data/lib/telnyx/models/ai/transfer_tool.rb +9 -7
- data/lib/telnyx/models/ai_retrieve_models_response.rb +210 -3
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +23 -4
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +23 -4
- data/lib/telnyx/models/calls/action_speak_params.rb +23 -4
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +23 -4
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +491 -0
- data/lib/telnyx/models/calls/action_start_conversation_relay_response.rb +37 -0
- data/lib/telnyx/models/calls/action_stop_conversation_relay_params.rb +44 -0
- data/lib/telnyx/models/calls/action_stop_conversation_relay_response.rb +18 -0
- data/lib/telnyx/models/calls/transcription_start_request.rb +167 -5
- data/lib/telnyx/models/conferences/action_speak_params.rb +23 -4
- data/lib/telnyx/models/network_list_interfaces_response.rb +2 -112
- data/lib/telnyx/models/public_internet_gateway_create_response.rb +8 -3
- data/lib/telnyx/models/public_internet_gateway_delete_response.rb +8 -3
- data/lib/telnyx/models/public_internet_gateway_list_response.rb +10 -0
- data/lib/telnyx/models/public_internet_gateway_retrieve_response.rb +8 -3
- data/lib/telnyx/models/text_to_speech_generate_params.rb +6 -6
- data/lib/telnyx/models/uac_connection_create_params.rb +255 -9
- data/lib/telnyx/models/uac_connection_create_response.rb +878 -3
- data/lib/telnyx/models/uac_connection_delete_response.rb +878 -3
- data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
- data/lib/telnyx/models/uac_connection_retrieve_response.rb +879 -3
- data/lib/telnyx/models/uac_connection_update_params.rb +255 -9
- data/lib/telnyx/models/uac_connection_update_response.rb +878 -3
- data/lib/telnyx/models/virtual_cross_connect_create_response.rb +8 -3
- data/lib/telnyx/models/virtual_cross_connect_delete_response.rb +8 -3
- data/lib/telnyx/models/virtual_cross_connect_list_response.rb +10 -0
- data/lib/telnyx/models/virtual_cross_connect_retrieve_response.rb +8 -3
- data/lib/telnyx/models/virtual_cross_connect_update_response.rb +8 -3
- data/lib/telnyx/models/wireguard_interface_create_response.rb +8 -3
- data/lib/telnyx/models/wireguard_interface_delete_response.rb +8 -3
- data/lib/telnyx/models/wireguard_interface_list_response.rb +10 -0
- data/lib/telnyx/models/wireguard_interface_retrieve_response.rb +8 -3
- data/lib/telnyx/models.rb +0 -20
- data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +2 -2
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
- data/lib/telnyx/resources/ai/assistants.rb +6 -6
- data/lib/telnyx/resources/calls/actions.rb +101 -5
- data/lib/telnyx/resources/conferences/actions.rb +1 -1
- data/lib/telnyx/resources/public_internet_gateways.rb +2 -2
- data/lib/telnyx/resources/uac_connections.rb +8 -8
- data/lib/telnyx/resources/virtual_cross_connects.rb +2 -2
- data/lib/telnyx/resources/wireguard_interfaces.rb +2 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +8 -22
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +352 -12
- data/rbi/telnyx/models/ai/assistant_tool.rbi +10 -10
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +352 -12
- data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +290 -4
- data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +301 -3
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +366 -12
- data/rbi/telnyx/models/ai/inference_embedding.rbi +351 -12
- data/rbi/telnyx/models/ai/openai_list_models_response.rbi +315 -3
- data/rbi/telnyx/models/ai/transfer_tool.rbi +5 -5
- data/rbi/telnyx/models/ai_retrieve_models_response.rbi +310 -3
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_speak_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +1075 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_response.rbi +95 -0
- data/rbi/telnyx/models/calls/action_stop_conversation_relay_params.rbi +72 -0
- data/rbi/telnyx/models/calls/action_stop_conversation_relay_response.rbi +39 -0
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +480 -10
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +41 -5
- data/rbi/telnyx/models/network_list_interfaces_response.rbi +4 -181
- data/rbi/telnyx/models/public_internet_gateway_create_response.rbi +38 -6
- data/rbi/telnyx/models/public_internet_gateway_delete_response.rbi +38 -6
- data/rbi/telnyx/models/public_internet_gateway_list_response.rbi +23 -0
- data/rbi/telnyx/models/public_internet_gateway_retrieve_response.rbi +38 -6
- data/rbi/telnyx/models/text_to_speech_generate_params.rbi +6 -6
- data/rbi/telnyx/models/uac_connection_create_params.rbi +516 -12
- data/rbi/telnyx/models/uac_connection_create_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_delete_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
- data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_update_params.rbi +516 -12
- data/rbi/telnyx/models/uac_connection_update_response.rbi +1756 -4
- data/rbi/telnyx/models/virtual_cross_connect_create_response.rbi +36 -6
- data/rbi/telnyx/models/virtual_cross_connect_delete_response.rbi +36 -6
- data/rbi/telnyx/models/virtual_cross_connect_list_response.rbi +23 -0
- data/rbi/telnyx/models/virtual_cross_connect_retrieve_response.rbi +38 -6
- data/rbi/telnyx/models/virtual_cross_connect_update_response.rbi +36 -6
- data/rbi/telnyx/models/wireguard_interface_create_response.rbi +36 -6
- data/rbi/telnyx/models/wireguard_interface_delete_response.rbi +36 -6
- data/rbi/telnyx/models/wireguard_interface_list_response.rbi +23 -0
- data/rbi/telnyx/models/wireguard_interface_retrieve_response.rbi +36 -6
- data/rbi/telnyx/models.rbi +0 -20
- data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +4 -2
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +9 -3
- data/rbi/telnyx/resources/ai/assistants.rbi +10 -6
- data/rbi/telnyx/resources/calls/actions.rbi +152 -6
- data/rbi/telnyx/resources/conferences/actions.rbi +1 -1
- data/rbi/telnyx/resources/public_internet_gateways.rbi +1 -1
- data/rbi/telnyx/resources/uac_connections.rbi +13 -7
- data/rbi/telnyx/resources/virtual_cross_connects.rbi +1 -1
- data/rbi/telnyx/resources/wireguard_interfaces.rbi +1 -1
- data/sig/telnyx/models/ai/assistant_create_params.rbs +149 -18
- data/sig/telnyx/models/ai/assistant_tool.rbs +8 -8
- data/sig/telnyx/models/ai/assistant_update_params.rbs +149 -18
- data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -6
- data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +109 -4
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +152 -18
- data/sig/telnyx/models/ai/inference_embedding.rbs +149 -18
- data/sig/telnyx/models/ai/openai_list_models_response.rbs +149 -4
- data/sig/telnyx/models/ai/transfer_tool.rbs +4 -4
- data/sig/telnyx/models/ai_retrieve_models_response.rbs +149 -4
- data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_speak_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +416 -0
- data/sig/telnyx/models/calls/action_start_conversation_relay_response.rbs +45 -0
- data/sig/telnyx/models/calls/action_stop_conversation_relay_params.rbs +38 -0
- data/sig/telnyx/models/calls/action_stop_conversation_relay_response.rbs +20 -0
- data/sig/telnyx/models/calls/transcription_start_request.rbs +184 -2
- data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -1
- data/sig/telnyx/models/network_list_interfaces_response.rbs +4 -106
- data/sig/telnyx/models/public_internet_gateway_create_response.rbs +18 -6
- data/sig/telnyx/models/public_internet_gateway_delete_response.rbs +18 -6
- data/sig/telnyx/models/public_internet_gateway_list_response.rbs +11 -0
- data/sig/telnyx/models/public_internet_gateway_retrieve_response.rbs +18 -6
- data/sig/telnyx/models/text_to_speech_generate_params.rbs +6 -6
- data/sig/telnyx/models/uac_connection_create_params.rbs +211 -17
- data/sig/telnyx/models/uac_connection_create_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_delete_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
- data/sig/telnyx/models/uac_connection_retrieve_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_update_params.rbs +211 -17
- data/sig/telnyx/models/uac_connection_update_response.rbs +731 -5
- data/sig/telnyx/models/virtual_cross_connect_create_response.rbs +18 -6
- data/sig/telnyx/models/virtual_cross_connect_delete_response.rbs +18 -6
- data/sig/telnyx/models/virtual_cross_connect_list_response.rbs +11 -0
- data/sig/telnyx/models/virtual_cross_connect_retrieve_response.rbs +18 -6
- data/sig/telnyx/models/virtual_cross_connect_update_response.rbs +18 -6
- data/sig/telnyx/models/wireguard_interface_create_response.rbs +18 -6
- data/sig/telnyx/models/wireguard_interface_delete_response.rbs +18 -6
- data/sig/telnyx/models/wireguard_interface_list_response.rbs +11 -0
- data/sig/telnyx/models/wireguard_interface_retrieve_response.rbs +18 -6
- data/sig/telnyx/models.rbs +0 -20
- data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
- data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
- data/sig/telnyx/resources/ai/assistants.rbs +6 -6
- data/sig/telnyx/resources/calls/actions.rbs +29 -0
- data/sig/telnyx/resources/public_internet_gateways.rbs +1 -1
- data/sig/telnyx/resources/uac_connections.rbs +7 -7
- data/sig/telnyx/resources/virtual_cross_connects.rbs +1 -1
- data/sig/telnyx/resources/wireguard_interfaces.rbs +1 -1
- metadata +26 -68
- data/lib/telnyx/models/ai/assistant_integration.rb +0 -38
- data/lib/telnyx/models/ai/assistant_mcp_server.rb +0 -35
- data/lib/telnyx/models/ai/assistants/clause.rb +0 -54
- data/lib/telnyx/models/ai/assistants/rollout_slot.rb +0 -27
- data/lib/telnyx/models/ai/assistants/rule_input.rb +0 -40
- data/lib/telnyx/models/ai/assistants/rule_output.rb +0 -40
- data/lib/telnyx/models/ai/assistants/serve.rb +0 -33
- data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +0 -47
- data/lib/telnyx/models/ai/start_speaking_plan.rb +0 -37
- data/lib/telnyx/models/ai/transcription_endpointing_plan.rb +0 -39
- data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +0 -64
- data/lib/telnyx/models/calls/transcription_engine_xai_config.rb +0 -108
- data/lib/telnyx/models/model_metadata.rb +0 -212
- data/lib/telnyx/models/public_internet_gateway_read.rb +0 -83
- data/lib/telnyx/models/uac_connection.rb +0 -412
- data/lib/telnyx/models/uac_external_settings.rb +0 -101
- data/lib/telnyx/models/uac_inbound.rb +0 -210
- data/lib/telnyx/models/uac_internal_settings.rb +0 -25
- data/lib/telnyx/models/uac_outbound.rb +0 -131
- data/lib/telnyx/models/virtual_cross_connect_combined.rb +0 -212
- data/lib/telnyx/models/wireguard_interface_read.rb +0 -136
- data/lib/telnyx/models/xai_voice_settings.rb +0 -36
- data/rbi/telnyx/models/ai/assistant_integration.rbi +0 -60
- data/rbi/telnyx/models/ai/assistant_mcp_server.rbi +0 -51
- data/rbi/telnyx/models/ai/assistants/clause.rbi +0 -91
- data/rbi/telnyx/models/ai/assistants/rollout_slot.rbi +0 -36
- data/rbi/telnyx/models/ai/assistants/rule_input.rbi +0 -73
- data/rbi/telnyx/models/ai/assistants/rule_output.rbi +0 -73
- data/rbi/telnyx/models/ai/assistants/serve.rbi +0 -61
- data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +0 -83
- data/rbi/telnyx/models/ai/start_speaking_plan.rbi +0 -70
- data/rbi/telnyx/models/ai/transcription_endpointing_plan.rbi +0 -71
- data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +0 -155
- data/rbi/telnyx/models/calls/transcription_engine_xai_config.rbi +0 -329
- data/rbi/telnyx/models/model_metadata.rbi +0 -272
- data/rbi/telnyx/models/public_internet_gateway_read.rbi +0 -128
- data/rbi/telnyx/models/uac_connection.rbi +0 -684
- data/rbi/telnyx/models/uac_external_settings.rbi +0 -146
- data/rbi/telnyx/models/uac_inbound.rbi +0 -410
- data/rbi/telnyx/models/uac_internal_settings.rbi +0 -39
- data/rbi/telnyx/models/uac_outbound.rbi +0 -224
- data/rbi/telnyx/models/virtual_cross_connect_combined.rbi +0 -345
- data/rbi/telnyx/models/wireguard_interface_read.rbi +0 -213
- data/rbi/telnyx/models/xai_voice_settings.rbi +0 -64
- data/sig/telnyx/models/ai/assistant_integration.rbs +0 -26
- data/sig/telnyx/models/ai/assistant_mcp_server.rbs +0 -19
- data/sig/telnyx/models/ai/assistants/clause.rbs +0 -46
- data/sig/telnyx/models/ai/assistants/rollout_slot.rbs +0 -19
- data/sig/telnyx/models/ai/assistants/rule_input.rbs +0 -33
- data/sig/telnyx/models/ai/assistants/rule_output.rbs +0 -33
- data/sig/telnyx/models/ai/assistants/serve.rbs +0 -35
- data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +0 -40
- data/sig/telnyx/models/ai/start_speaking_plan.rbs +0 -33
- data/sig/telnyx/models/ai/transcription_endpointing_plan.rbs +0 -38
- data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +0 -62
- data/sig/telnyx/models/calls/transcription_engine_xai_config.rbs +0 -130
- data/sig/telnyx/models/model_metadata.rbs +0 -142
- data/sig/telnyx/models/public_internet_gateway_read.rbs +0 -80
- data/sig/telnyx/models/uac_connection.rbs +0 -338
- data/sig/telnyx/models/uac_external_settings.rbs +0 -73
- data/sig/telnyx/models/uac_inbound.rbs +0 -190
- data/sig/telnyx/models/uac_internal_settings.rbs +0 -15
- data/sig/telnyx/models/uac_outbound.rbs +0 -113
- data/sig/telnyx/models/virtual_cross_connect_combined.rbs +0 -190
- data/sig/telnyx/models/wireguard_interface_read.rbs +0 -127
- data/sig/telnyx/models/xai_voice_settings.rbs +0 -34
|
@@ -14,13 +14,16 @@ module Telnyx
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
sig do
|
|
17
|
-
returns(
|
|
17
|
+
returns(
|
|
18
|
+
T.nilable(T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule])
|
|
19
|
+
)
|
|
18
20
|
end
|
|
19
21
|
attr_reader :rules
|
|
20
22
|
|
|
21
23
|
sig do
|
|
22
24
|
params(
|
|
23
|
-
rules:
|
|
25
|
+
rules:
|
|
26
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::OrHash]
|
|
24
27
|
).void
|
|
25
28
|
end
|
|
26
29
|
attr_writer :rules
|
|
@@ -30,7 +33,8 @@ module Telnyx
|
|
|
30
33
|
# - `rules` — canonical ordered list of routing rules
|
|
31
34
|
sig do
|
|
32
35
|
params(
|
|
33
|
-
rules:
|
|
36
|
+
rules:
|
|
37
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::OrHash]
|
|
34
38
|
).returns(T.attached_class)
|
|
35
39
|
end
|
|
36
40
|
def self.new(rules: nil)
|
|
@@ -38,11 +42,293 @@ module Telnyx
|
|
|
38
42
|
|
|
39
43
|
sig do
|
|
40
44
|
override.returns(
|
|
41
|
-
{ rules: T::Array[Telnyx::AI::Assistants::
|
|
45
|
+
{ rules: T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
|
|
42
46
|
)
|
|
43
47
|
end
|
|
44
48
|
def to_hash
|
|
45
49
|
end
|
|
50
|
+
|
|
51
|
+
class Rule < Telnyx::Internal::Type::BaseModel
|
|
52
|
+
OrHash =
|
|
53
|
+
T.type_alias do
|
|
54
|
+
T.any(
|
|
55
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule,
|
|
56
|
+
Telnyx::Internal::AnyHash
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# What a rule serves when matched.
|
|
61
|
+
#
|
|
62
|
+
# Exactly one of:
|
|
63
|
+
#
|
|
64
|
+
# - `version_id` — serve a specific version
|
|
65
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
66
|
+
# 100, with the leftover routing to the main version
|
|
67
|
+
sig { returns(Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve) }
|
|
68
|
+
attr_reader :serve
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::OrHash
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :serve
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
returns(
|
|
79
|
+
T.nilable(
|
|
80
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
attr_reader :match
|
|
85
|
+
|
|
86
|
+
sig do
|
|
87
|
+
params(
|
|
88
|
+
match:
|
|
89
|
+
T::Array[
|
|
90
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::OrHash
|
|
91
|
+
]
|
|
92
|
+
).void
|
|
93
|
+
end
|
|
94
|
+
attr_writer :match
|
|
95
|
+
|
|
96
|
+
# A targeting rule: `match` clauses (AND) gate `serve`.
|
|
97
|
+
#
|
|
98
|
+
# An empty `match` is a catch-all (always fires).
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
serve:
|
|
102
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::OrHash,
|
|
103
|
+
match:
|
|
104
|
+
T::Array[
|
|
105
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::OrHash
|
|
106
|
+
]
|
|
107
|
+
).returns(T.attached_class)
|
|
108
|
+
end
|
|
109
|
+
def self.new(
|
|
110
|
+
# What a rule serves when matched.
|
|
111
|
+
#
|
|
112
|
+
# Exactly one of:
|
|
113
|
+
#
|
|
114
|
+
# - `version_id` — serve a specific version
|
|
115
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
116
|
+
# 100, with the leftover routing to the main version
|
|
117
|
+
serve:,
|
|
118
|
+
match: nil
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig do
|
|
123
|
+
override.returns(
|
|
124
|
+
{
|
|
125
|
+
serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve,
|
|
126
|
+
match:
|
|
127
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
def to_hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
class Serve < Telnyx::Internal::Type::BaseModel
|
|
135
|
+
OrHash =
|
|
136
|
+
T.type_alias do
|
|
137
|
+
T.any(
|
|
138
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve,
|
|
139
|
+
Telnyx::Internal::AnyHash
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
sig do
|
|
144
|
+
returns(
|
|
145
|
+
T.nilable(
|
|
146
|
+
T::Array[
|
|
147
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout
|
|
148
|
+
]
|
|
149
|
+
)
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
attr_reader :rollout
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
params(
|
|
156
|
+
rollout:
|
|
157
|
+
T::Array[
|
|
158
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout::OrHash
|
|
159
|
+
]
|
|
160
|
+
).void
|
|
161
|
+
end
|
|
162
|
+
attr_writer :rollout
|
|
163
|
+
|
|
164
|
+
sig { returns(T.nilable(String)) }
|
|
165
|
+
attr_reader :version_id
|
|
166
|
+
|
|
167
|
+
sig { params(version_id: String).void }
|
|
168
|
+
attr_writer :version_id
|
|
169
|
+
|
|
170
|
+
# What a rule serves when matched.
|
|
171
|
+
#
|
|
172
|
+
# Exactly one of:
|
|
173
|
+
#
|
|
174
|
+
# - `version_id` — serve a specific version
|
|
175
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
176
|
+
# 100, with the leftover routing to the main version
|
|
177
|
+
sig do
|
|
178
|
+
params(
|
|
179
|
+
rollout:
|
|
180
|
+
T::Array[
|
|
181
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout::OrHash
|
|
182
|
+
],
|
|
183
|
+
version_id: String
|
|
184
|
+
).returns(T.attached_class)
|
|
185
|
+
end
|
|
186
|
+
def self.new(rollout: nil, version_id: nil)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
sig do
|
|
190
|
+
override.returns(
|
|
191
|
+
{
|
|
192
|
+
rollout:
|
|
193
|
+
T::Array[
|
|
194
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout
|
|
195
|
+
],
|
|
196
|
+
version_id: String
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
end
|
|
200
|
+
def to_hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
class Rollout < Telnyx::Internal::Type::BaseModel
|
|
204
|
+
OrHash =
|
|
205
|
+
T.type_alias do
|
|
206
|
+
T.any(
|
|
207
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout,
|
|
208
|
+
Telnyx::Internal::AnyHash
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
sig { returns(String) }
|
|
213
|
+
attr_accessor :version_id
|
|
214
|
+
|
|
215
|
+
sig { returns(Float) }
|
|
216
|
+
attr_accessor :weight
|
|
217
|
+
|
|
218
|
+
# One slot in a percentage rollout.
|
|
219
|
+
sig do
|
|
220
|
+
params(version_id: String, weight: Float).returns(
|
|
221
|
+
T.attached_class
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
def self.new(version_id:, weight:)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
sig { override.returns({ version_id: String, weight: Float }) }
|
|
228
|
+
def to_hash
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
class Match < Telnyx::Internal::Type::BaseModel
|
|
234
|
+
OrHash =
|
|
235
|
+
T.type_alias do
|
|
236
|
+
T.any(
|
|
237
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match,
|
|
238
|
+
Telnyx::Internal::AnyHash
|
|
239
|
+
)
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Attribute name from the routing context
|
|
243
|
+
sig { returns(String) }
|
|
244
|
+
attr_accessor :attribute
|
|
245
|
+
|
|
246
|
+
# Match operator
|
|
247
|
+
sig do
|
|
248
|
+
returns(
|
|
249
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::OrSymbol
|
|
250
|
+
)
|
|
251
|
+
end
|
|
252
|
+
attr_accessor :operator
|
|
253
|
+
|
|
254
|
+
sig { returns(T::Array[String]) }
|
|
255
|
+
attr_accessor :values
|
|
256
|
+
|
|
257
|
+
# A single attribute/operator/values check.
|
|
258
|
+
#
|
|
259
|
+
# A clause matches when the routing context's value for `attribute` satisfies
|
|
260
|
+
# `operator` against any of `values`.
|
|
261
|
+
sig do
|
|
262
|
+
params(
|
|
263
|
+
attribute: String,
|
|
264
|
+
operator:
|
|
265
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::OrSymbol,
|
|
266
|
+
values: T::Array[String]
|
|
267
|
+
).returns(T.attached_class)
|
|
268
|
+
end
|
|
269
|
+
def self.new(
|
|
270
|
+
# Attribute name from the routing context
|
|
271
|
+
attribute:,
|
|
272
|
+
# Match operator
|
|
273
|
+
operator:,
|
|
274
|
+
values:
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
sig do
|
|
279
|
+
override.returns(
|
|
280
|
+
{
|
|
281
|
+
attribute: String,
|
|
282
|
+
operator:
|
|
283
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::OrSymbol,
|
|
284
|
+
values: T::Array[String]
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
def to_hash
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Match operator
|
|
292
|
+
module Operator
|
|
293
|
+
extend Telnyx::Internal::Type::Enum
|
|
294
|
+
|
|
295
|
+
TaggedSymbol =
|
|
296
|
+
T.type_alias do
|
|
297
|
+
T.all(
|
|
298
|
+
Symbol,
|
|
299
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
303
|
+
|
|
304
|
+
IN =
|
|
305
|
+
T.let(
|
|
306
|
+
:in,
|
|
307
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::TaggedSymbol
|
|
308
|
+
)
|
|
309
|
+
NOT_IN =
|
|
310
|
+
T.let(
|
|
311
|
+
:not_in,
|
|
312
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::TaggedSymbol
|
|
313
|
+
)
|
|
314
|
+
STARTS_WITH =
|
|
315
|
+
T.let(
|
|
316
|
+
:starts_with,
|
|
317
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::TaggedSymbol
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
sig do
|
|
321
|
+
override.returns(
|
|
322
|
+
T::Array[
|
|
323
|
+
Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator::TaggedSymbol
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
end
|
|
327
|
+
def self.values
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
end
|
|
46
332
|
end
|
|
47
333
|
end
|
|
48
334
|
end
|
|
@@ -19,7 +19,11 @@ module Telnyx
|
|
|
19
19
|
sig { returns(Time) }
|
|
20
20
|
attr_accessor :created_at
|
|
21
21
|
|
|
22
|
-
sig
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule]
|
|
25
|
+
)
|
|
26
|
+
end
|
|
23
27
|
attr_accessor :rules
|
|
24
28
|
|
|
25
29
|
sig { returns(Time) }
|
|
@@ -32,7 +36,10 @@ module Telnyx
|
|
|
32
36
|
params(
|
|
33
37
|
assistant_id: String,
|
|
34
38
|
created_at: Time,
|
|
35
|
-
rules:
|
|
39
|
+
rules:
|
|
40
|
+
T::Array[
|
|
41
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::OrHash
|
|
42
|
+
],
|
|
36
43
|
updated_at: Time
|
|
37
44
|
).returns(T.attached_class)
|
|
38
45
|
end
|
|
@@ -44,13 +51,304 @@ module Telnyx
|
|
|
44
51
|
{
|
|
45
52
|
assistant_id: String,
|
|
46
53
|
created_at: Time,
|
|
47
|
-
rules:
|
|
54
|
+
rules:
|
|
55
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule],
|
|
48
56
|
updated_at: Time
|
|
49
57
|
}
|
|
50
58
|
)
|
|
51
59
|
end
|
|
52
60
|
def to_hash
|
|
53
61
|
end
|
|
62
|
+
|
|
63
|
+
class Rule < Telnyx::Internal::Type::BaseModel
|
|
64
|
+
OrHash =
|
|
65
|
+
T.type_alias do
|
|
66
|
+
T.any(
|
|
67
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule,
|
|
68
|
+
Telnyx::Internal::AnyHash
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# What a rule serves when matched.
|
|
73
|
+
#
|
|
74
|
+
# Exactly one of:
|
|
75
|
+
#
|
|
76
|
+
# - `version_id` — serve a specific version
|
|
77
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
78
|
+
# 100, with the leftover routing to the main version
|
|
79
|
+
sig do
|
|
80
|
+
returns(Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve)
|
|
81
|
+
end
|
|
82
|
+
attr_reader :serve
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
serve:
|
|
87
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::OrHash
|
|
88
|
+
).void
|
|
89
|
+
end
|
|
90
|
+
attr_writer :serve
|
|
91
|
+
|
|
92
|
+
sig do
|
|
93
|
+
returns(
|
|
94
|
+
T.nilable(
|
|
95
|
+
T::Array[
|
|
96
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match
|
|
97
|
+
]
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
attr_reader :match
|
|
102
|
+
|
|
103
|
+
sig do
|
|
104
|
+
params(
|
|
105
|
+
match:
|
|
106
|
+
T::Array[
|
|
107
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::OrHash
|
|
108
|
+
]
|
|
109
|
+
).void
|
|
110
|
+
end
|
|
111
|
+
attr_writer :match
|
|
112
|
+
|
|
113
|
+
# A targeting rule: `match` clauses (AND) gate `serve`.
|
|
114
|
+
#
|
|
115
|
+
# An empty `match` is a catch-all (always fires).
|
|
116
|
+
sig do
|
|
117
|
+
params(
|
|
118
|
+
serve:
|
|
119
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::OrHash,
|
|
120
|
+
match:
|
|
121
|
+
T::Array[
|
|
122
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::OrHash
|
|
123
|
+
]
|
|
124
|
+
).returns(T.attached_class)
|
|
125
|
+
end
|
|
126
|
+
def self.new(
|
|
127
|
+
# What a rule serves when matched.
|
|
128
|
+
#
|
|
129
|
+
# Exactly one of:
|
|
130
|
+
#
|
|
131
|
+
# - `version_id` — serve a specific version
|
|
132
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
133
|
+
# 100, with the leftover routing to the main version
|
|
134
|
+
serve:,
|
|
135
|
+
match: nil
|
|
136
|
+
)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
sig do
|
|
140
|
+
override.returns(
|
|
141
|
+
{
|
|
142
|
+
serve:
|
|
143
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve,
|
|
144
|
+
match:
|
|
145
|
+
T::Array[
|
|
146
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
def to_hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
class Serve < Telnyx::Internal::Type::BaseModel
|
|
155
|
+
OrHash =
|
|
156
|
+
T.type_alias do
|
|
157
|
+
T.any(
|
|
158
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve,
|
|
159
|
+
Telnyx::Internal::AnyHash
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
sig do
|
|
164
|
+
returns(
|
|
165
|
+
T.nilable(
|
|
166
|
+
T::Array[
|
|
167
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout
|
|
168
|
+
]
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
attr_reader :rollout
|
|
173
|
+
|
|
174
|
+
sig do
|
|
175
|
+
params(
|
|
176
|
+
rollout:
|
|
177
|
+
T::Array[
|
|
178
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout::OrHash
|
|
179
|
+
]
|
|
180
|
+
).void
|
|
181
|
+
end
|
|
182
|
+
attr_writer :rollout
|
|
183
|
+
|
|
184
|
+
sig { returns(T.nilable(String)) }
|
|
185
|
+
attr_reader :version_id
|
|
186
|
+
|
|
187
|
+
sig { params(version_id: String).void }
|
|
188
|
+
attr_writer :version_id
|
|
189
|
+
|
|
190
|
+
# What a rule serves when matched.
|
|
191
|
+
#
|
|
192
|
+
# Exactly one of:
|
|
193
|
+
#
|
|
194
|
+
# - `version_id` — serve a specific version
|
|
195
|
+
# - `rollout` — weighted random across versions; weights must sum to less than
|
|
196
|
+
# 100, with the leftover routing to the main version
|
|
197
|
+
sig do
|
|
198
|
+
params(
|
|
199
|
+
rollout:
|
|
200
|
+
T::Array[
|
|
201
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout::OrHash
|
|
202
|
+
],
|
|
203
|
+
version_id: String
|
|
204
|
+
).returns(T.attached_class)
|
|
205
|
+
end
|
|
206
|
+
def self.new(rollout: nil, version_id: nil)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
sig do
|
|
210
|
+
override.returns(
|
|
211
|
+
{
|
|
212
|
+
rollout:
|
|
213
|
+
T::Array[
|
|
214
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout
|
|
215
|
+
],
|
|
216
|
+
version_id: String
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
def to_hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
class Rollout < Telnyx::Internal::Type::BaseModel
|
|
224
|
+
OrHash =
|
|
225
|
+
T.type_alias do
|
|
226
|
+
T.any(
|
|
227
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout,
|
|
228
|
+
Telnyx::Internal::AnyHash
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
sig { returns(String) }
|
|
233
|
+
attr_accessor :version_id
|
|
234
|
+
|
|
235
|
+
sig { returns(Float) }
|
|
236
|
+
attr_accessor :weight
|
|
237
|
+
|
|
238
|
+
# One slot in a percentage rollout.
|
|
239
|
+
sig do
|
|
240
|
+
params(version_id: String, weight: Float).returns(
|
|
241
|
+
T.attached_class
|
|
242
|
+
)
|
|
243
|
+
end
|
|
244
|
+
def self.new(version_id:, weight:)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
sig { override.returns({ version_id: String, weight: Float }) }
|
|
248
|
+
def to_hash
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
class Match < Telnyx::Internal::Type::BaseModel
|
|
254
|
+
OrHash =
|
|
255
|
+
T.type_alias do
|
|
256
|
+
T.any(
|
|
257
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match,
|
|
258
|
+
Telnyx::Internal::AnyHash
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Attribute name from the routing context
|
|
263
|
+
sig { returns(String) }
|
|
264
|
+
attr_accessor :attribute
|
|
265
|
+
|
|
266
|
+
# Match operator
|
|
267
|
+
sig do
|
|
268
|
+
returns(
|
|
269
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol
|
|
270
|
+
)
|
|
271
|
+
end
|
|
272
|
+
attr_accessor :operator
|
|
273
|
+
|
|
274
|
+
sig { returns(T::Array[String]) }
|
|
275
|
+
attr_accessor :values
|
|
276
|
+
|
|
277
|
+
# A single attribute/operator/values check.
|
|
278
|
+
#
|
|
279
|
+
# A clause matches when the routing context's value for `attribute` satisfies
|
|
280
|
+
# `operator` against any of `values`.
|
|
281
|
+
sig do
|
|
282
|
+
params(
|
|
283
|
+
attribute: String,
|
|
284
|
+
operator:
|
|
285
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::OrSymbol,
|
|
286
|
+
values: T::Array[String]
|
|
287
|
+
).returns(T.attached_class)
|
|
288
|
+
end
|
|
289
|
+
def self.new(
|
|
290
|
+
# Attribute name from the routing context
|
|
291
|
+
attribute:,
|
|
292
|
+
# Match operator
|
|
293
|
+
operator:,
|
|
294
|
+
values:
|
|
295
|
+
)
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
sig do
|
|
299
|
+
override.returns(
|
|
300
|
+
{
|
|
301
|
+
attribute: String,
|
|
302
|
+
operator:
|
|
303
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol,
|
|
304
|
+
values: T::Array[String]
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
def to_hash
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Match operator
|
|
312
|
+
module Operator
|
|
313
|
+
extend Telnyx::Internal::Type::Enum
|
|
314
|
+
|
|
315
|
+
TaggedSymbol =
|
|
316
|
+
T.type_alias do
|
|
317
|
+
T.all(
|
|
318
|
+
Symbol,
|
|
319
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator
|
|
320
|
+
)
|
|
321
|
+
end
|
|
322
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
323
|
+
|
|
324
|
+
IN =
|
|
325
|
+
T.let(
|
|
326
|
+
:in,
|
|
327
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol
|
|
328
|
+
)
|
|
329
|
+
NOT_IN =
|
|
330
|
+
T.let(
|
|
331
|
+
:not_in,
|
|
332
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol
|
|
333
|
+
)
|
|
334
|
+
STARTS_WITH =
|
|
335
|
+
T.let(
|
|
336
|
+
:starts_with,
|
|
337
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
sig do
|
|
341
|
+
override.returns(
|
|
342
|
+
T::Array[
|
|
343
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator::TaggedSymbol
|
|
344
|
+
]
|
|
345
|
+
)
|
|
346
|
+
end
|
|
347
|
+
def self.values
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|
|
54
352
|
end
|
|
55
353
|
end
|
|
56
354
|
end
|