diff --git a/spec/openapi.infra.yaml b/spec/openapi.infra.yaml index c27fab0c4..8843134e1 100644 --- a/spec/openapi.infra.yaml +++ b/spec/openapi.infra.yaml @@ -713,6 +713,17 @@ components: type: boolean default: false description: Automatically pauses the sandbox after the timeout + autoPauseMemory: + type: boolean + default: true + description: >- + Controls the snapshot kind taken when the sandbox auto-pauses on + timeout (only relevant when autoPause is true). When false, the + auto-pause drops the in-memory state and persists only the + filesystem (a filesystem-only snapshot); resuming it cold-boots + (reboots) the sandbox from disk. Such a snapshot cannot be + auto-resumed by traffic and must be resumed explicitly, so it cannot + be combined with autoResume. Defaults to true (full memory snapshot). autoResume: $ref: "#/components/schemas/SandboxAutoResumeConfig" secure: @@ -2696,6 +2707,47 @@ paths: $ref: "#/components/responses/500" /v2/templates: + get: + description: List all templates + tags: [templates] + security: + - ApiKeyAuth: [] + - AccessTokenAuth: [] + - AuthProviderBearerAuth: [] + AuthProviderTeamAuth: [] + - AdminApiKeyAuth: [] + AdminTeamAuth: [] + parameters: + - in: query + required: false + name: teamID + schema: + type: string + description: Identifier of the team + - $ref: "#/components/parameters/paginationNextToken" + - $ref: "#/components/parameters/paginationLimit" + responses: + "200": + description: Successfully returned all templates + headers: + X-Next-Token: + description: Cursor to fetch the next page of results, if more exist + schema: + type: string + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Template" + "400": + $ref: "#/components/responses/400" + "401": + $ref: "#/components/responses/401" + "403": + $ref: "#/components/responses/403" + "500": + $ref: "#/components/responses/500" post: description: Create a new template deprecated: true @@ -2766,6 +2818,7 @@ paths: /templates: get: description: List all templates + deprecated: true tags: [templates] security: - ApiKeyAuth: [] diff --git a/src/core/shared/contracts/infra-api.types.ts b/src/core/shared/contracts/infra-api.types.ts index 57ff68235..e691905b5 100644 --- a/src/core/shared/contracts/infra-api.types.ts +++ b/src/core/shared/contracts/infra-api.types.ts @@ -959,7 +959,39 @@ export interface paths { path?: never cookie?: never } - get?: never + /** @description List all templates */ + get: { + parameters: { + query?: { + teamID?: string + /** @description Cursor to start the list from */ + nextToken?: components['parameters']['paginationNextToken'] + /** @description Maximum number of items to return per page */ + limit?: components['parameters']['paginationLimit'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all templates */ + 200: { + headers: { + /** @description Cursor to fetch the next page of results, if more exist */ + 'X-Next-Token'?: string + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Template'][] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 403: components['responses']['403'] + 500: components['responses']['500'] + } + } put?: never /** * @deprecated @@ -1048,7 +1080,10 @@ export interface paths { path?: never cookie?: never } - /** @description List all templates */ + /** + * @deprecated + * @description List all templates + */ get: { parameters: { query?: { @@ -2603,6 +2638,11 @@ export interface components { * @default false */ autoPause: boolean + /** + * @description Controls the snapshot kind taken when the sandbox auto-pauses on timeout (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only the filesystem (a filesystem-only snapshot); resuming it cold-boots (reboots) the sandbox from disk. Such a snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with autoResume. Defaults to true (full memory snapshot). + * @default true + */ + autoPauseMemory: boolean autoResume?: components['schemas']['SandboxAutoResumeConfig'] /** @description Secure all system communication with sandbox */ secure?: boolean