22
33from __future__ import annotations
44
5+ import typing_extensions
56from typing import Dict , List , Mapping , Iterable , Optional , TypedDict , cast
67from typing_extensions import Literal
78
1011# uuid_utils is not typed
1112from uuid_utils import uuid7 # type: ignore
1213
13- from .lsp import (
14- LspResource ,
15- AsyncLspResource ,
16- LspResourceWithRawResponse ,
17- AsyncLspResourceWithRawResponse ,
18- LspResourceWithStreamingResponse ,
19- AsyncLspResourceWithStreamingResponse ,
20- )
2114from .logs import (
2215 LogsResource ,
2316 AsyncLogsResource ,
@@ -154,10 +147,6 @@ def browsers(self) -> BrowsersResource:
154147 def computers (self ) -> ComputersResource :
155148 return ComputersResource (self ._client )
156149
157- @cached_property
158- def lsp (self ) -> LspResource :
159- return LspResource (self ._client )
160-
161150 @cached_property
162151 def logs (self ) -> LogsResource :
163152 return LogsResource (self ._client )
@@ -730,6 +719,7 @@ def execute(
730719 * ,
731720 command : str ,
732721 command_id : str ,
722+ optimistic_timeout : Optional [int ] | Omit = omit ,
733723 shell_name : Optional [str ] | Omit = omit ,
734724 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
735725 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -752,6 +742,9 @@ def execute(
752742
753743 command_id: The command ID for idempotency and tracking
754744
745+ optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
746+ is 600 seconds.
747+
755748 shell_name: The name of the persistent shell to create or use if already created. When using
756749 a persistent shell, the command will run from the directory at the end of the
757750 previous command and environment variables will be preserved.
@@ -776,6 +769,7 @@ def execute(
776769 {
777770 "command" : command ,
778771 "command_id" : command_id ,
772+ "optimistic_timeout" : optimistic_timeout ,
779773 "shell_name" : shell_name ,
780774 },
781775 devbox_execute_params .DevboxExecuteParams ,
@@ -902,6 +896,7 @@ def execute_async(
902896 cast_to = DevboxAsyncExecutionDetailView ,
903897 )
904898
899+ @typing_extensions .deprecated ("deprecated" )
905900 def execute_sync (
906901 self ,
907902 id : str ,
@@ -1596,10 +1591,6 @@ def browsers(self) -> AsyncBrowsersResource:
15961591 def computers (self ) -> AsyncComputersResource :
15971592 return AsyncComputersResource (self ._client )
15981593
1599- @cached_property
1600- def lsp (self ) -> AsyncLspResource :
1601- return AsyncLspResource (self ._client )
1602-
16031594 @cached_property
16041595 def logs (self ) -> AsyncLogsResource :
16051596 return AsyncLogsResource (self ._client )
@@ -2171,6 +2162,7 @@ async def execute(
21712162 * ,
21722163 command : str ,
21732164 command_id : str ,
2165+ optimistic_timeout : Optional [int ] | Omit = omit ,
21742166 shell_name : Optional [str ] | Omit = omit ,
21752167 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
21762168 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2193,6 +2185,9 @@ async def execute(
21932185
21942186 command_id: The command ID for idempotency and tracking
21952187
2188+ optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
2189+ is 600 seconds.
2190+
21962191 shell_name: The name of the persistent shell to create or use if already created. When using
21972192 a persistent shell, the command will run from the directory at the end of the
21982193 previous command and environment variables will be preserved.
@@ -2217,6 +2212,7 @@ async def execute(
22172212 {
22182213 "command" : command ,
22192214 "command_id" : command_id ,
2215+ "optimistic_timeout" : optimistic_timeout ,
22202216 "shell_name" : shell_name ,
22212217 },
22222218 devbox_execute_params .DevboxExecuteParams ,
@@ -2344,6 +2340,7 @@ async def execute_async(
23442340 cast_to = DevboxAsyncExecutionDetailView ,
23452341 )
23462342
2343+ @typing_extensions .deprecated ("deprecated" )
23472344 async def execute_sync (
23482345 self ,
23492346 id : str ,
@@ -3060,8 +3057,10 @@ def __init__(self, devboxes: DevboxesResource) -> None:
30603057 self .execute_async = to_raw_response_wrapper (
30613058 devboxes .execute_async ,
30623059 )
3063- self .execute_sync = to_raw_response_wrapper (
3064- devboxes .execute_sync ,
3060+ self .execute_sync = ( # pyright: ignore[reportDeprecated]
3061+ to_raw_response_wrapper (
3062+ devboxes .execute_sync , # pyright: ignore[reportDeprecated],
3063+ )
30653064 )
30663065 self .keep_alive = to_raw_response_wrapper (
30673066 devboxes .keep_alive ,
@@ -3112,10 +3111,6 @@ def browsers(self) -> BrowsersResourceWithRawResponse:
31123111 def computers (self ) -> ComputersResourceWithRawResponse :
31133112 return ComputersResourceWithRawResponse (self ._devboxes .computers )
31143113
3115- @cached_property
3116- def lsp (self ) -> LspResourceWithRawResponse :
3117- return LspResourceWithRawResponse (self ._devboxes .lsp )
3118-
31193114 @cached_property
31203115 def logs (self ) -> LogsResourceWithRawResponse :
31213116 return LogsResourceWithRawResponse (self ._devboxes .logs )
@@ -3160,8 +3155,10 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
31603155 self .execute_async = async_to_raw_response_wrapper (
31613156 devboxes .execute_async ,
31623157 )
3163- self .execute_sync = async_to_raw_response_wrapper (
3164- devboxes .execute_sync ,
3158+ self .execute_sync = ( # pyright: ignore[reportDeprecated]
3159+ async_to_raw_response_wrapper (
3160+ devboxes .execute_sync , # pyright: ignore[reportDeprecated],
3161+ )
31653162 )
31663163 self .keep_alive = async_to_raw_response_wrapper (
31673164 devboxes .keep_alive ,
@@ -3212,10 +3209,6 @@ def browsers(self) -> AsyncBrowsersResourceWithRawResponse:
32123209 def computers (self ) -> AsyncComputersResourceWithRawResponse :
32133210 return AsyncComputersResourceWithRawResponse (self ._devboxes .computers )
32143211
3215- @cached_property
3216- def lsp (self ) -> AsyncLspResourceWithRawResponse :
3217- return AsyncLspResourceWithRawResponse (self ._devboxes .lsp )
3218-
32193212 @cached_property
32203213 def logs (self ) -> AsyncLogsResourceWithRawResponse :
32213214 return AsyncLogsResourceWithRawResponse (self ._devboxes .logs )
@@ -3260,8 +3253,10 @@ def __init__(self, devboxes: DevboxesResource) -> None:
32603253 self .execute_async = to_streamed_response_wrapper (
32613254 devboxes .execute_async ,
32623255 )
3263- self .execute_sync = to_streamed_response_wrapper (
3264- devboxes .execute_sync ,
3256+ self .execute_sync = ( # pyright: ignore[reportDeprecated]
3257+ to_streamed_response_wrapper (
3258+ devboxes .execute_sync , # pyright: ignore[reportDeprecated],
3259+ )
32653260 )
32663261 self .keep_alive = to_streamed_response_wrapper (
32673262 devboxes .keep_alive ,
@@ -3312,10 +3307,6 @@ def browsers(self) -> BrowsersResourceWithStreamingResponse:
33123307 def computers (self ) -> ComputersResourceWithStreamingResponse :
33133308 return ComputersResourceWithStreamingResponse (self ._devboxes .computers )
33143309
3315- @cached_property
3316- def lsp (self ) -> LspResourceWithStreamingResponse :
3317- return LspResourceWithStreamingResponse (self ._devboxes .lsp )
3318-
33193310 @cached_property
33203311 def logs (self ) -> LogsResourceWithStreamingResponse :
33213312 return LogsResourceWithStreamingResponse (self ._devboxes .logs )
@@ -3360,8 +3351,10 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
33603351 self .execute_async = async_to_streamed_response_wrapper (
33613352 devboxes .execute_async ,
33623353 )
3363- self .execute_sync = async_to_streamed_response_wrapper (
3364- devboxes .execute_sync ,
3354+ self .execute_sync = ( # pyright: ignore[reportDeprecated]
3355+ async_to_streamed_response_wrapper (
3356+ devboxes .execute_sync , # pyright: ignore[reportDeprecated],
3357+ )
33653358 )
33663359 self .keep_alive = async_to_streamed_response_wrapper (
33673360 devboxes .keep_alive ,
@@ -3412,10 +3405,6 @@ def browsers(self) -> AsyncBrowsersResourceWithStreamingResponse:
34123405 def computers (self ) -> AsyncComputersResourceWithStreamingResponse :
34133406 return AsyncComputersResourceWithStreamingResponse (self ._devboxes .computers )
34143407
3415- @cached_property
3416- def lsp (self ) -> AsyncLspResourceWithStreamingResponse :
3417- return AsyncLspResourceWithStreamingResponse (self ._devboxes .lsp )
3418-
34193408 @cached_property
34203409 def logs (self ) -> AsyncLogsResourceWithStreamingResponse :
34213410 return AsyncLogsResourceWithStreamingResponse (self ._devboxes .logs )
0 commit comments