@@ -538,6 +538,17 @@ export class Devboxes extends APIResource {
538538 } ) ;
539539 }
540540
541+ /**
542+ * Subscribe, via server-sent events, to pending infrastructure evictions for every
543+ * Devbox in the account. On connect the stream emits one event per Devbox that
544+ * currently has a pending eviction, then one event as each further eviction is
545+ * scheduled. Best-effort and advisory: a Devbox stays running until its deadline,
546+ * and delivery is not guaranteed.
547+ */
548+ watchEvictions ( options ?: Core . RequestOptions ) : Core . APIPromise < DevboxWatchEvictionsResponse > {
549+ return this . _client . get ( '/v1/devboxes/watch_evictions' , options ) ;
550+ }
551+
541552 /**
542553 * Write UTF-8 string contents to a file at path on the Devbox. Note for large
543554 * files (larger than 100MB), the upload_file endpoint must be used.
@@ -1094,6 +1105,19 @@ export type DevboxRemoveTunnelResponse = unknown;
10941105
10951106export type DevboxUploadFileResponse = unknown ;
10961107
1108+ export interface DevboxWatchEvictionsResponse {
1109+ /**
1110+ * The ID of the Devbox with a pending eviction.
1111+ */
1112+ devbox_id : string ;
1113+
1114+ /**
1115+ * Unix timestamp (milliseconds) after which the Devbox will be suspended. Advisory
1116+ * and best-effort.
1117+ */
1118+ eviction_deadline_ms : number ;
1119+ }
1120+
10971121/**
10981122 * Parameters for creating a new Devbox.
10991123 *
@@ -1556,6 +1580,7 @@ export declare namespace Devboxes {
15561580 type DevboxReadFileContentsResponse as DevboxReadFileContentsResponse ,
15571581 type DevboxRemoveTunnelResponse as DevboxRemoveTunnelResponse ,
15581582 type DevboxUploadFileResponse as DevboxUploadFileResponse ,
1583+ type DevboxWatchEvictionsResponse as DevboxWatchEvictionsResponse ,
15591584 DevboxViewsDevboxesCursorIDPage as DevboxViewsDevboxesCursorIDPage ,
15601585 DevboxSnapshotViewsDiskSnapshotsCursorIDPage as DevboxSnapshotViewsDiskSnapshotsCursorIDPage ,
15611586 type DevboxCreateParams as DevboxCreateParams ,
0 commit comments