volcano-sdk 0.34.0 → 0.35.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/README.md +53 -4
- data/lib/volcano/client.rb +1 -1
- data/lib/volcano/durable.rb +9 -4
- data/lib/volcano/durable_approval_models.rb +1 -1
- data/lib/volcano/durable_message_arguments.rb +49 -0
- data/lib/volcano/durable_message_backlog.rb +38 -0
- data/lib/volcano/durable_message_catch_ups.rb +112 -0
- data/lib/volcano/durable_message_models.rb +62 -0
- data/lib/volcano/durable_message_responses.rb +107 -0
- data/lib/volcano/durable_message_session.rb +72 -0
- data/lib/volcano/durable_message_stream.rb +176 -0
- data/lib/volcano/durable_messages.rb +217 -0
- data/lib/volcano/durable_models.rb +32 -3
- data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb +222 -0
- data/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb +725 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb +254 -0
- data/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +20 -20
- data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +57 -0
- data/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb +373 -0
- data/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +46 -4
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +110 -2
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb +45 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb +385 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +16 -53
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +14 -4
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb +396 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +25 -2
- data/lib/volcano/generated/lib/volcano-generated/models/issue.rb +493 -0
- data/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +10 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb +206 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb +12 -50
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +25 -2
- data/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +11 -12
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +51 -13
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +4 -30
- data/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +79 -1
- data/lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb +325 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated.rb +34 -0
- data/lib/volcano/generated_transport.rb +1 -0
- data/lib/volcano/generated_transport_durable_messages.rb +57 -0
- data/lib/volcano/realtime/channel_callbacks.rb +5 -1
- data/lib/volcano/realtime/channel_lifecycle.rb +4 -1
- data/lib/volcano/realtime/durable_channel.rb +47 -0
- data/lib/volcano/realtime/lifecycle.rb +37 -1
- data/lib/volcano/realtime/protocol.rb +7 -3
- data/lib/volcano/realtime/protocol_dispatch.rb +1 -1
- data/lib/volcano/realtime/protocol_io.rb +7 -4
- data/lib/volcano/realtime/protocol_lifecycle.rb +7 -0
- data/lib/volcano/realtime/protocol_recovery.rb +23 -12
- data/lib/volcano/realtime.rb +42 -8
- data/lib/volcano/redaction.rb +1 -1
- data/lib/volcano/version.rb +1 -1
- data/lib/volcano.rb +8 -0
- data/sig/core_facades.rbs +15 -0
- data/sig/durable_message_records.rbs +68 -0
- data/sig/durable_records.rbs +17 -9
- metadata +46 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@volcano.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Volcano::Generated
|
|
16
|
+
class AutofixApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Delete the API key
|
|
23
|
+
# Deletes the project's stored API key and returns the settings. Autofix on the key's provider runs on that key, so it turns off; on another provider it stays as it is. Deleting when no key is stored succeeds. Turning autofix off or switching providers never deletes the key, and neither does applying a project configuration. This works where autofix is not available, for a project that saved settings. Project access tokens are refused.
|
|
24
|
+
# @param id [String] Project ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AutofixSettings]
|
|
27
|
+
def delete_autofix_api_key(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = delete_autofix_api_key_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Delete the API key
|
|
33
|
+
# Deletes the project's stored API key and returns the settings. Autofix on the key's provider runs on that key, so it turns off; on another provider it stays as it is. Deleting when no key is stored succeeds. Turning autofix off or switching providers never deletes the key, and neither does applying a project configuration. This works where autofix is not available, for a project that saved settings. Project access tokens are refused.
|
|
34
|
+
# @param id [String] Project ID
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers
|
|
37
|
+
def delete_autofix_api_key_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AutofixApi.delete_autofix_api_key ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.delete_autofix_api_key"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/projects/{id}/autofix/api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'AutofixSettings'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"AutofixApi.delete_autofix_api_key",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: AutofixApi#delete_autofix_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Get autofix settings
|
|
86
|
+
# Returns whether Volcano diagnoses the project's issues with AI, how far a run may go, and which model it uses. A project that never saved settings returns the defaults, with autofix off. Your API key is never returned. `api_key_configured`, `api_key_provider`, and `api_key_last4` show whether one is set and which provider it belongs to. Where autofix is not available, saved settings stay readable. A project that never saved any answers `404` with code `feature_unavailable`.
|
|
87
|
+
# @param id [String] Project ID
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [AutofixSettings]
|
|
90
|
+
def get_autofix_settings(id, opts = {})
|
|
91
|
+
data, _status_code, _headers = get_autofix_settings_with_http_info(id, opts)
|
|
92
|
+
data
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Get autofix settings
|
|
96
|
+
# Returns whether Volcano diagnoses the project's issues with AI, how far a run may go, and which model it uses. A project that never saved settings returns the defaults, with autofix off. Your API key is never returned. `api_key_configured`, `api_key_provider`, and `api_key_last4` show whether one is set and which provider it belongs to. Where autofix is not available, saved settings stay readable. A project that never saved any answers `404` with code `feature_unavailable`.
|
|
97
|
+
# @param id [String] Project ID
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers
|
|
100
|
+
def get_autofix_settings_with_http_info(id, opts = {})
|
|
101
|
+
if @api_client.config.debugging
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: AutofixApi.get_autofix_settings ...'
|
|
103
|
+
end
|
|
104
|
+
# verify the required parameter 'id' is set
|
|
105
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.get_autofix_settings"
|
|
107
|
+
end
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/projects/{id}/autofix'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
110
|
+
|
|
111
|
+
# query parameters
|
|
112
|
+
query_params = opts[:query_params] || {}
|
|
113
|
+
|
|
114
|
+
# header parameters
|
|
115
|
+
header_params = opts[:header_params] || {}
|
|
116
|
+
# HTTP header 'Accept' (if needed)
|
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
118
|
+
|
|
119
|
+
# form parameters
|
|
120
|
+
form_params = opts[:form_params] || {}
|
|
121
|
+
|
|
122
|
+
# http body (model)
|
|
123
|
+
post_body = opts[:debug_body]
|
|
124
|
+
|
|
125
|
+
# return_type
|
|
126
|
+
return_type = opts[:debug_return_type] || 'AutofixSettings'
|
|
127
|
+
|
|
128
|
+
# auth_names
|
|
129
|
+
auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken']
|
|
130
|
+
|
|
131
|
+
new_options = opts.merge(
|
|
132
|
+
:operation => :"AutofixApi.get_autofix_settings",
|
|
133
|
+
:header_params => header_params,
|
|
134
|
+
:query_params => query_params,
|
|
135
|
+
:form_params => form_params,
|
|
136
|
+
:body => post_body,
|
|
137
|
+
:auth_names => auth_names,
|
|
138
|
+
:return_type => return_type
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
142
|
+
if @api_client.config.debugging
|
|
143
|
+
@api_client.config.logger.debug "API called: AutofixApi#get_autofix_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
+
end
|
|
145
|
+
return data, status_code, headers
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Replace autofix settings
|
|
149
|
+
# Replaces the project's autofix settings. Omitted fields take their defaults, except three: an omitted `provider` or `model` keeps its saved value, and an omitted `api_key` keeps the stored key. So `{\"enabled\": false}` turns autofix off and keeps the key. Project access tokens are refused. Autofix opens pull requests in the project's repository, so a person turns it on with a platform token or in the dashboard. Turning autofix on needs a plan that includes it. Settings that are already on stay stored after a downgrade, and saving them again is not refused, but no run starts until the plan includes autofix again. Other saves need no plan. Provider `anthropic` runs on your own API key. A key belongs to the provider it was saved with, and turning autofix on with a provider that runs on your own key needs one for it. Turning autofix off or switching providers keeps the stored key; only `DELETE /projects/{id}/autofix/api-key` removes it. Turning autofix on with provider `volcano` needs the `autofix.managed_models` capability; without it the request answers `400` with code `feature_unavailable`. Where autofix is not available, a project with saved settings can still change them with `enabled: false`. Turning autofix on answers `404` with code `feature_unavailable`.
|
|
150
|
+
# @param id [String] Project ID
|
|
151
|
+
# @param update_autofix_settings_request [UpdateAutofixSettingsRequest]
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @return [AutofixSettings]
|
|
154
|
+
def update_autofix_settings(id, update_autofix_settings_request, opts = {})
|
|
155
|
+
data, _status_code, _headers = update_autofix_settings_with_http_info(id, update_autofix_settings_request, opts)
|
|
156
|
+
data
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Replace autofix settings
|
|
160
|
+
# Replaces the project's autofix settings. Omitted fields take their defaults, except three: an omitted `provider` or `model` keeps its saved value, and an omitted `api_key` keeps the stored key. So `{\"enabled\": false}` turns autofix off and keeps the key. Project access tokens are refused. Autofix opens pull requests in the project's repository, so a person turns it on with a platform token or in the dashboard. Turning autofix on needs a plan that includes it. Settings that are already on stay stored after a downgrade, and saving them again is not refused, but no run starts until the plan includes autofix again. Other saves need no plan. Provider `anthropic` runs on your own API key. A key belongs to the provider it was saved with, and turning autofix on with a provider that runs on your own key needs one for it. Turning autofix off or switching providers keeps the stored key; only `DELETE /projects/{id}/autofix/api-key` removes it. Turning autofix on with provider `volcano` needs the `autofix.managed_models` capability; without it the request answers `400` with code `feature_unavailable`. Where autofix is not available, a project with saved settings can still change them with `enabled: false`. Turning autofix on answers `404` with code `feature_unavailable`.
|
|
161
|
+
# @param id [String] Project ID
|
|
162
|
+
# @param update_autofix_settings_request [UpdateAutofixSettingsRequest]
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers
|
|
165
|
+
def update_autofix_settings_with_http_info(id, update_autofix_settings_request, opts = {})
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: AutofixApi.update_autofix_settings ...'
|
|
168
|
+
end
|
|
169
|
+
# verify the required parameter 'id' is set
|
|
170
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
171
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.update_autofix_settings"
|
|
172
|
+
end
|
|
173
|
+
# verify the required parameter 'update_autofix_settings_request' is set
|
|
174
|
+
if @api_client.config.client_side_validation && update_autofix_settings_request.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'update_autofix_settings_request' when calling AutofixApi.update_autofix_settings"
|
|
176
|
+
end
|
|
177
|
+
# resource path
|
|
178
|
+
local_var_path = '/projects/{id}/autofix'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
179
|
+
|
|
180
|
+
# query parameters
|
|
181
|
+
query_params = opts[:query_params] || {}
|
|
182
|
+
|
|
183
|
+
# header parameters
|
|
184
|
+
header_params = opts[:header_params] || {}
|
|
185
|
+
# HTTP header 'Accept' (if needed)
|
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
187
|
+
# HTTP header 'Content-Type'
|
|
188
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
189
|
+
if !content_type.nil?
|
|
190
|
+
header_params['Content-Type'] = content_type
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_autofix_settings_request)
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'AutofixSettings'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :"AutofixApi.update_autofix_settings",
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug "API called: AutofixApi#update_autofix_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
+
end
|
|
219
|
+
return data, status_code, headers
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|