cogbox_toolbox_api_client_async 0.190.1__py3-none-any.whl

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.
Files changed (116) hide show
  1. cogbox_toolbox_api_client_async/__init__.py +386 -0
  2. cogbox_toolbox_api_client_async/api/__init__.py +46 -0
  3. cogbox_toolbox_api_client_async/api/computer_use_api.py +9075 -0
  4. cogbox_toolbox_api_client_async/api/file_system_api.py +3583 -0
  5. cogbox_toolbox_api_client_async/api/git_api.py +2969 -0
  6. cogbox_toolbox_api_client_async/api/info_api.py +773 -0
  7. cogbox_toolbox_api_client_async/api/interpreter_api.py +1075 -0
  8. cogbox_toolbox_api_client_async/api/lsp_api.py +1971 -0
  9. cogbox_toolbox_api_client_async/api/port_api.py +543 -0
  10. cogbox_toolbox_api_client_async/api/process_api.py +4865 -0
  11. cogbox_toolbox_api_client_async/api/server_api.py +298 -0
  12. cogbox_toolbox_api_client_async/api_client.py +812 -0
  13. cogbox_toolbox_api_client_async/api_response.py +21 -0
  14. cogbox_toolbox_api_client_async/configuration.py +624 -0
  15. cogbox_toolbox_api_client_async/exceptions.py +218 -0
  16. cogbox_toolbox_api_client_async/models/__init__.py +224 -0
  17. cogbox_toolbox_api_client_async/models/accessibility_bounds.py +108 -0
  18. cogbox_toolbox_api_client_async/models/accessibility_invoke_request.py +104 -0
  19. cogbox_toolbox_api_client_async/models/accessibility_node_request.py +102 -0
  20. cogbox_toolbox_api_client_async/models/accessibility_nodes_response.py +112 -0
  21. cogbox_toolbox_api_client_async/models/accessibility_set_value_request.py +104 -0
  22. cogbox_toolbox_api_client_async/models/accessibility_tree_response.py +108 -0
  23. cogbox_toolbox_api_client_async/models/chart.py +132 -0
  24. cogbox_toolbox_api_client_async/models/chart_element.py +134 -0
  25. cogbox_toolbox_api_client_async/models/code_run_artifacts.py +110 -0
  26. cogbox_toolbox_api_client_async/models/code_run_request.py +110 -0
  27. cogbox_toolbox_api_client_async/models/code_run_response.py +110 -0
  28. cogbox_toolbox_api_client_async/models/command.py +106 -0
  29. cogbox_toolbox_api_client_async/models/completion_context.py +104 -0
  30. cogbox_toolbox_api_client_async/models/completion_item.py +114 -0
  31. cogbox_toolbox_api_client_async/models/completion_list.py +112 -0
  32. cogbox_toolbox_api_client_async/models/computer_use_accessibility_node.py +129 -0
  33. cogbox_toolbox_api_client_async/models/computer_use_start_response.py +117 -0
  34. cogbox_toolbox_api_client_async/models/computer_use_status_response.py +102 -0
  35. cogbox_toolbox_api_client_async/models/computer_use_stop_response.py +117 -0
  36. cogbox_toolbox_api_client_async/models/create_context_request.py +104 -0
  37. cogbox_toolbox_api_client_async/models/create_session_request.py +102 -0
  38. cogbox_toolbox_api_client_async/models/display_info.py +112 -0
  39. cogbox_toolbox_api_client_async/models/display_info_response.py +110 -0
  40. cogbox_toolbox_api_client_async/models/execute_request.py +108 -0
  41. cogbox_toolbox_api_client_async/models/execute_response.py +104 -0
  42. cogbox_toolbox_api_client_async/models/file_info.py +118 -0
  43. cogbox_toolbox_api_client_async/models/file_status.py +109 -0
  44. cogbox_toolbox_api_client_async/models/files_download_request.py +102 -0
  45. cogbox_toolbox_api_client_async/models/find_accessibility_nodes_request.py +114 -0
  46. cogbox_toolbox_api_client_async/models/git_add_request.py +104 -0
  47. cogbox_toolbox_api_client_async/models/git_branch_request.py +104 -0
  48. cogbox_toolbox_api_client_async/models/git_checkout_request.py +104 -0
  49. cogbox_toolbox_api_client_async/models/git_clone_request.py +114 -0
  50. cogbox_toolbox_api_client_async/models/git_commit_info.py +110 -0
  51. cogbox_toolbox_api_client_async/models/git_commit_request.py +110 -0
  52. cogbox_toolbox_api_client_async/models/git_commit_response.py +102 -0
  53. cogbox_toolbox_api_client_async/models/git_delete_branch_request.py +104 -0
  54. cogbox_toolbox_api_client_async/models/git_repo_request.py +106 -0
  55. cogbox_toolbox_api_client_async/models/git_status.py +118 -0
  56. cogbox_toolbox_api_client_async/models/initialize_request.py +102 -0
  57. cogbox_toolbox_api_client_async/models/interpreter_context.py +110 -0
  58. cogbox_toolbox_api_client_async/models/is_port_in_use_response.py +102 -0
  59. cogbox_toolbox_api_client_async/models/keyboard_hotkey_request.py +102 -0
  60. cogbox_toolbox_api_client_async/models/keyboard_press_request.py +104 -0
  61. cogbox_toolbox_api_client_async/models/keyboard_type_request.py +104 -0
  62. cogbox_toolbox_api_client_async/models/list_branch_response.py +102 -0
  63. cogbox_toolbox_api_client_async/models/list_contexts_response.py +110 -0
  64. cogbox_toolbox_api_client_async/models/list_recordings_response.py +110 -0
  65. cogbox_toolbox_api_client_async/models/lsp_completion_params.py +118 -0
  66. cogbox_toolbox_api_client_async/models/lsp_document_request.py +106 -0
  67. cogbox_toolbox_api_client_async/models/lsp_location.py +108 -0
  68. cogbox_toolbox_api_client_async/models/lsp_position.py +104 -0
  69. cogbox_toolbox_api_client_async/models/lsp_range.py +111 -0
  70. cogbox_toolbox_api_client_async/models/lsp_server_request.py +104 -0
  71. cogbox_toolbox_api_client_async/models/lsp_symbol.py +110 -0
  72. cogbox_toolbox_api_client_async/models/match.py +106 -0
  73. cogbox_toolbox_api_client_async/models/mouse_click_request.py +108 -0
  74. cogbox_toolbox_api_client_async/models/mouse_click_response.py +104 -0
  75. cogbox_toolbox_api_client_async/models/mouse_drag_request.py +110 -0
  76. cogbox_toolbox_api_client_async/models/mouse_drag_response.py +104 -0
  77. cogbox_toolbox_api_client_async/models/mouse_move_request.py +104 -0
  78. cogbox_toolbox_api_client_async/models/mouse_position_response.py +104 -0
  79. cogbox_toolbox_api_client_async/models/mouse_scroll_request.py +109 -0
  80. cogbox_toolbox_api_client_async/models/port_list.py +102 -0
  81. cogbox_toolbox_api_client_async/models/position.py +104 -0
  82. cogbox_toolbox_api_client_async/models/process_errors_response.py +104 -0
  83. cogbox_toolbox_api_client_async/models/process_logs_response.py +104 -0
  84. cogbox_toolbox_api_client_async/models/process_restart_response.py +104 -0
  85. cogbox_toolbox_api_client_async/models/process_status.py +108 -0
  86. cogbox_toolbox_api_client_async/models/process_status_response.py +104 -0
  87. cogbox_toolbox_api_client_async/models/pty_create_request.py +112 -0
  88. cogbox_toolbox_api_client_async/models/pty_create_response.py +102 -0
  89. cogbox_toolbox_api_client_async/models/pty_list_response.py +110 -0
  90. cogbox_toolbox_api_client_async/models/pty_resize_request.py +105 -0
  91. cogbox_toolbox_api_client_async/models/pty_session_info.py +116 -0
  92. cogbox_toolbox_api_client_async/models/recording.py +116 -0
  93. cogbox_toolbox_api_client_async/models/replace_request.py +106 -0
  94. cogbox_toolbox_api_client_async/models/replace_result.py +106 -0
  95. cogbox_toolbox_api_client_async/models/screenshot_response.py +110 -0
  96. cogbox_toolbox_api_client_async/models/scroll_response.py +102 -0
  97. cogbox_toolbox_api_client_async/models/search_files_response.py +102 -0
  98. cogbox_toolbox_api_client_async/models/session.py +112 -0
  99. cogbox_toolbox_api_client_async/models/session_command_logs_response.py +106 -0
  100. cogbox_toolbox_api_client_async/models/session_execute_request.py +108 -0
  101. cogbox_toolbox_api_client_async/models/session_execute_response.py +110 -0
  102. cogbox_toolbox_api_client_async/models/session_send_input_request.py +102 -0
  103. cogbox_toolbox_api_client_async/models/start_recording_request.py +102 -0
  104. cogbox_toolbox_api_client_async/models/status.py +48 -0
  105. cogbox_toolbox_api_client_async/models/stop_recording_request.py +102 -0
  106. cogbox_toolbox_api_client_async/models/user_home_dir_response.py +102 -0
  107. cogbox_toolbox_api_client_async/models/window_info.py +114 -0
  108. cogbox_toolbox_api_client_async/models/windows_response.py +110 -0
  109. cogbox_toolbox_api_client_async/models/work_dir_response.py +102 -0
  110. cogbox_toolbox_api_client_async/py.typed +0 -0
  111. cogbox_toolbox_api_client_async/rest.py +226 -0
  112. cogbox_toolbox_api_client_async-0.190.1.dist-info/METADATA +20 -0
  113. cogbox_toolbox_api_client_async-0.190.1.dist-info/RECORD +116 -0
  114. cogbox_toolbox_api_client_async-0.190.1.dist-info/WHEEL +5 -0
  115. cogbox_toolbox_api_client_async-0.190.1.dist-info/licenses/LICENSE +190 -0
  116. cogbox_toolbox_api_client_async-0.190.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1971 @@
