daytona_toolbox_api_client 0.102.0rc2__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.

Potentially problematic release.


This version of daytona_toolbox_api_client might be problematic. Click here for more details.

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