daytona_api_client 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 +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +240 -0
- data/lib/daytona_api_client/api/config_api.rb +77 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
- data/lib/daytona_api_client/api/health_api.rb +75 -0
- data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
- data/lib/daytona_api_client/api/organizations_api.rb +1695 -0
- data/lib/daytona_api_client/api/preview_api.rb +209 -0
- data/lib/daytona_api_client/api/runners_api.rb +321 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1573 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +553 -0
- data/lib/daytona_api_client/api/volumes_api.rb +342 -0
- data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +393 -0
- data/lib/daytona_api_client/api_error.rb +58 -0
- data/lib/daytona_api_client/configuration.rb +306 -0
- data/lib/daytona_api_client/models/account_provider.rb +261 -0
- data/lib/daytona_api_client/models/announcement.rb +246 -0
- data/lib/daytona_api_client/models/api_key_list.rb +384 -0
- data/lib/daytona_api_client/models/api_key_response.rb +344 -0
- data/lib/daytona_api_client/models/audit_log.rb +422 -0
- data/lib/daytona_api_client/models/build_info.rb +285 -0
- data/lib/daytona_api_client/models/command.rb +273 -0
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/computer_use_status_response.rb +260 -0
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +288 -0
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +248 -0
- data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
- data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
- data/lib/daytona_api_client/models/create_organization.rb +236 -0
- data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/create_runner.rb +545 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +429 -0
- data/lib/daytona_api_client/models/create_session_request.rb +236 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
- data/lib/daytona_api_client/models/create_user.rb +331 -0
- data/lib/daytona_api_client/models/create_volume.rb +235 -0
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +531 -0
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- data/lib/daytona_api_client/models/docker_registry.rb +449 -0
- data/lib/daytona_api_client/models/download_files.rb +238 -0
- data/lib/daytona_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/file_status.rb +313 -0
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
- data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +290 -0
- data/lib/daytona_api_client/models/organization.rb +695 -0
- data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
- data/lib/daytona_api_client/models/organization_role.rb +412 -0
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- data/lib/daytona_api_client/models/organization_usage_overview.rb +469 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +315 -0
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
- data/lib/daytona_api_client/models/port_preview_url.rb +273 -0
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +263 -0
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/project_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +236 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_api_client/models/runner.rb +780 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
- data/lib/daytona_api_client/models/runner_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox.rb +755 -0
- data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
- data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
- data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
- data/lib/daytona_api_client/models/sandbox_volume.rb +263 -0
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/session_execute_request.rb +256 -0
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
- data/lib/daytona_api_client/models/snapshot_state.rb +49 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +283 -0
- data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
- data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
- data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +260 -0
- data/lib/daytona_api_client/models/user.rb +346 -0
- data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/user_public_key.rb +263 -0
- data/lib/daytona_api_client/models/volume_dto.rb +417 -0
- data/lib/daytona_api_client/models/volume_state.rb +45 -0
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/workspace.rb +834 -0
- data/lib/daytona_api_client/version.rb +15 -0
- data/lib/daytona_api_client.rb +194 -0
- data/project.json +37 -0
- metadata +246 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e3ee10e82eea35019a29ff41af2ba07fec0f69ae719b7dfcee1d58dc7048540e
|
|
4
|
+
data.tar.gz: f013eb05273d6dc7db9a7061add8c2f06a42f86d2d631f2e4a8549651e8f2f1e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 23245385616a577135b9b9f4207cfc4ae5b6ee4af39cdf750ebfa9f60b35a97a130c816747d799dca6eca5fc3b441272ccf69df0d77a0b2d31db5fc9dacdb5be
|
|
7
|
+
data.tar.gz: 6dc8b51f3e79601f20962d2205c483418ca5a82951a75981a9d7b0d0c58265324e3c4836dc77d57911e9566396c18cf00a6459823747516e685ec0c9bfd22daa
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
daytona_api_client (1.0.0)
|
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
ast (2.4.3)
|
|
11
|
+
byebug (12.0.0)
|
|
12
|
+
coderay (1.1.3)
|
|
13
|
+
diff-lcs (1.6.2)
|
|
14
|
+
ethon (0.15.0)
|
|
15
|
+
ffi (>= 1.15.0)
|
|
16
|
+
ffi (1.17.2)
|
|
17
|
+
ffi (1.17.2-aarch64-linux-gnu)
|
|
18
|
+
ffi (1.17.2-aarch64-linux-musl)
|
|
19
|
+
ffi (1.17.2-arm-linux-gnu)
|
|
20
|
+
ffi (1.17.2-arm-linux-musl)
|
|
21
|
+
ffi (1.17.2-arm64-darwin)
|
|
22
|
+
ffi (1.17.2-x86-linux-gnu)
|
|
23
|
+
ffi (1.17.2-x86-linux-musl)
|
|
24
|
+
ffi (1.17.2-x86_64-darwin)
|
|
25
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
|
26
|
+
ffi (1.17.2-x86_64-linux-musl)
|
|
27
|
+
json (2.16.0)
|
|
28
|
+
language_server-protocol (3.17.0.5)
|
|
29
|
+
lint_roller (1.1.0)
|
|
30
|
+
method_source (1.1.0)
|
|
31
|
+
parallel (1.27.0)
|
|
32
|
+
parser (3.3.10.0)
|
|
33
|
+
ast (~> 2.4.1)
|
|
34
|
+
racc
|
|
35
|
+
prism (1.6.0)
|
|
36
|
+
pry (0.15.2)
|
|
37
|
+
coderay (~> 1.1)
|
|
38
|
+
method_source (~> 1.0)
|
|
39
|
+
pry-byebug (3.11.0)
|
|
40
|
+
byebug (~> 12.0)
|
|
41
|
+
pry (>= 0.13, < 0.16)
|
|
42
|
+
racc (1.8.1)
|
|
43
|
+
rainbow (3.1.1)
|
|
44
|
+
rake (13.0.6)
|
|
45
|
+
regexp_parser (2.11.3)
|
|
46
|
+
rspec (3.13.2)
|
|
47
|
+
rspec-core (~> 3.13.0)
|
|
48
|
+
rspec-expectations (~> 3.13.0)
|
|
49
|
+
rspec-mocks (~> 3.13.0)
|
|
50
|
+
rspec-core (3.13.6)
|
|
51
|
+
rspec-support (~> 3.13.0)
|
|
52
|
+
rspec-expectations (3.13.5)
|
|
53
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
54
|
+
rspec-support (~> 3.13.0)
|
|
55
|
+
rspec-mocks (3.13.7)
|
|
56
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
57
|
+
rspec-support (~> 3.13.0)
|
|
58
|
+
rspec-support (3.13.6)
|
|
59
|
+
rubocop (1.81.7)
|
|
60
|
+
json (~> 2.3)
|
|
61
|
+
language_server-protocol (~> 3.17.0.2)
|
|
62
|
+
lint_roller (~> 1.1.0)
|
|
63
|
+
parallel (~> 1.10)
|
|
64
|
+
parser (>= 3.3.0.2)
|
|
65
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
66
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
67
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
68
|
+
ruby-progressbar (~> 1.7)
|
|
69
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
70
|
+
rubocop-ast (1.48.0)
|
|
71
|
+
parser (>= 3.3.7.2)
|
|
72
|
+
prism (~> 1.4)
|
|
73
|
+
ruby-progressbar (1.13.0)
|
|
74
|
+
typhoeus (1.5.0)
|
|
75
|
+
ethon (>= 0.9.0, < 0.16.0)
|
|
76
|
+
unicode-display_width (3.2.0)
|
|
77
|
+
unicode-emoji (~> 4.1)
|
|
78
|
+
unicode-emoji (4.1.0)
|
|
79
|
+
|
|
80
|
+
PLATFORMS
|
|
81
|
+
aarch64-linux-gnu
|
|
82
|
+
aarch64-linux-musl
|
|
83
|
+
arm-linux-gnu
|
|
84
|
+
arm-linux-musl
|
|
85
|
+
arm64-darwin
|
|
86
|
+
ruby
|
|
87
|
+
x86-linux-gnu
|
|
88
|
+
x86-linux-musl
|
|
89
|
+
x86_64-darwin
|
|
90
|
+
x86_64-linux-gnu
|
|
91
|
+
x86_64-linux-musl
|
|
92
|
+
|
|
93
|
+
DEPENDENCIES
|
|
94
|
+
daytona_api_client!
|
|
95
|
+
pry-byebug
|
|
96
|
+
rake (~> 13.0)
|
|
97
|
+
rspec (~> 3.6, >= 3.6.0)
|
|
98
|
+
rubocop (~> 1.21)
|
|
99
|
+
|
|
100
|
+
BUNDLED WITH
|
|
101
|
+
2.6.9
|
data/Rakefile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#Daytona
|
|
5
|
+
|
|
6
|
+
#Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
Generator version: 7.12.0
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "daytona_api_client/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "daytona_api_client"
|
|
20
|
+
s.version = DaytonaApiClient::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["daytonaio"]
|
|
23
|
+
s.email = ["support@daytona.io"]
|
|
24
|
+
s.homepage = "https://github.com/daytonaio/daytona"
|
|
25
|
+
s.summary = "Daytona Ruby Gem"
|
|
26
|
+
s.description = "Daytona API Client"
|
|
27
|
+
s.license = "Unlicense"
|
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
|
29
|
+
s.metadata = {}
|
|
30
|
+
|
|
31
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
32
|
+
|
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
|
+
|
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
36
|
+
s.test_files = Dir.exist?('spec') ? `find spec/*`.split("\n") : []
|
|
37
|
+
s.executables = []
|
|
38
|
+
s.require_paths = ["lib"]
|
|
39
|
+
end
|
|
@@ -0,0 +1,401 @@
|
|
|
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.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaApiClient
|
|
16
|
+
class ApiKeysApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create API key
|
|
23
|
+
# @param create_api_key [CreateApiKey]
|
|
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 [ApiKeyResponse]
|
|
27
|
+
def create_api_key(create_api_key, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_api_key_with_http_info(create_api_key, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create API key
|
|
33
|
+
# @param create_api_key [CreateApiKey]
|
|
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<(ApiKeyResponse, Integer, Hash)>] ApiKeyResponse data, response status code and response headers
|
|
37
|
+
def create_api_key_with_http_info(create_api_key, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.create_api_key ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_api_key' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_api_key.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_api_key' when calling ApiKeysApi.create_api_key"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api-keys'
|
|
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_api_key)
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'ApiKeyResponse'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"ApiKeysApi.create_api_key",
|
|
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: ApiKeysApi#create_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Delete API key
|
|
92
|
+
# @param name [String]
|
|
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_api_key(name, opts = {})
|
|
97
|
+
delete_api_key_with_http_info(name, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete API key
|
|
102
|
+
# @param name [String]
|
|
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_api_key_with_http_info(name, opts = {})
|
|
107
|
+
if @api_client.config.debugging
|
|
108
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.delete_api_key ...'
|
|
109
|
+
end
|
|
110
|
+
# verify the required parameter 'name' is set
|
|
111
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
112
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ApiKeysApi.delete_api_key"
|
|
113
|
+
end
|
|
114
|
+
# resource path
|
|
115
|
+
local_var_path = '/api-keys/{name}'.sub('{' + 'name' + '}', CGI.escape(name.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 => :"ApiKeysApi.delete_api_key",
|
|
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: ApiKeysApi#delete_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Delete API key for user
|
|
154
|
+
# @param user_id [String]
|
|
155
|
+
# @param name [String]
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
158
|
+
# @return [nil]
|
|
159
|
+
def delete_api_key_for_user(user_id, name, opts = {})
|
|
160
|
+
delete_api_key_for_user_with_http_info(user_id, name, opts)
|
|
161
|
+
nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Delete API key for user
|
|
165
|
+
# @param user_id [String]
|
|
166
|
+
# @param name [String]
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
169
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
170
|
+
def delete_api_key_for_user_with_http_info(user_id, name, opts = {})
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.delete_api_key_for_user ...'
|
|
173
|
+
end
|
|
174
|
+
# verify the required parameter 'user_id' is set
|
|
175
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
176
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling ApiKeysApi.delete_api_key_for_user"
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'name' is set
|
|
179
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ApiKeysApi.delete_api_key_for_user"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/api-keys/{userId}/{name}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
191
|
+
|
|
192
|
+
# form parameters
|
|
193
|
+
form_params = opts[:form_params] || {}
|
|
194
|
+
|
|
195
|
+
# http body (model)
|
|
196
|
+
post_body = opts[:debug_body]
|
|
197
|
+
|
|
198
|
+
# return_type
|
|
199
|
+
return_type = opts[:debug_return_type]
|
|
200
|
+
|
|
201
|
+
# auth_names
|
|
202
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
203
|
+
|
|
204
|
+
new_options = opts.merge(
|
|
205
|
+
:operation => :"ApiKeysApi.delete_api_key_for_user",
|
|
206
|
+
:header_params => header_params,
|
|
207
|
+
:query_params => query_params,
|
|
208
|
+
:form_params => form_params,
|
|
209
|
+
:body => post_body,
|
|
210
|
+
:auth_names => auth_names,
|
|
211
|
+
:return_type => return_type
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug "API called: ApiKeysApi#delete_api_key_for_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
217
|
+
end
|
|
218
|
+
return data, status_code, headers
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Get API key
|
|
222
|
+
# @param name [String]
|
|
223
|
+
# @param [Hash] opts the optional parameters
|
|
224
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
225
|
+
# @return [ApiKeyList]
|
|
226
|
+
def get_api_key(name, opts = {})
|
|
227
|
+
data, _status_code, _headers = get_api_key_with_http_info(name, opts)
|
|
228
|
+
data
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Get API key
|
|
232
|
+
# @param name [String]
|
|
233
|
+
# @param [Hash] opts the optional parameters
|
|
234
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
235
|
+
# @return [Array<(ApiKeyList, Integer, Hash)>] ApiKeyList data, response status code and response headers
|
|
236
|
+
def get_api_key_with_http_info(name, opts = {})
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.get_api_key ...'
|
|
239
|
+
end
|
|
240
|
+
# verify the required parameter 'name' is set
|
|
241
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
242
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ApiKeysApi.get_api_key"
|
|
243
|
+
end
|
|
244
|
+
# resource path
|
|
245
|
+
local_var_path = '/api-keys/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
246
|
+
|
|
247
|
+
# query parameters
|
|
248
|
+
query_params = opts[:query_params] || {}
|
|
249
|
+
|
|
250
|
+
# header parameters
|
|
251
|
+
header_params = opts[:header_params] || {}
|
|
252
|
+
# HTTP header 'Accept' (if needed)
|
|
253
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
254
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = opts[:form_params] || {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = opts[:debug_body]
|
|
261
|
+
|
|
262
|
+
# return_type
|
|
263
|
+
return_type = opts[:debug_return_type] || 'ApiKeyList'
|
|
264
|
+
|
|
265
|
+
# auth_names
|
|
266
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
267
|
+
|
|
268
|
+
new_options = opts.merge(
|
|
269
|
+
:operation => :"ApiKeysApi.get_api_key",
|
|
270
|
+
:header_params => header_params,
|
|
271
|
+
:query_params => query_params,
|
|
272
|
+
:form_params => form_params,
|
|
273
|
+
:body => post_body,
|
|
274
|
+
:auth_names => auth_names,
|
|
275
|
+
:return_type => return_type
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug "API called: ApiKeysApi#get_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
|
+
end
|
|
282
|
+
return data, status_code, headers
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Get current API key's details
|
|
286
|
+
# @param [Hash] opts the optional parameters
|
|
287
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
288
|
+
# @return [ApiKeyList]
|
|
289
|
+
def get_current_api_key(opts = {})
|
|
290
|
+
data, _status_code, _headers = get_current_api_key_with_http_info(opts)
|
|
291
|
+
data
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Get current API key's details
|
|
295
|
+
# @param [Hash] opts the optional parameters
|
|
296
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
297
|
+
# @return [Array<(ApiKeyList, Integer, Hash)>] ApiKeyList data, response status code and response headers
|
|
298
|
+
def get_current_api_key_with_http_info(opts = {})
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.get_current_api_key ...'
|
|
301
|
+
end
|
|
302
|
+
# resource path
|
|
303
|
+
local_var_path = '/api-keys/current'
|
|
304
|
+
|
|
305
|
+
# query parameters
|
|
306
|
+
query_params = opts[:query_params] || {}
|
|
307
|
+
|
|
308
|
+
# header parameters
|
|
309
|
+
header_params = opts[:header_params] || {}
|
|
310
|
+
# HTTP header 'Accept' (if needed)
|
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
312
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
313
|
+
|
|
314
|
+
# form parameters
|
|
315
|
+
form_params = opts[:form_params] || {}
|
|
316
|
+
|
|
317
|
+
# http body (model)
|
|
318
|
+
post_body = opts[:debug_body]
|
|
319
|
+
|
|
320
|
+
# return_type
|
|
321
|
+
return_type = opts[:debug_return_type] || 'ApiKeyList'
|
|
322
|
+
|
|
323
|
+
# auth_names
|
|
324
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
325
|
+
|
|
326
|
+
new_options = opts.merge(
|
|
327
|
+
:operation => :"ApiKeysApi.get_current_api_key",
|
|
328
|
+
:header_params => header_params,
|
|
329
|
+
:query_params => query_params,
|
|
330
|
+
:form_params => form_params,
|
|
331
|
+
:body => post_body,
|
|
332
|
+
:auth_names => auth_names,
|
|
333
|
+
:return_type => return_type
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug "API called: ApiKeysApi#get_current_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
339
|
+
end
|
|
340
|
+
return data, status_code, headers
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# List API keys
|
|
344
|
+
# @param [Hash] opts the optional parameters
|
|
345
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
346
|
+
# @return [Array<ApiKeyList>]
|
|
347
|
+
def list_api_keys(opts = {})
|
|
348
|
+
data, _status_code, _headers = list_api_keys_with_http_info(opts)
|
|
349
|
+
data
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# List API keys
|
|
353
|
+
# @param [Hash] opts the optional parameters
|
|
354
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
355
|
+
# @return [Array<(Array<ApiKeyList>, Integer, Hash)>] Array<ApiKeyList> data, response status code and response headers
|
|
356
|
+
def list_api_keys_with_http_info(opts = {})
|
|
357
|
+
if @api_client.config.debugging
|
|
358
|
+
@api_client.config.logger.debug 'Calling API: ApiKeysApi.list_api_keys ...'
|
|
359
|
+
end
|
|
360
|
+
# resource path
|
|
361
|
+
local_var_path = '/api-keys'
|
|
362
|
+
|
|
363
|
+
# query parameters
|
|
364
|
+
query_params = opts[:query_params] || {}
|
|
365
|
+
|
|
366
|
+
# header parameters
|
|
367
|
+
header_params = opts[:header_params] || {}
|
|
368
|
+
# HTTP header 'Accept' (if needed)
|
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
370
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
371
|
+
|
|
372
|
+
# form parameters
|
|
373
|
+
form_params = opts[:form_params] || {}
|
|
374
|
+
|
|
375
|
+
# http body (model)
|
|
376
|
+
post_body = opts[:debug_body]
|
|
377
|
+
|
|
378
|
+
# return_type
|
|
379
|
+
return_type = opts[:debug_return_type] || 'Array<ApiKeyList>'
|
|
380
|
+
|
|
381
|
+
# auth_names
|
|
382
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
383
|
+
|
|
384
|
+
new_options = opts.merge(
|
|
385
|
+
:operation => :"ApiKeysApi.list_api_keys",
|
|
386
|
+
:header_params => header_params,
|
|
387
|
+
:query_params => query_params,
|
|
388
|
+
:form_params => form_params,
|
|
389
|
+
:body => post_body,
|
|
390
|
+
:auth_names => auth_names,
|
|
391
|
+
:return_type => return_type
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
395
|
+
if @api_client.config.debugging
|
|
396
|
+
@api_client.config.logger.debug "API called: ApiKeysApi#list_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
397
|
+
end
|
|
398
|
+
return data, status_code, headers
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
end
|