diff --git a/spec/openapi.infra.yaml b/spec/openapi.infra.yaml index b0096d0c1..8be186097 100644 --- a/spec/openapi.infra.yaml +++ b/spec/openapi.infra.yaml @@ -787,6 +787,20 @@ components: type: string description: Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one. + SandboxPauseRequest: + type: object + properties: + memory: + type: boolean + default: true + description: >- + Whether to capture a full memory snapshot. When false, only the + filesystem is persisted and resuming the sandbox cold-boots + (reboots) it from disk, losing in-memory state, running processes, + and open connections. Resume it with an explicit request (connect or + resume); auto-resume, which can be triggered by arbitrary traffic, + refuses such a sandbox. Defaults to true. + TeamMetric: description: Team metric with timestamp required: @@ -2396,6 +2410,12 @@ paths: AdminTeamAuth: [] parameters: - $ref: "#/components/parameters/sandboxID" + requestBody: + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/SandboxPauseRequest" responses: "204": description: The sandbox was paused successfully and can be resumed diff --git a/src/core/shared/contracts/infra-api.types.ts b/src/core/shared/contracts/infra-api.types.ts index fd88950af..9151f2bd3 100644 --- a/src/core/shared/contracts/infra-api.types.ts +++ b/src/core/shared/contracts/infra-api.types.ts @@ -560,7 +560,11 @@ export interface paths { } cookie?: never } - requestBody?: never + requestBody?: { + content: { + 'application/json': components['schemas']['SandboxPauseRequest'] + } + } responses: { /** @description The sandbox was paused successfully and can be resumed */ 204: { @@ -2645,6 +2649,13 @@ export interface components { /** @description Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one. */ name?: string } + SandboxPauseRequest: { + /** + * @description Whether to capture a full memory snapshot. When false, only the filesystem is persisted and resuming the sandbox cold-boots (reboots) it from disk, losing in-memory state, running processes, and open connections. Resume it with an explicit request (connect or resume); auto-resume, which can be triggered by arbitrary traffic, refuses such a sandbox. Defaults to true. + * @default true + */ + memory: boolean + } /** @description Team metric with timestamp */ TeamMetric: { /**