@@ -450,10 +450,26 @@ export class Devboxes extends APIResource {
450450 /**
451451 * Shutdown a running Devbox. This will permanently stop the Devbox. If you want to
452452 * save the state of the Devbox, you should take a snapshot before shutting down or
453- * should suspend the Devbox instead of shutting down.
453+ * should suspend the Devbox instead of shutting down. If the Devbox has any
454+ * in-progress snapshots, the shutdown will be rejected with a 409 Conflict unless
455+ * force=true is specified.
454456 */
455- shutdown ( id : string , options ?: Core . RequestOptions ) : Core . APIPromise < DevboxView > {
456- return this . _client . post ( `/v1/devboxes/${ id } /shutdown` , options ) ;
457+ shutdown (
458+ id : string ,
459+ params ?: DevboxShutdownParams ,
460+ options ?: Core . RequestOptions ,
461+ ) : Core . APIPromise < DevboxView > ;
462+ shutdown ( id : string , options ?: Core . RequestOptions ) : Core . APIPromise < DevboxView > ;
463+ shutdown (
464+ id : string ,
465+ params : DevboxShutdownParams | Core . RequestOptions = { } ,
466+ options ?: Core . RequestOptions ,
467+ ) : Core . APIPromise < DevboxView > {
468+ if ( isRequestOptions ( params ) ) {
469+ return this . shutdown ( id , { } , params ) ;
470+ }
471+ const { force } = params ;
472+ return this . _client . post ( `/v1/devboxes/${ id } /shutdown` , { query : { force } , ...options } ) ;
457473 }
458474
459475 /**
@@ -674,9 +690,9 @@ export interface DevboxListView {
674690
675691 has_more : boolean ;
676692
677- remaining_count : number ;
693+ remaining_count ? : number | null ;
678694
679- total_count : number ;
695+ total_count ? : number | null ;
680696}
681697
682698export interface DevboxResourceUsageView {
@@ -762,14 +778,14 @@ export interface DevboxSendStdInResult {
762778export interface DevboxSnapshotListView {
763779 has_more : boolean ;
764780
765- remaining_count : number ;
766-
767781 /**
768782 * List of snapshots matching filter.
769783 */
770784 snapshots : Array < DevboxSnapshotView > ;
771785
772- total_count : number ;
786+ remaining_count ?: number | null ;
787+
788+ total_count ?: number | null ;
773789}
774790
775791/**
@@ -1380,6 +1396,13 @@ export interface DevboxRemoveTunnelParams {
13801396 port : number ;
13811397}
13821398
1399+ export interface DevboxShutdownParams {
1400+ /**
1401+ * If true, force shutdown even if snapshots are in progress. Defaults to false.
1402+ */
1403+ force ?: string ;
1404+ }
1405+
13831406export interface DevboxSnapshotDiskParams {
13841407 /**
13851408 * (Optional) Commit message associated with the snapshot (max 1000 characters)
@@ -1500,6 +1523,7 @@ export declare namespace Devboxes {
15001523 type DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams ,
15011524 type DevboxReadFileContentsParams as DevboxReadFileContentsParams ,
15021525 type DevboxRemoveTunnelParams as DevboxRemoveTunnelParams ,
1526+ type DevboxShutdownParams as DevboxShutdownParams ,
15031527 type DevboxSnapshotDiskParams as DevboxSnapshotDiskParams ,
15041528 type DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams ,
15051529 type DevboxUploadFileParams as DevboxUploadFileParams ,
0 commit comments