telnyx 5.99.0 → 5.101.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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -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/ai/chat_create_completion_params.rb +36 -1
  8. data/lib/telnyx/models/ai/openai/chat_create_completion_params.rb +458 -0
  9. data/lib/telnyx/models/ai/openai/chat_create_completion_response.rb +12 -0
  10. data/lib/telnyx/models/ai/openai_list_models_params.rb +16 -0
  11. data/lib/telnyx/models/ai/openai_list_models_response.rb +52 -0
  12. data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
  13. data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
  14. data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
  15. data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
  16. data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
  17. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  18. data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
  20. data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
  21. data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
  22. data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
  23. data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
  24. data/lib/telnyx/models.rb +12 -0
  25. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
  26. data/lib/telnyx/resources/ai/chat.rb +9 -2
  27. data/lib/telnyx/resources/ai/openai/chat.rb +96 -0
  28. data/lib/telnyx/resources/ai/openai.rb +26 -0
  29. data/lib/telnyx/resources/ai.rb +7 -5
  30. data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
  31. data/lib/telnyx/resources/uac_connections.rb +256 -0
  32. data/lib/telnyx/version.rb +1 -1
  33. data/lib/telnyx.rb +19 -1
  34. data/rbi/telnyx/client.rbi +4 -0
  35. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
  36. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
  37. data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +58 -0
  38. data/rbi/telnyx/models/ai/openai/chat_create_completion_params.rbi +963 -0
  39. data/rbi/telnyx/models/ai/openai/chat_create_completion_response.rbi +15 -0
  40. data/rbi/telnyx/models/ai/openai_list_models_params.rbi +29 -0
  41. data/rbi/telnyx/models/ai/openai_list_models_response.rbi +96 -0
  42. data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
  43. data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
  44. data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
  45. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
  46. data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
  47. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  48. data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
  49. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
  50. data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
  51. data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
  52. data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
  53. data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
  54. data/rbi/telnyx/models.rbi +12 -0
  55. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
  56. data/rbi/telnyx/resources/ai/chat.rbi +11 -1
  57. data/rbi/telnyx/resources/ai/openai/chat.rbi +147 -0
  58. data/rbi/telnyx/resources/ai/openai.rbi +16 -0
  59. data/rbi/telnyx/resources/ai.rbi +5 -5
  60. data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
  61. data/rbi/telnyx/resources/uac_connections.rbi +348 -0
  62. data/sig/telnyx/client.rbs +2 -0
  63. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
  64. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
  65. data/sig/telnyx/models/ai/chat_create_completion_params.rbs +26 -0
  66. data/sig/telnyx/models/ai/openai/chat_create_completion_params.rbs +434 -0
  67. data/sig/telnyx/models/ai/openai/chat_create_completion_response.rbs +11 -0
  68. data/sig/telnyx/models/ai/openai_list_models_params.rbs +17 -0
  69. data/sig/telnyx/models/ai/openai_list_models_response.rbs +58 -0
  70. data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
  71. data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
  72. data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
  73. data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
  74. data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
  75. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  76. data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
  77. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
  78. data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
  79. data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
  80. data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
  81. data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
  82. data/sig/telnyx/models.rbs +12 -0
  83. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  84. data/sig/telnyx/resources/ai/chat.rbs +2 -0
  85. data/sig/telnyx/resources/ai/openai/chat.rbs +41 -0
  86. data/sig/telnyx/resources/ai/openai.rbs +6 -0
  87. data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
  88. data/sig/telnyx/resources/uac_connections.rbs +90 -0
  89. metadata +59 -5
  90. data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
  91. data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
  92. data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