1
+ """
2
+ Cogbox Toolbox API
3
+
4
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+
9
+ Do not edit the class manually.
10
+ """ # noqa: E501
11
+
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictStr
19
+ from typing import List
20
+ from typing_extensions import Annotated
21
+ from cogbox_toolbox_api_client_async.models.completion_list import CompletionList
22
+ from cogbox_toolbox_api_client_async.models.lsp_completion_params import LspCompletionParams
23
+ from cogbox_toolbox_api_client_async.models.lsp_document_request import LspDocumentRequest
24
+ from cogbox_toolbox_api_client_async.models.lsp_server_request import LspServerRequest
25
+ from cogbox_toolbox_api_client_async.models.lsp_symbol import LspSymbol
26
+
27
+ from cogbox_toolbox_api_client_async.api_client import ApiClient, RequestSerialized
28
+ from cogbox_toolbox_api_client_async.api_response import ApiResponse
29
+ from cogbox_toolbox_api_client_async.rest import RESTResponseType
30
+
31
+
32
+ class LspApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def completions(
47
+ self,
48
+ request: Annotated[LspCompletionParams, Field(description="Completion request")],
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> CompletionList:
62
+ """Get code completions
63
+
64
+ Get code completion suggestions from the LSP server
65
+
66
+ :param request: Completion request (required)
67
+ :type request: LspCompletionParams
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._completions_serialize(
91
+ request=request,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "CompletionList",
100
+ }
101
+ response_data = await self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ await response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ async def completions_with_http_info(
114
+ self,
115
+ request: Annotated[LspCompletionParams, Field(description="Completion request")],
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[CompletionList]:
129
+ """Get code completions
130
+
131
+ Get code completion suggestions from the LSP server
132
+
133
+ :param request: Completion request (required)
134
+ :type request: LspCompletionParams
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._completions_serialize(
158
+ request=request,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "CompletionList",
167
+ }
168
+ response_data = await self.api_client.call_api(
169
+ *_param,
170
+ _request_timeout=_request_timeout
171
+ )
172
+ await response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+
179
+ @validate_call
180
+ async def completions_without_preload_content(
181
+ self,
182
+ request: Annotated[LspCompletionParams, Field(description="Completion request")],
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Annotated[StrictFloat, Field(gt=0)]
189
+ ]
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Get code completions
197
+
198
+ Get code completion suggestions from the LSP server
199
+
200
+ :param request: Completion request (required)
201
+ :type request: LspCompletionParams
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._completions_serialize(
225
+ request=request,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ '200': "CompletionList",
234
+ }
235
+ response_data = await self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _completions_serialize(
243
+ self,
244
+ request,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ # process the query parameters
267
+ # process the header parameters
268
+ # process the form parameters
269
+ # process the body parameter
270
+ if request is not None:
271
+ _body_params = request
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if 'Accept' not in _header_params:
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
281
+
282
+ # set the HTTP header `Content-Type`
283
+ if _content_type:
284
+ _header_params['Content-Type'] = _content_type
285
+ else:
286
+ _default_content_type = (
287
+ self.api_client.select_header_content_type(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+ )
293
+ if _default_content_type is not None:
294
+ _header_params['Content-Type'] = _default_content_type
295
+
296
+ # authentication setting
297
+ _auth_settings: List[str] = [
298
+ ]
299
+
300
+ return self.api_client.param_serialize(
301
+ method='POST',
302
+ resource_path='/lsp/completions',
303
+ path_params=_path_params,
304
+ query_params=_query_params,
305
+ header_params=_header_params,
306
+ body=_body_params,
307
+ post_params=_form_params,
308
+ files=_files,
309
+ auth_settings=_auth_settings,
310
+ collection_formats=_collection_formats,
311
+ _host=_host,
312
+ _request_auth=_request_auth
313
+ )
314
+
315
+
316
+
317
+
318
+ @validate_call
319
+ async def did_close(
320
+ self,
321
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
322
+ _request_timeout: Union[
323
+ None,
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Tuple[
326
+ Annotated[StrictFloat, Field(gt=0)],
327
+ Annotated[StrictFloat, Field(gt=0)]
328
+ ]
329
+ ] = None,
330
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
331
+ _content_type: Optional[StrictStr] = None,
332
+ _headers: Optional[Dict[StrictStr, Any]] = None,
333
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
334
+ ) -> None:
335
+ """Notify document closed
336
+
337
+ Notify the LSP server that a document has been closed
338
+
339
+ :param request: Document request (required)
340
+ :type request: LspDocumentRequest
341
+ :param _request_timeout: timeout setting for this request. If one
342
+ number provided, it will be total request
343
+ timeout. It can also be a pair (tuple) of
344
+ (connection, read) timeouts.
345
+ :type _request_timeout: int, tuple(int, int), optional
346
+ :param _request_auth: set to override the auth_settings for an a single
347
+ request; this effectively ignores the
348
+ authentication in the spec for a single request.
349
+ :type _request_auth: dict, optional
350
+ :param _content_type: force content-type for the request.
351
+ :type _content_type: str, Optional
352
+ :param _headers: set to override the headers for a single
353
+ request; this effectively ignores the headers
354
+ in the spec for a single request.
355
+ :type _headers: dict, optional
356
+ :param _host_index: set to override the host_index for a single
357
+ request; this effectively ignores the host_index
358
+ in the spec for a single request.
359
+ :type _host_index: int, optional
360
+ :return: Returns the result object.
361
+ """ # noqa: E501
362
+
363
+ _param = self._did_close_serialize(
364
+ request=request,
365
+ _request_auth=_request_auth,
366
+ _content_type=_content_type,
367
+ _headers=_headers,
368
+ _host_index=_host_index
369
+ )
370
+
371
+ _response_types_map: Dict[str, Optional[str]] = {
372
+ '200': None,
373
+ }
374
+ response_data = await self.api_client.call_api(
375
+ *_param,
376
+ _request_timeout=_request_timeout
377
+ )
378
+ await response_data.read()
379
+ return self.api_client.response_deserialize(
380
+ response_data=response_data,
381
+ response_types_map=_response_types_map,
382
+ ).data
383
+
384
+
385
+ @validate_call
386
+ async def did_close_with_http_info(
387
+ self,
388
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Annotated[StrictFloat, Field(gt=0)]
395
+ ]
396
+ ] = None,
397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
398
+ _content_type: Optional[StrictStr] = None,
399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
401
+ ) -> ApiResponse[None]:
402
+ """Notify document closed
403
+
404
+ Notify the LSP server that a document has been closed
405
+
406
+ :param request: Document request (required)
407
+ :type request: LspDocumentRequest
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._did_close_serialize(
431
+ request=request,
432
+ _request_auth=_request_auth,
433
+ _content_type=_content_type,
434
+ _headers=_headers,
435
+ _host_index=_host_index
436
+ )
437
+
438
+ _response_types_map: Dict[str, Optional[str]] = {
439
+ '200': None,
440
+ }
441
+ response_data = await self.api_client.call_api(
442
+ *_param,
443
+ _request_timeout=_request_timeout
444
+ )
445
+ await response_data.read()
446
+ return self.api_client.response_deserialize(
447
+ response_data=response_data,
448
+ response_types_map=_response_types_map,
449
+ )
450
+
451
+
452
+ @validate_call
453
+ async def did_close_without_preload_content(
454
+ self,
455
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
456
+ _request_timeout: Union[
457
+ None,
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Tuple[
460
+ Annotated[StrictFloat, Field(gt=0)],
461
+ Annotated[StrictFloat, Field(gt=0)]
462
+ ]
463
+ ] = None,
464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
465
+ _content_type: Optional[StrictStr] = None,
466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
468
+ ) -> RESTResponseType:
469
+ """Notify document closed
470
+
471
+ Notify the LSP server that a document has been closed
472
+
473
+ :param request: Document request (required)
474
+ :type request: LspDocumentRequest
475
+ :param _request_timeout: timeout setting for this request. If one
476
+ number provided, it will be total request
477
+ timeout. It can also be a pair (tuple) of
478
+ (connection, read) timeouts.
479
+ :type _request_timeout: int, tuple(int, int), optional
480
+ :param _request_auth: set to override the auth_settings for an a single
481
+ request; this effectively ignores the
482
+ authentication in the spec for a single request.
483
+ :type _request_auth: dict, optional
484
+ :param _content_type: force content-type for the request.
485
+ :type _content_type: str, Optional
486
+ :param _headers: set to override the headers for a single
487
+ request; this effectively ignores the headers
488
+ in the spec for a single request.
489
+ :type _headers: dict, optional
490
+ :param _host_index: set to override the host_index for a single
491
+ request; this effectively ignores the host_index
492
+ in the spec for a single request.
493
+ :type _host_index: int, optional
494
+ :return: Returns the result object.
495
+ """ # noqa: E501
496
+
497
+ _param = self._did_close_serialize(
498
+ request=request,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '200': None,
507
+ }
508
+ response_data = await self.api_client.call_api(
509
+ *_param,
510
+ _request_timeout=_request_timeout
511
+ )
512
+ return response_data.response
513
+
514
+
515
+ def _did_close_serialize(
516
+ self,
517
+ request,
518
+ _request_auth,
519
+ _content_type,
520
+ _headers,
521
+ _host_index,
522
+ ) -> RequestSerialized:
523
+
524
+ _host = None
525
+
526
+ _collection_formats: Dict[str, str] = {
527
+ }
528
+
529
+ _path_params: Dict[str, str] = {}
530
+ _query_params: List[Tuple[str, str]] = []
531
+ _header_params: Dict[str, Optional[str]] = _headers or {}
532
+ _form_params: List[Tuple[str, str]] = []
533
+ _files: Dict[
534
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
535
+ ] = {}
536
+ _body_params: Optional[bytes] = None
537
+
538
+ # process the path parameters
539
+ # process the query parameters
540
+ # process the header parameters
541
+ # process the form parameters
542
+ # process the body parameter
543
+ if request is not None:
544
+ _body_params = request
545
+
546
+
547
+
548
+ # set the HTTP header `Content-Type`
549
+ if _content_type:
550
+ _header_params['Content-Type'] = _content_type
551
+ else:
552
+ _default_content_type = (
553
+ self.api_client.select_header_content_type(
554
+ [
555
+ 'application/json'
556
+ ]
557
+ )
558
+ )
559
+ if _default_content_type is not None:
560
+ _header_params['Content-Type'] = _default_content_type
561
+
562
+ # authentication setting
563
+ _auth_settings: List[str] = [
564
+ ]
565
+
566
+ return self.api_client.param_serialize(
567
+ method='POST',
568
+ resource_path='/lsp/did-close',
569
+ path_params=_path_params,
570
+ query_params=_query_params,
571
+ header_params=_header_params,
572
+ body=_body_params,
573
+ post_params=_form_params,
574
+ files=_files,
575
+ auth_settings=_auth_settings,
576
+ collection_formats=_collection_formats,
577
+ _host=_host,
578
+ _request_auth=_request_auth
579
+ )
580
+
581
+
582
+
583
+
584
+ @validate_call
585
+ async def did_open(
586
+ self,
587
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
588
+ _request_timeout: Union[
589
+ None,
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Tuple[
592
+ Annotated[StrictFloat, Field(gt=0)],
593
+ Annotated[StrictFloat, Field(gt=0)]
594
+ ]
595
+ ] = None,
596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
597
+ _content_type: Optional[StrictStr] = None,
598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
600
+ ) -> None:
601
+ """Notify document opened
602
+
603
+ Notify the LSP server that a document has been opened
604
+
605
+ :param request: Document request (required)
606
+ :type request: LspDocumentRequest
607
+ :param _request_timeout: timeout setting for this request. If one
608
+ number provided, it will be total request
609
+ timeout. It can also be a pair (tuple) of
610
+ (connection, read) timeouts.
611
+ :type _request_timeout: int, tuple(int, int), optional
612
+ :param _request_auth: set to override the auth_settings for an a single
613
+ request; this effectively ignores the
614
+ authentication in the spec for a single request.
615
+ :type _request_auth: dict, optional
616
+ :param _content_type: force content-type for the request.
617
+ :type _content_type: str, Optional
618
+ :param _headers: set to override the headers for a single
619
+ request; this effectively ignores the headers
620
+ in the spec for a single request.
621
+ :type _headers: dict, optional
622
+ :param _host_index: set to override the host_index for a single
623
+ request; this effectively ignores the host_index
624
+ in the spec for a single request.
625
+ :type _host_index: int, optional
626
+ :return: Returns the result object.
627
+ """ # noqa: E501
628
+
629
+ _param = self._did_open_serialize(
630
+ request=request,
631
+ _request_auth=_request_auth,
632
+ _content_type=_content_type,
633
+ _headers=_headers,
634
+ _host_index=_host_index
635
+ )
636
+
637
+ _response_types_map: Dict[str, Optional[str]] = {
638
+ '200': None,
639
+ }
640
+ response_data = await self.api_client.call_api(
641
+ *_param,
642
+ _request_timeout=_request_timeout
643
+ )
644
+ await response_data.read()
645
+ return self.api_client.response_deserialize(
646
+ response_data=response_data,
647
+ response_types_map=_response_types_map,
648
+ ).data
649
+
650
+
651
+ @validate_call
652
+ async def did_open_with_http_info(
653
+ self,
654
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
655
+ _request_timeout: Union[
656
+ None,
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Tuple[
659
+ Annotated[StrictFloat, Field(gt=0)],
660
+ Annotated[StrictFloat, Field(gt=0)]
661
+ ]
662
+ ] = None,
663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
664
+ _content_type: Optional[StrictStr] = None,
665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
667
+ ) -> ApiResponse[None]:
668
+ """Notify document opened
669
+
670
+ Notify the LSP server that a document has been opened
671
+
672
+ :param request: Document request (required)
673
+ :type request: LspDocumentRequest
674
+ :param _request_timeout: timeout setting for this request. If one
675
+ number provided, it will be total request
676
+ timeout. It can also be a pair (tuple) of
677
+ (connection, read) timeouts.
678
+ :type _request_timeout: int, tuple(int, int), optional
679
+ :param _request_auth: set to override the auth_settings for an a single
680
+ request; this effectively ignores the
681
+ authentication in the spec for a single request.
682
+ :type _request_auth: dict, optional
683
+ :param _content_type: force content-type for the request.
684
+ :type _content_type: str, Optional
685
+ :param _headers: set to override the headers for a single
686
+ request; this effectively ignores the headers
687
+ in the spec for a single request.
688
+ :type _headers: dict, optional
689
+ :param _host_index: set to override the host_index for a single
690
+ request; this effectively ignores the host_index
691
+ in the spec for a single request.
692
+ :type _host_index: int, optional
693
+ :return: Returns the result object.
694
+ """ # noqa: E501
695
+
696
+ _param = self._did_open_serialize(
697
+ request=request,
698
+ _request_auth=_request_auth,
699
+ _content_type=_content_type,
700
+ _headers=_headers,
701
+ _host_index=_host_index
702
+ )
703
+
704
+ _response_types_map: Dict[str, Optional[str]] = {
705
+ '200': None,
706
+ }
707
+ response_data = await self.api_client.call_api(
708
+ *_param,
709
+ _request_timeout=_request_timeout
710
+ )
711
+ await response_data.read()
712
+ return self.api_client.response_deserialize(
713
+ response_data=response_data,
714
+ response_types_map=_response_types_map,
715
+ )
716
+
717
+
718
+ @validate_call
719
+ async def did_open_without_preload_content(
720
+ self,
721
+ request: Annotated[LspDocumentRequest, Field(description="Document request")],
722
+ _request_timeout: Union[
723
+ None,
724
+ Annotated[StrictFloat, Field(gt=0)],
725
+ Tuple[
726
+ Annotated[StrictFloat, Field(gt=0)],
727
+ Annotated[StrictFloat, Field(gt=0)]
728
+ ]
729
+ ] = None,
730
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
731
+ _content_type: Optional[StrictStr] = None,
732
+ _headers: Optional[Dict[StrictStr, Any]] = None,
733
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
734
+ ) -> RESTResponseType:
735
+ """Notify document opened
736
+
737
+ Notify the LSP server that a document has been opened
738
+
739
+ :param request: Document request (required)
740
+ :type request: LspDocumentRequest
741
+ :param _request_timeout: timeout setting for this request. If one
742
+ number provided, it will be total request
743
+ timeout. It can also be a pair (tuple) of
744
+ (connection, read) timeouts.
745
+ :type _request_timeout: int, tuple(int, int), optional
746
+ :param _request_auth: set to override the auth_settings for an a single
747
+ request; this effectively ignores the
748
+ authentication in the spec for a single request.
749
+ :type _request_auth: dict, optional
750
+ :param _content_type: force content-type for the request.
751
+ :type _content_type: str, Optional
752
+ :param _headers: set to override the headers for a single
753
+ request; this effectively ignores the headers
754
+ in the spec for a single request.
755
+ :type _headers: dict, optional
756
+ :param _host_index: set to override the host_index for a single
757
+ request; this effectively ignores the host_index
758
+ in the spec for a single request.
759
+ :type _host_index: int, optional
760
+ :return: Returns the result object.
761
+ """ # noqa: E501
762
+
763
+ _param = self._did_open_serialize(
764
+ request=request,
765
+ _request_auth=_request_auth,
766
+ _content_type=_content_type,
767
+ _headers=_headers,
768
+ _host_index=_host_index
769
+ )
770
+
771
+ _response_types_map: Dict[str, Optional[str]] = {
772
+ '200': None,
773
+ }
774
+ response_data = await self.api_client.call_api(
775
+ *_param,
776
+ _request_timeout=_request_timeout
777
+ )
778
+ return response_data.response
779
+
780
+
781
+ def _did_open_serialize(
782
+ self,
783
+ request,
784
+ _request_auth,
785
+ _content_type,
786
+ _headers,
787
+ _host_index,
788
+ ) -> RequestSerialized:
789
+
790
+ _host = None
791
+
792
+ _collection_formats: Dict[str, str] = {
793
+ }
794
+
795
+ _path_params: Dict[str, str] = {}
796
+ _query_params: List[Tuple[str, str]] = []
797
+ _header_params: Dict[str, Optional[str]] = _headers or {}
798
+ _form_params: List[Tuple[str, str]] = []
799
+ _files: Dict[
800
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
801
+ ] = {}
802
+ _body_params: Optional[bytes] = None
803
+
804
+ # process the path parameters
805
+ # process the query parameters
806
+ # process the header parameters
807
+ # process the form parameters
808
+ # process the body parameter
809
+ if request is not None:
810
+ _body_params = request
811
+
812
+
813
+
814
+ # set the HTTP header `Content-Type`
815
+ if _content_type:
816
+ _header_params['Content-Type'] = _content_type
817
+ else:
818
+ _default_content_type = (
819
+ self.api_client.select_header_content_type(
820
+ [
821
+ 'application/json'
822
+ ]
823
+ )
824
+ )
825
+ if _default_content_type is not None:
826
+ _header_params['Content-Type'] = _default_content_type
827
+
828
+ # authentication setting
829
+ _auth_settings: List[str] = [
830
+ ]
831
+
832
+ return self.api_client.param_serialize(
833
+ method='POST',
834
+ resource_path='/lsp/did-open',
835
+ path_params=_path_params,
836
+ query_params=_query_params,
837
+ header_params=_header_params,
838
+ body=_body_params,
839
+ post_params=_form_params,
840
+ files=_files,
841
+ auth_settings=_auth_settings,
842
+ collection_formats=_collection_formats,
843
+ _host=_host,
844
+ _request_auth=_request_auth
845
+ )
846
+
847
+
848
+
849
+
850
+ @validate_call
851
+ async def document_symbols(
852
+ self,
853
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
854
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
855
+ uri: Annotated[StrictStr, Field(description="Document URI")],
856
+ _request_timeout: Union[
857
+ None,
858
+ Annotated[StrictFloat, Field(gt=0)],
859
+ Tuple[
860
+ Annotated[StrictFloat, Field(gt=0)],
861
+ Annotated[StrictFloat, Field(gt=0)]
862
+ ]
863
+ ] = None,
864
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
865
+ _content_type: Optional[StrictStr] = None,
866
+ _headers: Optional[Dict[StrictStr, Any]] = None,
867
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
868
+ ) -> List[LspSymbol]:
869
+ """Get document symbols
870
+
871
+ Get symbols (functions, classes, etc.) from a document
872
+
873
+ :param language_id: Language ID (e.g., python, typescript) (required)
874
+ :type language_id: str
875
+ :param path_to_project: Path to project (required)
876
+ :type path_to_project: str
877
+ :param uri: Document URI (required)
878
+ :type uri: str
879
+ :param _request_timeout: timeout setting for this request. If one
880
+ number provided, it will be total request
881
+ timeout. It can also be a pair (tuple) of
882
+ (connection, read) timeouts.
883
+ :type _request_timeout: int, tuple(int, int), optional
884
+ :param _request_auth: set to override the auth_settings for an a single
885
+ request; this effectively ignores the
886
+ authentication in the spec for a single request.
887
+ :type _request_auth: dict, optional
888
+ :param _content_type: force content-type for the request.
889
+ :type _content_type: str, Optional
890
+ :param _headers: set to override the headers for a single
891
+ request; this effectively ignores the headers
892
+ in the spec for a single request.
893
+ :type _headers: dict, optional
894
+ :param _host_index: set to override the host_index for a single
895
+ request; this effectively ignores the host_index
896
+ in the spec for a single request.
897
+ :type _host_index: int, optional
898
+ :return: Returns the result object.
899
+ """ # noqa: E501
900
+
901
+ _param = self._document_symbols_serialize(
902
+ language_id=language_id,
903
+ path_to_project=path_to_project,
904
+ uri=uri,
905
+ _request_auth=_request_auth,
906
+ _content_type=_content_type,
907
+ _headers=_headers,
908
+ _host_index=_host_index
909
+ )
910
+
911
+ _response_types_map: Dict[str, Optional[str]] = {
912
+ '200': "List[LspSymbol]",
913
+ }
914
+ response_data = await self.api_client.call_api(
915
+ *_param,
916
+ _request_timeout=_request_timeout
917
+ )
918
+ await response_data.read()
919
+ return self.api_client.response_deserialize(
920
+ response_data=response_data,
921
+ response_types_map=_response_types_map,
922
+ ).data
923
+
924
+
925
+ @validate_call
926
+ async def document_symbols_with_http_info(
927
+ self,
928
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
929
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
930
+ uri: Annotated[StrictStr, Field(description="Document URI")],
931
+ _request_timeout: Union[
932
+ None,
933
+ Annotated[StrictFloat, Field(gt=0)],
934
+ Tuple[
935
+ Annotated[StrictFloat, Field(gt=0)],
936
+ Annotated[StrictFloat, Field(gt=0)]
937
+ ]
938
+ ] = None,
939
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
940
+ _content_type: Optional[StrictStr] = None,
941
+ _headers: Optional[Dict[StrictStr, Any]] = None,
942
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
943
+ ) -> ApiResponse[List[LspSymbol]]:
944
+ """Get document symbols
945
+
946
+ Get symbols (functions, classes, etc.) from a document
947
+
948
+ :param language_id: Language ID (e.g., python, typescript) (required)
949
+ :type language_id: str
950
+ :param path_to_project: Path to project (required)
951
+ :type path_to_project: str
952
+ :param uri: Document URI (required)
953
+ :type uri: str
954
+ :param _request_timeout: timeout setting for this request. If one
955
+ number provided, it will be total request
956
+ timeout. It can also be a pair (tuple) of
957
+ (connection, read) timeouts.
958
+ :type _request_timeout: int, tuple(int, int), optional
959
+ :param _request_auth: set to override the auth_settings for an a single
960
+ request; this effectively ignores the
961
+ authentication in the spec for a single request.
962
+ :type _request_auth: dict, optional
963
+ :param _content_type: force content-type for the request.
964
+ :type _content_type: str, Optional
965
+ :param _headers: set to override the headers for a single
966
+ request; this effectively ignores the headers
967
+ in the spec for a single request.
968
+ :type _headers: dict, optional
969
+ :param _host_index: set to override the host_index for a single
970
+ request; this effectively ignores the host_index
971
+ in the spec for a single request.
972
+ :type _host_index: int, optional
973
+ :return: Returns the result object.
974
+ """ # noqa: E501
975
+
976
+ _param = self._document_symbols_serialize(
977
+ language_id=language_id,
978
+ path_to_project=path_to_project,
979
+ uri=uri,
980
+ _request_auth=_request_auth,
981
+ _content_type=_content_type,
982
+ _headers=_headers,
983
+ _host_index=_host_index
984
+ )
985
+
986
+ _response_types_map: Dict[str, Optional[str]] = {
987
+ '200': "List[LspSymbol]",
988
+ }
989
+ response_data = await self.api_client.call_api(
990
+ *_param,
991
+ _request_timeout=_request_timeout
992
+ )
993
+ await response_data.read()
994
+ return self.api_client.response_deserialize(
995
+ response_data=response_data,
996
+ response_types_map=_response_types_map,
997
+ )
998
+
999
+
1000
+ @validate_call
1001
+ async def document_symbols_without_preload_content(
1002
+ self,
1003
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
1004
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
1005
+ uri: Annotated[StrictStr, Field(description="Document URI")],
1006
+ _request_timeout: Union[
1007
+ None,
1008
+ Annotated[StrictFloat, Field(gt=0)],
1009
+ Tuple[
1010
+ Annotated[StrictFloat, Field(gt=0)],
1011
+ Annotated[StrictFloat, Field(gt=0)]
1012
+ ]
1013
+ ] = None,
1014
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1015
+ _content_type: Optional[StrictStr] = None,
1016
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1017
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1018
+ ) -> RESTResponseType:
1019
+ """Get document symbols
1020
+
1021
+ Get symbols (functions, classes, etc.) from a document
1022
+
1023
+ :param language_id: Language ID (e.g., python, typescript) (required)
1024
+ :type language_id: str
1025
+ :param path_to_project: Path to project (required)
1026
+ :type path_to_project: str
1027
+ :param uri: Document URI (required)
1028
+ :type uri: str
1029
+ :param _request_timeout: timeout setting for this request. If one
1030
+ number provided, it will be total request
1031
+ timeout. It can also be a pair (tuple) of
1032
+ (connection, read) timeouts.
1033
+ :type _request_timeout: int, tuple(int, int), optional
1034
+ :param _request_auth: set to override the auth_settings for an a single
1035
+ request; this effectively ignores the
1036
+ authentication in the spec for a single request.
1037
+ :type _request_auth: dict, optional
1038
+ :param _content_type: force content-type for the request.
1039
+ :type _content_type: str, Optional
1040
+ :param _headers: set to override the headers for a single
1041
+ request; this effectively ignores the headers
1042
+ in the spec for a single request.
1043
+ :type _headers: dict, optional
1044
+ :param _host_index: set to override the host_index for a single
1045
+ request; this effectively ignores the host_index
1046
+ in the spec for a single request.
1047
+ :type _host_index: int, optional
1048
+ :return: Returns the result object.
1049
+ """ # noqa: E501
1050
+
1051
+ _param = self._document_symbols_serialize(
1052
+ language_id=language_id,
1053
+ path_to_project=path_to_project,
1054
+ uri=uri,
1055
+ _request_auth=_request_auth,
1056
+ _content_type=_content_type,
1057
+ _headers=_headers,
1058
+ _host_index=_host_index
1059
+ )
1060
+
1061
+ _response_types_map: Dict[str, Optional[str]] = {
1062
+ '200': "List[LspSymbol]",
1063
+ }
1064
+ response_data = await self.api_client.call_api(
1065
+ *_param,
1066
+ _request_timeout=_request_timeout
1067
+ )
1068
+ return response_data.response
1069
+
1070
+
1071
+ def _document_symbols_serialize(
1072
+ self,
1073
+ language_id,
1074
+ path_to_project,
1075
+ uri,
1076
+ _request_auth,
1077
+ _content_type,
1078
+ _headers,
1079
+ _host_index,
1080
+ ) -> RequestSerialized:
1081
+
1082
+ _host = None
1083
+
1084
+ _collection_formats: Dict[str, str] = {
1085
+ }
1086
+
1087
+ _path_params: Dict[str, str] = {}
1088
+ _query_params: List[Tuple[str, str]] = []
1089
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1090
+ _form_params: List[Tuple[str, str]] = []
1091
+ _files: Dict[
1092
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1093
+ ] = {}
1094
+ _body_params: Optional[bytes] = None
1095
+
1096
+ # process the path parameters
1097
+ # process the query parameters
1098
+ if language_id is not None:
1099
+
1100
+ _query_params.append(('languageId', language_id))
1101
+
1102
+ if path_to_project is not None:
1103
+
1104
+ _query_params.append(('pathToProject', path_to_project))
1105
+
1106
+ if uri is not None:
1107
+
1108
+ _query_params.append(('uri', uri))
1109
+
1110
+ # process the header parameters
1111
+ # process the form parameters
1112
+ # process the body parameter
1113
+
1114
+
1115
+ # set the HTTP header `Accept`
1116
+ if 'Accept' not in _header_params:
1117
+ _header_params['Accept'] = self.api_client.select_header_accept(
1118
+ [
1119
+ 'application/json'
1120
+ ]
1121
+ )
1122
+
1123
+
1124
+ # authentication setting
1125
+ _auth_settings: List[str] = [
1126
+ ]
1127
+
1128
+ return self.api_client.param_serialize(
1129
+ method='GET',
1130
+ resource_path='/lsp/document-symbols',
1131
+ path_params=_path_params,
1132
+ query_params=_query_params,
1133
+ header_params=_header_params,
1134
+ body=_body_params,
1135
+ post_params=_form_params,
1136
+ files=_files,
1137
+ auth_settings=_auth_settings,
1138
+ collection_formats=_collection_formats,
1139
+ _host=_host,
1140
+ _request_auth=_request_auth
1141
+ )
1142
+
1143
+
1144
+
1145
+
1146
+ @validate_call
1147
+ async def start(
1148
+ self,
1149
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1150
+ _request_timeout: Union[
1151
+ None,
1152
+ Annotated[StrictFloat, Field(gt=0)],
1153
+ Tuple[
1154
+ Annotated[StrictFloat, Field(gt=0)],
1155
+ Annotated[StrictFloat, Field(gt=0)]
1156
+ ]
1157
+ ] = None,
1158
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1159
+ _content_type: Optional[StrictStr] = None,
1160
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1161
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1162
+ ) -> None:
1163
+ """Start LSP server
1164
+
1165
+ Start a Language Server Protocol server for the specified language
1166
+
1167
+ :param request: LSP server request (required)
1168
+ :type request: LspServerRequest
1169
+ :param _request_timeout: timeout setting for this request. If one
1170
+ number provided, it will be total request
1171
+ timeout. It can also be a pair (tuple) of
1172
+ (connection, read) timeouts.
1173
+ :type _request_timeout: int, tuple(int, int), optional
1174
+ :param _request_auth: set to override the auth_settings for an a single
1175
+ request; this effectively ignores the
1176
+ authentication in the spec for a single request.
1177
+ :type _request_auth: dict, optional
1178
+ :param _content_type: force content-type for the request.
1179
+ :type _content_type: str, Optional
1180
+ :param _headers: set to override the headers for a single
1181
+ request; this effectively ignores the headers
1182
+ in the spec for a single request.
1183
+ :type _headers: dict, optional
1184
+ :param _host_index: set to override the host_index for a single
1185
+ request; this effectively ignores the host_index
1186
+ in the spec for a single request.
1187
+ :type _host_index: int, optional
1188
+ :return: Returns the result object.
1189
+ """ # noqa: E501
1190
+
1191
+ _param = self._start_serialize(
1192
+ request=request,
1193
+ _request_auth=_request_auth,
1194
+ _content_type=_content_type,
1195
+ _headers=_headers,
1196
+ _host_index=_host_index
1197
+ )
1198
+
1199
+ _response_types_map: Dict[str, Optional[str]] = {
1200
+ '200': None,
1201
+ }
1202
+ response_data = await self.api_client.call_api(
1203
+ *_param,
1204
+ _request_timeout=_request_timeout
1205
+ )
1206
+ await response_data.read()
1207
+ return self.api_client.response_deserialize(
1208
+ response_data=response_data,
1209
+ response_types_map=_response_types_map,
1210
+ ).data
1211
+
1212
+
1213
+ @validate_call
1214
+ async def start_with_http_info(
1215
+ self,
1216
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1217
+ _request_timeout: Union[
1218
+ None,
1219
+ Annotated[StrictFloat, Field(gt=0)],
1220
+ Tuple[
1221
+ Annotated[StrictFloat, Field(gt=0)],
1222
+ Annotated[StrictFloat, Field(gt=0)]
1223
+ ]
1224
+ ] = None,
1225
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1226
+ _content_type: Optional[StrictStr] = None,
1227
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1228
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1229
+ ) -> ApiResponse[None]:
1230
+ """Start LSP server
1231
+
1232
+ Start a Language Server Protocol server for the specified language
1233
+
1234
+ :param request: LSP server request (required)
1235
+ :type request: LspServerRequest
1236
+ :param _request_timeout: timeout setting for this request. If one
1237
+ number provided, it will be total request
1238
+ timeout. It can also be a pair (tuple) of
1239
+ (connection, read) timeouts.
1240
+ :type _request_timeout: int, tuple(int, int), optional
1241
+ :param _request_auth: set to override the auth_settings for an a single
1242
+ request; this effectively ignores the
1243
+ authentication in the spec for a single request.
1244
+ :type _request_auth: dict, optional
1245
+ :param _content_type: force content-type for the request.
1246
+ :type _content_type: str, Optional
1247
+ :param _headers: set to override the headers for a single
1248
+ request; this effectively ignores the headers
1249
+ in the spec for a single request.
1250
+ :type _headers: dict, optional
1251
+ :param _host_index: set to override the host_index for a single
1252
+ request; this effectively ignores the host_index
1253
+ in the spec for a single request.
1254
+ :type _host_index: int, optional
1255
+ :return: Returns the result object.
1256
+ """ # noqa: E501
1257
+
1258
+ _param = self._start_serialize(
1259
+ request=request,
1260
+ _request_auth=_request_auth,
1261
+ _content_type=_content_type,
1262
+ _headers=_headers,
1263
+ _host_index=_host_index
1264
+ )
1265
+
1266
+ _response_types_map: Dict[str, Optional[str]] = {
1267
+ '200': None,
1268
+ }
1269
+ response_data = await self.api_client.call_api(
1270
+ *_param,
1271
+ _request_timeout=_request_timeout
1272
+ )
1273
+ await response_data.read()
1274
+ return self.api_client.response_deserialize(
1275
+ response_data=response_data,
1276
+ response_types_map=_response_types_map,
1277
+ )
1278
+
1279
+
1280
+ @validate_call
1281
+ async def start_without_preload_content(
1282
+ self,
1283
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1284
+ _request_timeout: Union[
1285
+ None,
1286
+ Annotated[StrictFloat, Field(gt=0)],
1287
+ Tuple[
1288
+ Annotated[StrictFloat, Field(gt=0)],
1289
+ Annotated[StrictFloat, Field(gt=0)]
1290
+ ]
1291
+ ] = None,
1292
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1293
+ _content_type: Optional[StrictStr] = None,
1294
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1295
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1296
+ ) -> RESTResponseType:
1297
+ """Start LSP server
1298
+
1299
+ Start a Language Server Protocol server for the specified language
1300
+
1301
+ :param request: LSP server request (required)
1302
+ :type request: LspServerRequest
1303
+ :param _request_timeout: timeout setting for this request. If one
1304
+ number provided, it will be total request
1305
+ timeout. It can also be a pair (tuple) of
1306
+ (connection, read) timeouts.
1307
+ :type _request_timeout: int, tuple(int, int), optional
1308
+ :param _request_auth: set to override the auth_settings for an a single
1309
+ request; this effectively ignores the
1310
+ authentication in the spec for a single request.
1311
+ :type _request_auth: dict, optional
1312
+ :param _content_type: force content-type for the request.
1313
+ :type _content_type: str, Optional
1314
+ :param _headers: set to override the headers for a single
1315
+ request; this effectively ignores the headers
1316
+ in the spec for a single request.
1317
+ :type _headers: dict, optional
1318
+ :param _host_index: set to override the host_index for a single
1319
+ request; this effectively ignores the host_index
1320
+ in the spec for a single request.
1321
+ :type _host_index: int, optional
1322
+ :return: Returns the result object.
1323
+ """ # noqa: E501
1324
+
1325
+ _param = self._start_serialize(
1326
+ request=request,
1327
+ _request_auth=_request_auth,
1328
+ _content_type=_content_type,
1329
+ _headers=_headers,
1330
+ _host_index=_host_index
1331
+ )
1332
+
1333
+ _response_types_map: Dict[str, Optional[str]] = {
1334
+ '200': None,
1335
+ }
1336
+ response_data = await self.api_client.call_api(
1337
+ *_param,
1338
+ _request_timeout=_request_timeout
1339
+ )
1340
+ return response_data.response
1341
+
1342
+
1343
+ def _start_serialize(
1344
+ self,
1345
+ request,
1346
+ _request_auth,
1347
+ _content_type,
1348
+ _headers,
1349
+ _host_index,
1350
+ ) -> RequestSerialized:
1351
+
1352
+ _host = None
1353
+
1354
+ _collection_formats: Dict[str, str] = {
1355
+ }
1356
+
1357
+ _path_params: Dict[str, str] = {}
1358
+ _query_params: List[Tuple[str, str]] = []
1359
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1360
+ _form_params: List[Tuple[str, str]] = []
1361
+ _files: Dict[
1362
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1363
+ ] = {}
1364
+ _body_params: Optional[bytes] = None
1365
+
1366
+ # process the path parameters
1367
+ # process the query parameters
1368
+ # process the header parameters
1369
+ # process the form parameters
1370
+ # process the body parameter
1371
+ if request is not None:
1372
+ _body_params = request
1373
+
1374
+
1375
+
1376
+ # set the HTTP header `Content-Type`
1377
+ if _content_type:
1378
+ _header_params['Content-Type'] = _content_type
1379
+ else:
1380
+ _default_content_type = (
1381
+ self.api_client.select_header_content_type(
1382
+ [
1383
+ 'application/json'
1384
+ ]
1385
+ )
1386
+ )
1387
+ if _default_content_type is not None:
1388
+ _header_params['Content-Type'] = _default_content_type
1389
+
1390
+ # authentication setting
1391
+ _auth_settings: List[str] = [
1392
+ ]
1393
+
1394
+ return self.api_client.param_serialize(
1395
+ method='POST',
1396
+ resource_path='/lsp/start',
1397
+ path_params=_path_params,
1398
+ query_params=_query_params,
1399
+ header_params=_header_params,
1400
+ body=_body_params,
1401
+ post_params=_form_params,
1402
+ files=_files,
1403
+ auth_settings=_auth_settings,
1404
+ collection_formats=_collection_formats,
1405
+ _host=_host,
1406
+ _request_auth=_request_auth
1407
+ )
1408
+
1409
+
1410
+
1411
+
1412
+ @validate_call
1413
+ async def stop(
1414
+ self,
1415
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1416
+ _request_timeout: Union[
1417
+ None,
1418
+ Annotated[StrictFloat, Field(gt=0)],
1419
+ Tuple[
1420
+ Annotated[StrictFloat, Field(gt=0)],
1421
+ Annotated[StrictFloat, Field(gt=0)]
1422
+ ]
1423
+ ] = None,
1424
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1425
+ _content_type: Optional[StrictStr] = None,
1426
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1427
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1428
+ ) -> None:
1429
+ """Stop LSP server
1430
+
1431
+ Stop a Language Server Protocol server
1432
+
1433
+ :param request: LSP server request (required)
1434
+ :type request: LspServerRequest
1435
+ :param _request_timeout: timeout setting for this request. If one
1436
+ number provided, it will be total request
1437
+ timeout. It can also be a pair (tuple) of
1438
+ (connection, read) timeouts.
1439
+ :type _request_timeout: int, tuple(int, int), optional
1440
+ :param _request_auth: set to override the auth_settings for an a single
1441
+ request; this effectively ignores the
1442
+ authentication in the spec for a single request.
1443
+ :type _request_auth: dict, optional
1444
+ :param _content_type: force content-type for the request.
1445
+ :type _content_type: str, Optional
1446
+ :param _headers: set to override the headers for a single
1447
+ request; this effectively ignores the headers
1448
+ in the spec for a single request.
1449
+ :type _headers: dict, optional
1450
+ :param _host_index: set to override the host_index for a single
1451
+ request; this effectively ignores the host_index
1452
+ in the spec for a single request.
1453
+ :type _host_index: int, optional
1454
+ :return: Returns the result object.
1455
+ """ # noqa: E501
1456
+
1457
+ _param = self._stop_serialize(
1458
+ request=request,
1459
+ _request_auth=_request_auth,
1460
+ _content_type=_content_type,
1461
+ _headers=_headers,
1462
+ _host_index=_host_index
1463
+ )
1464
+
1465
+ _response_types_map: Dict[str, Optional[str]] = {
1466
+ '200': None,
1467
+ }
1468
+ response_data = await self.api_client.call_api(
1469
+ *_param,
1470
+ _request_timeout=_request_timeout
1471
+ )
1472
+ await response_data.read()
1473
+ return self.api_client.response_deserialize(
1474
+ response_data=response_data,
1475
+ response_types_map=_response_types_map,
1476
+ ).data
1477
+
1478
+
1479
+ @validate_call
1480
+ async def stop_with_http_info(
1481
+ self,
1482
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1483
+ _request_timeout: Union[
1484
+ None,
1485
+ Annotated[StrictFloat, Field(gt=0)],
1486
+ Tuple[
1487
+ Annotated[StrictFloat, Field(gt=0)],
1488
+ Annotated[StrictFloat, Field(gt=0)]
1489
+ ]
1490
+ ] = None,
1491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1492
+ _content_type: Optional[StrictStr] = None,
1493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1495
+ ) -> ApiResponse[None]:
1496
+ """Stop LSP server
1497
+
1498
+ Stop a Language Server Protocol server
1499
+
1500
+ :param request: LSP server request (required)
1501
+ :type request: LspServerRequest
1502
+ :param _request_timeout: timeout setting for this request. If one
1503
+ number provided, it will be total request
1504
+ timeout. It can also be a pair (tuple) of
1505
+ (connection, read) timeouts.
1506
+ :type _request_timeout: int, tuple(int, int), optional
1507
+ :param _request_auth: set to override the auth_settings for an a single
1508
+ request; this effectively ignores the
1509
+ authentication in the spec for a single request.
1510
+ :type _request_auth: dict, optional
1511
+ :param _content_type: force content-type for the request.
1512
+ :type _content_type: str, Optional
1513
+ :param _headers: set to override the headers for a single
1514
+ request; this effectively ignores the headers
1515
+ in the spec for a single request.
1516
+ :type _headers: dict, optional
1517
+ :param _host_index: set to override the host_index for a single
1518
+ request; this effectively ignores the host_index
1519
+ in the spec for a single request.
1520
+ :type _host_index: int, optional
1521
+ :return: Returns the result object.
1522
+ """ # noqa: E501
1523
+
1524
+ _param = self._stop_serialize(
1525
+ request=request,
1526
+ _request_auth=_request_auth,
1527
+ _content_type=_content_type,
1528
+ _headers=_headers,
1529
+ _host_index=_host_index
1530
+ )
1531
+
1532
+ _response_types_map: Dict[str, Optional[str]] = {
1533
+ '200': None,
1534
+ }
1535
+ response_data = await self.api_client.call_api(
1536
+ *_param,
1537
+ _request_timeout=_request_timeout
1538
+ )
1539
+ await response_data.read()
1540
+ return self.api_client.response_deserialize(
1541
+ response_data=response_data,
1542
+ response_types_map=_response_types_map,
1543
+ )
1544
+
1545
+
1546
+ @validate_call
1547
+ async def stop_without_preload_content(
1548
+ self,
1549
+ request: Annotated[LspServerRequest, Field(description="LSP server request")],
1550
+ _request_timeout: Union[
1551
+ None,
1552
+ Annotated[StrictFloat, Field(gt=0)],
1553
+ Tuple[
1554
+ Annotated[StrictFloat, Field(gt=0)],
1555
+ Annotated[StrictFloat, Field(gt=0)]
1556
+ ]
1557
+ ] = None,
1558
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1559
+ _content_type: Optional[StrictStr] = None,
1560
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1561
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1562
+ ) -> RESTResponseType:
1563
+ """Stop LSP server
1564
+
1565
+ Stop a Language Server Protocol server
1566
+
1567
+ :param request: LSP server request (required)
1568
+ :type request: LspServerRequest
1569
+ :param _request_timeout: timeout setting for this request. If one
1570
+ number provided, it will be total request
1571
+ timeout. It can also be a pair (tuple) of
1572
+ (connection, read) timeouts.
1573
+ :type _request_timeout: int, tuple(int, int), optional
1574
+ :param _request_auth: set to override the auth_settings for an a single
1575
+ request; this effectively ignores the
1576
+ authentication in the spec for a single request.
1577
+ :type _request_auth: dict, optional
1578
+ :param _content_type: force content-type for the request.
1579
+ :type _content_type: str, Optional
1580
+ :param _headers: set to override the headers for a single
1581
+ request; this effectively ignores the headers
1582
+ in the spec for a single request.
1583
+ :type _headers: dict, optional
1584
+ :param _host_index: set to override the host_index for a single
1585
+ request; this effectively ignores the host_index
1586
+ in the spec for a single request.
1587
+ :type _host_index: int, optional
1588
+ :return: Returns the result object.
1589
+ """ # noqa: E501
1590
+
1591
+ _param = self._stop_serialize(
1592
+ request=request,
1593
+ _request_auth=_request_auth,
1594
+ _content_type=_content_type,
1595
+ _headers=_headers,
1596
+ _host_index=_host_index
1597
+ )
1598
+
1599
+ _response_types_map: Dict[str, Optional[str]] = {
1600
+ '200': None,
1601
+ }
1602
+ response_data = await self.api_client.call_api(
1603
+ *_param,
1604
+ _request_timeout=_request_timeout
1605
+ )
1606
+ return response_data.response
1607
+
1608
+
1609
+ def _stop_serialize(
1610
+ self,
1611
+ request,
1612
+ _request_auth,
1613
+ _content_type,
1614
+ _headers,
1615
+ _host_index,
1616
+ ) -> RequestSerialized:
1617
+
1618
+ _host = None
1619
+
1620
+ _collection_formats: Dict[str, str] = {
1621
+ }
1622
+
1623
+ _path_params: Dict[str, str] = {}
1624
+ _query_params: List[Tuple[str, str]] = []
1625
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1626
+ _form_params: List[Tuple[str, str]] = []
1627
+ _files: Dict[
1628
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1629
+ ] = {}
1630
+ _body_params: Optional[bytes] = None
1631
+
1632
+ # process the path parameters
1633
+ # process the query parameters
1634
+ # process the header parameters
1635
+ # process the form parameters
1636
+ # process the body parameter
1637
+ if request is not None:
1638
+ _body_params = request
1639
+
1640
+
1641
+
1642
+ # set the HTTP header `Content-Type`
1643
+ if _content_type:
1644
+ _header_params['Content-Type'] = _content_type
1645
+ else:
1646
+ _default_content_type = (
1647
+ self.api_client.select_header_content_type(
1648
+ [
1649
+ 'application/json'
1650
+ ]
1651
+ )
1652
+ )
1653
+ if _default_content_type is not None:
1654
+ _header_params['Content-Type'] = _default_content_type
1655
+
1656
+ # authentication setting
1657
+ _auth_settings: List[str] = [
1658
+ ]
1659
+
1660
+ return self.api_client.param_serialize(
1661
+ method='POST',
1662
+ resource_path='/lsp/stop',
1663
+ path_params=_path_params,
1664
+ query_params=_query_params,
1665
+ header_params=_header_params,
1666
+ body=_body_params,
1667
+ post_params=_form_params,
1668
+ files=_files,
1669
+ auth_settings=_auth_settings,
1670
+ collection_formats=_collection_formats,
1671
+ _host=_host,
1672
+ _request_auth=_request_auth
1673
+ )
1674
+
1675
+
1676
+
1677
+
1678
+ @validate_call
1679
+ async def workspace_symbols(
1680
+ self,
1681
+ query: Annotated[StrictStr, Field(description="Search query")],
1682
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
1683
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
1684
+ _request_timeout: Union[
1685
+ None,
1686
+ Annotated[StrictFloat, Field(gt=0)],
1687
+ Tuple[
1688
+ Annotated[StrictFloat, Field(gt=0)],
1689
+ Annotated[StrictFloat, Field(gt=0)]
1690
+ ]
1691
+ ] = None,
1692
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1693
+ _content_type: Optional[StrictStr] = None,
1694
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1695
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1696
+ ) -> List[LspSymbol]:
1697
+ """Get workspace symbols
1698
+
1699
+ Search for symbols across the entire workspace
1700
+
1701
+ :param query: Search query (required)
1702
+ :type query: str
1703
+ :param language_id: Language ID (e.g., python, typescript) (required)
1704
+ :type language_id: str
1705
+ :param path_to_project: Path to project (required)
1706
+ :type path_to_project: str
1707
+ :param _request_timeout: timeout setting for this request. If one
1708
+ number provided, it will be total request
1709
+ timeout. It can also be a pair (tuple) of
1710
+ (connection, read) timeouts.
1711
+ :type _request_timeout: int, tuple(int, int), optional
1712
+ :param _request_auth: set to override the auth_settings for an a single
1713
+ request; this effectively ignores the
1714
+ authentication in the spec for a single request.
1715
+ :type _request_auth: dict, optional
1716
+ :param _content_type: force content-type for the request.
1717
+ :type _content_type: str, Optional
1718
+ :param _headers: set to override the headers for a single
1719
+ request; this effectively ignores the headers
1720
+ in the spec for a single request.
1721
+ :type _headers: dict, optional
1722
+ :param _host_index: set to override the host_index for a single
1723
+ request; this effectively ignores the host_index
1724
+ in the spec for a single request.
1725
+ :type _host_index: int, optional
1726
+ :return: Returns the result object.
1727
+ """ # noqa: E501
1728
+
1729
+ _param = self._workspace_symbols_serialize(
1730
+ query=query,
1731
+ language_id=language_id,
1732
+ path_to_project=path_to_project,
1733
+ _request_auth=_request_auth,
1734
+ _content_type=_content_type,
1735
+ _headers=_headers,
1736
+ _host_index=_host_index
1737
+ )
1738
+
1739
+ _response_types_map: Dict[str, Optional[str]] = {
1740
+ '200': "List[LspSymbol]",
1741
+ }
1742
+ response_data = await self.api_client.call_api(
1743
+ *_param,
1744
+ _request_timeout=_request_timeout
1745
+ )
1746
+ await response_data.read()
1747
+ return self.api_client.response_deserialize(
1748
+ response_data=response_data,
1749
+ response_types_map=_response_types_map,
1750
+ ).data
1751
+
1752
+
1753
+ @validate_call
1754
+ async def workspace_symbols_with_http_info(
1755
+ self,
1756
+ query: Annotated[StrictStr, Field(description="Search query")],
1757
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
1758
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
1759
+ _request_timeout: Union[
1760
+ None,
1761
+ Annotated[StrictFloat, Field(gt=0)],
1762
+ Tuple[
1763
+ Annotated[StrictFloat, Field(gt=0)],
1764
+ Annotated[StrictFloat, Field(gt=0)]
1765
+ ]
1766
+ ] = None,
1767
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1768
+ _content_type: Optional[StrictStr] = None,
1769
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1770
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1771
+ ) -> ApiResponse[List[LspSymbol]]:
1772
+ """Get workspace symbols
1773
+
1774
+ Search for symbols across the entire workspace
1775
+
1776
+ :param query: Search query (required)
1777
+ :type query: str
1778
+ :param language_id: Language ID (e.g., python, typescript) (required)
1779
+ :type language_id: str
1780
+ :param path_to_project: Path to project (required)
1781
+ :type path_to_project: str
1782
+ :param _request_timeout: timeout setting for this request. If one
1783
+ number provided, it will be total request
1784
+ timeout. It can also be a pair (tuple) of
1785
+ (connection, read) timeouts.
1786
+ :type _request_timeout: int, tuple(int, int), optional
1787
+ :param _request_auth: set to override the auth_settings for an a single
1788
+ request; this effectively ignores the
1789
+ authentication in the spec for a single request.
1790
+ :type _request_auth: dict, optional
1791
+ :param _content_type: force content-type for the request.
1792
+ :type _content_type: str, Optional
1793
+ :param _headers: set to override the headers for a single
1794
+ request; this effectively ignores the headers
1795
+ in the spec for a single request.
1796
+ :type _headers: dict, optional
1797
+ :param _host_index: set to override the host_index for a single
1798
+ request; this effectively ignores the host_index
1799
+ in the spec for a single request.
1800
+ :type _host_index: int, optional
1801
+ :return: Returns the result object.
1802
+ """ # noqa: E501
1803
+
1804
+ _param = self._workspace_symbols_serialize(
1805
+ query=query,
1806
+ language_id=language_id,
1807
+ path_to_project=path_to_project,
1808
+ _request_auth=_request_auth,
1809
+ _content_type=_content_type,
1810
+ _headers=_headers,
1811
+ _host_index=_host_index
1812
+ )
1813
+
1814
+ _response_types_map: Dict[str, Optional[str]] = {
1815
+ '200': "List[LspSymbol]",
1816
+ }
1817
+ response_data = await self.api_client.call_api(
1818
+ *_param,
1819
+ _request_timeout=_request_timeout
1820
+ )
1821
+ await response_data.read()
1822
+ return self.api_client.response_deserialize(
1823
+ response_data=response_data,
1824
+ response_types_map=_response_types_map,
1825
+ )
1826
+
1827
+
1828
+ @validate_call
1829
+ async def workspace_symbols_without_preload_content(
1830
+ self,
1831
+ query: Annotated[StrictStr, Field(description="Search query")],
1832
+ language_id: Annotated[StrictStr, Field(description="Language ID (e.g., python, typescript)")],
1833
+ path_to_project: Annotated[StrictStr, Field(description="Path to project")],
1834
+ _request_timeout: Union[
1835
+ None,
1836
+ Annotated[StrictFloat, Field(gt=0)],
1837
+ Tuple[
1838
+ Annotated[StrictFloat, Field(gt=0)],
1839
+ Annotated[StrictFloat, Field(gt=0)]
1840
+ ]
1841
+ ] = None,
1842
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1843
+ _content_type: Optional[StrictStr] = None,
1844
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1845
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1846
+ ) -> RESTResponseType:
1847
+ """Get workspace symbols
1848
+
1849
+ Search for symbols across the entire workspace
1850
+
1851
+ :param query: Search query (required)
1852
+ :type query: str
1853
+ :param language_id: Language ID (e.g., python, typescript) (required)
1854
+ :type language_id: str
1855
+ :param path_to_project: Path to project (required)
1856
+ :type path_to_project: str
1857
+ :param _request_timeout: timeout setting for this request. If one
1858
+ number provided, it will be total request
1859
+ timeout. It can also be a pair (tuple) of
1860
+ (connection, read) timeouts.
1861
+ :type _request_timeout: int, tuple(int, int), optional
1862
+ :param _request_auth: set to override the auth_settings for an a single
1863
+ request; this effectively ignores the
1864
+ authentication in the spec for a single request.
1865
+ :type _request_auth: dict, optional
1866
+ :param _content_type: force content-type for the request.
1867
+ :type _content_type: str, Optional
1868
+ :param _headers: set to override the headers for a single
1869
+ request; this effectively ignores the headers
1870
+ in the spec for a single request.
1871
+ :type _headers: dict, optional
1872
+ :param _host_index: set to override the host_index for a single
1873
+ request; this effectively ignores the host_index
1874
+ in the spec for a single request.
1875
+ :type _host_index: int, optional
1876
+ :return: Returns the result object.
1877
+ """ # noqa: E501
1878
+
1879
+ _param = self._workspace_symbols_serialize(
1880
+ query=query,
1881
+ language_id=language_id,
1882
+ path_to_project=path_to_project,
1883
+ _request_auth=_request_auth,
1884
+ _content_type=_content_type,
1885
+ _headers=_headers,
1886
+ _host_index=_host_index
1887
+ )
1888
+
1889
+ _response_types_map: Dict[str, Optional[str]] = {
1890
+ '200': "List[LspSymbol]",
1891
+ }
1892
+ response_data = await self.api_client.call_api(
1893
+ *_param,
1894
+ _request_timeout=_request_timeout
1895
+ )
1896
+ return response_data.response
1897
+
1898
+
1899
+ def _workspace_symbols_serialize(
1900
+ self,
1901
+ query,
1902
+ language_id,
1903
+ path_to_project,
1904
+ _request_auth,
1905
+ _content_type,
1906
+ _headers,
1907
+ _host_index,
1908
+ ) -> RequestSerialized:
1909
+
1910
+ _host = None
1911
+
1912
+ _collection_formats: Dict[str, str] = {
1913
+ }
1914
+
1915
+ _path_params: Dict[str, str] = {}
1916
+ _query_params: List[Tuple[str, str]] = []
1917
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1918
+ _form_params: List[Tuple[str, str]] = []
1919
+ _files: Dict[
1920
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1921
+ ] = {}
1922
+ _body_params: Optional[bytes] = None
1923
+
1924
+ # process the path parameters
1925
+ # process the query parameters
1926
+ if query is not None:
1927
+
1928
+ _query_params.append(('query', query))
1929
+
1930
+ if language_id is not None:
1931
+
1932
+ _query_params.append(('languageId', language_id))
1933
+
1934
+ if path_to_project is not None:
1935
+
1936
+ _query_params.append(('pathToProject', path_to_project))
1937
+
1938
+ # process the header parameters
1939
+ # process the form parameters
1940
+ # process the body parameter
1941
+
1942
+
1943
+ # set the HTTP header `Accept`
1944
+ if 'Accept' not in _header_params:
1945
+ _header_params['Accept'] = self.api_client.select_header_accept(
1946
+ [
1947
+ 'application/json'
1948
+ ]
1949
+ )
1950
+
1951
+
1952
+ # authentication setting
1953
+ _auth_settings: List[str] = [
1954
+ ]
1955
+
1956
+ return self.api_client.param_serialize(
1957
+ method='GET',
1958
+ resource_path='/lsp/workspacesymbols',
1959
+ path_params=_path_params,
1960
+ query_params=_query_params,
1961
+ header_params=_header_params,
1962
+ body=_body_params,
1963
+ post_params=_form_params,
1964
+ files=_files,
1965
+ auth_settings=_auth_settings,
1966
+ collection_formats=_collection_formats,
1967
+ _host=_host,
1968
+ _request_auth=_request_auth
1969
+ )
1970
+
1971
+