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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +5 -0
  5. data/lib/telnyx/models/ai/assistants/canary_deploy.rb +128 -7
  6. data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +131 -7
  7. data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
  8. data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
  9. data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
  10. data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
  11. data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
  12. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  13. data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
  14. data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
  15. data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
  16. data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
  17. data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
  18. data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
  19. data/lib/telnyx/models.rb +12 -0
  20. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
  21. data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
  22. data/lib/telnyx/resources/uac_connections.rb +256 -0
  23. data/lib/telnyx/version.rb +1 -1
  24. data/lib/telnyx.rb +14 -1
  25. data/rbi/telnyx/client.rbi +4 -0
  26. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
  27. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
  28. data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
  29. data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
  30. data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
  31. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
  32. data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
  33. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  34. data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
  35. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
  36. data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
  37. data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
  38. data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
  39. data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
  40. data/rbi/telnyx/models.rbi +12 -0
  41. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
  42. data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
  43. data/rbi/telnyx/resources/uac_connections.rbi +348 -0
  44. data/sig/telnyx/client.rbs +2 -0
  45. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
  46. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
  47. data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
  48. data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
  49. data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
  50. data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
  51. data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
  52. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  53. data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
  54. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
  55. data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
  56. data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
  57. data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
  58. data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
  59. data/sig/telnyx/models.rbs +12 -0
  60. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  61. data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
  62. data/sig/telnyx/resources/uac_connections.rbs +90 -0
  63. metadata +44 -5
  64. data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
  65. data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
  66. data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