@@ -0,0 +1,256 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Resources
5
+ # UAC connection operations
6
+ class UacConnections
7
+ # UAC connection operations
8
+ # @return [Telnyx::Resources::UacConnections::Actions]
9
+ attr_reader :actions
10
+
11
+ # Some parameter documentations has been truncated, see
12
+ # {Telnyx::Models::UacConnectionCreateParams} for more details.
13
+ #
14
+ # Creates a UAC connection. A UAC (User Agent Client) Connection registers Telnyx
15
+ # to your PBX — the opposite of a standard SIP trunk, where the PBX registers to
16
+ # Telnyx. Use UAC when your PBX doesn’t support outbound SIP registration or you
17
+ # need Telnyx to maintain the registration.
18
+ #
19
+ # @overload create(connection_name:, active: nil, anchorsite_override: nil, android_push_credential_id: nil, call_cost_in_webhooks: nil, default_on_hold_comfort_noise_enabled: nil, dtmf_type: nil, encode_contact_header_enabled: nil, encrypted_media: nil, external_uac_settings: nil, inbound: nil, internal_uac_settings: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, password: nil, rtcp_settings: nil, sip_uri_calling_preference: nil, tags: nil, user_name: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {})
20
+ #
21
+ # @param connection_name [String] A user-assigned name to help manage the connection.
22
+ #
23
+ # @param active [Boolean] Defaults to true
24
+ #
25
+ # @param anchorsite_override [Symbol, Telnyx::Models::AnchorsiteOverride] `Latency` directs Telnyx to route media through the site with the lowest round-t
26
+ #
27
+ # @param android_push_credential_id [String, nil] The uuid of the push credential for Android
28
+ #
29
+ # @param call_cost_in_webhooks [Boolean] Specifies if call cost webhooks should be sent for this connection.
30
+ #
31
+ # @param default_on_hold_comfort_noise_enabled [Boolean] When enabled, Telnyx will generate comfort noise when you place the call on hold
32
+ #
33
+ # @param dtmf_type [Symbol, Telnyx::Models::DtmfType] Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
34
+ #
35
+ # @param encode_contact_header_enabled [Boolean] Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scen
36
+ #
37
+ # @param encrypted_media [Symbol, Telnyx::Models::EncryptedMedia, nil] Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TL
38
+ #
39
+ # @param external_uac_settings [Telnyx::Models::UacConnectionCreateParams::ExternalUacSettings] External SIP peer settings used by Telnyx when registering to your PBX and routi
40
+ #
41
+ # @param inbound [Telnyx::Models::UacConnectionCreateParams::Inbound] Inbound settings that can be supplied when creating or updating a UAC connection
42
+ #
43
+ # @param internal_uac_settings [Telnyx::Models::UacConnectionCreateParams::InternalUacSettings] Internal Telnyx-side settings for a UAC connection.
44
+ #
45
+ # @param ios_push_credential_id [String, nil] The uuid of the push credential for Ios
46
+ #
47
+ # @param jitter_buffer [Telnyx::Models::ConnectionJitterBuffer] Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams o
48
+ #
49
+ # @param noise_suppression [Symbol, Telnyx::Models::UacConnectionCreateParams::NoiseSuppression] Controls when noise suppression is applied to calls. When set to 'inbound', nois
50
+ #
51
+ # @param noise_suppression_details [Telnyx::Models::ConnectionNoiseSuppressionDetails] Configuration options for noise suppression. These settings are stored regardles
52
+ #
53
+ # @param onnet_t38_passthrough_enabled [Boolean] Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
54
+ #
55
+ # @param outbound [Telnyx::Models::UacConnectionCreateParams::Outbound]
56
+ #
57
+ # @param password [String] The password to be used as part of the credentials. Must be 8 to 128 characters
58
+ #
59
+ # @param rtcp_settings [Telnyx::Models::ConnectionRtcpSettings]
60
+ #
61
+ # @param sip_uri_calling_preference [Symbol, Telnyx::Models::UacConnectionCreateParams::SipUriCallingPreference] This feature enables inbound SIP URI calls to your Credential Auth Connection. I
62
+ #
63
+ # @param tags [Array<String>] Tags associated with the connection.
64
+ #
65
+ # @param user_name [String] The user name to be used as part of the credentials. Must be 4-32 characters lon
66
+ #
67
+ # @param webhook_api_version [Symbol, Telnyx::Models::UacConnectionCreateParams::WebhookAPIVersion] Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -
68
+ #
69
+ # @param webhook_event_failover_url [String, nil] The failover URL where webhooks related to this connection will be sent if sendi
70
+ #
71
+ # @param webhook_event_url [String] The URL where webhooks related to this connection will be sent. Must include a s
72
+ #
73
+ # @param webhook_timeout_secs [Integer, nil] Specifies how many seconds to wait before timing out a webhook.
74
+ #
75
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
76
+ #
77
+ # @return [Telnyx::Models::UacConnectionCreateResponse]
78
+ #
79
+ # @see Telnyx::Models::UacConnectionCreateParams
80
+ def create(params)
81
+ parsed, options = Telnyx::UacConnectionCreateParams.dump_request(params)
82
+ @client.request(
83
+ method: :post,
84
+ path: "uac_connections",
85
+ body: parsed,
86
+ model: Telnyx::Models::UacConnectionCreateResponse,
87
+ options: options
88
+ )
89
+ end
90
+
91
+ # Retrieves the details of an existing UAC connection.
92
+ #
93
+ # @overload retrieve(id, request_options: {})
94
+ #
95
+ # @param id [String] Identifies the resource.
96
+ #
97
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
98
+ #
99
+ # @return [Telnyx::Models::UacConnectionRetrieveResponse]
100
+ #
101
+ # @see Telnyx::Models::UacConnectionRetrieveParams
102
+ def retrieve(id, params = {})
103
+ @client.request(
104
+ method: :get,
105
+ path: ["uac_connections/%1$s", id],
106
+ model: Telnyx::Models::UacConnectionRetrieveResponse,
107
+ options: params[:request_options]
108
+ )
109
+ end
110
+
111
+ # Some parameter documentations has been truncated, see
112
+ # {Telnyx::Models::UacConnectionUpdateParams} for more details.
113
+ #
114
+ # Updates settings of an existing UAC connection.
115
+ #
116
+ # @overload update(id, active: nil, anchorsite_override: nil, android_push_credential_id: nil, call_cost_in_webhooks: nil, connection_name: nil, default_on_hold_comfort_noise_enabled: nil, dtmf_type: nil, encode_contact_header_enabled: nil, encrypted_media: nil, external_uac_settings: nil, inbound: nil, internal_uac_settings: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, password: nil, rtcp_settings: nil, sip_uri_calling_preference: nil, tags: nil, user_name: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {})
117
+ #
118
+ # @param id [String] Identifies the resource.
119
+ #
120
+ # @param active [Boolean] Defaults to true
121
+ #
122
+ # @param anchorsite_override [Symbol, Telnyx::Models::AnchorsiteOverride] `Latency` directs Telnyx to route media through the site with the lowest round-t
123
+ #
124
+ # @param android_push_credential_id [String, nil] The uuid of the push credential for Android
125
+ #
126
+ # @param call_cost_in_webhooks [Boolean] Specifies if call cost webhooks should be sent for this connection.
127
+ #
128
+ # @param connection_name [String] A user-assigned name to help manage the connection.
129
+ #
130
+ # @param default_on_hold_comfort_noise_enabled [Boolean] When enabled, Telnyx will generate comfort noise when you place the call on hold
131
+ #
132
+ # @param dtmf_type [Symbol, Telnyx::Models::DtmfType] Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
133
+ #
134
+ # @param encode_contact_header_enabled [Boolean] Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scen
135
+ #
136
+ # @param encrypted_media [Symbol, Telnyx::Models::EncryptedMedia, nil] Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TL
137
+ #
138
+ # @param external_uac_settings [Telnyx::Models::UacConnectionUpdateParams::ExternalUacSettings] External SIP peer settings used by Telnyx when registering to your PBX and routi
139
+ #
140
+ # @param inbound [Telnyx::Models::UacConnectionUpdateParams::Inbound] Inbound settings that can be supplied when creating or updating a UAC connection
141
+ #
142
+ # @param internal_uac_settings [Telnyx::Models::UacConnectionUpdateParams::InternalUacSettings] Internal Telnyx-side settings for a UAC connection.
143
+ #
144
+ # @param ios_push_credential_id [String, nil] The uuid of the push credential for Ios
145
+ #
146
+ # @param jitter_buffer [Telnyx::Models::ConnectionJitterBuffer] Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams o
147
+ #
148
+ # @param noise_suppression [Symbol, Telnyx::Models::UacConnectionUpdateParams::NoiseSuppression] Controls when noise suppression is applied to calls. When set to 'inbound', nois
149
+ #
150
+ # @param noise_suppression_details [Telnyx::Models::ConnectionNoiseSuppressionDetails] Configuration options for noise suppression. These settings are stored regardles
151
+ #
152
+ # @param onnet_t38_passthrough_enabled [Boolean] Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
153
+ #
154
+ # @param outbound [Telnyx::Models::UacConnectionUpdateParams::Outbound]
155
+ #
156
+ # @param password [String] The password to be used as part of the credentials. Must be 8 to 128 characters
157
+ #
158
+ # @param rtcp_settings [Telnyx::Models::ConnectionRtcpSettings]
159
+ #
160
+ # @param sip_uri_calling_preference [Symbol, Telnyx::Models::UacConnectionUpdateParams::SipUriCallingPreference] This feature enables inbound SIP URI calls to your Credential Auth Connection. I
161
+ #
162
+ # @param tags [Array<String>] Tags associated with the connection.
163
+ #
164
+ # @param user_name [String] The user name to be used as part of the credentials. Must be 4-32 characters lon
165
+ #
166
+ # @param webhook_api_version [Symbol, Telnyx::Models::UacConnectionUpdateParams::WebhookAPIVersion] Determines which webhook format will be used, Telnyx API v1 or v2.
167
+ #
168
+ # @param webhook_event_failover_url [String, nil] The failover URL where webhooks related to this connection will be sent if sendi
169
+ #
170
+ # @param webhook_event_url [String] The URL where webhooks related to this connection will be sent. Must include a s
171
+ #
172
+ # @param webhook_timeout_secs [Integer, nil] Specifies how many seconds to wait before timing out a webhook.
173
+ #
174
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
175
+ #
176
+ # @return [Telnyx::Models::UacConnectionUpdateResponse]
177
+ #
178
+ # @see Telnyx::Models::UacConnectionUpdateParams
179
+ def update(id, params = {})
180
+ parsed, options = Telnyx::UacConnectionUpdateParams.dump_request(params)
181
+ @client.request(
182
+ method: :patch,
183
+ path: ["uac_connections/%1$s", id],
184
+ body: parsed,
185
+ model: Telnyx::Models::UacConnectionUpdateResponse,
186
+ options: options
187
+ )
188
+ end
189
+
190
+ # Some parameter documentations has been truncated, see
191
+ # {Telnyx::Models::UacConnectionListParams} for more details.
192
+ #
193
+ # Returns a list of your UAC connections. A UAC (User Agent Client) Connection
194
+ # registers Telnyx to your PBX — the opposite of a standard SIP trunk, where the
195
+ # PBX registers to Telnyx. Use UAC when your PBX doesn’t support outbound SIP
196
+ # registration or you need Telnyx to maintain the registration.
197
+ #
198
+ # @overload list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {})
199
+ #
200
+ # @param filter [Telnyx::Models::UacConnectionListParams::Filter] Consolidated filter parameter (deepObject style). Originally:
201
+ # filter[connection\_
202
+ #
203
+ # @param page_number [Integer]
204
+ #
205
+ # @param page_size [Integer]
206
+ #
207
+ # @param sort [Symbol, Telnyx::Models::UacConnectionListParams::Sort] Specifies the sort order for results. By default sorting direction is ascending.
208
+ #
209
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
210
+ #
211
+ # @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::UacConnectionListResponse>]
212
+ #
213
+ # @see Telnyx::Models::UacConnectionListParams
214
+ def list(params = {})
215
+ parsed, options = Telnyx::UacConnectionListParams.dump_request(params)
216
+ query = Telnyx::Internal::Util.encode_query_params(parsed)
217
+ @client.request(
218
+ method: :get,
219
+ path: "uac_connections",
220
+ query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
221
+ page: Telnyx::Internal::DefaultFlatPagination,
222
+ model: Telnyx::Models::UacConnectionListResponse,
223
+ options: options
224
+ )
225
+ end
226
+
227
+ # Deletes an existing UAC connection.
228
+ #
229
+ # @overload delete(id, request_options: {})
230
+ #
231
+ # @param id [String] Identifies the resource.
232
+ #
233
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
234
+ #
235
+ # @return [Telnyx::Models::UacConnectionDeleteResponse]
236
+ #
237
+ # @see Telnyx::Models::UacConnectionDeleteParams
238
+ def delete(id, params = {})
239
+ @client.request(
240
+ method: :delete,
241
+ path: ["uac_connections/%1$s", id],
242
+ model: Telnyx::Models::UacConnectionDeleteResponse,
243
+ options: params[:request_options]
244
+ )
245
+ end
246
+
247
+ # @api private
248
+ #
249
+ # @param client [Telnyx::Client]
250
+ def initialize(client:)
251
+ @client = client
252
+ @actions = Telnyx::Resources::UacConnections::Actions.new(client: client)
253
+ end
254
+ end
255
+ end
256
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.99.0"
4
+ VERSION = "5.101.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -185,7 +185,6 @@ require_relative "telnyx/models/ai/assistants/tool_remove_params"
185
185
  require_relative "telnyx/models/ai/assistants/tool_remove_response"
