|
54 | 54 | from ...types.devboxes.base_workspace_edit_param import BaseWorkspaceEditParam |
55 | 55 | from ...types.devboxes.code_action_context_param import CodeActionContextParam |
56 | 56 | from ...types.devboxes.code_segment_info_response import CodeSegmentInfoResponse |
| 57 | +from ...types.devboxes.references_request_body_param import ReferencesRequestBodyParam |
57 | 58 | from ...types.devboxes.code_action_application_result import CodeActionApplicationResult |
| 59 | +from ...types.devboxes.signature_help_request_body_param import SignatureHelpRequestBodyParam |
| 60 | +from ...types.devboxes.file_definition_request_body_param import FileDefinitionRequestBodyParam |
58 | 61 | from ...types.devboxes.lsp_get_code_actions_for_diagnostic_response import LspGetCodeActionsForDiagnosticResponse |
59 | 62 |
|
60 | 63 | __all__ = ["LspResource", "AsyncLspResource"] |
@@ -343,9 +346,7 @@ def file_definition( |
343 | 346 | self, |
344 | 347 | id: str, |
345 | 348 | *, |
346 | | - character: float, |
347 | | - line: float, |
348 | | - uri: str, |
| 349 | + file_definition_request_body: FileDefinitionRequestBodyParam, |
349 | 350 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
350 | 351 | # The extra values given here take precedence over values defined on the client or passed to this method. |
351 | 352 | extra_headers: Headers | None = None, |
@@ -373,14 +374,7 @@ def file_definition( |
373 | 374 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
374 | 375 | return self._post( |
375 | 376 | f"/v1/devboxes/{id}/lsp/file-definition", |
376 | | - body=maybe_transform( |
377 | | - { |
378 | | - "character": character, |
379 | | - "line": line, |
380 | | - "uri": uri, |
381 | | - }, |
382 | | - lsp_file_definition_params.LspFileDefinitionParams, |
383 | | - ), |
| 377 | + body=maybe_transform(file_definition_request_body, lsp_file_definition_params.LspFileDefinitionParams), |
384 | 378 | options=make_request_options( |
385 | 379 | extra_headers=extra_headers, |
386 | 380 | extra_query=extra_query, |
@@ -572,9 +566,7 @@ def get_signature_help( |
572 | 566 | self, |
573 | 567 | id: str, |
574 | 568 | *, |
575 | | - character: float, |
576 | | - line: float, |
577 | | - uri: str, |
| 569 | + signature_help_request_body: SignatureHelpRequestBodyParam, |
578 | 570 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
579 | 571 | # The extra values given here take precedence over values defined on the client or passed to this method. |
580 | 572 | extra_headers: Headers | None = None, |
@@ -602,14 +594,7 @@ def get_signature_help( |
602 | 594 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
603 | 595 | return self._post( |
604 | 596 | f"/v1/devboxes/{id}/lsp/get-signature-help", |
605 | | - body=maybe_transform( |
606 | | - { |
607 | | - "character": character, |
608 | | - "line": line, |
609 | | - "uri": uri, |
610 | | - }, |
611 | | - lsp_get_signature_help_params.LspGetSignatureHelpParams, |
612 | | - ), |
| 597 | + body=maybe_transform(signature_help_request_body, lsp_get_signature_help_params.LspGetSignatureHelpParams), |
613 | 598 | options=make_request_options( |
614 | 599 | extra_headers=extra_headers, |
615 | 600 | extra_query=extra_query, |
@@ -658,9 +643,7 @@ def references( |
658 | 643 | self, |
659 | 644 | id: str, |
660 | 645 | *, |
661 | | - character: float, |
662 | | - line: float, |
663 | | - uri: str, |
| 646 | + references_request_body: ReferencesRequestBodyParam, |
664 | 647 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
665 | 648 | # The extra values given here take precedence over values defined on the client or passed to this method. |
666 | 649 | extra_headers: Headers | None = None, |
@@ -691,14 +674,7 @@ def references( |
691 | 674 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
692 | 675 | return self._post( |
693 | 676 | f"/v1/devboxes/{id}/lsp/references", |
694 | | - body=maybe_transform( |
695 | | - { |
696 | | - "character": character, |
697 | | - "line": line, |
698 | | - "uri": uri, |
699 | | - }, |
700 | | - lsp_references_params.LspReferencesParams, |
701 | | - ), |
| 677 | + body=maybe_transform(references_request_body, lsp_references_params.LspReferencesParams), |
702 | 678 | options=make_request_options( |
703 | 679 | extra_headers=extra_headers, |
704 | 680 | extra_query=extra_query, |
@@ -1036,9 +1012,7 @@ async def file_definition( |
1036 | 1012 | self, |
1037 | 1013 | id: str, |
1038 | 1014 | *, |
1039 | | - character: float, |
1040 | | - line: float, |
1041 | | - uri: str, |
| 1015 | + file_definition_request_body: FileDefinitionRequestBodyParam, |
1042 | 1016 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
1043 | 1017 | # The extra values given here take precedence over values defined on the client or passed to this method. |
1044 | 1018 | extra_headers: Headers | None = None, |
@@ -1067,12 +1041,7 @@ async def file_definition( |
1067 | 1041 | return await self._post( |
1068 | 1042 | f"/v1/devboxes/{id}/lsp/file-definition", |
1069 | 1043 | body=await async_maybe_transform( |
1070 | | - { |
1071 | | - "character": character, |
1072 | | - "line": line, |
1073 | | - "uri": uri, |
1074 | | - }, |
1075 | | - lsp_file_definition_params.LspFileDefinitionParams, |
| 1044 | + file_definition_request_body, lsp_file_definition_params.LspFileDefinitionParams |
1076 | 1045 | ), |
1077 | 1046 | options=make_request_options( |
1078 | 1047 | extra_headers=extra_headers, |
@@ -1265,9 +1234,7 @@ async def get_signature_help( |
1265 | 1234 | self, |
1266 | 1235 | id: str, |
1267 | 1236 | *, |
1268 | | - character: float, |
1269 | | - line: float, |
1270 | | - uri: str, |
| 1237 | + signature_help_request_body: SignatureHelpRequestBodyParam, |
1271 | 1238 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
1272 | 1239 | # The extra values given here take precedence over values defined on the client or passed to this method. |
1273 | 1240 | extra_headers: Headers | None = None, |
@@ -1296,12 +1263,7 @@ async def get_signature_help( |
1296 | 1263 | return await self._post( |
1297 | 1264 | f"/v1/devboxes/{id}/lsp/get-signature-help", |
1298 | 1265 | body=await async_maybe_transform( |
1299 | | - { |
1300 | | - "character": character, |
1301 | | - "line": line, |
1302 | | - "uri": uri, |
1303 | | - }, |
1304 | | - lsp_get_signature_help_params.LspGetSignatureHelpParams, |
| 1266 | + signature_help_request_body, lsp_get_signature_help_params.LspGetSignatureHelpParams |
1305 | 1267 | ), |
1306 | 1268 | options=make_request_options( |
1307 | 1269 | extra_headers=extra_headers, |
@@ -1351,9 +1313,7 @@ async def references( |
1351 | 1313 | self, |
1352 | 1314 | id: str, |
1353 | 1315 | *, |
1354 | | - character: float, |
1355 | | - line: float, |
1356 | | - uri: str, |
| 1316 | + references_request_body: ReferencesRequestBodyParam, |
1357 | 1317 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
1358 | 1318 | # The extra values given here take precedence over values defined on the client or passed to this method. |
1359 | 1319 | extra_headers: Headers | None = None, |
@@ -1384,14 +1344,7 @@ async def references( |
1384 | 1344 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
1385 | 1345 | return await self._post( |
1386 | 1346 | f"/v1/devboxes/{id}/lsp/references", |
1387 | | - body=await async_maybe_transform( |
1388 | | - { |
1389 | | - "character": character, |
1390 | | - "line": line, |
1391 | | - "uri": uri, |
1392 | | - }, |
1393 | | - lsp_references_params.LspReferencesParams, |
1394 | | - ), |
| 1347 | + body=await async_maybe_transform(references_request_body, lsp_references_params.LspReferencesParams), |
1395 | 1348 | options=make_request_options( |
1396 | 1349 | extra_headers=extra_headers, |
1397 | 1350 | extra_query=extra_query, |
|
0 commit comments