Skip to content

feat(api): api update #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 73
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-00234fd425f75dd0ac33cdfd2b9e806a7fa29638ffc4ed4b91d5042a17ff5cfd.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-76f469266d2a329a84074f63a1e53c27bb78eb39c0585fe7790b082e1758c0c5.yml
10 changes: 5 additions & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,18 @@ from runloop_api_client.types.devboxes import (
Methods:

- <code title="post /v1/devboxes/{id}/lsp/apply-code-action">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">apply_code_action</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_apply_code_action_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/code_action_application_result.py">CodeActionApplicationResult</a></code>
- <code title="post /v1/devboxes/{id}/lsp/code-actions">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">code_actions</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_code_actions_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/code_actions_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/lsp/code-actions">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">code_actions</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_code_actions_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/code_actions_response.py">CodeActionsResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/diagnostics">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">diagnostics</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_diagnostics_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/diagnostics_response.py">DiagnosticsResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/document-symbols">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">document_symbols</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_document_symbols_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/document_symbol_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/lsp/document-symbols">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">document_symbols</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_document_symbols_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/document_symbol_response.py">DocumentSymbolResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/file">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">file</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/file_contents_response.py">FileContentsResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/file-definition">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">file_definition</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_file_definition_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/file_definition_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/lsp/file-definition">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">file_definition</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_file_definition_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/file_definition_response.py">FileDefinitionResponse</a></code>
- <code title="get /v1/devboxes/{id}/lsp/files">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">files</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/lsp_files_response.py">LspFilesResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/formatting">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">formatting</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_formatting_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/formatting_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/lsp/formatting">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">formatting</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_formatting_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/formatting_response.py">FormattingResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/get-code-actions-for-diagnostic">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">get_code_actions_for_diagnostic</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_get_code_actions_for_diagnostic_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/lsp_get_code_actions_for_diagnostic_response.py">LspGetCodeActionsForDiagnosticResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/get-code-segment-info">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">get_code_segment_info</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_get_code_segment_info_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/code_segment_info_response.py">CodeSegmentInfoResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/get-signature-help">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">get_signature_help</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_get_signature_help_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/signature_help_response.py">SignatureHelpResponse</a></code>
- <code title="get /v1/devboxes/{id}/lsp/health">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">health</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/health_status_response.py">HealthStatusResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/references">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">references</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_references_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/references_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/lsp/references">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">references</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_references_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/references_response.py">ReferencesResponse</a></code>
- <code title="post /v1/devboxes/{id}/lsp/set-watch-directory">client.devboxes.lsp.<a href="./src/runloop_api_client/resources/devboxes/lsp.py">set_watch_directory</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/lsp_set_watch_directory_params.py">params</a>) -> str</code>

## Logs
Expand Down
49 changes: 29 additions & 20 deletions src/runloop_api_client/resources/devboxes/lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@
from ...types.devboxes.symbol_type import SymbolType
from ...types.devboxes.base_command_param import BaseCommandParam
from ...types.devboxes.lsp_files_response import LspFilesResponse
from ...types.devboxes.formatting_response import FormattingResponse
from ...types.devboxes.references_response import ReferencesResponse
from ...types.devboxes.diagnostics_response import DiagnosticsResponse
from ...types.devboxes.base_diagnostic_param import BaseDiagnosticParam
from ...types.devboxes.code_actions_response import CodeActionsResponse
from ...types.devboxes.file_contents_response import FileContentsResponse
from ...types.devboxes.health_status_response import HealthStatusResponse
from ...types.devboxes.signature_help_response import SignatureHelpResponse
from ...types.devboxes.document_symbol_response import DocumentSymbolResponse
from ...types.devboxes.file_definition_response import FileDefinitionResponse
from ...types.devboxes.base_workspace_edit_param import BaseWorkspaceEditParam
from ...types.devboxes.code_action_context_param import CodeActionContextParam
from ...types.devboxes.code_segment_info_response import CodeSegmentInfoResponse
Expand Down Expand Up @@ -83,6 +88,7 @@ def apply_code_action(
command: BaseCommandParam | NotGiven = NOT_GIVEN,
edit: BaseWorkspaceEditParam | NotGiven = NOT_GIVEN,
is_preferred: bool | NotGiven = NOT_GIVEN,
kind: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -116,6 +122,7 @@ def apply_code_action(
"command": command,
"edit": edit,
"is_preferred": is_preferred,
"kind": kind,
},
lsp_apply_code_action_params.LspApplyCodeActionParams,
),
Expand Down Expand Up @@ -143,7 +150,7 @@ def code_actions(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> CodeActionsResponse:
"""Get code actions for a part of a document.

This method calls the
Expand Down Expand Up @@ -203,7 +210,7 @@ def code_actions(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=CodeActionsResponse,
)

def diagnostics(
Expand Down Expand Up @@ -260,7 +267,7 @@ def document_symbols(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> DocumentSymbolResponse:
"""
Get document symbols for a given document.

Expand All @@ -287,7 +294,7 @@ def document_symbols(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=DocumentSymbolResponse,
)

def file(
Expand Down Expand Up @@ -346,7 +353,7 @@ def file_definition(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> FileDefinitionResponse:
"""
Get the definition of a symbol at a given position in a file
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition
Expand Down Expand Up @@ -381,7 +388,7 @@ def file_definition(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=FileDefinitionResponse,
)

def files(
Expand Down Expand Up @@ -429,7 +436,7 @@ def formatting(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> FormattingResponse:
"""
Get formatting changes for a given document.
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting
Expand Down Expand Up @@ -457,7 +464,7 @@ def formatting(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=FormattingResponse,
)

def get_code_actions_for_diagnostic(
Expand Down Expand Up @@ -661,7 +668,7 @@ def references(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> ReferencesResponse:
"""Get references for a given symbol.

This method calls the `getReferences` method
Expand Down Expand Up @@ -699,7 +706,7 @@ def references(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=ReferencesResponse,
)

def set_watch_directory(
Expand Down Expand Up @@ -774,6 +781,7 @@ async def apply_code_action(
command: BaseCommandParam | NotGiven = NOT_GIVEN,
edit: BaseWorkspaceEditParam | NotGiven = NOT_GIVEN,
is_preferred: bool | NotGiven = NOT_GIVEN,
kind: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -807,6 +815,7 @@ async def apply_code_action(
"command": command,
"edit": edit,
"is_preferred": is_preferred,
"kind": kind,
},
lsp_apply_code_action_params.LspApplyCodeActionParams,
),
Expand Down Expand Up @@ -834,7 +843,7 @@ async def code_actions(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> CodeActionsResponse:
"""Get code actions for a part of a document.

This method calls the
Expand Down Expand Up @@ -894,7 +903,7 @@ async def code_actions(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=CodeActionsResponse,
)

async def diagnostics(
Expand Down Expand Up @@ -951,7 +960,7 @@ async def document_symbols(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> DocumentSymbolResponse:
"""
Get document symbols for a given document.

Expand All @@ -978,7 +987,7 @@ async def document_symbols(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=DocumentSymbolResponse,
)

async def file(
Expand Down Expand Up @@ -1037,7 +1046,7 @@ async def file_definition(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> FileDefinitionResponse:
"""
Get the definition of a symbol at a given position in a file
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition
Expand Down Expand Up @@ -1072,7 +1081,7 @@ async def file_definition(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=FileDefinitionResponse,
)

async def files(
Expand Down Expand Up @@ -1120,7 +1129,7 @@ async def formatting(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> FormattingResponse:
"""
Get formatting changes for a given document.
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting
Expand Down Expand Up @@ -1148,7 +1157,7 @@ async def formatting(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=FormattingResponse,
)

async def get_code_actions_for_diagnostic(
Expand Down Expand Up @@ -1352,7 +1361,7 @@ async def references(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> object:
) -> ReferencesResponse:
"""Get references for a given symbol.

This method calls the `getReferences` method
Expand Down Expand Up @@ -1390,7 +1399,7 @@ async def references(
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=object,
cast_to=ReferencesResponse,
)

async def set_watch_directory(
Expand Down
5 changes: 5 additions & 0 deletions src/runloop_api_client/types/devboxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@
from .base_markup_content import BaseMarkupContent as BaseMarkupContent
from .base_workspace_edit import BaseWorkspaceEdit as BaseWorkspaceEdit
from .diagnostic_severity import DiagnosticSeverity as DiagnosticSeverity
from .formatting_response import FormattingResponse as FormattingResponse
from .references_response import ReferencesResponse as ReferencesResponse
from .diagnostics_response import DiagnosticsResponse as DiagnosticsResponse
from .base_diagnostic_param import BaseDiagnosticParam as BaseDiagnosticParam
from .code_actions_response import CodeActionsResponse as CodeActionsResponse
from .devbox_logs_list_view import DevboxLogsListView as DevboxLogsListView
from .lsp_formatting_params import LspFormattingParams as LspFormattingParams
from .lsp_references_params import LspReferencesParams as LspReferencesParams
Expand All @@ -53,6 +56,8 @@
from .lsp_code_actions_params import LspCodeActionsParams as LspCodeActionsParams
from .signature_help_response import SignatureHelpResponse as SignatureHelpResponse
from .code_action_trigger_kind import CodeActionTriggerKind as CodeActionTriggerKind
from .document_symbol_response import DocumentSymbolResponse as DocumentSymbolResponse
from .file_definition_response import FileDefinitionResponse as FileDefinitionResponse
from .base_workspace_edit_param import BaseWorkspaceEditParam as BaseWorkspaceEditParam
from .code_action_context_param import CodeActionContextParam as CodeActionContextParam
from .execution_retrieve_params import ExecutionRetrieveParams as ExecutionRetrieveParams
Expand Down
2 changes: 2 additions & 0 deletions src/runloop_api_client/types/devboxes/base_code_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ class BaseCodeAction(BaseModel):
edit: Optional[BaseWorkspaceEdit] = None

is_preferred: Optional[bool] = FieldInfo(alias="isPreferred", default=None)

kind: Optional[str] = None
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from __future__ import annotations

from typing import List, Iterable
from typing_extensions import Required, Annotated, TypedDict
from typing import Dict, List, Union, Iterable
from typing_extensions import Required, Annotated, TypeAlias, TypedDict

from ..._utils import PropertyInfo
from .code_action_kind import CodeActionKind
Expand All @@ -13,7 +13,7 @@
__all__ = ["CodeActionContextParam"]


class CodeActionContextParam(TypedDict, total=False):
class CodeActionContextParamTyped(TypedDict, total=False):
diagnostics: Required[Iterable[DiagnosticParam]]
"""
An array of diagnostics known on the client side overlapping the range provided
Expand All @@ -32,3 +32,6 @@ class CodeActionContextParam(TypedDict, total=False):

trigger_kind: Annotated[CodeActionTriggerKind, PropertyInfo(alias="triggerKind")]
"""The reason why code actions were requested."""


CodeActionContextParam: TypeAlias = Union[CodeActionContextParamTyped, Dict[str, object]]
13 changes: 13 additions & 0 deletions src/runloop_api_client/types/devboxes/code_actions_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing_extensions import TypeAlias

from .base_command import BaseCommand
from .base_code_action import BaseCodeAction

__all__ = ["CodeActionsResponse", "CodeActionsResponseItem"]

CodeActionsResponseItem: TypeAlias = Union[BaseCodeAction, BaseCommand]

CodeActionsResponse: TypeAlias = List[CodeActionsResponseItem]
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

from __future__ import annotations

from typing_extensions import Required, TypedDict
from typing import Dict, Union
from typing_extensions import Required, TypeAlias, TypedDict

from .u_ri import URi

__all__ = ["CodeDescriptionParam"]


class CodeDescriptionParam(TypedDict, total=False):
class CodeDescriptionParamTyped(TypedDict, total=False):
href: Required[URi]
"""An URI to open with more information about the diagnostic error."""


CodeDescriptionParam: TypeAlias = Union[CodeDescriptionParamTyped, Dict[str, object]]
Loading