daytona_toolbox_api_client 0.195.0 → 0.196.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/.openapi-generator/FILES +1 -0
- data/lib/daytona_toolbox_api_client/api/server_api.rb +70 -7
- data/lib/daytona_toolbox_api_client/models/update_env_request.rb +172 -0
- data/lib/daytona_toolbox_api_client/version.rb +1 -1
- data/lib/daytona_toolbox_api_client.rb +1 -0
- data/project.json +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac7042ca037e05a5d9a2c327e4f8b557673fcfcf1f872187060791074db3fc0c
|
|
4
|
+
data.tar.gz: 80517eb47bd107cdea3ae56aa6b28566734b368089201414e9f63e2f3335b723
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1239c00123549f35416224eb712727697f5de7201205a1cc8685ed2fc54801bdb74255e8fe9c3d0bf7d8ea4d78a0ca7f78917801424bdf69efdfbbe87c568d26
|
|
7
|
+
data.tar.gz: 6ea86a4ba40fef7e14094291aac5e2f1a92458059f9680b55be0de044011b465774b16453a84ef70a1cfa289df584f3588947941941fcf5689ffc92c178b0f19
|
data/.openapi-generator/FILES
CHANGED
|
@@ -119,6 +119,7 @@ lib/daytona_toolbox_api_client/models/start_recording_request.rb
|
|
|
119
119
|
lib/daytona_toolbox_api_client/models/status.rb
|
|
120
120
|
lib/daytona_toolbox_api_client/models/stop_recording_request.rb
|
|
121
121
|
lib/daytona_toolbox_api_client/models/system_metrics.rb
|
|
122
|
+
lib/daytona_toolbox_api_client/models/update_env_request.rb
|
|
122
123
|
lib/daytona_toolbox_api_client/models/user_home_dir_response.rb
|
|
123
124
|
lib/daytona_toolbox_api_client/models/window_info.rb
|
|
124
125
|
lib/daytona_toolbox_api_client/models/windows_response.rb
|
|
@@ -24,8 +24,8 @@ module DaytonaToolboxApiClient
|
|
|
24
24
|
# @param request [InitializeRequest] Initialization request
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [Hash<String, String>]
|
|
27
|
-
def
|
|
28
|
-
data, _status_code, _headers =
|
|
27
|
+
def initialize_server(request, opts = {})
|
|
28
|
+
data, _status_code, _headers = initialize_server_with_http_info(request, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -34,13 +34,13 @@ module DaytonaToolboxApiClient
|
|
|
34
34
|
# @param request [InitializeRequest] Initialization request
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(Hash<String, String>, Integer, Hash)>] Hash<String, String> data, response status code and response headers
|
|
37
|
-
def
|
|
37
|
+
def initialize_server_with_http_info(request, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: ServerApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ServerApi.initialize_server ...'
|
|
40
40
|
end
|
|
41
41
|
# verify the required parameter 'request' is set
|
|
42
42
|
if @api_client.config.client_side_validation && request.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'request' when calling ServerApi.
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ServerApi.initialize_server"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/init'
|
|
@@ -66,7 +66,7 @@ module DaytonaToolboxApiClient
|
|
|
66
66
|
auth_names = opts[:debug_auth_names] || []
|
|
67
67
|
|
|
68
68
|
new_options = opts.merge(
|
|
69
|
-
:operation => :"ServerApi.
|
|
69
|
+
:operation => :"ServerApi.initialize_server",
|
|
70
70
|
:header_params => header_params,
|
|
71
71
|
:query_params => query_params,
|
|
72
72
|
:form_params => form_params,
|
|
@@ -77,7 +77,70 @@ module DaytonaToolboxApiClient
|
|
|
77
77
|
|
|
78
78
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
79
|
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called: ServerApi#
|
|
80
|
+
@api_client.config.logger.debug "API called: ServerApi#initialize_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Update process environment
|
|
86
|
+
# Update the daemon's process environment. Newly spawned processes, sessions and PTYs inherit the change; already-running processes keep their environment.
|
|
87
|
+
# @param request [UpdateEnvRequest] Environment update request
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Hash<String, String>]
|
|
90
|
+
def update_env(request, opts = {})
|
|
91
|
+
data, _status_code, _headers = update_env_with_http_info(request, opts)
|
|
92
|
+
data
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Update process environment
|
|
96
|
+
# Update the daemon's process environment. Newly spawned processes, sessions and PTYs inherit the change; already-running processes keep their environment.
|
|
97
|
+
# @param request [UpdateEnvRequest] Environment update request
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Array<(Hash<String, String>, Integer, Hash)>] Hash<String, String> data, response status code and response headers
|
|
100
|
+
def update_env_with_http_info(request, opts = {})
|
|
101
|
+
if @api_client.config.debugging
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: ServerApi.update_env ...'
|
|
103
|
+
end
|
|
104
|
+
# verify the required parameter 'request' is set
|
|
105
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ServerApi.update_env"
|
|
107
|
+
end
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/env'
|
|
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] || @api_client.object_to_http_body(request)
|
|
124
|
+
|
|
125
|
+
# return_type
|
|
126
|
+
return_type = opts[:debug_return_type] || 'Hash<String, String>'
|
|
127
|
+
|
|
128
|
+
# auth_names
|
|
129
|
+
auth_names = opts[:debug_auth_names] || []
|
|
130
|
+
|
|
131
|
+
new_options = opts.merge(
|
|
132
|
+
:operation => :"ServerApi.update_env",
|
|
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(:POST, local_var_path, new_options)
|
|
142
|
+
if @api_client.config.debugging
|
|
143
|
+
@api_client.config.logger.debug "API called: ServerApi#update_env\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
144
|
end
|
|
82
145
|
return data, status_code, headers
|
|
83
146
|
end
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona Toolbox API
|
|
3
|
+
|
|
4
|
+
#Daytona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Daytona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Daytona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaToolboxApiClient
|
|
17
|
+
class UpdateEnvRequest < ApiModelBase
|
|
18
|
+
# Set maps env var names to values applied to the daemon's process env, so processes spawned after the call (exec, sessions, PTYs) inherit them.
|
|
19
|
+
attr_accessor :set
|
|
20
|
+
|
|
21
|
+
# Unset lists env var names to remove before Set is applied.
|
|
22
|
+
attr_accessor :unset
|
|
23
|
+
|
|
24
|
+
# UnsetValuePrefix removes every env var whose value has this prefix and whose name is not a key of Set, before Set is applied. Used to reconcile secret placeholder vars without the caller knowing the daemon's env.
|
|
25
|
+
attr_accessor :unset_value_prefix
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'set' => :'set',
|
|
31
|
+
:'unset' => :'unset',
|
|
32
|
+
:'unset_value_prefix' => :'unsetValuePrefix'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'set' => :'Hash<String, String>',
|
|
50
|
+
:'unset' => :'Array<String>',
|
|
51
|
+
:'unset_value_prefix' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::UpdateEnvRequest` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::UpdateEnvRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'set')
|
|
78
|
+
if (value = attributes[:'set']).is_a?(Hash)
|
|
79
|
+
self.set = value
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'unset')
|
|
84
|
+
if (value = attributes[:'unset']).is_a?(Array)
|
|
85
|
+
self.unset = value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'unset_value_prefix')
|
|
90
|
+
self.unset_value_prefix = attributes[:'unset_value_prefix']
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
set == o.set &&
|
|
115
|
+
unset == o.unset &&
|
|
116
|
+
unset_value_prefix == o.unset_value_prefix
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[set, unset, unset_value_prefix].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
137
|
+
transformed_hash = {}
|
|
138
|
+
openapi_types.each_pair do |key, type|
|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = nil
|
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
|
+
# check to ensure the input is an array given that the attribute
|
|
143
|
+
# is documented as an array but the input is not
|
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
|
+
end
|
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
new(transformed_hash)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Returns the object in the form of hash
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_hash
|
|
157
|
+
hash = {}
|
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
159
|
+
value = self.send(attr)
|
|
160
|
+
if value.nil?
|
|
161
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
162
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
hash[param] = _to_hash(value)
|
|
166
|
+
end
|
|
167
|
+
hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|
|
@@ -119,6 +119,7 @@ require 'daytona_toolbox_api_client/models/start_recording_request'
|
|
|
119
119
|
require 'daytona_toolbox_api_client/models/status'
|
|
120
120
|
require 'daytona_toolbox_api_client/models/stop_recording_request'
|
|
121
121
|
require 'daytona_toolbox_api_client/models/system_metrics'
|
|
122
|
+
require 'daytona_toolbox_api_client/models/update_env_request'
|
|
122
123
|
require 'daytona_toolbox_api_client/models/user_home_dir_response'
|
|
123
124
|
require 'daytona_toolbox_api_client/models/window_info'
|
|
124
125
|
require 'daytona_toolbox_api_client/models/windows_response'
|
data/project.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"options": {
|
|
32
32
|
"commands": [
|
|
33
33
|
"rm -rf toolbox-api-client-ruby/lib",
|
|
34
|
-
"yarn run openapi-generator-cli generate -i openapi-specs/toolbox.json -g ruby -t hack/ruby-client/openapi-templates --name-mappings hash=_hash --model-name-mappings computeruse.AccessibilityNode=ComputerUseAccessibilityNode --additional-properties=gemAuthor=daytona,gemAuthorEmail=support@daytona.io,gemDescription=\\\"Daytona Toolbox API Client\\\",gemHomepage=\\\"https://github.com/daytona/clients\\\",gemVersion=$DEFAULT_GEM_VERSION,gemName=daytona_toolbox_api_client,enumUnknownDefaultCase=true -o toolbox-api-client-ruby",
|
|
34
|
+
"yarn run openapi-generator-cli generate -i openapi-specs/toolbox.json -g ruby -t hack/ruby-client/openapi-templates --name-mappings hash=_hash --model-name-mappings computeruse.AccessibilityNode=ComputerUseAccessibilityNode --operation-id-name-mappings Initialize=initialize_server --additional-properties=gemAuthor=daytona,gemAuthorEmail=support@daytona.io,gemDescription=\\\"Daytona Toolbox API Client\\\",gemHomepage=\\\"https://github.com/daytona/clients\\\",gemVersion=$DEFAULT_GEM_VERSION,gemName=daytona_toolbox_api_client,enumUnknownDefaultCase=true -o toolbox-api-client-ruby",
|
|
35
35
|
"bash toolbox-api-client-ruby/fix-gemspec.sh",
|
|
36
36
|
"sed -i 's|OpenAPI-Generator/#{VERSION}/ruby|toolbox-api-client-ruby/#{VERSION}|' toolbox-api-client-ruby/lib/daytona_toolbox_api_client/api_client.rb",
|
|
37
37
|
"cd toolbox-api-client-ruby && BUNDLE_GEMFILE=Gemfile bundle install"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: daytona_toolbox_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.196.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- daytona
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 1980-01-
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: typhoeus
|
|
@@ -181,6 +181,7 @@ files:
|
|
|
181
181
|
- lib/daytona_toolbox_api_client/models/status.rb
|
|
182
182
|
- lib/daytona_toolbox_api_client/models/stop_recording_request.rb
|
|
183
183
|
- lib/daytona_toolbox_api_client/models/system_metrics.rb
|
|
184
|
+
- lib/daytona_toolbox_api_client/models/update_env_request.rb
|
|
184
185
|
- lib/daytona_toolbox_api_client/models/user_home_dir_response.rb
|
|
185
186
|
- lib/daytona_toolbox_api_client/models/window_info.rb
|
|
186
187
|
- lib/daytona_toolbox_api_client/models/windows_response.rb
|
|
@@ -205,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
205
206
|
- !ruby/object:Gem::Version
|
|
206
207
|
version: '0'
|
|
207
208
|
requirements: []
|
|
208
|
-
rubygems_version: 3.
|
|
209
|
+
rubygems_version: 3.6.9
|
|
209
210
|
specification_version: 4
|
|
210
211
|
summary: Daytona Toolbox API Ruby Gem
|
|
211
212
|
test_files: []
|