186
186
  require_relative "telnyx/models/ai/assistants/tool_test_params"
187
187
  require_relative "telnyx/models/ai/assistants/tool_test_response"
188
- require_relative "telnyx/models/ai/assistants/version_config"
189
188
  require_relative "telnyx/models/ai/assistants/version_delete_params"
190
189
  require_relative "telnyx/models/ai/assistants/version_list_params"
191
190
  require_relative "telnyx/models/ai/assistants/version_promote_params"
@@ -371,10 +370,14 @@ require_relative "telnyx/models/ai/mission_update_mission_params"
371
370
  require_relative "telnyx/models/ai/mission_update_mission_response"
372
371
  require_relative "telnyx/models/ai/observability"
373
372
  require_relative "telnyx/models/ai/observability_req"
373
+ require_relative "telnyx/models/ai/openai/chat_create_completion_params"
374
+ require_relative "telnyx/models/ai/openai/chat_create_completion_response"
374
375
  require_relative "telnyx/models/ai/openai/embedding_create_embeddings_params"
375
376
  require_relative "telnyx/models/ai/openai/embedding_create_embeddings_response"
376
377
  require_relative "telnyx/models/ai/openai/embedding_list_embedding_models_params"
377
378
  require_relative "telnyx/models/ai/openai/embedding_list_embedding_models_response"
