daytona_toolbox_api_client 0.126.0.alpha.1
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/.gitignore +39 -0
- data/.openapi-generator/FILES +92 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_toolbox_api_client.gemspec +39 -0
- data/fix-gemspec.sh +13 -0
- data/lib/daytona_toolbox_api_client/api/computer_use_api.rb +1463 -0
- data/lib/daytona_toolbox_api_client/api/file_system_api.rb +893 -0
- data/lib/daytona_toolbox_api_client/api/git_api.rb +744 -0
- data/lib/daytona_toolbox_api_client/api/info_api.rb +193 -0
- data/lib/daytona_toolbox_api_client/api/interpreter_api.rb +267 -0
- data/lib/daytona_toolbox_api_client/api/lsp_api.rb +510 -0
- data/lib/daytona_toolbox_api_client/api/port_api.rb +142 -0
- data/lib/daytona_toolbox_api_client/api/process_api.rb +938 -0
- data/lib/daytona_toolbox_api_client/api_client.rb +392 -0
- data/lib/daytona_toolbox_api_client/api_error.rb +58 -0
- data/lib/daytona_toolbox_api_client/configuration.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/command.rb +270 -0
- data/lib/daytona_toolbox_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_start_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_status_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_stop_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/create_context_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/create_session_request.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/display_info.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/display_info_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_toolbox_api_client/models/execute_response.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/file_info.rb +417 -0
- data/lib/daytona_toolbox_api_client/models/file_status.rb +335 -0
- data/lib/daytona_toolbox_api_client/models/files_download_request.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_toolbox_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_request.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/git_git_delete_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/git_status.rb +290 -0
- data/lib/daytona_toolbox_api_client/models/interpreter_context.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/is_port_in_use_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_hotkey_request.rb +219 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_press_request.rb +230 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_type_request.rb +228 -0
- data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/list_contexts_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/lsp_completion_params.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/lsp_document_request.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_position.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_range.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_server_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/match.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_request.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_move_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_position_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_scroll_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/port_list.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/position.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_errors_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_logs_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_restart_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_status.rb +245 -0
- data/lib/daytona_toolbox_api_client/models/process_status_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_request.rb +266 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/pty_list_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/pty_resize_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/pty_session_info.rb +284 -0
- data/lib/daytona_toolbox_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/screenshot_response.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/scroll_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/session.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_response.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/status.rb +46 -0
- data/lib/daytona_toolbox_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/window_info.rb +272 -0
- data/lib/daytona_toolbox_api_client/models/windows_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/version.rb +15 -0
- data/lib/daytona_toolbox_api_client.rb +120 -0
- data/project.json +65 -0
- metadata +178 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona Daemon API
|
|
3
|
+
|
|
4
|
+
#Daytona Daemon 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 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaToolboxApiClient
|
|
16
|
+
class LspApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get code completions
|
|
23
|
+
# Get code completion suggestions from the LSP server
|
|
24
|
+
# @param request [LspCompletionParams] Completion request
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CompletionList]
|
|
27
|
+
def completions(request, opts = {})
|
|
28
|
+
data, _status_code, _headers = completions_with_http_info(request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get code completions
|
|
33
|
+
# Get code completion suggestions from the LSP server
|
|
34
|
+
# @param request [LspCompletionParams] Completion request
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CompletionList, Integer, Hash)>] CompletionList data, response status code and response headers
|
|
37
|
+
def completions_with_http_info(request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: LspApi.completions ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.completions"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/lsp/completions'
|
|
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
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CompletionList'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || []
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"LspApi.completions",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: LspApi#completions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Notify document closed
|
|
91
|
+
# Notify the LSP server that a document has been closed
|
|
92
|
+
# @param request [LspDocumentRequest] Document request
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def did_close(request, opts = {})
|
|
96
|
+
did_close_with_http_info(request, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Notify document closed
|
|
101
|
+
# Notify the LSP server that a document has been closed
|
|
102
|
+
# @param request [LspDocumentRequest] Document request
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def did_close_with_http_info(request, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: LspApi.did_close ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'request' is set
|
|
110
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.did_close"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/lsp/did-close'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
if !content_type.nil?
|
|
124
|
+
header_params['Content-Type'] = content_type
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# form parameters
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
# http body (model)
|
|
131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
132
|
+
|
|
133
|
+
# return_type
|
|
134
|
+
return_type = opts[:debug_return_type]
|
|
135
|
+
|
|
136
|
+
# auth_names
|
|
137
|
+
auth_names = opts[:debug_auth_names] || []
|
|
138
|
+
|
|
139
|
+
new_options = opts.merge(
|
|
140
|
+
:operation => :"LspApi.did_close",
|
|
141
|
+
:header_params => header_params,
|
|
142
|
+
:query_params => query_params,
|
|
143
|
+
:form_params => form_params,
|
|
144
|
+
:body => post_body,
|
|
145
|
+
:auth_names => auth_names,
|
|
146
|
+
:return_type => return_type
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: LspApi#did_close\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Notify document opened
|
|
157
|
+
# Notify the LSP server that a document has been opened
|
|
158
|
+
# @param request [LspDocumentRequest] Document request
|
|
159
|
+
# @param [Hash] opts the optional parameters
|
|
160
|
+
# @return [nil]
|
|
161
|
+
def did_open(request, opts = {})
|
|
162
|
+
did_open_with_http_info(request, opts)
|
|
163
|
+
nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Notify document opened
|
|
167
|
+
# Notify the LSP server that a document has been opened
|
|
168
|
+
# @param request [LspDocumentRequest] Document request
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
171
|
+
def did_open_with_http_info(request, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: LspApi.did_open ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'request' is set
|
|
176
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.did_open"
|
|
178
|
+
end
|
|
179
|
+
# resource path
|
|
180
|
+
local_var_path = '/lsp/did-open'
|
|
181
|
+
|
|
182
|
+
# query parameters
|
|
183
|
+
query_params = opts[:query_params] || {}
|
|
184
|
+
|
|
185
|
+
# header parameters
|
|
186
|
+
header_params = opts[:header_params] || {}
|
|
187
|
+
# HTTP header 'Content-Type'
|
|
188
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
189
|
+
if !content_type.nil?
|
|
190
|
+
header_params['Content-Type'] = content_type
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type]
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || []
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :"LspApi.did_open",
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug "API called: LspApi#did_open\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
+
end
|
|
219
|
+
return data, status_code, headers
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Get document symbols
|
|
223
|
+
# Get symbols (functions, classes, etc.) from a document
|
|
224
|
+
# @param language_id [String] Language ID (e.g., python, typescript)
|
|
225
|
+
# @param path_to_project [String] Path to project
|
|
226
|
+
# @param uri [String] Document URI
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @return [Array<LspSymbol>]
|
|
229
|
+
def document_symbols(language_id, path_to_project, uri, opts = {})
|
|
230
|
+
data, _status_code, _headers = document_symbols_with_http_info(language_id, path_to_project, uri, opts)
|
|
231
|
+
data
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Get document symbols
|
|
235
|
+
# Get symbols (functions, classes, etc.) from a document
|
|
236
|
+
# @param language_id [String] Language ID (e.g., python, typescript)
|
|
237
|
+
# @param path_to_project [String] Path to project
|
|
238
|
+
# @param uri [String] Document URI
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Array<(Array<LspSymbol>, Integer, Hash)>] Array<LspSymbol> data, response status code and response headers
|
|
241
|
+
def document_symbols_with_http_info(language_id, path_to_project, uri, opts = {})
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug 'Calling API: LspApi.document_symbols ...'
|
|
244
|
+
end
|
|
245
|
+
# verify the required parameter 'language_id' is set
|
|
246
|
+
if @api_client.config.client_side_validation && language_id.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'language_id' when calling LspApi.document_symbols"
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'path_to_project' is set
|
|
250
|
+
if @api_client.config.client_side_validation && path_to_project.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'path_to_project' when calling LspApi.document_symbols"
|
|
252
|
+
end
|
|
253
|
+
# verify the required parameter 'uri' is set
|
|
254
|
+
if @api_client.config.client_side_validation && uri.nil?
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'uri' when calling LspApi.document_symbols"
|
|
256
|
+
end
|
|
257
|
+
# resource path
|
|
258
|
+
local_var_path = '/lsp/document-symbols'
|
|
259
|
+
|
|
260
|
+
# query parameters
|
|
261
|
+
query_params = opts[:query_params] || {}
|
|
262
|
+
query_params[:'languageId'] = language_id
|
|
263
|
+
query_params[:'pathToProject'] = path_to_project
|
|
264
|
+
query_params[:'uri'] = uri
|
|
265
|
+
|
|
266
|
+
# header parameters
|
|
267
|
+
header_params = opts[:header_params] || {}
|
|
268
|
+
# HTTP header 'Accept' (if needed)
|
|
269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
270
|
+
|
|
271
|
+
# form parameters
|
|
272
|
+
form_params = opts[:form_params] || {}
|
|
273
|
+
|
|
274
|
+
# http body (model)
|
|
275
|
+
post_body = opts[:debug_body]
|
|
276
|
+
|
|
277
|
+
# return_type
|
|
278
|
+
return_type = opts[:debug_return_type] || 'Array<LspSymbol>'
|
|
279
|
+
|
|
280
|
+
# auth_names
|
|
281
|
+
auth_names = opts[:debug_auth_names] || []
|
|
282
|
+
|
|
283
|
+
new_options = opts.merge(
|
|
284
|
+
:operation => :"LspApi.document_symbols",
|
|
285
|
+
:header_params => header_params,
|
|
286
|
+
:query_params => query_params,
|
|
287
|
+
:form_params => form_params,
|
|
288
|
+
:body => post_body,
|
|
289
|
+
:auth_names => auth_names,
|
|
290
|
+
:return_type => return_type
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug "API called: LspApi#document_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
296
|
+
end
|
|
297
|
+
return data, status_code, headers
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Start LSP server
|
|
301
|
+
# Start a Language Server Protocol server for the specified language
|
|
302
|
+
# @param request [LspServerRequest] LSP server request
|
|
303
|
+
# @param [Hash] opts the optional parameters
|
|
304
|
+
# @return [nil]
|
|
305
|
+
def start(request, opts = {})
|
|
306
|
+
start_with_http_info(request, opts)
|
|
307
|
+
nil
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Start LSP server
|
|
311
|
+
# Start a Language Server Protocol server for the specified language
|
|
312
|
+
# @param request [LspServerRequest] LSP server request
|
|
313
|
+
# @param [Hash] opts the optional parameters
|
|
314
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
315
|
+
def start_with_http_info(request, opts = {})
|
|
316
|
+
if @api_client.config.debugging
|
|
317
|
+
@api_client.config.logger.debug 'Calling API: LspApi.start ...'
|
|
318
|
+
end
|
|
319
|
+
# verify the required parameter 'request' is set
|
|
320
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
321
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.start"
|
|
322
|
+
end
|
|
323
|
+
# resource path
|
|
324
|
+
local_var_path = '/lsp/start'
|
|
325
|
+
|
|
326
|
+
# query parameters
|
|
327
|
+
query_params = opts[:query_params] || {}
|
|
328
|
+
|
|
329
|
+
# header parameters
|
|
330
|
+
header_params = opts[:header_params] || {}
|
|
331
|
+
# HTTP header 'Content-Type'
|
|
332
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
333
|
+
if !content_type.nil?
|
|
334
|
+
header_params['Content-Type'] = content_type
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# form parameters
|
|
338
|
+
form_params = opts[:form_params] || {}
|
|
339
|
+
|
|
340
|
+
# http body (model)
|
|
341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
342
|
+
|
|
343
|
+
# return_type
|
|
344
|
+
return_type = opts[:debug_return_type]
|
|
345
|
+
|
|
346
|
+
# auth_names
|
|
347
|
+
auth_names = opts[:debug_auth_names] || []
|
|
348
|
+
|
|
349
|
+
new_options = opts.merge(
|
|
350
|
+
:operation => :"LspApi.start",
|
|
351
|
+
:header_params => header_params,
|
|
352
|
+
:query_params => query_params,
|
|
353
|
+
:form_params => form_params,
|
|
354
|
+
:body => post_body,
|
|
355
|
+
:auth_names => auth_names,
|
|
356
|
+
:return_type => return_type
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug "API called: LspApi#start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
362
|
+
end
|
|
363
|
+
return data, status_code, headers
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Stop LSP server
|
|
367
|
+
# Stop a Language Server Protocol server
|
|
368
|
+
# @param request [LspServerRequest] LSP server request
|
|
369
|
+
# @param [Hash] opts the optional parameters
|
|
370
|
+
# @return [nil]
|
|
371
|
+
def stop(request, opts = {})
|
|
372
|
+
stop_with_http_info(request, opts)
|
|
373
|
+
nil
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Stop LSP server
|
|
377
|
+
# Stop a Language Server Protocol server
|
|
378
|
+
# @param request [LspServerRequest] LSP server request
|
|
379
|
+
# @param [Hash] opts the optional parameters
|
|
380
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
381
|
+
def stop_with_http_info(request, opts = {})
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: LspApi.stop ...'
|
|
384
|
+
end
|
|
385
|
+
# verify the required parameter 'request' is set
|
|
386
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.stop"
|
|
388
|
+
end
|
|
389
|
+
# resource path
|
|
390
|
+
local_var_path = '/lsp/stop'
|
|
391
|
+
|
|
392
|
+
# query parameters
|
|
393
|
+
query_params = opts[:query_params] || {}
|
|
394
|
+
|
|
395
|
+
# header parameters
|
|
396
|
+
header_params = opts[:header_params] || {}
|
|
397
|
+
# HTTP header 'Content-Type'
|
|
398
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
399
|
+
if !content_type.nil?
|
|
400
|
+
header_params['Content-Type'] = content_type
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# form parameters
|
|
404
|
+
form_params = opts[:form_params] || {}
|
|
405
|
+
|
|
406
|
+
# http body (model)
|
|
407
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
408
|
+
|
|
409
|
+
# return_type
|
|
410
|
+
return_type = opts[:debug_return_type]
|
|
411
|
+
|
|
412
|
+
# auth_names
|
|
413
|
+
auth_names = opts[:debug_auth_names] || []
|
|
414
|
+
|
|
415
|
+
new_options = opts.merge(
|
|
416
|
+
:operation => :"LspApi.stop",
|
|
417
|
+
:header_params => header_params,
|
|
418
|
+
:query_params => query_params,
|
|
419
|
+
:form_params => form_params,
|
|
420
|
+
:body => post_body,
|
|
421
|
+
:auth_names => auth_names,
|
|
422
|
+
:return_type => return_type
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called: LspApi#stop\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
+
end
|
|
429
|
+
return data, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Get workspace symbols
|
|
433
|
+
# Search for symbols across the entire workspace
|
|
434
|
+
# @param query [String] Search query
|
|
435
|
+
# @param language_id [String] Language ID (e.g., python, typescript)
|
|
436
|
+
# @param path_to_project [String] Path to project
|
|
437
|
+
# @param [Hash] opts the optional parameters
|
|
438
|
+
# @return [Array<LspSymbol>]
|
|
439
|
+
def workspace_symbols(query, language_id, path_to_project, opts = {})
|
|
440
|
+
data, _status_code, _headers = workspace_symbols_with_http_info(query, language_id, path_to_project, opts)
|
|
441
|
+
data
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Get workspace symbols
|
|
445
|
+
# Search for symbols across the entire workspace
|
|
446
|
+
# @param query [String] Search query
|
|
447
|
+
# @param language_id [String] Language ID (e.g., python, typescript)
|
|
448
|
+
# @param path_to_project [String] Path to project
|
|
449
|
+
# @param [Hash] opts the optional parameters
|
|
450
|
+
# @return [Array<(Array<LspSymbol>, Integer, Hash)>] Array<LspSymbol> data, response status code and response headers
|
|
451
|
+
def workspace_symbols_with_http_info(query, language_id, path_to_project, opts = {})
|
|
452
|
+
if @api_client.config.debugging
|
|
453
|
+
@api_client.config.logger.debug 'Calling API: LspApi.workspace_symbols ...'
|
|
454
|
+
end
|
|
455
|
+
# verify the required parameter 'query' is set
|
|
456
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
457
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling LspApi.workspace_symbols"
|
|
458
|
+
end
|
|
459
|
+
# verify the required parameter 'language_id' is set
|
|
460
|
+
if @api_client.config.client_side_validation && language_id.nil?
|
|
461
|
+
fail ArgumentError, "Missing the required parameter 'language_id' when calling LspApi.workspace_symbols"
|
|
462
|
+
end
|
|
463
|
+
# verify the required parameter 'path_to_project' is set
|
|
464
|
+
if @api_client.config.client_side_validation && path_to_project.nil?
|
|
465
|
+
fail ArgumentError, "Missing the required parameter 'path_to_project' when calling LspApi.workspace_symbols"
|
|
466
|
+
end
|
|
467
|
+
# resource path
|
|
468
|
+
local_var_path = '/lsp/workspacesymbols'
|
|
469
|
+
|
|
470
|
+
# query parameters
|
|
471
|
+
query_params = opts[:query_params] || {}
|
|
472
|
+
query_params[:'query'] = query
|
|
473
|
+
query_params[:'languageId'] = language_id
|
|
474
|
+
query_params[:'pathToProject'] = path_to_project
|
|
475
|
+
|
|
476
|
+
# header parameters
|
|
477
|
+
header_params = opts[:header_params] || {}
|
|
478
|
+
# HTTP header 'Accept' (if needed)
|
|
479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
480
|
+
|
|
481
|
+
# form parameters
|
|
482
|
+
form_params = opts[:form_params] || {}
|
|
483
|
+
|
|
484
|
+
# http body (model)
|
|
485
|
+
post_body = opts[:debug_body]
|
|
486
|
+
|
|
487
|
+
# return_type
|
|
488
|
+
return_type = opts[:debug_return_type] || 'Array<LspSymbol>'
|
|
489
|
+
|
|
490
|
+
# auth_names
|
|
491
|
+
auth_names = opts[:debug_auth_names] || []
|
|
492
|
+
|
|
493
|
+
new_options = opts.merge(
|
|
494
|
+
:operation => :"LspApi.workspace_symbols",
|
|
495
|
+
:header_params => header_params,
|
|
496
|
+
:query_params => query_params,
|
|
497
|
+
:form_params => form_params,
|
|
498
|
+
:body => post_body,
|
|
499
|
+
:auth_names => auth_names,
|
|
500
|
+
:return_type => return_type
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug "API called: LspApi#workspace_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
506
|
+
end
|
|
507
|
+
return data, status_code, headers
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
end
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona Daemon API
|
|
3
|
+
|
|
4
|
+
#Daytona Daemon 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 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaToolboxApiClient
|
|
16
|
+
class PortApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get active ports
|
|
23
|
+
# Get a list of all currently active ports
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [PortList]
|
|
26
|
+
def get_ports(opts = {})
|
|
27
|
+
data, _status_code, _headers = get_ports_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get active ports
|
|
32
|
+
# Get a list of all currently active ports
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(PortList, Integer, Hash)>] PortList data, response status code and response headers
|
|
35
|
+
def get_ports_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: PortApi.get_ports ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/port'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'PortList'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"PortApi.get_ports",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: PortApi#get_ports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check if port is in use
|
|
80
|
+
# Check if a specific port is currently in use
|
|
81
|
+
# @param port [Integer] Port number (3000-9999)
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [IsPortInUseResponse]
|
|
84
|
+
def is_port_in_use(port, opts = {})
|
|
85
|
+
data, _status_code, _headers = is_port_in_use_with_http_info(port, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check if port is in use
|
|
90
|
+
# Check if a specific port is currently in use
|
|
91
|
+
# @param port [Integer] Port number (3000-9999)
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @return [Array<(IsPortInUseResponse, Integer, Hash)>] IsPortInUseResponse data, response status code and response headers
|
|
94
|
+
def is_port_in_use_with_http_info(port, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: PortApi.is_port_in_use ...'
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'port' is set
|
|
99
|
+
if @api_client.config.client_side_validation && port.nil?
|
|
100
|
+
fail ArgumentError, "Missing the required parameter 'port' when calling PortApi.is_port_in_use"
|
|
101
|
+
end
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = '/port/{port}/in-use'.sub('{' + 'port' + '}', CGI.escape(port.to_s))
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = opts[:query_params] || {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = opts[:form_params] || {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'IsPortInUseResponse'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || []
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"PortApi.is_port_in_use",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: PortApi#is_port_in_use\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
return data, status_code, headers
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|