daytona_api_client 0.192.0 → 1.0.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/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -40
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +346 -1901
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +78 -17
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +386 -43
- data/lib/daytona_api_client/models/create_sandbox.rb +117 -56
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/create_user.rb +77 -15
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -64
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -162
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +215 -155
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +104 -137
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- data/lib/daytona_api_client/models/{create_secret.rb → sandbox_info.rb} +112 -53
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/search_files_response.rb +74 -3
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +115 -106
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -168
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -63
- data/project.json +13 -38
- metadata +13 -72
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -220
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/admin_api.rb +0 -1479
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api/secret_api.rb +0 -350
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -372
- data/lib/daytona_api_client/models/create_region.rb +0 -198
- data/lib/daytona_api_client/models/create_region_response.rb +0 -209
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -177
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -41
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -54
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -178
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
- data/lib/daytona_api_client/models/region_quota.rb +0 -437
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/secret.rb +0 -312
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_job_status.rb +0 -207
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -299
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Daytona
|
|
3
|
-
|
|
4
|
-
#Daytona AI platform API Docs
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0
|
|
7
|
-
Contact: support@daytona.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'cgi'
|
|
14
|
-
|
|
15
|
-
module DaytonaApiClient
|
|
16
|
-
class SecretApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Create secret
|
|
23
|
-
# @param create_secret [CreateSecret]
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
26
|
-
# @return [Secret]
|
|
27
|
-
def create_secret(create_secret, opts = {})
|
|
28
|
-
data, _status_code, _headers = create_secret_with_http_info(create_secret, opts)
|
|
29
|
-
data
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Create secret
|
|
33
|
-
# @param create_secret [CreateSecret]
|
|
34
|
-
# @param [Hash] opts the optional parameters
|
|
35
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
36
|
-
# @return [Array<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
37
|
-
def create_secret_with_http_info(create_secret, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: SecretApi.create_secret ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'create_secret' is set
|
|
42
|
-
if @api_client.config.client_side_validation && create_secret.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'create_secret' when calling SecretApi.create_secret"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/secret'
|
|
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
|
-
# HTTP header 'Content-Type'
|
|
56
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
-
if !content_type.nil?
|
|
58
|
-
header_params['Content-Type'] = content_type
|
|
59
|
-
end
|
|
60
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
61
|
-
|
|
62
|
-
# form parameters
|
|
63
|
-
form_params = opts[:form_params] || {}
|
|
64
|
-
|
|
65
|
-
# http body (model)
|
|
66
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_secret)
|
|
67
|
-
|
|
68
|
-
# return_type
|
|
69
|
-
return_type = opts[:debug_return_type] || 'Secret'
|
|
70
|
-
|
|
71
|
-
# auth_names
|
|
72
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
73
|
-
|
|
74
|
-
new_options = opts.merge(
|
|
75
|
-
:operation => :"SecretApi.create_secret",
|
|
76
|
-
:header_params => header_params,
|
|
77
|
-
:query_params => query_params,
|
|
78
|
-
:form_params => form_params,
|
|
79
|
-
:body => post_body,
|
|
80
|
-
:auth_names => auth_names,
|
|
81
|
-
:return_type => return_type
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
85
|
-
if @api_client.config.debugging
|
|
86
|
-
@api_client.config.logger.debug "API called: SecretApi#create_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
-
end
|
|
88
|
-
return data, status_code, headers
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Delete secret
|
|
92
|
-
# @param secret_id [String] ID of the secret
|
|
93
|
-
# @param [Hash] opts the optional parameters
|
|
94
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
95
|
-
# @return [nil]
|
|
96
|
-
def delete_secret(secret_id, opts = {})
|
|
97
|
-
delete_secret_with_http_info(secret_id, opts)
|
|
98
|
-
nil
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Delete secret
|
|
102
|
-
# @param secret_id [String] ID of the secret
|
|
103
|
-
# @param [Hash] opts the optional parameters
|
|
104
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
105
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
106
|
-
def delete_secret_with_http_info(secret_id, opts = {})
|
|
107
|
-
if @api_client.config.debugging
|
|
108
|
-
@api_client.config.logger.debug 'Calling API: SecretApi.delete_secret ...'
|
|
109
|
-
end
|
|
110
|
-
# verify the required parameter 'secret_id' is set
|
|
111
|
-
if @api_client.config.client_side_validation && secret_id.nil?
|
|
112
|
-
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.delete_secret"
|
|
113
|
-
end
|
|
114
|
-
# resource path
|
|
115
|
-
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
116
|
-
|
|
117
|
-
# query parameters
|
|
118
|
-
query_params = opts[:query_params] || {}
|
|
119
|
-
|
|
120
|
-
# header parameters
|
|
121
|
-
header_params = opts[:header_params] || {}
|
|
122
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
123
|
-
|
|
124
|
-
# form parameters
|
|
125
|
-
form_params = opts[:form_params] || {}
|
|
126
|
-
|
|
127
|
-
# http body (model)
|
|
128
|
-
post_body = opts[:debug_body]
|
|
129
|
-
|
|
130
|
-
# return_type
|
|
131
|
-
return_type = opts[:debug_return_type]
|
|
132
|
-
|
|
133
|
-
# auth_names
|
|
134
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
135
|
-
|
|
136
|
-
new_options = opts.merge(
|
|
137
|
-
:operation => :"SecretApi.delete_secret",
|
|
138
|
-
:header_params => header_params,
|
|
139
|
-
:query_params => query_params,
|
|
140
|
-
:form_params => form_params,
|
|
141
|
-
:body => post_body,
|
|
142
|
-
:auth_names => auth_names,
|
|
143
|
-
:return_type => return_type
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
-
if @api_client.config.debugging
|
|
148
|
-
@api_client.config.logger.debug "API called: SecretApi#delete_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
-
end
|
|
150
|
-
return data, status_code, headers
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Get secret
|
|
154
|
-
# @param secret_id [String] ID of the secret
|
|
155
|
-
# @param [Hash] opts the optional parameters
|
|
156
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
157
|
-
# @return [Secret]
|
|
158
|
-
def get_secret(secret_id, opts = {})
|
|
159
|
-
data, _status_code, _headers = get_secret_with_http_info(secret_id, opts)
|
|
160
|
-
data
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Get secret
|
|
164
|
-
# @param secret_id [String] ID of the secret
|
|
165
|
-
# @param [Hash] opts the optional parameters
|
|
166
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
167
|
-
# @return [Array<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
168
|
-
def get_secret_with_http_info(secret_id, opts = {})
|
|
169
|
-
if @api_client.config.debugging
|
|
170
|
-
@api_client.config.logger.debug 'Calling API: SecretApi.get_secret ...'
|
|
171
|
-
end
|
|
172
|
-
# verify the required parameter 'secret_id' is set
|
|
173
|
-
if @api_client.config.client_side_validation && secret_id.nil?
|
|
174
|
-
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.get_secret"
|
|
175
|
-
end
|
|
176
|
-
# resource path
|
|
177
|
-
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
178
|
-
|
|
179
|
-
# query parameters
|
|
180
|
-
query_params = opts[:query_params] || {}
|
|
181
|
-
|
|
182
|
-
# header parameters
|
|
183
|
-
header_params = opts[:header_params] || {}
|
|
184
|
-
# HTTP header 'Accept' (if needed)
|
|
185
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
187
|
-
|
|
188
|
-
# form parameters
|
|
189
|
-
form_params = opts[:form_params] || {}
|
|
190
|
-
|
|
191
|
-
# http body (model)
|
|
192
|
-
post_body = opts[:debug_body]
|
|
193
|
-
|
|
194
|
-
# return_type
|
|
195
|
-
return_type = opts[:debug_return_type] || 'Secret'
|
|
196
|
-
|
|
197
|
-
# auth_names
|
|
198
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
199
|
-
|
|
200
|
-
new_options = opts.merge(
|
|
201
|
-
:operation => :"SecretApi.get_secret",
|
|
202
|
-
:header_params => header_params,
|
|
203
|
-
:query_params => query_params,
|
|
204
|
-
:form_params => form_params,
|
|
205
|
-
:body => post_body,
|
|
206
|
-
:auth_names => auth_names,
|
|
207
|
-
:return_type => return_type
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
-
if @api_client.config.debugging
|
|
212
|
-
@api_client.config.logger.debug "API called: SecretApi#get_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
-
end
|
|
214
|
-
return data, status_code, headers
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# List secrets
|
|
218
|
-
# @param [Hash] opts the optional parameters
|
|
219
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
220
|
-
# @return [Array<Secret>]
|
|
221
|
-
def list_secrets(opts = {})
|
|
222
|
-
data, _status_code, _headers = list_secrets_with_http_info(opts)
|
|
223
|
-
data
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# List secrets
|
|
227
|
-
# @param [Hash] opts the optional parameters
|
|
228
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
229
|
-
# @return [Array<(Array<Secret>, Integer, Hash)>] Array<Secret> data, response status code and response headers
|
|
230
|
-
def list_secrets_with_http_info(opts = {})
|
|
231
|
-
if @api_client.config.debugging
|
|
232
|
-
@api_client.config.logger.debug 'Calling API: SecretApi.list_secrets ...'
|
|
233
|
-
end
|
|
234
|
-
# resource path
|
|
235
|
-
local_var_path = '/secret'
|
|
236
|
-
|
|
237
|
-
# query parameters
|
|
238
|
-
query_params = opts[:query_params] || {}
|
|
239
|
-
|
|
240
|
-
# header parameters
|
|
241
|
-
header_params = opts[:header_params] || {}
|
|
242
|
-
# HTTP header 'Accept' (if needed)
|
|
243
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
244
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
245
|
-
|
|
246
|
-
# form parameters
|
|
247
|
-
form_params = opts[:form_params] || {}
|
|
248
|
-
|
|
249
|
-
# http body (model)
|
|
250
|
-
post_body = opts[:debug_body]
|
|
251
|
-
|
|
252
|
-
# return_type
|
|
253
|
-
return_type = opts[:debug_return_type] || 'Array<Secret>'
|
|
254
|
-
|
|
255
|
-
# auth_names
|
|
256
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
257
|
-
|
|
258
|
-
new_options = opts.merge(
|
|
259
|
-
:operation => :"SecretApi.list_secrets",
|
|
260
|
-
:header_params => header_params,
|
|
261
|
-
:query_params => query_params,
|
|
262
|
-
:form_params => form_params,
|
|
263
|
-
:body => post_body,
|
|
264
|
-
:auth_names => auth_names,
|
|
265
|
-
:return_type => return_type
|
|
266
|
-
)
|
|
267
|
-
|
|
268
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
269
|
-
if @api_client.config.debugging
|
|
270
|
-
@api_client.config.logger.debug "API called: SecretApi#list_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
-
end
|
|
272
|
-
return data, status_code, headers
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
# Update secret
|
|
276
|
-
# @param secret_id [String] ID of the secret
|
|
277
|
-
# @param update_secret [UpdateSecret]
|
|
278
|
-
# @param [Hash] opts the optional parameters
|
|
279
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
280
|
-
# @return [Secret]
|
|
281
|
-
def update_secret(secret_id, update_secret, opts = {})
|
|
282
|
-
data, _status_code, _headers = update_secret_with_http_info(secret_id, update_secret, opts)
|
|
283
|
-
data
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
# Update secret
|
|
287
|
-
# @param secret_id [String] ID of the secret
|
|
288
|
-
# @param update_secret [UpdateSecret]
|
|
289
|
-
# @param [Hash] opts the optional parameters
|
|
290
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
291
|
-
# @return [Array<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
292
|
-
def update_secret_with_http_info(secret_id, update_secret, opts = {})
|
|
293
|
-
if @api_client.config.debugging
|
|
294
|
-
@api_client.config.logger.debug 'Calling API: SecretApi.update_secret ...'
|
|
295
|
-
end
|
|
296
|
-
# verify the required parameter 'secret_id' is set
|
|
297
|
-
if @api_client.config.client_side_validation && secret_id.nil?
|
|
298
|
-
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.update_secret"
|
|
299
|
-
end
|
|
300
|
-
# verify the required parameter 'update_secret' is set
|
|
301
|
-
if @api_client.config.client_side_validation && update_secret.nil?
|
|
302
|
-
fail ArgumentError, "Missing the required parameter 'update_secret' when calling SecretApi.update_secret"
|
|
303
|
-
end
|
|
304
|
-
# resource path
|
|
305
|
-
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
306
|
-
|
|
307
|
-
# query parameters
|
|
308
|
-
query_params = opts[:query_params] || {}
|
|
309
|
-
|
|
310
|
-
# header parameters
|
|
311
|
-
header_params = opts[:header_params] || {}
|
|
312
|
-
# HTTP header 'Accept' (if needed)
|
|
313
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
314
|
-
# HTTP header 'Content-Type'
|
|
315
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
316
|
-
if !content_type.nil?
|
|
317
|
-
header_params['Content-Type'] = content_type
|
|
318
|
-
end
|
|
319
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
320
|
-
|
|
321
|
-
# form parameters
|
|
322
|
-
form_params = opts[:form_params] || {}
|
|
323
|
-
|
|
324
|
-
# http body (model)
|
|
325
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_secret)
|
|
326
|
-
|
|
327
|
-
# return_type
|
|
328
|
-
return_type = opts[:debug_return_type] || 'Secret'
|
|
329
|
-
|
|
330
|
-
# auth_names
|
|
331
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
332
|
-
|
|
333
|
-
new_options = opts.merge(
|
|
334
|
-
:operation => :"SecretApi.update_secret",
|
|
335
|
-
:header_params => header_params,
|
|
336
|
-
:query_params => query_params,
|
|
337
|
-
:form_params => form_params,
|
|
338
|
-
:body => post_body,
|
|
339
|
-
:auth_names => auth_names,
|
|
340
|
-
:return_type => return_type
|
|
341
|
-
)
|
|
342
|
-
|
|
343
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
344
|
-
if @api_client.config.debugging
|
|
345
|
-
@api_client.config.logger.debug "API called: SecretApi#update_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
-
end
|
|
347
|
-
return data, status_code, headers
|
|
348
|
-
end
|
|
349
|
-
end
|
|
350
|
-
end
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Daytona
|
|
3
|
-
|
|
4
|
-
#Daytona AI platform API Docs
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0
|
|
7
|
-
Contact: support@daytona.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
module DaytonaApiClient
|
|
14
|
-
class ApiModelBase
|
|
15
|
-
# Deserializes the data based on type
|
|
16
|
-
# @param string type Data type
|
|
17
|
-
# @param string value Value to be deserialized
|
|
18
|
-
# @return [Object] Deserialized data
|
|
19
|
-
def self._deserialize(type, value)
|
|
20
|
-
case type.to_sym
|
|
21
|
-
when :Time
|
|
22
|
-
Time.parse(value)
|
|
23
|
-
when :Date
|
|
24
|
-
Date.parse(value)
|
|
25
|
-
when :String
|
|
26
|
-
value.to_s
|
|
27
|
-
when :Integer
|
|
28
|
-
value.to_i
|
|
29
|
-
when :Float
|
|
30
|
-
value.to_f
|
|
31
|
-
when :Boolean
|
|
32
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
33
|
-
true
|
|
34
|
-
else
|
|
35
|
-
false
|
|
36
|
-
end
|
|
37
|
-
when :Object
|
|
38
|
-
# generic object (usually a Hash), return directly
|
|
39
|
-
value
|
|
40
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
41
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
42
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
43
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
44
|
-
k_type = Regexp.last_match[:k_type]
|
|
45
|
-
v_type = Regexp.last_match[:v_type]
|
|
46
|
-
{}.tap do |hash|
|
|
47
|
-
value.each do |k, v|
|
|
48
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
else # model
|
|
52
|
-
# models (e.g. Pet) or oneOf
|
|
53
|
-
klass = DaytonaApiClient.const_get(type)
|
|
54
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Returns the string representation of the object
|
|
59
|
-
# @return [String] String presentation of the object
|
|
60
|
-
def to_s
|
|
61
|
-
to_hash.to_s
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
65
|
-
# @return [Hash] Returns the object in the form of hash
|
|
66
|
-
def to_body
|
|
67
|
-
to_hash
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# Outputs non-array value in the form of hash
|
|
71
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
72
|
-
# @param [Object] value Any valid value
|
|
73
|
-
# @return [Hash] Returns the value in the form of hash
|
|
74
|
-
def _to_hash(value)
|
|
75
|
-
if value.is_a?(Array)
|
|
76
|
-
value.compact.map { |v| _to_hash(v) }
|
|
77
|
-
elsif value.is_a?(Hash)
|
|
78
|
-
{}.tap do |hash|
|
|
79
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
80
|
-
end
|
|
81
|
-
elsif value.respond_to? :to_hash
|
|
82
|
-
value.to_hash
|
|
83
|
-
else
|
|
84
|
-
value
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|