telnyx 5.99.0 → 5.100.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 +13 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +5 -0
- data/lib/telnyx/models/ai/assistants/canary_deploy.rb +128 -7
- data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +131 -7
- data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
- data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
- data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
- data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
- data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
- data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
- data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
- data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
- data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
- data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
- data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
- data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
- data/lib/telnyx/models.rb +12 -0
- data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
- data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
- data/lib/telnyx/resources/uac_connections.rb +256 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +14 -1
- data/rbi/telnyx/client.rbi +4 -0
- data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
- data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
- data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
- data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
- data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
- data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
- data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
- data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
- data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
- data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
- data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
- data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
- data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
- data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
- data/rbi/telnyx/models.rbi +12 -0
- data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
- data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
- data/rbi/telnyx/resources/uac_connections.rbi +348 -0
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
- data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
- data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
- data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
- data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
- data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
- data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
- data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
- data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
- data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
- data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
- data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
- data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
- data/sig/telnyx/models.rbs +12 -0
- data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
- data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
- data/sig/telnyx/resources/uac_connections.rbs +90 -0
- metadata +44 -5
- data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
- data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
- data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
|
@@ -13,29 +13,322 @@ module Telnyx
|
|
|
13
13
|
)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
sig do
|
|
17
|
+
returns(
|
|
18
|
+
T.nilable(T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule])
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
attr_reader :rules
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
rules:
|
|
26
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::OrHash]
|
|
27
|
+
).void
|
|
28
|
+
end
|
|
29
|
+
attr_writer :rules
|
|
19
30
|
|
|
20
|
-
#
|
|
31
|
+
# Create/update request body. Accepts:
|
|
32
|
+
#
|
|
33
|
+
# - `rules` — canonical ordered list of routing rules
|
|
21
34
|
sig do
|
|
22
35
|
params(
|
|
23
|
-
|
|
36
|
+
rules:
|
|
37
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::OrHash]
|
|
24
38
|
).returns(T.attached_class)
|
|
25
39
|
end
|
|
26
|
-
def self.new(
|
|
27
|
-
# List of version configurations
|
|
28
|
-
versions:
|
|
29
|
-
)
|
|
40
|
+
def self.new(rules: nil)
|
|
30
41
|
end
|
|
31
42
|
|
|
32
43
|
sig do
|
|
33
44
|
override.returns(
|
|
34
|
-
{
|
|
45
|
+
{ rules: T::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
|
|
35
46
|
)
|
|
36
47
|
end
|
|
37
48
|
def to_hash
|
|
38
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
|
|
39
332
|
end
|
|
40
333
|
end
|
|
41
334
|
end
|
|
@@ -19,22 +19,31 @@ module Telnyx
|
|
|
19
19
|
sig { returns(Time) }
|
|
20
20
|
attr_accessor :created_at
|
|
21
21
|
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule]
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
attr_accessor :rules
|
|
28
|
+
|
|
22
29
|
sig { returns(Time) }
|
|
23
30
|
attr_accessor :updated_at
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# Response model for canary deploy operations.
|
|
32
|
+
# Response shape.
|
|
33
|
+
#
|
|
34
|
+
# Always carries `rules` (canonical).
|
|
29
35
|
sig do
|
|
30
36
|
params(
|
|
31
37
|
assistant_id: String,
|
|
32
38
|
created_at: Time,
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
rules:
|
|
40
|
+
T::Array[
|
|
41
|
+
Telnyx::AI::Assistants::CanaryDeployResponse::Rule::OrHash
|
|
42
|
+
],
|
|
43
|
+
updated_at: Time
|
|
35
44
|
).returns(T.attached_class)
|
|
36
45
|
end
|
|
37
|
-
def self.new(assistant_id:, created_at:,
|
|
46
|
+
def self.new(assistant_id:, created_at:, rules:, updated_at:)
|
|
38
47
|
end
|
|
39
48
|
|
|
40
49
|
sig do
|
|
@@ -42,13 +51,304 @@ module Telnyx
|
|
|
42
51
|
{
|
|
43
52
|
assistant_id: String,
|
|
44
53
|
created_at: Time,
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
rules:
|
|
55
|
+
T::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule],
|
|
56
|
+
updated_at: Time
|
|
47
57
|
}
|
|
48
58
|
)
|
|
49
59
|
end
|
|
50
60
|
def to_hash
|
|
51
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
|
|
52
352
|
end
|
|
53
353
|
end
|
|
54
354
|
end
|