379
+ require_relative "telnyx/models/ai/openai_list_models_params"
380
+ require_relative "telnyx/models/ai/openai_list_models_response"
378
381
  require_relative "telnyx/models/ai/post_conversation_settings"
379
382
  require_relative "telnyx/models/ai/post_conversation_settings_req"
380
383
  require_relative "telnyx/models/ai/privacy_settings"
@@ -2201,6 +2204,18 @@ require_relative "telnyx/models/traffic_type"
2201
2204
  require_relative "telnyx/models/transcription"
2202
2205
  require_relative "telnyx/models/transcription_webhook_event"
2203
2206
  require_relative "telnyx/models/transport_protocol"
2207
+ require_relative "telnyx/models/uac_connection_create_params"
2208
+ require_relative "telnyx/models/uac_connection_create_response"
2209
+ require_relative "telnyx/models/uac_connection_delete_params"
2210
+ require_relative "telnyx/models/uac_connection_delete_response"
2211
+ require_relative "telnyx/models/uac_connection_list_params"
2212
+ require_relative "telnyx/models/uac_connection_list_response"
2213
+ require_relative "telnyx/models/uac_connection_retrieve_params"
2214
+ require_relative "telnyx/models/uac_connection_retrieve_response"
2215
+ require_relative "telnyx/models/uac_connections/action_check_registration_status_params"
2216
+ require_relative "telnyx/models/uac_connections/action_check_registration_status_response"
2217
+ require_relative "telnyx/models/uac_connection_update_params"
2218
+ require_relative "telnyx/models/uac_connection_update_response"
2204
2219
  require_relative "telnyx/models/unsafe_unwrap_webhook_event"