@@ -0,0 +1,348 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ # UAC connection operations
6
+ class UacConnections
7
+ # UAC connection operations
8
+ sig { returns(Telnyx::Resources::UacConnections::Actions) }
9
+ attr_reader :actions
10
+
11
+ # Creates a UAC connection. A UAC (User Agent Client) Connection registers Telnyx
12
+ # to your PBX — the opposite of a standard SIP trunk, where the PBX registers to
13
+ # Telnyx. Use UAC when your PBX doesn’t support outbound SIP registration or you
14
+ # need Telnyx to maintain the registration.
15
+ sig do
16
+ params(
17
+ connection_name: String,
18
+ active: T::Boolean,
19
+ anchorsite_override: Telnyx::AnchorsiteOverride::OrSymbol,
20
+ android_push_credential_id: T.nilable(String),
21
+ call_cost_in_webhooks: T::Boolean,
22
+ default_on_hold_comfort_noise_enabled: T::Boolean,
23
+ dtmf_type: Telnyx::DtmfType::OrSymbol,
24
+ encode_contact_header_enabled: T::Boolean,
25
+ encrypted_media: T.nilable(Telnyx::EncryptedMedia::OrSymbol),
26
+ external_uac_settings:
27
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::OrHash,
28
+ inbound: Telnyx::UacConnectionCreateParams::Inbound::OrHash,
29
+ internal_uac_settings:
30
+ Telnyx::UacConnectionCreateParams::InternalUacSettings::OrHash,
31
+ ios_push_credential_id: T.nilable(String),
32
+ jitter_buffer: Telnyx::ConnectionJitterBuffer::OrHash,
33
+ noise_suppression:
34
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::OrSymbol,
35
+ noise_suppression_details:
36
+ Telnyx::ConnectionNoiseSuppressionDetails::OrHash,
37
+ onnet_t38_passthrough_enabled: T::Boolean,
38
+ outbound: Telnyx::UacConnectionCreateParams::Outbound::OrHash,
39
+ password: String,
40
+ rtcp_settings: Telnyx::ConnectionRtcpSettings::OrHash,
41
+ sip_uri_calling_preference:
42
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::OrSymbol,
43
+ tags: T::Array[String],
44
+ user_name: String,
45
+ webhook_api_version:
46
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::OrSymbol,
47
+ webhook_event_failover_url: T.nilable(String),
48
+ webhook_event_url: String,
49
+ webhook_timeout_secs: T.nilable(Integer),
50
+ request_options: Telnyx::RequestOptions::OrHash
51
+ ).returns(Telnyx::Models::UacConnectionCreateResponse)
52
+ end
53
+ def create(
54
+ # A user-assigned name to help manage the connection.
55
+ connection_name:,
56
+ # Defaults to true
57
+ active: nil,
58
+ # `Latency` directs Telnyx to route media through the site with the lowest
59
+ # round-trip time to the user's connection. Telnyx calculates this time using ICMP
60
+ # ping messages. This can be disabled by specifying a site to handle all media.
61
+ anchorsite_override: nil,
62
+ # The uuid of the push credential for Android
63
+ android_push_credential_id: nil,
64
+ # Specifies if call cost webhooks should be sent for this connection.
65
+ call_cost_in_webhooks: nil,
66
+ # When enabled, Telnyx will generate comfort noise when you place the call on
67
+ # hold. If disabled, you will need to generate comfort noise or on hold music to
68
+ # avoid RTP timeout.
69
+ default_on_hold_comfort_noise_enabled: nil,
70
+ # Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
71
+ # digits sent to Telnyx will be accepted in all formats.
72
+ dtmf_type: nil,
73
+ # Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG
74
+ # scenarios.
75
+ encode_contact_header_enabled: nil,
76
+ # Enable use of SRTP for encryption. Cannot be set if the transport_portocol is
77
+ # TLS.
78
+ encrypted_media: nil,
79
+ # External SIP peer settings used by Telnyx when registering to your PBX and
80
+ # routing outbound calls.
81
+ external_uac_settings: nil,
82
+ # Inbound settings that can be supplied when creating or updating a UAC
83
+ # connection. The SIP subdomain fields returned in UAC connection responses are
84
+ # generated by Telnyx and are not accepted as request parameters.
85
+ inbound: nil,
86
+ # Internal Telnyx-side settings for a UAC connection.
87
+ internal_uac_settings: nil,
88
+ # The uuid of the push credential for Ios
89
+ ios_push_credential_id: nil,
90
+ # Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams
91
+ # of SIP Trunking calls. The feature is off unless enabled. You may define min and
92
+ # max values in msec for customized buffering behaviors. Larger values add latency
93
+ # but tolerate more jitter, while smaller values reduce latency but are more
94
+ # sensitive to jitter and reordering.
95
+ jitter_buffer: nil,
96
+ # Controls when noise suppression is applied to calls. When set to 'inbound',
97
+ # noise suppression is applied to incoming audio. When set to 'outbound', it's
98
+ # applied to outgoing audio. When set to 'both', it's applied in both directions.
99
+ # When set to 'disabled', noise suppression is turned off.
100
+ noise_suppression: nil,
101
+ # Configuration options for noise suppression. These settings are stored
102
+ # regardless of the noise_suppression value, but only take effect when
103
+ # noise_suppression is not 'disabled'. If you disable noise suppression and later
104
+ # re-enable it, the previously configured settings will be used.
105
+ noise_suppression_details: nil,
106
+ # Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
107
+ # if both are on the Telnyx network. If this is disabled, Telnyx will be able to
108
+ # use T38 on just one leg of the call depending on each leg's settings.
109
+ onnet_t38_passthrough_enabled: nil,
110
+ outbound: nil,
111
+ # The password to be used as part of the credentials. Must be 8 to 128 characters
112
+ # long.
113
+ password: nil,
114
+ rtcp_settings: nil,
115
+ # This feature enables inbound SIP URI calls to your Credential Auth Connection.
116
+ # If enabled for all (unrestricted) then anyone who calls the SIP URI
117
+ # <your-username>@telnyx.com will be connected to your Connection. You can also
118
+ # choose to allow only calls that are originated on any Connections under your
119
+ # account (internal).
120
+ sip_uri_calling_preference: nil,
121
+ # Tags associated with the connection.
122
+ tags: nil,
123
+ # The user name to be used as part of the credentials. Must be 4-32 characters
124
+ # long and alphanumeric values only (no spaces or special characters).
125
+ user_name: nil,
126
+ # Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -
127
+ # texml can only be set when the outbound object parameter call_parking_enabled is
128
+ # included and set to true.
129
+ webhook_api_version: nil,
130
+ # The failover URL where webhooks related to this connection will be sent if
131
+ # sending to the primary URL fails. Must include a scheme, such as 'https'.
132
+ webhook_event_failover_url: nil,
133
+ # The URL where webhooks related to this connection will be sent. Must include a
134
+ # scheme, such as 'https'.
135
+ webhook_event_url: nil,
136
+ # Specifies how many seconds to wait before timing out a webhook.
137
+ webhook_timeout_secs: nil,
138
+ request_options: {}
139
+ )
140
+ end
141
+
142
+ # Retrieves the details of an existing UAC connection.
143
+ sig do
144
+ params(
145
+ id: String,
146
+ request_options: Telnyx::RequestOptions::OrHash
147
+ ).returns(Telnyx::Models::UacConnectionRetrieveResponse)
148
+ end
149
+ def retrieve(
150
+ # Identifies the resource.
151
+ id,
152
+ request_options: {}
153
+ )
154
+ end
155
+
156
+ # Updates settings of an existing UAC connection.
157
+ sig do
158
+ params(
159
+ id: String,
160
+ active: T::Boolean,
161
+ anchorsite_override: Telnyx::AnchorsiteOverride::OrSymbol,
162
+ android_push_credential_id: T.nilable(String),
163
+ call_cost_in_webhooks: T::Boolean,
164
+ connection_name: String,
165
+ default_on_hold_comfort_noise_enabled: T::Boolean,
166
+ dtmf_type: Telnyx::DtmfType::OrSymbol,
167
+ encode_contact_header_enabled: T::Boolean,
168
+ encrypted_media: T.nilable(Telnyx::EncryptedMedia::OrSymbol),
169
+ external_uac_settings:
170
+ Telnyx::UacConnectionUpdateParams::ExternalUacSettings::OrHash,
171
+ inbound: Telnyx::UacConnectionUpdateParams::Inbound::OrHash,
172
+ internal_uac_settings:
173
+ Telnyx::UacConnectionUpdateParams::InternalUacSettings::OrHash,
174
+ ios_push_credential_id: T.nilable(String),
175
+ jitter_buffer: Telnyx::ConnectionJitterBuffer::OrHash,
176
+ noise_suppression:
177
+ Telnyx::UacConnectionUpdateParams::NoiseSuppression::OrSymbol,
178
+ noise_suppression_details:
179
+ Telnyx::ConnectionNoiseSuppressionDetails::OrHash,
180
+ onnet_t38_passthrough_enabled: T::Boolean,
181
+ outbound: Telnyx::UacConnectionUpdateParams::Outbound::OrHash,
182
+ password: String,
183
+ rtcp_settings: Telnyx::ConnectionRtcpSettings::OrHash,
184
+ sip_uri_calling_preference:
185
+ Telnyx::UacConnectionUpdateParams::SipUriCallingPreference::OrSymbol,
186
+ tags: T::Array[String],
187
+ user_name: String,
188
+ webhook_api_version:
189
+ Telnyx::UacConnectionUpdateParams::WebhookAPIVersion::OrSymbol,
190
+ webhook_event_failover_url: T.nilable(String),
191
+ webhook_event_url: String,
192
+ webhook_timeout_secs: T.nilable(Integer),
193
+ request_options: Telnyx::RequestOptions::OrHash
194
+ ).returns(Telnyx::Models::UacConnectionUpdateResponse)
195
+ end
196
+ def update(
197
+ # Identifies the resource.
198
+ id,
199
+ # Defaults to true
200
+ active: nil,
201
+ # `Latency` directs Telnyx to route media through the site with the lowest
202
+ # round-trip time to the user's connection. Telnyx calculates this time using ICMP
203
+ # ping messages. This can be disabled by specifying a site to handle all media.
204
+ anchorsite_override: nil,
205
+ # The uuid of the push credential for Android
206
+ android_push_credential_id: nil,
207
+ # Specifies if call cost webhooks should be sent for this connection.
208
+ call_cost_in_webhooks: nil,
209
+ # A user-assigned name to help manage the connection.
210
+ connection_name: nil,
211
+ # When enabled, Telnyx will generate comfort noise when you place the call on
212
+ # hold. If disabled, you will need to generate comfort noise or on hold music to
213
+ # avoid RTP timeout.
214
+ default_on_hold_comfort_noise_enabled: nil,
215
+ # Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
216
+ # digits sent to Telnyx will be accepted in all formats.
217
+ dtmf_type: nil,
218
+ # Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG
219
+ # scenarios.
220
+ encode_contact_header_enabled: nil,
221
+ # Enable use of SRTP for encryption. Cannot be set if the transport_portocol is
222
+ # TLS.
223
+ encrypted_media: nil,
224
+ # External SIP peer settings used by Telnyx when registering to your PBX and
225
+ # routing outbound calls.
226
+ external_uac_settings: nil,
227
+ # Inbound settings that can be supplied when creating or updating a UAC
228
+ # connection. The SIP subdomain fields returned in UAC connection responses are
229
+ # generated by Telnyx and are not accepted as request parameters.
230
+ inbound: nil,
231
+ # Internal Telnyx-side settings for a UAC connection.
232
+ internal_uac_settings: nil,
233
+ # The uuid of the push credential for Ios
234
+ ios_push_credential_id: nil,
235
+ # Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams
236
+ # of SIP Trunking calls. The feature is off unless enabled. You may define min and
237
+ # max values in msec for customized buffering behaviors. Larger values add latency
238
+ # but tolerate more jitter, while smaller values reduce latency but are more
239
+ # sensitive to jitter and reordering.
240
+ jitter_buffer: nil,
241
+ # Controls when noise suppression is applied to calls. When set to 'inbound',
242
+ # noise suppression is applied to incoming audio. When set to 'outbound', it's
243
+ # applied to outgoing audio. When set to 'both', it's applied in both directions.
244
+ # When set to 'disabled', noise suppression is turned off.
245
+ noise_suppression: nil,
246
+ # Configuration options for noise suppression. These settings are stored
247
+ # regardless of the noise_suppression value, but only take effect when
248
+ # noise_suppression is not 'disabled'. If you disable noise suppression and later
249
+ # re-enable it, the previously configured settings will be used.
250
+ noise_suppression_details: nil,
251
+ # Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
252
+ # if both are on the Telnyx network. If this is disabled, Telnyx will be able to
253
+ # use T38 on just one leg of the call depending on each leg's settings.
254
+ onnet_t38_passthrough_enabled: nil,
255
+ outbound: nil,
256
+ # The password to be used as part of the credentials. Must be 8 to 128 characters
257
+ # long.
258
+ password: nil,
259
+ rtcp_settings: nil,
260
+ # This feature enables inbound SIP URI calls to your Credential Auth Connection.
261
+ # If enabled for all (unrestricted) then anyone who calls the SIP URI
262
+ # <your-username>@telnyx.com will be connected to your Connection. You can also
263
+ # choose to allow only calls that are originated on any Connections under your
264
+ # account (internal).
265
+ sip_uri_calling_preference: nil,
266
+ # Tags associated with the connection.
267
+ tags: nil,
268
+ # The user name to be used as part of the credentials. Must be 4-32 characters
269
+ # long and alphanumeric values only (no spaces or special characters).
270
+ user_name: nil,
271
+ # Determines which webhook format will be used, Telnyx API v1 or v2.
272
+ webhook_api_version: nil,
273
+ # The failover URL where webhooks related to this connection will be sent if
274
+ # sending to the primary URL fails. Must include a scheme, such as 'https'.
275
+ webhook_event_failover_url: nil,
276
+ # The URL where webhooks related to this connection will be sent. Must include a
277
+ # scheme, such as 'https'.
278
+ webhook_event_url: nil,
279
+ # Specifies how many seconds to wait before timing out a webhook.
280
+ webhook_timeout_secs: nil,
281
+ request_options: {}
282
+ )
283
+ end
284
+
285
+ # Returns a list of your UAC connections. A UAC (User Agent Client) Connection
286
+ # registers Telnyx to your PBX — the opposite of a standard SIP trunk, where the
287
+ # PBX registers to Telnyx. Use UAC when your PBX doesn’t support outbound SIP
288
+ # registration or you need Telnyx to maintain the registration.
289
+ sig do
290
+ params(
291
+ filter: Telnyx::UacConnectionListParams::Filter::OrHash,
292
+ page_number: Integer,
293
+ page_size: Integer,
294
+ sort: Telnyx::UacConnectionListParams::Sort::OrSymbol,
295
+ request_options: Telnyx::RequestOptions::OrHash
296
+ ).returns(
297
+ Telnyx::Internal::DefaultFlatPagination[
298
+ Telnyx::Models::UacConnectionListResponse
299
+ ]
300
+ )
301
+ end
302
+ def list(
303
+ # Consolidated filter parameter (deepObject style). Originally:
304
+ # filter[connection_name], filter[fqdn], filter[outbound_voice_profile_id],
305
+ # filter[outbound.outbound_voice_profile_id]
306
+ filter: nil,
307
+ page_number: nil,
308
+ page_size: nil,
309
+ # Specifies the sort order for results. By default sorting direction is ascending.
310
+ # To have the results sorted in descending order add the <code> -</code>
311
+ # prefix.<br/><br/> That is: <ul>
312
+ #
313
+ # <li>
314
+ # <code>connection_name</code>: sorts the result by the
315
+ # <code>connection_name</code> field in ascending order.
316
+ # </li>
317
+ #
318
+ # <li>
319
+ # <code>-connection_name</code>: sorts the result by the
320
+ # <code>connection_name</code> field in descending order.
321
+ # </li>
322
+ # </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order.
323
+ sort: nil,
324
+ request_options: {}
325
+ )
326
+ end
327
+
328
+ # Deletes an existing UAC connection.
329
+ sig do
330
+ params(
331
+ id: String,
332
+ request_options: Telnyx::RequestOptions::OrHash
333
+ ).returns(Telnyx::Models::UacConnectionDeleteResponse)
334
+ end
335
+ def delete(
336
+ # Identifies the resource.
337
+ id,
338
+ request_options: {}
339
+ )
340
+ end
341
+
342
+ # @api private
343
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
344
+ def self.new(client:)
345
+ end
346
+ end
347
+ end
348
+ end
@@ -342,6 +342,8 @@ module Telnyx
342
342
 
