6969 LONG_POLL_CLIENT_BUFFER_SECONDS ,
7070 EXEC_LONG_POLL_SERVER_MAX_SECONDS ,
7171)
72+ from ..._streaming import Stream , AsyncStream
7273from ...pagination import (
7374 SyncDevboxesCursorIDPage ,
7475 AsyncDevboxesCursorIDPage ,
9495from ...types .shared_params .mount import Mount
9596from ...types .devbox_snapshot_view import DevboxSnapshotView
9697from ...types .shared .launch_parameters import LaunchParameters as SharedLaunchParameters
98+ from ...types .devbox_eviction_event_view import DevboxEvictionEventView
9799from ...types .devbox_resource_usage_view import DevboxResourceUsageView
98100from ...types .devbox_execution_detail_view import DevboxExecutionDetailView
99101from ...types .devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse
100- from ...types .devbox_watch_evictions_response import DevboxWatchEvictionsResponse
101102from ...types .shared_params .launch_parameters import LaunchParameters
102103from ...types .devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
103104from ...types .shared_params .code_mount_parameters import CodeMountParameters
@@ -1752,7 +1753,7 @@ def watch_evictions(
17521753 extra_query : Query | None = None ,
17531754 extra_body : Body | None = None ,
17541755 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
1755- ) -> DevboxWatchEvictionsResponse :
1756+ ) -> Stream [ DevboxEvictionEventView ] :
17561757 """
17571758 Subscribe, via server-sent events, to pending infrastructure evictions for every
17581759 Devbox in the account. On connect the stream emits one event per Devbox that
@@ -1765,7 +1766,9 @@ def watch_evictions(
17651766 options = make_request_options (
17661767 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
17671768 ),
1768- cast_to = DevboxWatchEvictionsResponse ,
1769+ cast_to = DevboxEvictionEventView ,
1770+ stream = True ,
1771+ stream_cls = Stream [DevboxEvictionEventView ],
17691772 )
17701773
17711774 def write_file_contents (
@@ -3452,7 +3455,7 @@ async def watch_evictions(
34523455 extra_query : Query | None = None ,
34533456 extra_body : Body | None = None ,
34543457 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
3455- ) -> DevboxWatchEvictionsResponse :
3458+ ) -> AsyncStream [ DevboxEvictionEventView ] :
34563459 """
34573460 Subscribe, via server-sent events, to pending infrastructure evictions for every
34583461 Devbox in the account. On connect the stream emits one event per Devbox that
@@ -3465,7 +3468,9 @@ async def watch_evictions(
34653468 options = make_request_options (
34663469 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
34673470 ),
3468- cast_to = DevboxWatchEvictionsResponse ,
3471+ cast_to = DevboxEvictionEventView ,
3472+ stream = True ,
3473+ stream_cls = AsyncStream [DevboxEvictionEventView ],
34693474 )
34703475
34713476 async def write_file_contents (
0 commit comments