2205
2220
  require_relative "telnyx/models/unwrap_webhook_event"
2206
2221
  require_relative "telnyx/models/update_regulatory_requirement"
@@ -2438,6 +2453,7 @@ require_relative "telnyx/resources/ai/missions/runs/plan"
2438
2453
  require_relative "telnyx/resources/ai/missions/runs/telnyx_agents"
2439
2454
  require_relative "telnyx/resources/ai/missions/tools"
2440
2455
  require_relative "telnyx/resources/ai/openai"
2456
+ require_relative "telnyx/resources/ai/openai/chat"
2441
2457
  require_relative "telnyx/resources/ai/openai/embeddings"
2442
2458
  require_relative "telnyx/resources/ai/tools"
2443
2459
  require_relative "telnyx/resources/alphanumeric_sender_ids"
@@ -2679,6 +2695,8 @@ require_relative "telnyx/resources/texml/accounts/transcriptions/json"
2679
2695
  require_relative "telnyx/resources/texml_applications"
2680
2696
  require_relative "telnyx/resources/text_to_speech"
2681
2697
  require_relative "telnyx/resources/traffic_policy_profiles"
2698
+ require_relative "telnyx/resources/uac_connections"
2699
+ require_relative "telnyx/resources/uac_connections/actions"
2682
2700
  require_relative "telnyx/resources/usage_reports"
2683
2701
  require_relative "telnyx/resources/user_addresses"
2684
2702
  require_relative "telnyx/resources/user_tags"
@@ -654,6 +654,10 @@ module Telnyx
654
654
  sig { returns(Telnyx::Resources::PronunciationDicts) }
655
655
  attr_reader :pronunciation_dicts
656
656
 
657
+ # UAC connection operations
658
+ sig { returns(Telnyx::Resources::UacConnections) }
659
+ attr_reader :uac_connections
660
+
657
661
  # @api private
658
662
  sig { override.returns(T::Hash[String, String]) }
659
663
  private def auth_headers
@@ -13,29 +13,322 @@ module Telnyx
13
13
  )
14
14
  end
15
15
 
16
- # List of version configurations
17
- sig { returns(T::Array[Telnyx::AI::Assistants::VersionConfig]) }
18
- attr_accessor :versions
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
- # Request model for creating or updating canary deploys.
31
+ # Create/update request body. Accepts:
32
+ #
33
+ # - `rules` — canonical ordered list of routing rules
21
34
  sig do
22
35
  params(
23
- versions: T::Array[Telnyx::AI::Assistants::VersionConfig::OrHash]
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
- { versions: T::Array[Telnyx::AI::Assistants::VersionConfig] }
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