343
343
  attr_reader pronunciation_dicts: Telnyx::Resources::PronunciationDicts
344
344
 
345
+ attr_reader uac_connections: Telnyx::Resources::UacConnections
346
+
345
347
  private def auth_headers: -> ::Hash[String, String]
346
348
 
347
349
  private def bearer_auth: -> ::Hash[String, String]
@@ -3,18 +3,127 @@ module Telnyx
3
3
  module AI
4
4
  module Assistants
5
5
  type canary_deploy =
6
- { versions: ::Array[Telnyx::AI::Assistants::VersionConfig] }
6
+ { rules: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
7
7
 
8
8
  class CanaryDeploy < Telnyx::Internal::Type::BaseModel
9
- attr_accessor versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
9
+ attr_reader rules: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule]?
10
+
11
+ def rules=: (
12
+ ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule]
13
+ ) -> ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule]
10
14
 
11
15
  def initialize: (
12
- versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
16
+ ?rules: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule]
13
17
  ) -> void
14
18
 
15
19
  def to_hash: -> {
16
- versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
20
+ rules: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule]
17
21
  }
22
+
23
+ type rule =
24
+ {
25
+ serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve,
26
+ match: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
27
+ }
28
+
29
+ class Rule < Telnyx::Internal::Type::BaseModel
30
+ attr_accessor serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve
31
+
32
+ attr_reader match: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]?
33
+
34
+ def match=: (
35
+ ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
36
+ ) -> ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
37
+
38
+ def initialize: (
39
+ serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve,
40
+ ?match: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ serve: Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve,
45
+ match: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match]
46
+ }
47
+
48
+ type serve =
49
+ {
50
+ rollout: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout],
51
+ version_id: String
52
+ }
53
+
54
+ class Serve < Telnyx::Internal::Type::BaseModel
55
+ attr_reader rollout: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout]?
56
+
57
+ def rollout=: (
58
+ ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout]
59
+ ) -> ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout]
60
+
61
+ attr_reader version_id: String?
62
+
63
+ def version_id=: (String) -> String
64
+
65
+ def initialize: (
66
+ ?rollout: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout],
67
+ ?version_id: String
68
+ ) -> void
69
+
70
+ def to_hash: -> {
71
+ rollout: ::Array[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout],
72
+ version_id: String
73
+ }
74
+
75
+ type rollout = { version_id: String, weight: Float }
76
+
77
+ class Rollout < Telnyx::Internal::Type::BaseModel
78
+ attr_accessor version_id: String
79
+
80
+ attr_accessor weight: Float
81
+
82
+ def initialize: (version_id: String, weight: Float) -> void
83
+
84
+ def to_hash: -> { version_id: String, weight: Float }
85
+ end
86
+ end
87
+
88
+ type match =
89
+ {
90
+ attribute: String,
91
+ operator: Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::operator,
92
+ values: ::Array[String]
93
+ }
94
+
95
+ class Match < Telnyx::Internal::Type::BaseModel
96
+ attr_accessor attribute: String
97
+
98
+ attr_accessor operator: Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::operator
99
+
100
+ attr_accessor values: ::Array[String]
101
+
102
+ def initialize: (
103
+ attribute: String,
104
+ operator: Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::operator,
105
+ values: ::Array[String]
106
+ ) -> void
107
+
108
+ def to_hash: -> {
109
+ attribute: String,
110
+ operator: Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::operator,
111
+ values: ::Array[String]
112
+ }
113
+
114
+ type operator = :in | :not_in | :starts_with
115
+
116
+ module Operator
117
+ extend Telnyx::Internal::Type::Enum
118
+
119
+ IN: :in
120
+ NOT_IN: :not_in
121
+ STARTS_WITH: :starts_with
122
+
123
+ def self?.values: -> ::Array[Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::operator]
124
+ end
125
+ end
126
+ end
18
127
  end
