daytona_toolbox_api_client 0.136.0 → 0.138.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 184863a8211245a17aa07b99984bfed071ef5f9282e3b6e9f6fc0f792a5e562e
4
- data.tar.gz: 10a4f763d4db91c3adf6a90fd310b8ead89870e9bd8aa5b643f95deaf766e231
3
+ metadata.gz: 50f0de49aac56d440ee6b4e8d85b4c79e33c81a7548cf1f4a3aceefd67fd7990
4
+ data.tar.gz: 0ebf343eeeaac2243609fd2fda8409fd870c3e275f5717b8c9300ad83b7ae6bd
5
5
  SHA512:
6
- metadata.gz: 3a60735fada0d13a4fa8d49397602c5227d012f5e048a4951f62ae5567764564ce35ee93c81e650d39a8346d2710ffcde5044bd0aa09f9ef6a0c2039aeac7ca0
7
- data.tar.gz: 0ac1b4b4999db7dd9dd79cfec1687e061c3a6e85a608d70d854d020eab20d735cece7c654d5b161e5c1ef94564c6189cce616405b0269d46b173427549160ec0
6
+ metadata.gz: eb4f380520846b5ce6dd18a8aa98cf520f78481bc6795e2549bb737255740b4c9ddd25d0bf8041cbc597a963b4b05f58635bf1c7c1a2b2280482795f630880a7
7
+ data.tar.gz: 0c7c9622e1787073f59865d1162b176df3db7be145fe8ef15e2edf092834fd414631a5f1e9931109d581dc2637bfeed05c0fe68ec1bddb2ac8073ccb76cb9eee
@@ -83,6 +83,7 @@ lib/daytona_toolbox_api_client/models/search_files_response.rb
83
83
  lib/daytona_toolbox_api_client/models/session.rb
84
84
  lib/daytona_toolbox_api_client/models/session_execute_request.rb
85
85
  lib/daytona_toolbox_api_client/models/session_execute_response.rb
86
+ lib/daytona_toolbox_api_client/models/session_send_input_request.rb
86
87
  lib/daytona_toolbox_api_client/models/status.rb
87
88
  lib/daytona_toolbox_api_client/models/user_home_dir_response.rb
88
89
  lib/daytona_toolbox_api_client/models/window_info.rb
@@ -861,6 +861,84 @@ module DaytonaToolboxApiClient
861
861
  return data, status_code, headers
862
862
  end
863
863
 
864
+ # Send input to command
865
+ # Send input data to a running command in a session for interactive execution
866
+ # @param session_id [String] Session ID
867
+ # @param command_id [String] Command ID
868
+ # @param request [SessionSendInputRequest] Input send request
869
+ # @param [Hash] opts the optional parameters
870
+ # @return [nil]
871
+ def send_input(session_id, command_id, request, opts = {})
872
+ send_input_with_http_info(session_id, command_id, request, opts)
873
+ nil
874
+ end
875
+
876
+ # Send input to command
877
+ # Send input data to a running command in a session for interactive execution
878
+ # @param session_id [String] Session ID
879
+ # @param command_id [String] Command ID
880
+ # @param request [SessionSendInputRequest] Input send request
881
+ # @param [Hash] opts the optional parameters
882
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
883
+ def send_input_with_http_info(session_id, command_id, request, opts = {})
884
+ if @api_client.config.debugging
885
+ @api_client.config.logger.debug 'Calling API: ProcessApi.send_input ...'
886
+ end
887
+ # verify the required parameter 'session_id' is set
888
+ if @api_client.config.client_side_validation && session_id.nil?
889
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.send_input"
890
+ end
891
+ # verify the required parameter 'command_id' is set
892
+ if @api_client.config.client_side_validation && command_id.nil?
893
+ fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.send_input"
894
+ end
895
+ # verify the required parameter 'request' is set
896
+ if @api_client.config.client_side_validation && request.nil?
897
+ fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.send_input"
898
+ end
899
+ # resource path
900
+ local_var_path = '/process/session/{sessionId}/command/{commandId}/input'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
901
+
902
+ # query parameters
903
+ query_params = opts[:query_params] || {}
904
+
905
+ # header parameters
906
+ header_params = opts[:header_params] || {}
907
+ # HTTP header 'Content-Type'
908
+ content_type = @api_client.select_header_content_type(['application/json'])
909
+ if !content_type.nil?
910
+ header_params['Content-Type'] = content_type
911
+ end
912
+
913
+ # form parameters
914
+ form_params = opts[:form_params] || {}
915
+
916
+ # http body (model)
917
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
918
+
919
+ # return_type
920
+ return_type = opts[:debug_return_type]
921
+
922
+ # auth_names
923
+ auth_names = opts[:debug_auth_names] || []
924
+
925
+ new_options = opts.merge(
926
+ :operation => :"ProcessApi.send_input",
927
+ :header_params => header_params,
928
+ :query_params => query_params,
929
+ :form_params => form_params,
930
+ :body => post_body,
931
+ :auth_names => auth_names,
932
+ :return_type => return_type
933
+ )
934
+
935
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug "API called: ProcessApi#send_input\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
938
+ end
939
+ return data, status_code, headers
940
+ end
941
+
864
942
  # Execute command in session
865
943
  # Execute a command within an existing shell session
866
944
  # @param session_id [String] Session ID
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #Daytona Toolbox API
3
+
4
+ #Daytona Toolbox API
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaToolboxApiClient
17
+ class SessionSendInputRequest
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'data' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::SessionSendInputRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::SessionSendInputRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ self.data = attributes[:'data']
68
+ else
69
+ self.data = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @data.nil?
79
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @data.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] data Value to be assigned
95
+ def data=(data)
96
+ if data.nil?
97
+ fail ArgumentError, 'data cannot be nil'
98
+ end
99
+
100
+ @data = data
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ data == o.data
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [data].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def self._deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = DaytonaToolboxApiClient.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+ end
235
+ end
@@ -11,5 +11,5 @@ Generator version: 7.12.0
11
11
  =end
12
12
 
13
13
  module DaytonaToolboxApiClient
14
- VERSION = '0.136.0'
14
+ VERSION = '0.138.0'
15
15
  end
@@ -85,6 +85,7 @@ require 'daytona_toolbox_api_client/models/search_files_response'
85
85
  require 'daytona_toolbox_api_client/models/session'
86
86
  require 'daytona_toolbox_api_client/models/session_execute_request'
87
87
  require 'daytona_toolbox_api_client/models/session_execute_response'
88
+ require 'daytona_toolbox_api_client/models/session_send_input_request'
88
89
  require 'daytona_toolbox_api_client/models/status'
89
90
  require 'daytona_toolbox_api_client/models/user_home_dir_response'
90
91
  require 'daytona_toolbox_api_client/models/window_info'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daytona_toolbox_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.136.0
4
+ version: 0.138.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - daytonaio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-28 00:00:00.000000000 Z
11
+ date: 2026-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -146,6 +146,7 @@ files:
146
146
  - lib/daytona_toolbox_api_client/models/session.rb
147
147
  - lib/daytona_toolbox_api_client/models/session_execute_request.rb
148
148
  - lib/daytona_toolbox_api_client/models/session_execute_response.rb
149
+ - lib/daytona_toolbox_api_client/models/session_send_input_request.rb
149
150
  - lib/daytona_toolbox_api_client/models/status.rb
150
151
  - lib/daytona_toolbox_api_client/models/user_home_dir_response.rb
151
152
  - lib/daytona_toolbox_api_client/models/window_info.rb