19
128
  end
20
129
  end
@@ -6,8 +6,8 @@ module Telnyx
6
6
  {
7
7
  assistant_id: String,
8
8
  created_at: Time,
9
- updated_at: Time,
10
- versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
9
+ rules: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule],
10
+ updated_at: Time
11
11
  }
12
12
 
13
13
  class CanaryDeployResponse < Telnyx::Internal::Type::BaseModel
@@ -15,23 +15,128 @@ module Telnyx
15
15
 
16
16
  attr_accessor created_at: Time
17
17
 
18
- attr_accessor updated_at: Time
18
+ attr_accessor rules: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule]
19
19
 
20
- attr_accessor versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
20
+ attr_accessor updated_at: Time
21
21
 
22
22
  def initialize: (
23
23
  assistant_id: String,
24
24
  created_at: Time,
25
- updated_at: Time,
26
- versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
25
+ rules: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule],
26
+ updated_at: Time
27
27
  ) -> void
28
28
 
29
29
  def to_hash: -> {
30
30
  assistant_id: String,
31
31
  created_at: Time,
32
- updated_at: Time,
33
- versions: ::Array[Telnyx::AI::Assistants::VersionConfig]
32
+ rules: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule],
33
+ updated_at: Time
34
34
  }
35
+
36
+ type rule =
37
+ {
38
+ serve: Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve,
39
+ match: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]
40
+ }
41
+
42
+ class Rule < Telnyx::Internal::Type::BaseModel
43
+ attr_accessor serve: Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve
44
+
45
+ attr_reader match: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]?
46
+
47
+ def match=: (
48
+ ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]
49
+ ) -> ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]
50
+
51
+ def initialize: (
52
+ serve: Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve,
53
+ ?match: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]
54
+ ) -> void
55
+
56
+ def to_hash: -> {
57
+ serve: Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve,
58
+ match: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match]
59
+ }
60
+
61
+ type serve =
62
+ {
63
+ rollout: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout],
64
+ version_id: String
65
+ }
66
+
67
+ class Serve < Telnyx::Internal::Type::BaseModel
68
+ attr_reader rollout: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout]?
69
+
70
+ def rollout=: (
71
+ ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout]
72
+ ) -> ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout]
73
+
74
+ attr_reader version_id: String?
75
+
76
+ def version_id=: (String) -> String
77
+
78
+ def initialize: (
79
+ ?rollout: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout],
80
+ ?version_id: String
81
+ ) -> void
82
+
83
+ def to_hash: -> {
84
+ rollout: ::Array[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout],
85
+ version_id: String
86
+ }
87
+
88
+ type rollout = { version_id: String, weight: Float }
89
+
90
+ class Rollout < Telnyx::Internal::Type::BaseModel
91
+ attr_accessor version_id: String
92
+
93
+ attr_accessor weight: Float
94
+
95
+ def initialize: (version_id: String, weight: Float) -> void
96
+
97
+ def to_hash: -> { version_id: String, weight: Float }
98
+ end
99
+ end
100
+
101
+ type match =
102
+ {
103
+ attribute: String,
104
+ operator: Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::operator,
105
+ values: ::Array[String]
106
+ }
107
+
108
+ class Match < Telnyx::Internal::Type::BaseModel
109
+ attr_accessor attribute: String
110
+
111
+ attr_accessor operator: Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::operator
112
+
113
+ attr_accessor values: ::Array[String]
114
+
115
+ def initialize: (
116
+ attribute: String,
117
+ operator: Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::operator,
118
+ values: ::Array[String]
119
+ ) -> void
120
+
121
+ def to_hash: -> {
122
+ attribute: String,
123
+ operator: Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::operator,
124
+ values: ::Array[String]
125
+ }
126
+
127
+ type operator = :in | :not_in | :starts_with
128
+
129
+ module Operator
130
+ extend Telnyx::Internal::Type::Enum
131
+
132
+ IN: :in
133
+ NOT_IN: :not_in
134
+ STARTS_WITH: :starts_with
135
+
136
+ def self?.values: -> ::Array[Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::operator]
137
+ end
138
+ end
139
+ end
35
140
  end
36
141
  end
37
142
  end