From 5b96d0f0259073fe2b7131cf7c8c67680077fe6c Mon Sep 17 00:00:00 2001 From: ben-fornefeld Date: Mon, 2 Mar 2026 15:10:05 -0800 Subject: [PATCH 1/6] implement: filter components, state management, update oapi spec --- spec/openapi.infra.yaml | 11 + src/features/dashboard/build/logs.tsx | 121 +- .../dashboard/common/log-level-filter.tsx | 79 + .../sandbox/logs/logs-filter-params.ts | 13 + src/features/dashboard/sandbox/logs/logs.tsx | 91 +- .../sandbox/logs/sandbox-logs-store.ts | 34 +- .../dashboard/sandbox/logs/use-log-filters.ts | 38 + .../sandbox/logs/use-sandbox-logs.ts | 17 +- .../api/repositories/sandboxes.repository.ts | 6 +- src/server/api/routers/sandbox.ts | 12 +- src/types/infra-api.types.ts | 6393 +++++++++-------- 11 files changed, 3507 insertions(+), 3308 deletions(-) create mode 100644 src/features/dashboard/common/log-level-filter.tsx create mode 100644 src/features/dashboard/sandbox/logs/logs-filter-params.ts create mode 100644 src/features/dashboard/sandbox/logs/use-log-filters.ts diff --git a/spec/openapi.infra.yaml b/spec/openapi.infra.yaml index f32b6ee17..cfd910297 100644 --- a/spec/openapi.infra.yaml +++ b/spec/openapi.infra.yaml @@ -2074,6 +2074,17 @@ paths: schema: $ref: "#/components/schemas/LogsDirection" description: Direction of the logs that should be returned + - in: query + name: level + schema: + $ref: "#/components/schemas/LogLevel" + description: Minimum log level to return. Logs below this level are excluded + - in: query + name: search + schema: + type: string + maxLength: 256 + description: Case-sensitive substring match on log message content responses: "200": description: Successfully returned the sandbox logs diff --git a/src/features/dashboard/build/logs.tsx b/src/features/dashboard/build/logs.tsx index 6b15c15e8..7a95e8e73 100644 --- a/src/features/dashboard/build/logs.tsx +++ b/src/features/dashboard/build/logs.tsx @@ -5,18 +5,12 @@ import { type VirtualItem, type Virtualizer, } from '@tanstack/react-virtual' -import { - type RefObject, - useCallback, - useEffect, - useReducer, - useRef, - useState, -} from 'react' +import { type RefObject, useCallback, useEffect, useRef, useState } from 'react' import { LOG_LEVEL_LEFT_BORDER_CLASS, type LogLevelValue, } from '@/features/dashboard/common/log-cells' +import { LogLevelFilter } from '@/features/dashboard/common/log-level-filter' import { LogStatusCell, LogsEmptyBody, @@ -29,26 +23,11 @@ import type { BuildDetailsDTO, BuildLogDTO, } from '@/server/api/models/builds.models' -import { Button } from '@/ui/primitives/button' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuTrigger, -} from '@/ui/primitives/dropdown-menu' import { Loader } from '@/ui/primitives/loader' -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from '@/ui/primitives/table' +import { Table, TableBody, TableCell } from '@/ui/primitives/table' import { LOG_RETENTION_MS } from '../templates/builds/constants' import { LogLevel, Message, Timestamp } from './logs-cells' -import type { LogLevelFilter } from './logs-filter-params' +import type { LogLevelFilter as BuildLogLevelFilter } from './logs-filter-params' import { useBuildLogs } from './use-build-logs' import useLogFilters from './use-log-filters' @@ -59,13 +38,6 @@ const LIVE_STATUS_ROW_HEIGHT_PX = ROW_HEIGHT_PX + 16 const VIRTUAL_OVERSCAN = 16 const SCROLL_LOAD_THRESHOLD_PX = 200 -const LEVEL_OPTIONS: Array<{ value: LogLevelFilter; label: string }> = [ - { value: 'debug', label: 'Debug' }, - { value: 'info', label: 'Info' }, - { value: 'warn', label: 'Warn' }, - { value: 'error', label: 'Error' }, -] - interface LogsProps { buildDetails: BuildDetailsDTO | undefined teamIdOrSlug: string @@ -86,7 +58,11 @@ export default function Logs({ if (!buildDetails) { return (
- + } + />
void + level: BuildLogLevelFilter | null + setLevel: (level: BuildLogLevelFilter | null) => void } function LogsContent({ @@ -170,7 +146,11 @@ function LogsContent({ return (
- + } + />
@@ -204,11 +184,12 @@ function LogsContent({ ) } -function useFilterRefetchTracking(level: LogLevelFilter | null) { +function useFilterRefetchTracking(level: BuildLogLevelFilter | null) { const [isRefetchingFromFilterChange, setIsRefetching] = useState(false) const isInitialRender = useRef(true) useEffect(() => { + void level if (isInitialRender.current) { isInitialRender.current = false return @@ -233,62 +214,6 @@ function EmptyBody({ hasRetainedLogs }: EmptyBodyProps) { return } -interface LevelFilterProps { - level: LogLevelFilter | null - onLevelChange: (level: LogLevelFilter | null) => void -} - -function LevelFilter({ level, onLevelChange }: LevelFilterProps) { - const selectedLevel = level ?? 'debug' - const selectedLabel = LEVEL_OPTIONS.find( - (o) => o.value === selectedLevel - )?.label - - return ( -
- - - - - - onLevelChange(value as LogLevelFilter)} - > - {LEVEL_OPTIONS.map((option) => ( - - - - ))} - - - -
- ) -} - -function LevelIndicator({ level }: { level: LogLevelFilter }) { - return ( -
- ) -} - interface VirtualizedLogsBodyProps { logs: BuildLogDTO[] scrollContainerRef: RefObject @@ -298,7 +223,7 @@ interface VirtualizedLogsBodyProps { isFetchingNextPage: boolean showRefetchOverlay: boolean isInitialized: boolean - level: LogLevelFilter | null + level: BuildLogLevelFilter | null isBuilding: boolean } @@ -402,11 +327,15 @@ function VirtualizedLogsBody({ } const logIndex = virtualRow.index - logsStartIndex + const log = logs[logIndex] + if (!log) { + return null + } return ( logsCount: number isInitialized: boolean - level: LogLevelFilter | null + level: BuildLogLevelFilter | null } function useAutoScrollToBottom({ diff --git a/src/features/dashboard/common/log-level-filter.tsx b/src/features/dashboard/common/log-level-filter.tsx new file mode 100644 index 000000000..aa6c3ff51 --- /dev/null +++ b/src/features/dashboard/common/log-level-filter.tsx @@ -0,0 +1,79 @@ +import type { ReactNode } from 'react' +import { cn } from '@/lib/utils' +import { Button } from '@/ui/primitives/button' +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuTrigger, +} from '@/ui/primitives/dropdown-menu' +import type { LogLevelValue } from './log-cells' + +const DEFAULT_OPTIONS: Array<{ value: LogLevelValue; label: string }> = [ + { value: 'debug', label: 'Debug' }, + { value: 'info', label: 'Info' }, + { value: 'warn', label: 'Warn' }, + { value: 'error', label: 'Error' }, +] + +interface LogLevelFilterProps { + level: LogLevelValue | null + onLevelChange: (level: LogLevelValue | null) => void + options?: Array<{ value: LogLevelValue; label: string }> + renderOption?: (level: LogLevelValue) => ReactNode +} + +export function LogLevelFilter({ + level, + onLevelChange, + options = DEFAULT_OPTIONS, + renderOption, +}: LogLevelFilterProps) { + const selectedLevel = level ?? 'debug' + const selectedLabel = options.find((o) => o.value === selectedLevel)?.label + + return ( +
+ + + + + + onLevelChange(value as LogLevelValue)} + > + {options.map((option) => ( + + {renderOption ? renderOption(option.value) : option.label} + + ))} + + + +
+ ) +} + +function LevelIndicator({ level }: { level: LogLevelValue }) { + return ( +
+ ) +} diff --git a/src/features/dashboard/sandbox/logs/logs-filter-params.ts b/src/features/dashboard/sandbox/logs/logs-filter-params.ts new file mode 100644 index 000000000..912decd32 --- /dev/null +++ b/src/features/dashboard/sandbox/logs/logs-filter-params.ts @@ -0,0 +1,13 @@ +import { createLoader, parseAsString, parseAsStringEnum } from 'nuqs/server' +import type { SandboxLogDTO } from '@/server/api/models/sandboxes.models' + +export type LogLevelFilter = SandboxLogDTO['level'] + +export const LOG_LEVELS: LogLevelFilter[] = ['debug', 'info', 'warn', 'error'] + +export const sandboxLogsFilterParams = { + level: parseAsStringEnum(['debug', 'info', 'warn', 'error'] as const), + search: parseAsString, +} + +export const loadSandboxLogsFilters = createLoader(sandboxLogsFilterParams) diff --git a/src/features/dashboard/sandbox/logs/logs.tsx b/src/features/dashboard/sandbox/logs/logs.tsx index ab994420f..f12130827 100644 --- a/src/features/dashboard/sandbox/logs/logs.tsx +++ b/src/features/dashboard/sandbox/logs/logs.tsx @@ -17,6 +17,7 @@ import { LOG_LEVEL_LEFT_BORDER_CLASS, type LogLevelValue, } from '@/features/dashboard/common/log-cells' +import { LogLevelFilter } from '@/features/dashboard/common/log-level-filter' import { LogStatusCell, LogsEmptyBody, @@ -25,10 +26,13 @@ import { LogVirtualRow, } from '@/features/dashboard/common/log-viewer-ui' import type { SandboxLogDTO } from '@/server/api/models/sandboxes.models' +import { DebouncedInput } from '@/ui/primitives/input' import { Loader } from '@/ui/primitives/loader' import { Table, TableBody, TableCell } from '@/ui/primitives/table' import { useSandboxContext } from '../context' import { LogLevel, Message, Timestamp } from './logs-cells' +import type { LogLevelFilter as SandboxLogLevelFilter } from './logs-filter-params' +import useLogFilters from './use-log-filters' import { useSandboxLogs } from './use-sandbox-logs' // column widths are calculated as max width of the content + padding @@ -58,10 +62,17 @@ export default function SandboxLogs({ teamIdOrSlug, sandboxId }: LogsProps) { 'use no memo' const { sandboxInfo, isRunning } = useSandboxContext() + const { level, setLevel, search, setSearch } = useLogFilters() if (!sandboxInfo) { return ( -
+
+
) } @@ -93,6 +108,10 @@ interface LogsContentProps { sandboxId: string isRunning: boolean hasRetainedLogs: boolean + level: SandboxLogLevelFilter | null + search: string + setLevel: (level: SandboxLogLevelFilter | null) => void + setSearch: (search: string) => void } function LogsContent({ @@ -100,6 +119,10 @@ function LogsContent({ sandboxId, isRunning, hasRetainedLogs, + level, + search, + setLevel, + setSearch, }: LogsContentProps) { const [scrollContainerElement, setScrollContainerElement] = useState(null) @@ -117,6 +140,8 @@ function LogsContent({ teamIdOrSlug, sandboxId, isRunning, + level, + search, }) const hasLogs = logs.length > 0 @@ -131,6 +156,12 @@ function LogsContent({ return (
+
)}
@@ -181,6 +214,36 @@ function EmptyBody({ hasRetainedLogs, errorMessage }: EmptyBodyProps) { return } +interface FiltersRowProps { + level: SandboxLogLevelFilter | null + onLevelChange: (level: SandboxLogLevelFilter | null) => void + search: string + onSearchChange: (search: string) => void +} + +function FiltersRow({ + level, + onLevelChange, + search, + onSearchChange, +}: FiltersRowProps) { + return ( +
+ } + /> + onSearchChange(String(value))} + placeholder="Filter log message..." + className="h-9 max-w-sm" + /> +
+ ) +} + interface VirtualizedLogsBodyProps { logs: SandboxLogDTO[] scrollContainerElement: HTMLDivElement @@ -189,6 +252,8 @@ interface VirtualizedLogsBodyProps { isFetchingNextPage: boolean isInitialized: boolean isRunning: boolean + level: SandboxLogLevelFilter | null + search: string } function VirtualizedLogsBody({ @@ -199,6 +264,8 @@ function VirtualizedLogsBody({ isFetchingNextPage, isInitialized, isRunning, + level, + search, }: VirtualizedLogsBodyProps) { const maxWidthRef = useRef(0) @@ -240,6 +307,8 @@ function VirtualizedLogsBody({ isFetchingNextPage, isInitialized, isRunning, + level, + search, scrollToLatestLog, }) @@ -293,7 +362,10 @@ function VirtualizedLogsBody({ } const logIndex = virtualRow.index - logsStartIndex - const log = logs[logIndex]! + const log = logs[logIndex] + if (!log) { + return null + } return ( void } @@ -384,11 +458,15 @@ function useAutoScrollToBottom({ isFetchingNextPage, isInitialized, isRunning, + level, + search, scrollToLatestLog, }: UseAutoScrollToBottomParams) { const isAutoScrollEnabledRef = useRef(true) const prevLogsCountRef = useRef(0) const prevIsRunningRef = useRef(isRunning) + const prevLevelRef = useRef(level) + const prevSearchRef = useRef(search) const wasFetchingNextPageRef = useRef(isFetchingNextPage) const hasInitialScrolled = useRef(false) @@ -424,6 +502,15 @@ function useAutoScrollToBottom({ } }, [isRunning]) + useEffect(() => { + if (prevLevelRef.current !== level || prevSearchRef.current !== search) { + prevLevelRef.current = level + prevSearchRef.current = search + hasInitialScrolled.current = false + prevLogsCountRef.current = 0 + } + }, [level, search]) + useEffect(() => { if (!hasInitialScrolled.current) { wasFetchingNextPageRef.current = isFetchingNextPage diff --git a/src/features/dashboard/sandbox/logs/sandbox-logs-store.ts b/src/features/dashboard/sandbox/logs/sandbox-logs-store.ts index e0790fe36..50a430229 100644 --- a/src/features/dashboard/sandbox/logs/sandbox-logs-store.ts +++ b/src/features/dashboard/sandbox/logs/sandbox-logs-store.ts @@ -10,6 +10,7 @@ import { dropLeadingAtTimestamp, dropTrailingAtTimestamp, } from '../../common/log-timestamp-utils' +import type { LogLevelFilter } from './logs-filter-params' interface SandboxLogsParams { teamIdOrSlug: string @@ -30,6 +31,8 @@ interface SandboxLogsState { isInitialized: boolean hasCompletedInitialLoad: boolean initialLoadError: string | null + level: LogLevelFilter | null + search: string _trpcClient: TRPCClient | null _params: SandboxLogsParams | null @@ -37,7 +40,12 @@ interface SandboxLogsState { } interface SandboxLogsMutations { - init: (trpcClient: TRPCClient, params: SandboxLogsParams) => Promise + init: ( + trpcClient: TRPCClient, + params: SandboxLogsParams, + level: LogLevelFilter | null, + search: string + ) => Promise fetchMoreBackwards: () => Promise fetchMoreForwards: () => Promise<{ logsCount: number }> reset: () => void @@ -58,6 +66,8 @@ const initialState: SandboxLogsState = { isInitialized: false, hasCompletedInitialLoad: false, initialLoadError: null, + level: null, + search: '', _trpcClient: null, _params: null, _initVersion: 0, @@ -81,18 +91,21 @@ export const createSandboxLogsStore = () => state.isInitialized = false state.hasCompletedInitialLoad = false state.initialLoadError = null + state.level = null + state.search = '' }) }, - init: async (trpcClient, params) => { + init: async (trpcClient, params, level, search) => { const state = get() // reset if params changed const paramsChanged = state._params?.sandboxId !== params.sandboxId || state._params?.teamIdOrSlug !== params.teamIdOrSlug + const filterChanged = state.level !== level || state.search !== search - if (paramsChanged || !state.isInitialized) { + if (paramsChanged || filterChanged || !state.isInitialized) { get().reset() } @@ -102,6 +115,8 @@ export const createSandboxLogsStore = () => set((s) => { s._trpcClient = trpcClient s._params = params + s.level = level + s.search = search s.isLoadingBackwards = true s.initialLoadError = null s._initVersion = requestVersion @@ -114,6 +129,8 @@ export const createSandboxLogsStore = () => teamIdOrSlug: params.teamIdOrSlug, sandboxId: params.sandboxId, cursor: initCursor, + level: level ?? undefined, + search: search || undefined, }) // ignore stale response if a newer init was called @@ -194,6 +211,8 @@ export const createSandboxLogsStore = () => teamIdOrSlug: state._params.teamIdOrSlug, sandboxId: state._params.sandboxId, cursor, + level: state.level ?? undefined, + search: state.search || undefined, }) // ignore stale response if init was called during fetch @@ -252,6 +271,8 @@ export const createSandboxLogsStore = () => teamIdOrSlug: state._params.teamIdOrSlug, sandboxId: state._params.sandboxId, cursor, + level: state.level ?? undefined, + search: state.search || undefined, }) // ignore stale response if init was called during fetch @@ -270,7 +291,12 @@ export const createSandboxLogsStore = () => if (logsCount > 0) { s.logs = [...s.logs, ...newLogs] - const newestTimestamp = newLogs[logsCount - 1]!.timestampUnix + const newestLog = newLogs[logsCount - 1] + if (!newestLog) { + s.isLoadingForwards = false + return + } + const newestTimestamp = newestLog.timestampUnix const trailingAtNewest = countTrailingAtTimestamp( newLogs, newestTimestamp diff --git a/src/features/dashboard/sandbox/logs/use-log-filters.ts b/src/features/dashboard/sandbox/logs/use-log-filters.ts new file mode 100644 index 000000000..694742b11 --- /dev/null +++ b/src/features/dashboard/sandbox/logs/use-log-filters.ts @@ -0,0 +1,38 @@ +'use client' + +import { useQueryStates } from 'nuqs' +import { useCallback } from 'react' +import { + type LogLevelFilter, + sandboxLogsFilterParams, +} from './logs-filter-params' + +export default function useLogFilters() { + const [filters, setFilters] = useQueryStates(sandboxLogsFilterParams, { + shallow: true, + }) + + const level = filters.level as LogLevelFilter | null + const search = filters.search ?? '' + + const setLevel = useCallback( + (level: LogLevelFilter | null) => { + setFilters({ level }) + }, + [setFilters] + ) + + const setSearch = useCallback( + (search: string) => { + setFilters({ search: search || null }) + }, + [setFilters] + ) + + return { + level, + search, + setLevel, + setSearch, + } +} diff --git a/src/features/dashboard/sandbox/logs/use-sandbox-logs.ts b/src/features/dashboard/sandbox/logs/use-sandbox-logs.ts index e9330f899..5f897560d 100644 --- a/src/features/dashboard/sandbox/logs/use-sandbox-logs.ts +++ b/src/features/dashboard/sandbox/logs/use-sandbox-logs.ts @@ -1,9 +1,10 @@ 'use client' import { useQuery } from '@tanstack/react-query' -import { useCallback, useEffect, useRef } from 'react' +import { useCallback, useEffect, useLayoutEffect, useRef } from 'react' import { useStore } from 'zustand' import { useTRPCClient } from '@/trpc/client' +import type { LogLevelFilter } from './logs-filter-params' import { createSandboxLogsStore, type SandboxLogsStore, @@ -17,12 +18,16 @@ interface UseSandboxLogsParams { teamIdOrSlug: string sandboxId: string isRunning: boolean + level: LogLevelFilter | null + search: string } export function useSandboxLogs({ teamIdOrSlug, sandboxId, isRunning, + level, + search, }: UseSandboxLogsParams) { const trpcClient = useTRPCClient() const storeRef = useRef(null) @@ -44,9 +49,11 @@ export function useSandboxLogs({ const isLoadingBackwards = useStore(store, (s) => s.isLoadingBackwards) const isLoadingForwards = useStore(store, (s) => s.isLoadingForwards) - useEffect(() => { - store.getState().init(trpcClient, { teamIdOrSlug, sandboxId }) - }, [store, trpcClient, teamIdOrSlug, sandboxId]) + useLayoutEffect(() => { + store + .getState() + .init(trpcClient, { teamIdOrSlug, sandboxId }, level, search) + }, [store, trpcClient, teamIdOrSlug, sandboxId, level, search]) const isDraining = useRef(false) const prevIsRunningRef = useRef(isRunning) @@ -74,7 +81,7 @@ export function useSandboxLogs({ const shouldPoll = isInitialized && (isRunning || isDraining.current) const { isFetching: isPolling } = useQuery({ - queryKey: ['sandboxLogsForward', teamIdOrSlug, sandboxId], + queryKey: ['sandboxLogsForward', teamIdOrSlug, sandboxId, level, search], queryFn: async () => { const { logsCount } = await store.getState().fetchMoreForwards() diff --git a/src/server/api/repositories/sandboxes.repository.ts b/src/server/api/repositories/sandboxes.repository.ts index 94b849996..be16f717c 100644 --- a/src/server/api/repositories/sandboxes.repository.ts +++ b/src/server/api/repositories/sandboxes.repository.ts @@ -14,6 +14,8 @@ export interface GetSandboxLogsOptions { cursor?: number limit?: number direction?: 'forward' | 'backward' + level?: 'debug' | 'info' | 'warn' | 'error' + search?: string } export async function getSandboxLogs( @@ -31,6 +33,8 @@ export async function getSandboxLogs( cursor: options.cursor, limit: options.limit, direction: options.direction, + level: options.level, + search: options.search, }, }, headers: { @@ -121,7 +125,7 @@ export async function getSandboxDetails( if (dashboardResult.response.ok && dashboardResult.data) { return { - source: 'dashboard-log' as const, + source: 'database-record' as const, details: dashboardResult.data, } } diff --git a/src/server/api/routers/sandbox.ts b/src/server/api/routers/sandbox.ts index 65d629724..a838269c6 100644 --- a/src/server/api/routers/sandbox.ts +++ b/src/server/api/routers/sandbox.ts @@ -43,11 +43,13 @@ export const sandboxRouter = createTRPCRouter({ z.object({ sandboxId: z.string(), cursor: z.number().optional(), + level: z.enum(['debug', 'info', 'warn', 'error']).optional(), + search: z.string().optional(), }) ) .query(async ({ ctx, input }) => { const { teamId, session } = ctx - const { sandboxId } = input + const { sandboxId, level, search } = input let { cursor } = input cursor ??= Date.now() @@ -59,7 +61,7 @@ export const sandboxRouter = createTRPCRouter({ session.access_token, teamId, sandboxId, - { cursor, limit, direction } + { cursor, limit, direction, level, search } ) const logs: SandboxLogDTO[] = sandboxLogs.logs @@ -83,11 +85,13 @@ export const sandboxRouter = createTRPCRouter({ z.object({ sandboxId: z.string(), cursor: z.number().optional(), + level: z.enum(['debug', 'info', 'warn', 'error']).optional(), + search: z.string().optional(), }) ) .query(async ({ ctx, input }) => { const { teamId, session } = ctx - const { sandboxId } = input + const { sandboxId, level, search } = input let { cursor } = input cursor ??= Date.now() @@ -99,7 +103,7 @@ export const sandboxRouter = createTRPCRouter({ session.access_token, teamId, sandboxId, - { cursor, limit, direction } + { cursor, limit, direction, level, search } ) const logs: SandboxLogDTO[] = sandboxLogs.logs.map( diff --git a/src/types/infra-api.types.ts b/src/types/infra-api.types.ts index 6b47362a1..c3aaa7a5b 100644 --- a/src/types/infra-api.types.ts +++ b/src/types/infra-api.types.ts @@ -4,3205 +4,3206 @@ */ export interface paths { - '/health': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Health check */ - get: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Request was successful */ - 200: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/teams': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all teams */ - get: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all teams */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Team'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/teams/{teamID}/metrics': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get metrics for the team */ - get: { - parameters: { - query?: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number - end?: number - } - header?: never - path: { - teamID: components['parameters']['teamID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the team metrics */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TeamMetric'][] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 403: components['responses']['403'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/teams/{teamID}/metrics/max': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get the maximum metrics for the team in the given interval */ - get: { - parameters: { - query: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number - end?: number - /** @description Metric to retrieve the maximum value for */ - metric: 'concurrent_sandboxes' | 'sandbox_start_rate' - } - header?: never - path: { - teamID: components['parameters']['teamID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the team metrics */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['MaxTeamMetric'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 403: components['responses']['403'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all running sandboxes */ - get: { - parameters: { - query?: { - /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ - metadata?: string - } - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all running sandboxes */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['ListedSandbox'][] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - /** @description Create a sandbox from the template */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['NewSandbox'] - } - } - responses: { - /** @description The sandbox was created successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Sandbox'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v2/sandboxes': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all sandboxes */ - get: { - parameters: { - query?: { - /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ - metadata?: string - /** @description Filter sandboxes by one or more states */ - state?: components['schemas']['SandboxState'][] - /** @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 running sandboxes */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['ListedSandbox'][] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/metrics': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List metrics for given sandboxes */ - get: { - parameters: { - query: { - /** @description Comma-separated list of sandbox IDs to get metrics for */ - sandbox_ids: string[] - } - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all running sandboxes with metrics */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SandboxesWithMetrics'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/logs': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** - * @deprecated - * @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead. - */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - start?: number - /** @description Maximum number of logs that should be returned */ - limit?: number - } - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the sandbox logs */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SandboxLogs'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v2/sandboxes/{sandboxID}/logs': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get sandbox logs */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - cursor?: number - /** @description Maximum number of logs that should be returned */ - limit?: number - /** @description Direction of the logs that should be returned */ - direction?: components['schemas']['LogsDirection'] - } - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the sandbox logs */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SandboxLogsV2Response'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get a sandbox by id */ - get: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the sandbox */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SandboxDetail'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - /** @description Kill a sandbox */ - delete: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description The sandbox was killed successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/metrics': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get sandbox metrics */ - get: { - parameters: { - query?: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number - end?: number - } - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the sandbox metrics */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SandboxMetric'][] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/pause': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Pause the sandbox */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description The sandbox was paused successfully and can be resumed */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 409: components['responses']['409'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/resume': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** - * @deprecated - * @description Resume the sandbox - */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['ResumedSandbox'] - } - } - responses: { - /** @description The sandbox was resumed successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Sandbox'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 409: components['responses']['409'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/connect': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['ConnectSandbox'] - } - } - responses: { - /** @description The sandbox was already running */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Sandbox'] - } - } - /** @description The sandbox was resumed successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Sandbox'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/timeout': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: { - content: { - 'application/json': { + "/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Health check */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Request was successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/teams": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all teams */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all teams */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Team"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/teams/{teamID}/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get metrics for the team */ + get: { + parameters: { + query?: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number; + end?: number; + }; + header?: never; + path: { + teamID: components["parameters"]["teamID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the team metrics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TeamMetric"][]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 403: components["responses"]["403"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/teams/{teamID}/metrics/max": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get the maximum metrics for the team in the given interval */ + get: { + parameters: { + query: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number; + end?: number; + /** @description Metric to retrieve the maximum value for */ + metric: "concurrent_sandboxes" | "sandbox_start_rate"; + }; + header?: never; + path: { + teamID: components["parameters"]["teamID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the team metrics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MaxTeamMetric"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 403: components["responses"]["403"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all running sandboxes */ + get: { + parameters: { + query?: { + /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ + metadata?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all running sandboxes */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListedSandbox"][]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** @description Create a sandbox from the template */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NewSandbox"]; + }; + }; + responses: { + /** @description The sandbox was created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Sandbox"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v2/sandboxes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all sandboxes */ + get: { + parameters: { + query?: { + /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ + metadata?: string; + /** @description Filter sandboxes by one or more states */ + state?: components["schemas"]["SandboxState"][]; + /** @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 running sandboxes */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListedSandbox"][]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List metrics for given sandboxes */ + get: { + parameters: { + query: { + /** @description Comma-separated list of sandbox IDs to get metrics for */ + sandbox_ids: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all running sandboxes with metrics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SandboxesWithMetrics"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/logs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * @deprecated + * @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead. + */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + start?: number; + /** @description Maximum number of logs that should be returned */ + limit?: number; + }; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the sandbox logs */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SandboxLogs"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v2/sandboxes/{sandboxID}/logs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get sandbox logs */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + cursor?: number; + /** @description Maximum number of logs that should be returned */ + limit?: number; + /** @description Direction of the logs that should be returned */ + direction?: components["schemas"]["LogsDirection"]; + /** @description Minimum log level to return. Logs below this level are excluded */ + level?: components["schemas"]["LogLevel"]; + /** @description Case-sensitive substring match on log message content */ + search?: string; + }; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the sandbox logs */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SandboxLogsV2Response"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get a sandbox by id */ + get: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the sandbox */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SandboxDetail"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + /** @description Kill a sandbox */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The sandbox was killed successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get sandbox metrics */ + get: { + parameters: { + query?: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number; + end?: number; + }; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the sandbox metrics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SandboxMetric"][]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/pause": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Pause the sandbox */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The sandbox was paused successfully and can be resumed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 409: components["responses"]["409"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/resume": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * @deprecated + * @description Resume the sandbox + */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ResumedSandbox"]; + }; + }; + responses: { + /** @description The sandbox was resumed successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Sandbox"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 409: components["responses"]["409"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/connect": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ConnectSandbox"]; + }; + }; + responses: { + /** @description The sandbox was already running */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Sandbox"]; + }; + }; + /** @description The sandbox was resumed successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Sandbox"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/timeout": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int32 + * @description Timeout in seconds from the current time after which the sandbox should expire + */ + timeout: number; + }; + }; + }; + responses: { + /** @description Successfully set the sandbox timeout */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/refreshes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Refresh the sandbox extending its time to live */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** @description Duration for which the sandbox should be kept alive in seconds */ + duration?: number; + }; + }; + }; + responses: { + /** @description Successfully refreshed the sandbox */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sandboxes/{sandboxID}/snapshots": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime. */ + post: { + parameters: { + query?: never; + header?: never; + path: { + sandboxID: components["parameters"]["sandboxID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + responses: { + /** @description Snapshot created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SnapshotInfo"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/snapshots": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all snapshots for the team */ + get: { + parameters: { + query?: { + sandboxID?: string; + /** @description Maximum number of items to return per page */ + limit?: components["parameters"]["paginationLimit"]; + /** @description Cursor to start the list from */ + nextToken?: components["parameters"]["paginationNextToken"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned snapshots */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SnapshotInfo"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/templates": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Create a new template */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateBuildRequestV3"]; + }; + }; + responses: { + /** @description The build was requested successfully */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateRequestResponseV3"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v2/templates": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * @deprecated + * @description Create a new template + */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateBuildRequestV2"]; + }; + }; + responses: { + /** @description The build was requested successfully */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateLegacy"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/{templateID}/files/{hash}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get an upload link for a tar file containing build layer files */ + get: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + hash: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The upload link where to upload the tar file */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateBuildFileUpload"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all templates */ + get: { + parameters: { + query?: { + teamID?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all templates */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Template"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** + * @deprecated + * @description Create a new template + */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateBuildRequest"]; + }; + }; + responses: { + /** @description The build was accepted */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateLegacy"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/{templateID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all builds for a template */ + get: { + parameters: { + query?: { + /** @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: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the template with its builds */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateWithBuilds"]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** + * @deprecated + * @description Rebuild an template + */ + post: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateBuildRequest"]; + }; + }; + responses: { + /** @description The build was accepted */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateLegacy"]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + /** @description Delete a template */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The template was deleted successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + /** + * @deprecated + * @description Update template + */ + patch: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateUpdateRequest"]; + }; + }; + responses: { + /** @description The template was updated successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + trace?: never; + }; + "/templates/{templateID}/builds/{buildID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * @deprecated + * @description Start the build + */ + post: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + buildID: components["parameters"]["buildID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The build has started */ + 202: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v2/templates/{templateID}/builds/{buildID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Start the build */ + post: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + buildID: components["parameters"]["buildID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateBuildStartV2"]; + }; + }; + responses: { + /** @description The build has started */ + 202: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v2/templates/{templateID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** @description Update template */ + patch: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TemplateUpdateRequest"]; + }; + }; + responses: { + /** @description The template was updated successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateUpdateResponse"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + trace?: never; + }; + "/templates/{templateID}/builds/{buildID}/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get template build info */ + get: { + parameters: { + query?: { + /** @description Index of the starting build log that should be returned with the template */ + logsOffset?: number; + /** @description Maximum number of logs that should be returned */ + limit?: number; + level?: components["schemas"]["LogLevel"]; + }; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + buildID: components["parameters"]["buildID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the template */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateBuildInfo"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/{templateID}/builds/{buildID}/logs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get template build logs */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + cursor?: number; + /** @description Maximum number of logs that should be returned */ + limit?: number; + direction?: components["schemas"]["LogsDirection"]; + level?: components["schemas"]["LogLevel"]; + /** @description Source of the logs that should be returned from */ + source?: components["schemas"]["LogsSource"]; + }; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + buildID: components["parameters"]["buildID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the template build logs */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateBuildLogsResponse"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/tags": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Assign tag(s) to a template build */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AssignTemplateTagsRequest"]; + }; + }; + responses: { + /** @description Tag assigned successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AssignedTemplateTags"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + /** @description Delete multiple tags from templates */ + delete: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DeleteTemplateTagsRequest"]; + }; + }; + responses: { + /** @description Tags deleted successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/{templateID}/tags": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all tags for a template */ + get: { + parameters: { + query?: never; + header?: never; + path: { + templateID: components["parameters"]["templateID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the template tags */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateTag"][]; + }; + }; + 401: components["responses"]["401"]; + 403: components["responses"]["403"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/templates/aliases/{alias}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Check if template with given alias exists */ + get: { + parameters: { + query?: never; + header?: never; + path: { + alias: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully queried template by alias */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TemplateAliasResponse"]; + }; + }; + 400: components["responses"]["400"]; + 403: components["responses"]["403"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/nodes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all nodes */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all nodes */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Node"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/nodes/{nodeID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get node info */ + get: { + parameters: { + query?: { + /** @description Identifier of the cluster */ + clusterID?: string; + }; + header?: never; + path: { + nodeID: components["parameters"]["nodeID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned the node */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["NodeDetail"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** @description Change status of a node */ + post: { + parameters: { + query?: never; + header?: never; + path: { + nodeID: components["parameters"]["nodeID"]; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["NodeStatusChange"]; + }; + }; + responses: { + /** @description The node status was changed successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/teams/{teamID}/sandboxes/kill": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Kill all sandboxes for a team + * @description Kills all sandboxes for the specified team + */ + post: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Team ID */ + teamID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully killed sandboxes */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AdminSandboxKillResult"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/teams/{teamID}/builds/cancel": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Cancel all builds for a team + * @description Cancels all in-progress and pending builds for the specified team + */ + post: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Team ID */ + teamID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully cancelled builds */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AdminBuildCancelResult"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/access-tokens": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Create a new access token */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NewAccessToken"]; + }; + }; + responses: { + /** @description Access token created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CreatedAccessToken"]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/access-tokens/{accessTokenID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** @description Delete an access token */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + accessTokenID: components["parameters"]["accessTokenID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Access token deleted successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api-keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all team API keys */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully returned all team API keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TeamAPIKey"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** @description Create a new team API key */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NewTeamAPIKey"]; + }; + }; + responses: { + /** @description Team API key created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CreatedTeamAPIKey"]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api-keys/{apiKeyID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** @description Delete a team API key */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + apiKeyID: components["parameters"]["apiKeyID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Team API key deleted successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + /** @description Update a team API key */ + patch: { + parameters: { + query?: never; + header?: never; + path: { + apiKeyID: components["parameters"]["apiKeyID"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["UpdateTeamAPIKey"]; + }; + }; + responses: { + /** @description Team API key updated successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + trace?: never; + }; + "/volumes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description List all team volumes */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully listed all team volumes */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Volume"][]; + }; + }; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + /** @description Create a new team volume */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NewVolume"]; + }; + }; + responses: { + /** @description Successfully created a new team volume */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Volume"]; + }; + }; + 400: components["responses"]["400"]; + 401: components["responses"]["401"]; + 500: components["responses"]["500"]; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{volumeID}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get team volume info */ + get: { + parameters: { + query?: never; + header?: never; + path: { + volumeID: components["parameters"]["volumeID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully retrieved a team volume */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Volume"]; + }; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + put?: never; + post?: never; + /** @description Delete a team volume */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + volumeID: components["parameters"]["volumeID"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully deleted a team volume */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["401"]; + 404: components["responses"]["404"]; + 500: components["responses"]["500"]; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + Team: { + /** @description Identifier of the team */ + teamID: string; + /** @description Name of the team */ + name: string; + /** @description API key for the team */ + apiKey: string; + /** @description Whether the team is the default team */ + isDefault: boolean; + }; + TeamUser: { + /** + * Format: uuid + * @description Identifier of the user + */ + id: string; + /** @description Email of the user */ + email: string; + }; + TemplateUpdateRequest: { + /** @description Whether the template is public or only accessible by the team */ + public?: boolean; + }; + TemplateUpdateResponse: { + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[]; + }; + /** + * Format: int32 + * @description CPU cores for the sandbox + */ + CPUCount: number; + /** + * Format: int32 + * @description Memory for the sandbox in MiB + */ + MemoryMB: number; + /** + * Format: int32 + * @description Disk size for the sandbox in MiB + */ + DiskSizeMB: number; + /** @description Version of the envd running in the sandbox */ + EnvdVersion: string; + SandboxMetadata: { + [key: string]: string; + }; + /** + * @description State of the sandbox + * @enum {string} + */ + SandboxState: "running" | "paused"; + SnapshotInfo: { + /** @description Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default). */ + snapshotID: string; + /** @description Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2) */ + names: string[]; + }; + EnvVars: { + [key: string]: string; + }; + /** @description MCP configuration for the sandbox */ + Mcp: { + [key: string]: unknown; + } | null; + SandboxNetworkConfig: { + /** + * @description Specify if the sandbox URLs should be accessible only with authentication. + * @default true + */ + allowPublicTraffic: boolean; + /** @description List of allowed CIDR blocks or IP addresses for egress traffic. Allowed addresses always take precedence over blocked addresses. */ + allowOut?: string[]; + /** @description List of denied CIDR blocks or IP addresses for egress traffic */ + denyOut?: string[]; + /** @description Specify host mask which will be used for all sandbox requests */ + maskRequestHost?: string; + }; + /** + * @description Auto-resume policy for paused sandboxes. Default is off. + * @default off + * @enum {string} + */ + SandboxAutoResumePolicy: "any" | "off"; + /** @description Auto-resume configuration for paused sandboxes. Default is off. */ + SandboxAutoResumeConfig: { + policy: components["schemas"]["SandboxAutoResumePolicy"]; + }; + /** @description Log entry with timestamp and line */ + SandboxLog: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string; + /** @description Log line content */ + line: string; + }; + SandboxLogEntry: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string; + /** @description Log message content */ + message: string; + level: components["schemas"]["LogLevel"]; + fields: { + [key: string]: string; + }; + }; + SandboxLogs: { + /** @description Logs of the sandbox */ + logs: components["schemas"]["SandboxLog"][]; + /** @description Structured logs of the sandbox */ + logEntries: components["schemas"]["SandboxLogEntry"][]; + }; + SandboxLogsV2Response: { + /** + * @description Sandbox logs structured + * @default [] + */ + logs: components["schemas"]["SandboxLogEntry"][]; + }; + /** @description Metric entry with timestamp and line */ + SandboxMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string; + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number; + /** + * Format: int32 + * @description Number of CPU cores + */ + cpuCount: number; + /** + * Format: float + * @description CPU usage percentage + */ + cpuUsedPct: number; + /** + * Format: int64 + * @description Memory used in bytes + */ + memUsed: number; + /** + * Format: int64 + * @description Total memory in bytes + */ + memTotal: number; + /** + * Format: int64 + * @description Disk used in bytes + */ + diskUsed: number; + /** + * Format: int64 + * @description Total disk space in bytes + */ + diskTotal: number; + }; + SandboxVolumeMount: { + /** @description Name of the volume */ + name: string; + /** @description Path of the volume */ + path: string; + }; + Sandbox: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string; + /** @description Identifier of the sandbox */ + sandboxID: string; + /** @description Alias of the template */ + alias?: string; + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string; + envdVersion: components["schemas"]["EnvdVersion"]; + /** @description Access token used for envd communication */ + envdAccessToken?: string; + /** @description Token required for accessing sandbox via proxy. */ + trafficAccessToken?: string | null; + /** @description Base domain where the sandbox traffic is accessible */ + domain?: string | null; + }; + SandboxDetail: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string; + /** @description Alias of the template */ + alias?: string; + /** @description Identifier of the sandbox */ + sandboxID: string; + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string; + /** + * Format: date-time + * @description Time when the sandbox was started + */ + startedAt: string; + /** + * Format: date-time + * @description Time when the sandbox will expire + */ + endAt: string; + envdVersion: components["schemas"]["EnvdVersion"]; + /** @description Access token used for envd communication */ + envdAccessToken?: string; + /** @description Base domain where the sandbox traffic is accessible */ + domain?: string | null; + cpuCount: components["schemas"]["CPUCount"]; + memoryMB: components["schemas"]["MemoryMB"]; + diskSizeMB: components["schemas"]["DiskSizeMB"]; + metadata?: components["schemas"]["SandboxMetadata"]; + state: components["schemas"]["SandboxState"]; + volumeMounts: components["schemas"]["SandboxVolumeMount"][]; + }; + ListedSandbox: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string; + /** @description Alias of the template */ + alias?: string; + /** @description Identifier of the sandbox */ + sandboxID: string; + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string; + /** + * Format: date-time + * @description Time when the sandbox was started + */ + startedAt: string; + /** + * Format: date-time + * @description Time when the sandbox will expire + */ + endAt: string; + cpuCount: components["schemas"]["CPUCount"]; + memoryMB: components["schemas"]["MemoryMB"]; + diskSizeMB: components["schemas"]["DiskSizeMB"]; + metadata?: components["schemas"]["SandboxMetadata"]; + state: components["schemas"]["SandboxState"]; + envdVersion: components["schemas"]["EnvdVersion"]; + volumeMounts: components["schemas"]["SandboxVolumeMount"][]; + }; + SandboxesWithMetrics: { + sandboxes: { + [key: string]: components["schemas"]["SandboxMetric"]; + }; + }; + NewSandbox: { + /** @description Identifier of the required template */ + templateID: string; + /** + * Format: int32 + * @description Time to live for the sandbox in seconds. + * @default 15 + */ + timeout: number; + /** + * @description Automatically pauses the sandbox after the timeout + * @default false + */ + autoPause: boolean; + autoResume?: components["schemas"]["SandboxAutoResumeConfig"]; + /** @description Secure all system communication with sandbox */ + secure?: boolean; + /** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */ + allow_internet_access?: boolean; + network?: components["schemas"]["SandboxNetworkConfig"]; + metadata?: components["schemas"]["SandboxMetadata"]; + envVars?: components["schemas"]["EnvVars"]; + mcp?: components["schemas"]["Mcp"]; + volumeMounts?: components["schemas"]["SandboxVolumeMount"][]; + }; + ResumedSandbox: { + /** + * Format: int32 + * @description Time to live for the sandbox in seconds. + * @default 15 + */ + timeout: number; + /** + * @deprecated + * @description Automatically pauses the sandbox after the timeout + */ + autoPause?: boolean; + }; + ConnectSandbox: { /** * Format: int32 * @description Timeout in seconds from the current time after which the sandbox should expire */ - timeout: number - } - } - } - responses: { - /** @description Successfully set the sandbox timeout */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/refreshes': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Refresh the sandbox extending its time to live */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody?: { - content: { - 'application/json': { - /** @description Duration for which the sandbox should be kept alive in seconds */ - duration?: number - } - } - } - responses: { - /** @description Successfully refreshed the sandbox */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/sandboxes/{sandboxID}/snapshots': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime. */ - post: { - parameters: { - query?: never - header?: never - path: { - sandboxID: components['parameters']['sandboxID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': { - /** @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 - } - } - } - responses: { - /** @description Snapshot created successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SnapshotInfo'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/snapshots': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all snapshots for the team */ - get: { - parameters: { - query?: { - sandboxID?: string - /** @description Maximum number of items to return per page */ - limit?: components['parameters']['paginationLimit'] - /** @description Cursor to start the list from */ - nextToken?: components['parameters']['paginationNextToken'] - } - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned snapshots */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['SnapshotInfo'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v3/templates': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Create a new template */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateBuildRequestV3'] - } - } - responses: { - /** @description The build was requested successfully */ - 202: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateRequestResponseV3'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v2/templates': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** - * @deprecated - * @description Create a new template - */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateBuildRequestV2'] - } - } - responses: { - /** @description The build was requested successfully */ - 202: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateLegacy'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/{templateID}/files/{hash}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get an upload link for a tar file containing build layer files */ - get: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - hash: string - } - cookie?: never - } - requestBody?: never - responses: { - /** @description The upload link where to upload the tar file */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateBuildFileUpload'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all templates */ - get: { - parameters: { - query?: { - teamID?: string - } - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all templates */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Template'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - /** - * @deprecated - * @description Create a new template - */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateBuildRequest'] - } - } - responses: { - /** @description The build was accepted */ - 202: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateLegacy'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/{templateID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all builds for a template */ - get: { - parameters: { - query?: { - /** @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: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the template with its builds */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateWithBuilds'] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - /** - * @deprecated - * @description Rebuild an template - */ - post: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateBuildRequest'] - } - } - responses: { - /** @description The build was accepted */ - 202: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateLegacy'] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - /** @description Delete a template */ - delete: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description The template was deleted successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - /** - * @deprecated - * @description Update template - */ - patch: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateUpdateRequest'] - } - } - responses: { - /** @description The template was updated successfully */ - 200: { - headers: { - [name: string]: unknown - } - content?: never - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - trace?: never - } - '/templates/{templateID}/builds/{buildID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** - * @deprecated - * @description Start the build - */ - post: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - buildID: components['parameters']['buildID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description The build has started */ - 202: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v2/templates/{templateID}/builds/{buildID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Start the build */ - post: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - buildID: components['parameters']['buildID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateBuildStartV2'] - } - } - responses: { - /** @description The build has started */ - 202: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/v2/templates/{templateID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - post?: never - delete?: never - options?: never - head?: never - /** @description Update template */ - patch: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['TemplateUpdateRequest'] - } - } - responses: { - /** @description The template was updated successfully */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateUpdateResponse'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - trace?: never - } - '/templates/{templateID}/builds/{buildID}/status': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get template build info */ - get: { - parameters: { - query?: { - /** @description Index of the starting build log that should be returned with the template */ - logsOffset?: number - /** @description Maximum number of logs that should be returned */ - limit?: number - level?: components['schemas']['LogLevel'] - } - header?: never - path: { - templateID: components['parameters']['templateID'] - buildID: components['parameters']['buildID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the template */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateBuildInfo'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/{templateID}/builds/{buildID}/logs': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get template build logs */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - cursor?: number - /** @description Maximum number of logs that should be returned */ - limit?: number - direction?: components['schemas']['LogsDirection'] - level?: components['schemas']['LogLevel'] - /** @description Source of the logs that should be returned from */ - source?: components['schemas']['LogsSource'] - } - header?: never - path: { - templateID: components['parameters']['templateID'] - buildID: components['parameters']['buildID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the template build logs */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateBuildLogsResponse'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/tags': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Assign tag(s) to a template build */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['AssignTemplateTagsRequest'] - } - } - responses: { - /** @description Tag assigned successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['AssignedTemplateTags'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - /** @description Delete multiple tags from templates */ - delete: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['DeleteTemplateTagsRequest'] - } - } - responses: { - /** @description Tags deleted successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/{templateID}/tags': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all tags for a template */ - get: { - parameters: { - query?: never - header?: never - path: { - templateID: components['parameters']['templateID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the template tags */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateTag'][] - } - } - 401: components['responses']['401'] - 403: components['responses']['403'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/templates/aliases/{alias}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Check if template with given alias exists */ - get: { - parameters: { - query?: never - header?: never - path: { - alias: string - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully queried template by alias */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TemplateAliasResponse'] - } - } - 400: components['responses']['400'] - 403: components['responses']['403'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/nodes': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all nodes */ - get: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all nodes */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Node'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/nodes/{nodeID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get node info */ - get: { - parameters: { - query?: { - /** @description Identifier of the cluster */ - clusterID?: string - } - header?: never - path: { - nodeID: components['parameters']['nodeID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned the node */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['NodeDetail'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - /** @description Change status of a node */ - post: { - parameters: { - query?: never - header?: never - path: { - nodeID: components['parameters']['nodeID'] - } - cookie?: never - } - requestBody?: { - content: { - 'application/json': components['schemas']['NodeStatusChange'] - } - } - responses: { - /** @description The node status was changed successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/admin/teams/{teamID}/sandboxes/kill': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** - * Kill all sandboxes for a team - * @description Kills all sandboxes for the specified team - */ - post: { - parameters: { - query?: never - header?: never - path: { - /** @description Team ID */ - teamID: string - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully killed sandboxes */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['AdminSandboxKillResult'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/admin/teams/{teamID}/builds/cancel': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** - * Cancel all builds for a team - * @description Cancels all in-progress and pending builds for the specified team - */ - post: { - parameters: { - query?: never - header?: never - path: { - /** @description Team ID */ - teamID: string - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully cancelled builds */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['AdminBuildCancelResult'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/access-tokens': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - /** @description Create a new access token */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['NewAccessToken'] - } - } - responses: { - /** @description Access token created successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['CreatedAccessToken'] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/access-tokens/{accessTokenID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - post?: never - /** @description Delete an access token */ - delete: { - parameters: { - query?: never - header?: never - path: { - accessTokenID: components['parameters']['accessTokenID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Access token deleted successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - patch?: never - trace?: never - } - '/api-keys': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all team API keys */ - get: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully returned all team API keys */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['TeamAPIKey'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - /** @description Create a new team API key */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['NewTeamAPIKey'] - } - } - responses: { - /** @description Team API key created successfully */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['CreatedTeamAPIKey'] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/api-keys/{apiKeyID}': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - get?: never - put?: never - post?: never - /** @description Delete a team API key */ - delete: { - parameters: { - query?: never - header?: never - path: { - apiKeyID: components['parameters']['apiKeyID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Team API key deleted successfully */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - /** @description Update a team API key */ - patch: { - parameters: { - query?: never - header?: never - path: { - apiKeyID: components['parameters']['apiKeyID'] - } - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['UpdateTeamAPIKey'] - } - } - responses: { - /** @description Team API key updated successfully */ - 200: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - trace?: never - } - '/volumes': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description List all team volumes */ - get: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully listed all team volumes */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Volume'][] - } - } - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - put?: never - /** @description Create a new team volume */ - post: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody: { - content: { - 'application/json': components['schemas']['NewVolume'] - } - } - responses: { - /** @description Successfully created a new team volume */ - 201: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Volume'] - } - } - 400: components['responses']['400'] - 401: components['responses']['401'] - 500: components['responses']['500'] - } - } - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } - '/volumes/{volumeID}': { + timeout: number; + }; + /** @description Team metric with timestamp */ + TeamMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string; + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number; + /** + * Format: int32 + * @description The number of concurrent sandboxes for the team + */ + concurrentSandboxes: number; + /** + * Format: float + * @description Number of sandboxes started per second + */ + sandboxStartRate: number; + }; + /** @description Team metric with timestamp */ + MaxTeamMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string; + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number; + /** @description The maximum value of the requested metric in the given interval */ + value: number; + }; + AdminSandboxKillResult: { + /** @description Number of sandboxes successfully killed */ + killedCount: number; + /** @description Number of sandboxes that failed to kill */ + failedCount: number; + }; + AdminBuildCancelResult: { + /** @description Number of builds successfully cancelled */ + cancelledCount: number; + /** @description Number of builds that failed to cancel */ + failedCount: number; + }; + Template: { + /** @description Identifier of the template */ + templateID: string; + /** @description Identifier of the last successful build for given template */ + buildID: string; + cpuCount: components["schemas"]["CPUCount"]; + memoryMB: components["schemas"]["MemoryMB"]; + diskSizeMB: components["schemas"]["DiskSizeMB"]; + /** @description Whether the template is public or only accessible by the team */ + public: boolean; + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[]; + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[]; + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string; + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string; + createdBy: components["schemas"]["TeamUser"] | null; + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null; + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number; + /** + * Format: int32 + * @description Number of times the template was built + */ + buildCount: number; + envdVersion: components["schemas"]["EnvdVersion"]; + buildStatus: components["schemas"]["TemplateBuildStatus"]; + }; + TemplateRequestResponseV3: { + /** @description Identifier of the template */ + templateID: string; + /** @description Identifier of the last successful build for given template */ + buildID: string; + /** @description Whether the template is public or only accessible by the team */ + public: boolean; + /** @description Names of the template */ + names: string[]; + /** @description Tags assigned to the template build */ + tags: string[]; + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[]; + }; + TemplateLegacy: { + /** @description Identifier of the template */ + templateID: string; + /** @description Identifier of the last successful build for given template */ + buildID: string; + cpuCount: components["schemas"]["CPUCount"]; + memoryMB: components["schemas"]["MemoryMB"]; + diskSizeMB: components["schemas"]["DiskSizeMB"]; + /** @description Whether the template is public or only accessible by the team */ + public: boolean; + /** @description Aliases of the template */ + aliases: string[]; + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string; + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string; + createdBy: components["schemas"]["TeamUser"] | null; + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null; + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number; + /** + * Format: int32 + * @description Number of times the template was built + */ + buildCount: number; + envdVersion: components["schemas"]["EnvdVersion"]; + }; + TemplateBuild: { + /** + * Format: uuid + * @description Identifier of the build + */ + buildID: string; + status: components["schemas"]["TemplateBuildStatus"]; + /** + * Format: date-time + * @description Time when the build was created + */ + createdAt: string; + /** + * Format: date-time + * @description Time when the build was last updated + */ + updatedAt: string; + /** + * Format: date-time + * @description Time when the build was finished + */ + finishedAt?: string; + cpuCount: components["schemas"]["CPUCount"]; + memoryMB: components["schemas"]["MemoryMB"]; + diskSizeMB?: components["schemas"]["DiskSizeMB"]; + envdVersion?: components["schemas"]["EnvdVersion"]; + }; + TemplateWithBuilds: { + /** @description Identifier of the template */ + templateID: string; + /** @description Whether the template is public or only accessible by the team */ + public: boolean; + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[]; + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[]; + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string; + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string; + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null; + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number; + /** @description List of builds for the template */ + builds: components["schemas"]["TemplateBuild"][]; + }; + TemplateAliasResponse: { + /** @description Identifier of the template */ + templateID: string; + /** @description Whether the template is public or only accessible by the team */ + public: boolean; + }; + TemplateBuildRequest: { + /** @description Alias of the template */ + alias?: string; + /** @description Dockerfile for the template */ + dockerfile: string; + /** @description Identifier of the team */ + teamID?: string; + /** @description Start command to execute in the template after the build */ + startCmd?: string; + /** @description Ready check command to execute in the template after the build */ + readyCmd?: string; + cpuCount?: components["schemas"]["CPUCount"]; + memoryMB?: components["schemas"]["MemoryMB"]; + }; + /** @description Step in the template build process */ + TemplateStep: { + /** @description Type of the step */ + type: string; + /** + * @description Arguments for the step + * @default [] + */ + args: string[]; + /** @description Hash of the files used in the step */ + filesHash?: string; + /** + * @description Whether the step should be forced to run regardless of the cache + * @default false + */ + force: boolean; + }; + TemplateBuildRequestV3: { + /** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */ + name?: string; + /** @description Tags to assign to the template build */ + tags?: string[]; + /** + * @deprecated + * @description Alias of the template. Deprecated, use name instead. + */ + alias?: string; + /** + * @deprecated + * @description Identifier of the team + */ + teamID?: string; + cpuCount?: components["schemas"]["CPUCount"]; + memoryMB?: components["schemas"]["MemoryMB"]; + }; + TemplateBuildRequestV2: { + /** @description Alias of the template */ + alias: string; + /** + * @deprecated + * @description Identifier of the team + */ + teamID?: string; + cpuCount?: components["schemas"]["CPUCount"]; + memoryMB?: components["schemas"]["MemoryMB"]; + }; + FromImageRegistry: components["schemas"]["AWSRegistry"] | components["schemas"]["GCPRegistry"] | components["schemas"]["GeneralRegistry"]; + AWSRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: "aws"; + /** @description AWS Access Key ID for ECR authentication */ + awsAccessKeyId: string; + /** @description AWS Secret Access Key for ECR authentication */ + awsSecretAccessKey: string; + /** @description AWS Region where the ECR registry is located */ + awsRegion: string; + }; + GCPRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: "gcp"; + /** @description Service Account JSON for GCP authentication */ + serviceAccountJson: string; + }; + GeneralRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: "registry"; + /** @description Username to use for the registry */ + username: string; + /** @description Password to use for the registry */ + password: string; + }; + TemplateBuildStartV2: { + /** @description Image to use as a base for the template build */ + fromImage?: string; + /** @description Template to use as a base for the template build */ + fromTemplate?: string; + fromImageRegistry?: components["schemas"]["FromImageRegistry"]; + /** + * @description Whether the whole build should be forced to run regardless of the cache + * @default false + */ + force: boolean; + /** + * @description List of steps to execute in the template build + * @default [] + */ + steps: components["schemas"]["TemplateStep"][]; + /** @description Start command to execute in the template after the build */ + startCmd?: string; + /** @description Ready check command to execute in the template after the build */ + readyCmd?: string; + }; + TemplateBuildFileUpload: { + /** @description Whether the file is already present in the cache */ + present: boolean; + /** @description Url where the file should be uploaded to */ + url?: string; + }; + /** + * @description State of the sandbox + * @enum {string} + */ + LogLevel: "debug" | "info" | "warn" | "error"; + BuildLogEntry: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string; + /** @description Log message content */ + message: string; + level: components["schemas"]["LogLevel"]; + /** @description Step in the build process related to the log entry */ + step?: string; + }; + BuildStatusReason: { + /** @description Message with the status reason, currently reporting only for error status */ + message: string; + /** @description Step that failed */ + step?: string; + /** + * @description Log entries related to the status reason + * @default [] + */ + logEntries: components["schemas"]["BuildLogEntry"][]; + }; + /** + * @description Status of the template build + * @enum {string} + */ + TemplateBuildStatus: "building" | "waiting" | "ready" | "error"; + TemplateBuildInfo: { + /** + * @description Build logs + * @default [] + */ + logs: string[]; + /** + * @description Build logs structured + * @default [] + */ + logEntries: components["schemas"]["BuildLogEntry"][]; + /** @description Identifier of the template */ + templateID: string; + /** @description Identifier of the build */ + buildID: string; + status: components["schemas"]["TemplateBuildStatus"]; + reason?: components["schemas"]["BuildStatusReason"]; + }; + TemplateBuildLogsResponse: { + /** + * @description Build logs structured + * @default [] + */ + logs: components["schemas"]["BuildLogEntry"][]; + }; + /** + * @description Direction of the logs that should be returned + * @enum {string} + */ + LogsDirection: "forward" | "backward"; + /** + * @description Source of the logs that should be returned + * @enum {string} + */ + LogsSource: "temporary" | "persistent"; + /** + * @description Status of the node + * @enum {string} + */ + NodeStatus: "ready" | "draining" | "connecting" | "unhealthy"; + NodeStatusChange: { + /** + * Format: uuid + * @description Identifier of the cluster + */ + clusterID?: string; + status: components["schemas"]["NodeStatus"]; + }; + DiskMetrics: { + /** @description Mount point of the disk */ + mountPoint: string; + /** @description Device name */ + device: string; + /** @description Filesystem type (e.g., ext4, xfs) */ + filesystemType: string; + /** + * Format: uint64 + * @description Used space in bytes + */ + usedBytes: number; + /** + * Format: uint64 + * @description Total space in bytes + */ + totalBytes: number; + }; + /** @description Node metrics */ + NodeMetrics: { + /** + * Format: uint32 + * @description Number of allocated CPU cores + */ + allocatedCPU: number; + /** + * Format: uint32 + * @description Node CPU usage percentage + */ + cpuPercent: number; + /** + * Format: uint32 + * @description Total number of CPU cores on the node + */ + cpuCount: number; + /** + * Format: uint64 + * @description Amount of allocated memory in bytes + */ + allocatedMemoryBytes: number; + /** + * Format: uint64 + * @description Node memory used in bytes + */ + memoryUsedBytes: number; + /** + * Format: uint64 + * @description Total node memory in bytes + */ + memoryTotalBytes: number; + /** @description Detailed metrics for each disk/mount point */ + disks: components["schemas"]["DiskMetrics"][]; + }; + MachineInfo: { + /** @description CPU family of the node */ + cpuFamily: string; + /** @description CPU model of the node */ + cpuModel: string; + /** @description CPU model name of the node */ + cpuModelName: string; + /** @description CPU architecture of the node */ + cpuArchitecture: string; + }; + Node: { + /** @description Version of the orchestrator */ + version: string; + /** @description Commit of the orchestrator */ + commit: string; + /** @description Identifier of the node */ + id: string; + /** @description Service instance identifier of the node */ + serviceInstanceID: string; + /** @description Identifier of the cluster */ + clusterID: string; + machineInfo: components["schemas"]["MachineInfo"]; + status: components["schemas"]["NodeStatus"]; + /** + * Format: uint32 + * @description Number of sandboxes running on the node + */ + sandboxCount: number; + metrics: components["schemas"]["NodeMetrics"]; + /** + * Format: uint64 + * @description Number of sandbox create successes + */ + createSuccesses: number; + /** + * Format: uint64 + * @description Number of sandbox create fails + */ + createFails: number; + /** + * Format: int + * @description Number of starting Sandboxes + */ + sandboxStartingCount: number; + }; + NodeDetail: { + /** @description Identifier of the cluster */ + clusterID: string; + /** @description Version of the orchestrator */ + version: string; + /** @description Commit of the orchestrator */ + commit: string; + /** @description Identifier of the node */ + id: string; + /** @description Service instance identifier of the node */ + serviceInstanceID: string; + machineInfo: components["schemas"]["MachineInfo"]; + status: components["schemas"]["NodeStatus"]; + /** + * Format: uint32 + * @description Number of sandboxes running on the node + */ + sandboxCount: number; + metrics: components["schemas"]["NodeMetrics"]; + /** @description List of cached builds id on the node */ + cachedBuilds: string[]; + /** + * Format: uint64 + * @description Number of sandbox create successes + */ + createSuccesses: number; + /** + * Format: uint64 + * @description Number of sandbox create fails + */ + createFails: number; + }; + CreatedAccessToken: { + /** + * Format: uuid + * @description Identifier of the access token + */ + id: string; + /** @description Name of the access token */ + name: string; + /** @description The fully created access token */ + token: string; + mask: components["schemas"]["IdentifierMaskingDetails"]; + /** + * Format: date-time + * @description Timestamp of access token creation + */ + createdAt: string; + }; + NewAccessToken: { + /** @description Name of the access token */ + name: string; + }; + TeamAPIKey: { + /** + * Format: uuid + * @description Identifier of the API key + */ + id: string; + /** @description Name of the API key */ + name: string; + mask: components["schemas"]["IdentifierMaskingDetails"]; + /** + * Format: date-time + * @description Timestamp of API key creation + */ + createdAt: string; + createdBy?: components["schemas"]["TeamUser"] | null; + /** + * Format: date-time + * @description Last time this API key was used + */ + lastUsed?: string | null; + }; + CreatedTeamAPIKey: { + /** + * Format: uuid + * @description Identifier of the API key + */ + id: string; + /** @description Raw value of the API key */ + key: string; + mask: components["schemas"]["IdentifierMaskingDetails"]; + /** @description Name of the API key */ + name: string; + /** + * Format: date-time + * @description Timestamp of API key creation + */ + createdAt: string; + createdBy?: components["schemas"]["TeamUser"] | null; + /** + * Format: date-time + * @description Last time this API key was used + */ + lastUsed?: string | null; + }; + NewTeamAPIKey: { + /** @description Name of the API key */ + name: string; + }; + UpdateTeamAPIKey: { + /** @description New name for the API key */ + name: string; + }; + AssignedTemplateTags: { + /** @description Assigned tags of the template */ + tags: string[]; + /** + * Format: uuid + * @description Identifier of the build associated with these tags + */ + buildID: string; + }; + TemplateTag: { + /** @description The tag name */ + tag: string; + /** + * Format: uuid + * @description Identifier of the build associated with this tag + */ + buildID: string; + /** + * Format: date-time + * @description Time when the tag was assigned + */ + createdAt: string; + }; + AssignTemplateTagsRequest: { + /** @description Target template in "name:tag" format */ + target: string; + /** @description Tags to assign to the template */ + tags: string[]; + }; + DeleteTemplateTagsRequest: { + /** @description Name of the template */ + name: string; + /** @description Tags to delete */ + tags: string[]; + }; + Error: { + /** + * Format: int32 + * @description Error code + */ + code: number; + /** @description Error */ + message: string; + }; + IdentifierMaskingDetails: { + /** @description Prefix that identifies the token or key type */ + prefix: string; + /** @description Length of the token or key */ + valueLength: number; + /** @description Prefix used in masked version of the token or key */ + maskedValuePrefix: string; + /** @description Suffix used in masked version of the token or key */ + maskedValueSuffix: string; + }; + Volume: { + /** @description ID of the volume */ + volumeID: string; + /** @description Name of the volume */ + name: string; + }; + NewVolume: { + /** @description Name of the volume */ + name: string; + }; + }; + responses: { + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Authentication error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** @description Get team volume info */ - get: { - parameters: { - query?: never - header?: never - path: { - volumeID: components['parameters']['volumeID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully retrieved a team volume */ - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Volume'] - } - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - put?: never - post?: never - /** @description Delete a team volume */ - delete: { - parameters: { - query?: never - header?: never - path: { - volumeID: components['parameters']['volumeID'] - } - cookie?: never - } - requestBody?: never - responses: { - /** @description Successfully deleted a team volume */ - 204: { - headers: { - [name: string]: unknown - } - content?: never - } - 401: components['responses']['401'] - 404: components['responses']['404'] - 500: components['responses']['500'] - } - } - options?: never - head?: never - patch?: never - trace?: never - } -} -export type webhooks = Record -export interface components { - schemas: { - Team: { - /** @description Identifier of the team */ - teamID: string - /** @description Name of the team */ - name: string - /** @description API key for the team */ - apiKey: string - /** @description Whether the team is the default team */ - isDefault: boolean - } - TeamUser: { - /** - * Format: uuid - * @description Identifier of the user - */ - id: string - /** @description Email of the user */ - email: string - } - TemplateUpdateRequest: { - /** @description Whether the template is public or only accessible by the team */ - public?: boolean - } - TemplateUpdateResponse: { - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[] - } - /** - * Format: int32 - * @description CPU cores for the sandbox - */ - CPUCount: number - /** - * Format: int32 - * @description Memory for the sandbox in MiB - */ - MemoryMB: number - /** - * Format: int32 - * @description Disk size for the sandbox in MiB - */ - DiskSizeMB: number - /** @description Version of the envd running in the sandbox */ - EnvdVersion: string - SandboxMetadata: { - [key: string]: string - } - /** - * @description State of the sandbox - * @enum {string} - */ - SandboxState: 'running' | 'paused' - SnapshotInfo: { - /** @description Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default). */ - snapshotID: string - /** @description Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2) */ - names: string[] - } - EnvVars: { - [key: string]: string - } - /** @description MCP configuration for the sandbox */ - Mcp: { - [key: string]: unknown - } | null - SandboxNetworkConfig: { - /** - * @description Specify if the sandbox URLs should be accessible only with authentication. - * @default true - */ - allowPublicTraffic: boolean - /** @description List of allowed CIDR blocks or IP addresses for egress traffic. Allowed addresses always take precedence over blocked addresses. */ - allowOut?: string[] - /** @description List of denied CIDR blocks or IP addresses for egress traffic */ - denyOut?: string[] - /** @description Specify host mask which will be used for all sandbox requests */ - maskRequestHost?: string - } - /** - * @description Auto-resume policy for paused sandboxes. Default is off. - * @default off - * @enum {string} - */ - SandboxAutoResumePolicy: 'any' | 'off' - /** @description Auto-resume configuration for paused sandboxes. Default is off. */ - SandboxAutoResumeConfig: { - policy: components['schemas']['SandboxAutoResumePolicy'] - } - /** @description Log entry with timestamp and line */ - SandboxLog: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string - /** @description Log line content */ - line: string - } - SandboxLogEntry: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string - /** @description Log message content */ - message: string - level: components['schemas']['LogLevel'] - fields: { - [key: string]: string - } - } - SandboxLogs: { - /** @description Logs of the sandbox */ - logs: components['schemas']['SandboxLog'][] - /** @description Structured logs of the sandbox */ - logEntries: components['schemas']['SandboxLogEntry'][] - } - SandboxLogsV2Response: { - /** - * @description Sandbox logs structured - * @default [] - */ - logs: components['schemas']['SandboxLogEntry'][] - } - /** @description Metric entry with timestamp and line */ - SandboxMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number - /** - * Format: int32 - * @description Number of CPU cores - */ - cpuCount: number - /** - * Format: float - * @description CPU usage percentage - */ - cpuUsedPct: number - /** - * Format: int64 - * @description Memory used in bytes - */ - memUsed: number - /** - * Format: int64 - * @description Total memory in bytes - */ - memTotal: number - /** - * Format: int64 - * @description Disk used in bytes - */ - diskUsed: number - /** - * Format: int64 - * @description Total disk space in bytes - */ - diskTotal: number - } - SandboxVolumeMount: { - /** @description Name of the volume */ - name: string - /** @description Path of the volume */ - path: string - } - Sandbox: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string - /** @description Identifier of the sandbox */ - sandboxID: string - /** @description Alias of the template */ - alias?: string - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string - envdVersion: components['schemas']['EnvdVersion'] - /** @description Access token used for envd communication */ - envdAccessToken?: string - /** @description Token required for accessing sandbox via proxy. */ - trafficAccessToken?: string | null - /** @description Base domain where the sandbox traffic is accessible */ - domain?: string | null - } - SandboxDetail: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string - /** @description Alias of the template */ - alias?: string - /** @description Identifier of the sandbox */ - sandboxID: string - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string - /** - * Format: date-time - * @description Time when the sandbox was started - */ - startedAt: string - /** - * Format: date-time - * @description Time when the sandbox will expire - */ - endAt: string - envdVersion: components['schemas']['EnvdVersion'] - /** @description Access token used for envd communication */ - envdAccessToken?: string - /** @description Base domain where the sandbox traffic is accessible */ - domain?: string | null - cpuCount: components['schemas']['CPUCount'] - memoryMB: components['schemas']['MemoryMB'] - diskSizeMB: components['schemas']['DiskSizeMB'] - metadata?: components['schemas']['SandboxMetadata'] - state: components['schemas']['SandboxState'] - volumeMounts: components['schemas']['SandboxVolumeMount'][] - } - ListedSandbox: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string - /** @description Alias of the template */ - alias?: string - /** @description Identifier of the sandbox */ - sandboxID: string - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string - /** - * Format: date-time - * @description Time when the sandbox was started - */ - startedAt: string - /** - * Format: date-time - * @description Time when the sandbox will expire - */ - endAt: string - cpuCount: components['schemas']['CPUCount'] - memoryMB: components['schemas']['MemoryMB'] - diskSizeMB: components['schemas']['DiskSizeMB'] - metadata?: components['schemas']['SandboxMetadata'] - state: components['schemas']['SandboxState'] - envdVersion: components['schemas']['EnvdVersion'] - volumeMounts: components['schemas']['SandboxVolumeMount'][] - } - SandboxesWithMetrics: { - sandboxes: { - [key: string]: components['schemas']['SandboxMetric'] - } - } - NewSandbox: { - /** @description Identifier of the required template */ - templateID: string - /** - * Format: int32 - * @description Time to live for the sandbox in seconds. - * @default 15 - */ - timeout: number - /** - * @description Automatically pauses the sandbox after the timeout - * @default false - */ - autoPause: boolean - autoResume?: components['schemas']['SandboxAutoResumeConfig'] - /** @description Secure all system communication with sandbox */ - secure?: boolean - /** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */ - allow_internet_access?: boolean - network?: components['schemas']['SandboxNetworkConfig'] - metadata?: components['schemas']['SandboxMetadata'] - envVars?: components['schemas']['EnvVars'] - mcp?: components['schemas']['Mcp'] - volumeMounts?: components['schemas']['SandboxVolumeMount'][] - } - ResumedSandbox: { - /** - * Format: int32 - * @description Time to live for the sandbox in seconds. - * @default 15 - */ - timeout: number - /** - * @deprecated - * @description Automatically pauses the sandbox after the timeout - */ - autoPause?: boolean - } - ConnectSandbox: { - /** - * Format: int32 - * @description Timeout in seconds from the current time after which the sandbox should expire - */ - timeout: number - } - /** @description Team metric with timestamp */ - TeamMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number - /** - * Format: int32 - * @description The number of concurrent sandboxes for the team - */ - concurrentSandboxes: number - /** - * Format: float - * @description Number of sandboxes started per second - */ - sandboxStartRate: number - } - /** @description Team metric with timestamp */ - MaxTeamMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number - /** @description The maximum value of the requested metric in the given interval */ - value: number - } - AdminSandboxKillResult: { - /** @description Number of sandboxes successfully killed */ - killedCount: number - /** @description Number of sandboxes that failed to kill */ - failedCount: number - } - AdminBuildCancelResult: { - /** @description Number of builds successfully cancelled */ - cancelledCount: number - /** @description Number of builds that failed to cancel */ - failedCount: number - } - Template: { - /** @description Identifier of the template */ - templateID: string - /** @description Identifier of the last successful build for given template */ - buildID: string - cpuCount: components['schemas']['CPUCount'] - memoryMB: components['schemas']['MemoryMB'] - diskSizeMB: components['schemas']['DiskSizeMB'] - /** @description Whether the template is public or only accessible by the team */ - public: boolean - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[] - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[] - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string - createdBy: components['schemas']['TeamUser'] | null - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number - /** - * Format: int32 - * @description Number of times the template was built - */ - buildCount: number - envdVersion: components['schemas']['EnvdVersion'] - buildStatus: components['schemas']['TemplateBuildStatus'] - } - TemplateRequestResponseV3: { - /** @description Identifier of the template */ - templateID: string - /** @description Identifier of the last successful build for given template */ - buildID: string - /** @description Whether the template is public or only accessible by the team */ - public: boolean - /** @description Names of the template */ - names: string[] - /** @description Tags assigned to the template build */ - tags: string[] - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[] - } - TemplateLegacy: { - /** @description Identifier of the template */ - templateID: string - /** @description Identifier of the last successful build for given template */ - buildID: string - cpuCount: components['schemas']['CPUCount'] - memoryMB: components['schemas']['MemoryMB'] - diskSizeMB: components['schemas']['DiskSizeMB'] - /** @description Whether the template is public or only accessible by the team */ - public: boolean - /** @description Aliases of the template */ - aliases: string[] - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string - createdBy: components['schemas']['TeamUser'] | null - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number - /** - * Format: int32 - * @description Number of times the template was built - */ - buildCount: number - envdVersion: components['schemas']['EnvdVersion'] - } - TemplateBuild: { - /** - * Format: uuid - * @description Identifier of the build - */ - buildID: string - status: components['schemas']['TemplateBuildStatus'] - /** - * Format: date-time - * @description Time when the build was created - */ - createdAt: string - /** - * Format: date-time - * @description Time when the build was last updated - */ - updatedAt: string - /** - * Format: date-time - * @description Time when the build was finished - */ - finishedAt?: string - cpuCount: components['schemas']['CPUCount'] - memoryMB: components['schemas']['MemoryMB'] - diskSizeMB?: components['schemas']['DiskSizeMB'] - envdVersion?: components['schemas']['EnvdVersion'] - } - TemplateWithBuilds: { - /** @description Identifier of the template */ - templateID: string - /** @description Whether the template is public or only accessible by the team */ - public: boolean - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[] - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[] - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number - /** @description List of builds for the template */ - builds: components['schemas']['TemplateBuild'][] - } - TemplateAliasResponse: { - /** @description Identifier of the template */ - templateID: string - /** @description Whether the template is public or only accessible by the team */ - public: boolean - } - TemplateBuildRequest: { - /** @description Alias of the template */ - alias?: string - /** @description Dockerfile for the template */ - dockerfile: string - /** @description Identifier of the team */ - teamID?: string - /** @description Start command to execute in the template after the build */ - startCmd?: string - /** @description Ready check command to execute in the template after the build */ - readyCmd?: string - cpuCount?: components['schemas']['CPUCount'] - memoryMB?: components['schemas']['MemoryMB'] - } - /** @description Step in the template build process */ - TemplateStep: { - /** @description Type of the step */ - type: string - /** - * @description Arguments for the step - * @default [] - */ - args: string[] - /** @description Hash of the files used in the step */ - filesHash?: string - /** - * @description Whether the step should be forced to run regardless of the cache - * @default false - */ - force: boolean - } - TemplateBuildRequestV3: { - /** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */ - name?: string - /** @description Tags to assign to the template build */ - tags?: string[] - /** - * @deprecated - * @description Alias of the template. Deprecated, use name instead. - */ - alias?: string - /** - * @deprecated - * @description Identifier of the team - */ - teamID?: string - cpuCount?: components['schemas']['CPUCount'] - memoryMB?: components['schemas']['MemoryMB'] - } - TemplateBuildRequestV2: { - /** @description Alias of the template */ - alias: string - /** - * @deprecated - * @description Identifier of the team - */ - teamID?: string - cpuCount?: components['schemas']['CPUCount'] - memoryMB?: components['schemas']['MemoryMB'] - } - FromImageRegistry: - | components['schemas']['AWSRegistry'] - | components['schemas']['GCPRegistry'] - | components['schemas']['GeneralRegistry'] - AWSRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: 'aws' - /** @description AWS Access Key ID for ECR authentication */ - awsAccessKeyId: string - /** @description AWS Secret Access Key for ECR authentication */ - awsSecretAccessKey: string - /** @description AWS Region where the ECR registry is located */ - awsRegion: string - } - GCPRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: 'gcp' - /** @description Service Account JSON for GCP authentication */ - serviceAccountJson: string - } - GeneralRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: 'registry' - /** @description Username to use for the registry */ - username: string - /** @description Password to use for the registry */ - password: string - } - TemplateBuildStartV2: { - /** @description Image to use as a base for the template build */ - fromImage?: string - /** @description Template to use as a base for the template build */ - fromTemplate?: string - fromImageRegistry?: components['schemas']['FromImageRegistry'] - /** - * @description Whether the whole build should be forced to run regardless of the cache - * @default false - */ - force: boolean - /** - * @description List of steps to execute in the template build - * @default [] - */ - steps: components['schemas']['TemplateStep'][] - /** @description Start command to execute in the template after the build */ - startCmd?: string - /** @description Ready check command to execute in the template after the build */ - readyCmd?: string - } - TemplateBuildFileUpload: { - /** @description Whether the file is already present in the cache */ - present: boolean - /** @description Url where the file should be uploaded to */ - url?: string - } - /** - * @description State of the sandbox - * @enum {string} - */ - LogLevel: 'debug' | 'info' | 'warn' | 'error' - BuildLogEntry: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string - /** @description Log message content */ - message: string - level: components['schemas']['LogLevel'] - /** @description Step in the build process related to the log entry */ - step?: string - } - BuildStatusReason: { - /** @description Message with the status reason, currently reporting only for error status */ - message: string - /** @description Step that failed */ - step?: string - /** - * @description Log entries related to the status reason - * @default [] - */ - logEntries: components['schemas']['BuildLogEntry'][] - } - /** - * @description Status of the template build - * @enum {string} - */ - TemplateBuildStatus: 'building' | 'waiting' | 'ready' | 'error' - TemplateBuildInfo: { - /** - * @description Build logs - * @default [] - */ - logs: string[] - /** - * @description Build logs structured - * @default [] - */ - logEntries: components['schemas']['BuildLogEntry'][] - /** @description Identifier of the template */ - templateID: string - /** @description Identifier of the build */ - buildID: string - status: components['schemas']['TemplateBuildStatus'] - reason?: components['schemas']['BuildStatusReason'] - } - TemplateBuildLogsResponse: { - /** - * @description Build logs structured - * @default [] - */ - logs: components['schemas']['BuildLogEntry'][] - } - /** - * @description Direction of the logs that should be returned - * @enum {string} - */ - LogsDirection: 'forward' | 'backward' - /** - * @description Source of the logs that should be returned - * @enum {string} - */ - LogsSource: 'temporary' | 'persistent' - /** - * @description Status of the node - * @enum {string} - */ - NodeStatus: 'ready' | 'draining' | 'connecting' | 'unhealthy' - NodeStatusChange: { - /** - * Format: uuid - * @description Identifier of the cluster - */ - clusterID?: string - status: components['schemas']['NodeStatus'] - } - DiskMetrics: { - /** @description Mount point of the disk */ - mountPoint: string - /** @description Device name */ - device: string - /** @description Filesystem type (e.g., ext4, xfs) */ - filesystemType: string - /** - * Format: uint64 - * @description Used space in bytes - */ - usedBytes: number - /** - * Format: uint64 - * @description Total space in bytes - */ - totalBytes: number - } - /** @description Node metrics */ - NodeMetrics: { - /** - * Format: uint32 - * @description Number of allocated CPU cores - */ - allocatedCPU: number - /** - * Format: uint32 - * @description Node CPU usage percentage - */ - cpuPercent: number - /** - * Format: uint32 - * @description Total number of CPU cores on the node - */ - cpuCount: number - /** - * Format: uint64 - * @description Amount of allocated memory in bytes - */ - allocatedMemoryBytes: number - /** - * Format: uint64 - * @description Node memory used in bytes - */ - memoryUsedBytes: number - /** - * Format: uint64 - * @description Total node memory in bytes - */ - memoryTotalBytes: number - /** @description Detailed metrics for each disk/mount point */ - disks: components['schemas']['DiskMetrics'][] - } - MachineInfo: { - /** @description CPU family of the node */ - cpuFamily: string - /** @description CPU model of the node */ - cpuModel: string - /** @description CPU model name of the node */ - cpuModelName: string - /** @description CPU architecture of the node */ - cpuArchitecture: string - } - Node: { - /** @description Version of the orchestrator */ - version: string - /** @description Commit of the orchestrator */ - commit: string - /** @description Identifier of the node */ - id: string - /** @description Service instance identifier of the node */ - serviceInstanceID: string - /** @description Identifier of the cluster */ - clusterID: string - machineInfo: components['schemas']['MachineInfo'] - status: components['schemas']['NodeStatus'] - /** - * Format: uint32 - * @description Number of sandboxes running on the node - */ - sandboxCount: number - metrics: components['schemas']['NodeMetrics'] - /** - * Format: uint64 - * @description Number of sandbox create successes - */ - createSuccesses: number - /** - * Format: uint64 - * @description Number of sandbox create fails - */ - createFails: number - /** - * Format: int - * @description Number of starting Sandboxes - */ - sandboxStartingCount: number - } - NodeDetail: { - /** @description Identifier of the cluster */ - clusterID: string - /** @description Version of the orchestrator */ - version: string - /** @description Commit of the orchestrator */ - commit: string - /** @description Identifier of the node */ - id: string - /** @description Service instance identifier of the node */ - serviceInstanceID: string - machineInfo: components['schemas']['MachineInfo'] - status: components['schemas']['NodeStatus'] - /** - * Format: uint32 - * @description Number of sandboxes running on the node - */ - sandboxCount: number - metrics: components['schemas']['NodeMetrics'] - /** @description List of cached builds id on the node */ - cachedBuilds: string[] - /** - * Format: uint64 - * @description Number of sandbox create successes - */ - createSuccesses: number - /** - * Format: uint64 - * @description Number of sandbox create fails - */ - createFails: number - } - CreatedAccessToken: { - /** - * Format: uuid - * @description Identifier of the access token - */ - id: string - /** @description Name of the access token */ - name: string - /** @description The fully created access token */ - token: string - mask: components['schemas']['IdentifierMaskingDetails'] - /** - * Format: date-time - * @description Timestamp of access token creation - */ - createdAt: string - } - NewAccessToken: { - /** @description Name of the access token */ - name: string - } - TeamAPIKey: { - /** - * Format: uuid - * @description Identifier of the API key - */ - id: string - /** @description Name of the API key */ - name: string - mask: components['schemas']['IdentifierMaskingDetails'] - /** - * Format: date-time - * @description Timestamp of API key creation - */ - createdAt: string - createdBy?: components['schemas']['TeamUser'] | null - /** - * Format: date-time - * @description Last time this API key was used - */ - lastUsed?: string | null - } - CreatedTeamAPIKey: { - /** - * Format: uuid - * @description Identifier of the API key - */ - id: string - /** @description Raw value of the API key */ - key: string - mask: components['schemas']['IdentifierMaskingDetails'] - /** @description Name of the API key */ - name: string - /** - * Format: date-time - * @description Timestamp of API key creation - */ - createdAt: string - createdBy?: components['schemas']['TeamUser'] | null - /** - * Format: date-time - * @description Last time this API key was used - */ - lastUsed?: string | null - } - NewTeamAPIKey: { - /** @description Name of the API key */ - name: string - } - UpdateTeamAPIKey: { - /** @description New name for the API key */ - name: string - } - AssignedTemplateTags: { - /** @description Assigned tags of the template */ - tags: string[] - /** - * Format: uuid - * @description Identifier of the build associated with these tags - */ - buildID: string - } - TemplateTag: { - /** @description The tag name */ - tag: string - /** - * Format: uuid - * @description Identifier of the build associated with this tag - */ - buildID: string - /** - * Format: date-time - * @description Time when the tag was assigned - */ - createdAt: string - } - AssignTemplateTagsRequest: { - /** @description Target template in "name:tag" format */ - target: string - /** @description Tags to assign to the template */ - tags: string[] - } - DeleteTemplateTagsRequest: { - /** @description Name of the template */ - name: string - /** @description Tags to delete */ - tags: string[] - } - Error: { - /** - * Format: int32 - * @description Error code - */ - code: number - /** @description Error */ - message: string - } - IdentifierMaskingDetails: { - /** @description Prefix that identifies the token or key type */ - prefix: string - /** @description Length of the token or key */ - valueLength: number - /** @description Prefix used in masked version of the token or key */ - maskedValuePrefix: string - /** @description Suffix used in masked version of the token or key */ - maskedValueSuffix: string - } - Volume: { - /** @description ID of the volume */ - volumeID: string - /** @description Name of the volume */ - name: string - } - NewVolume: { - /** @description Name of the volume */ - name: string - } - } - responses: { - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - /** @description Authentication error */ - 401: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - /** @description Forbidden */ - 403: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - /** @description Not found */ - 404: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - /** @description Conflict */ - 409: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - /** @description Server error */ - 500: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['Error'] - } - } - } - parameters: { - templateID: string - buildID: string - sandboxID: string - teamID: string - nodeID: string - apiKeyID: string - accessTokenID: string - snapshotID: string - tag: string - /** @description Maximum number of items to return per page */ - paginationLimit: number - /** @description Cursor to start the list from */ - paginationNextToken: string - volumeID: string - } - requestBodies: never - headers: never - pathItems: never + templateID: string; + buildID: string; + sandboxID: string; + teamID: string; + nodeID: string; + apiKeyID: string; + accessTokenID: string; + snapshotID: string; + tag: string; + /** @description Maximum number of items to return per page */ + paginationLimit: number; + /** @description Cursor to start the list from */ + paginationNextToken: string; + volumeID: string; + }; + requestBodies: never; + headers: never; + pathItems: never; } -export type $defs = Record -export type operations = Record +export type $defs = Record; +export type operations = Record; From 32237adbf3a11307feb554cd5a44da4d96dd9f2a Mon Sep 17 00:00:00 2001 From: ben-fornefeld Date: Mon, 2 Mar 2026 15:13:14 -0800 Subject: [PATCH 2/6] chore: format & lint fix --- .../dashboard/build/use-build-logs.ts | 2 +- .../dashboard/templates/builds/constants.ts | 2 +- .../dashboard/templates/builds/header.tsx | 2 +- .../templates/builds/use-filters.tsx | 2 +- src/lib/clients/api.ts | 2 +- .../api/repositories/builds.repository.ts | 4 +- src/server/api/routers/builds.ts | 6 +- src/types/infra-api.types.ts | 6397 +++++++++-------- 8 files changed, 3210 insertions(+), 3207 deletions(-) diff --git a/src/features/dashboard/build/use-build-logs.ts b/src/features/dashboard/build/use-build-logs.ts index 244f70121..a1499bf3f 100644 --- a/src/features/dashboard/build/use-build-logs.ts +++ b/src/features/dashboard/build/use-build-logs.ts @@ -6,7 +6,7 @@ import { useStore } from 'zustand' import type { BuildStatus } from '@/server/api/models/builds.models' import { useTRPCClient } from '@/trpc/client' import { type BuildLogsStore, createBuildLogsStore } from './build-logs-store' -import { type LogLevelFilter } from './logs-filter-params' +import type { LogLevelFilter } from './logs-filter-params' const REFETCH_INTERVAL_MS = 1_500 const DRAIN_AFTER_BUILD_STOP_WINDOW_MS = 10_000 diff --git a/src/features/dashboard/templates/builds/constants.ts b/src/features/dashboard/templates/builds/constants.ts index 9c19e9ec5..1669ce53d 100644 --- a/src/features/dashboard/templates/builds/constants.ts +++ b/src/features/dashboard/templates/builds/constants.ts @@ -1,5 +1,5 @@ import { millisecondsInDay } from 'date-fns/constants' -import { BuildStatus } from '@/server/api/models/builds.models' +import type { BuildStatus } from '@/server/api/models/builds.models' export const LOG_RETENTION_MS = 7 * millisecondsInDay // 7 days diff --git a/src/features/dashboard/templates/builds/header.tsx b/src/features/dashboard/templates/builds/header.tsx index 4322d2b38..99f79d676 100644 --- a/src/features/dashboard/templates/builds/header.tsx +++ b/src/features/dashboard/templates/builds/header.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { cn } from '@/lib/utils' -import { BuildStatus } from '@/server/api/models/builds.models' +import type { BuildStatus } from '@/server/api/models/builds.models' import { Button } from '@/ui/primitives/button' import { DropdownMenu, diff --git a/src/features/dashboard/templates/builds/use-filters.tsx b/src/features/dashboard/templates/builds/use-filters.tsx index ef220e8b3..26950e3ea 100644 --- a/src/features/dashboard/templates/builds/use-filters.tsx +++ b/src/features/dashboard/templates/builds/use-filters.tsx @@ -3,7 +3,7 @@ import { useQueryStates } from 'nuqs' import { useMemo } from 'react' import { useDebounceCallback } from 'usehooks-ts' -import { BuildStatus } from '@/server/api/models/builds.models' +import type { BuildStatus } from '@/server/api/models/builds.models' import { INITIAL_BUILD_STATUSES } from './constants' import { templateBuildsFilterParams } from './filter-params' diff --git a/src/lib/clients/api.ts b/src/lib/clients/api.ts index 89db1e524..60b906e96 100644 --- a/src/lib/clients/api.ts +++ b/src/lib/clients/api.ts @@ -20,7 +20,7 @@ export const infra = createClient({ headers, body, method, - duplex: !!body ? 'half' : undefined, + duplex: body ? 'half' : undefined, ...options, } as RequestInit) }, diff --git a/src/server/api/repositories/builds.repository.ts b/src/server/api/repositories/builds.repository.ts index 8c2a08c02..55a875e22 100644 --- a/src/server/api/repositories/builds.repository.ts +++ b/src/server/api/repositories/builds.repository.ts @@ -2,10 +2,10 @@ import { SUPABASE_AUTH_HEADERS } from '@/configs/api' import { INITIAL_BUILD_STATUSES } from '@/features/dashboard/templates/builds/constants' import { api, infra } from '@/lib/clients/api' import { handleDashboardApiError, handleInfraApiError } from '../errors' -import { +import type { BuildStatus, ListedBuildDTO, - type RunningBuildStatusDTO, + RunningBuildStatusDTO, } from '../models/builds.models' // helpers diff --git a/src/server/api/routers/builds.ts b/src/server/api/routers/builds.ts index 31a9ab089..327447c4a 100644 --- a/src/server/api/routers/builds.ts +++ b/src/server/api/routers/builds.ts @@ -3,9 +3,9 @@ import { LOG_RETENTION_MS } from '@/features/dashboard/templates/builds/constant import { buildsRepo } from '@/server/api/repositories/builds.repository' import { createTRPCRouter } from '../init' import { - BuildDetailsDTO, - BuildLogDTO, - BuildLogsDTO, + type BuildDetailsDTO, + type BuildLogDTO, + type BuildLogsDTO, BuildStatusSchema, } from '../models/builds.models' import { protectedTeamProcedure } from '../procedures' diff --git a/src/types/infra-api.types.ts b/src/types/infra-api.types.ts index c3aaa7a5b..52b1a4ee8 100644 --- a/src/types/infra-api.types.ts +++ b/src/types/infra-api.types.ts @@ -4,3206 +4,3209 @@ */ export interface paths { - "/health": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Health check */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Request was successful */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/teams": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all teams */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all teams */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Team"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/teams/{teamID}/metrics": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get metrics for the team */ - get: { - parameters: { - query?: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number; - end?: number; - }; - header?: never; - path: { - teamID: components["parameters"]["teamID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the team metrics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TeamMetric"][]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 403: components["responses"]["403"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/teams/{teamID}/metrics/max": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get the maximum metrics for the team in the given interval */ - get: { - parameters: { - query: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number; - end?: number; - /** @description Metric to retrieve the maximum value for */ - metric: "concurrent_sandboxes" | "sandbox_start_rate"; - }; - header?: never; - path: { - teamID: components["parameters"]["teamID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the team metrics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MaxTeamMetric"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 403: components["responses"]["403"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all running sandboxes */ - get: { - parameters: { - query?: { - /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ - metadata?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all running sandboxes */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListedSandbox"][]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** @description Create a sandbox from the template */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["NewSandbox"]; - }; - }; - responses: { - /** @description The sandbox was created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Sandbox"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v2/sandboxes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all sandboxes */ - get: { - parameters: { - query?: { - /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ - metadata?: string; - /** @description Filter sandboxes by one or more states */ - state?: components["schemas"]["SandboxState"][]; - /** @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 running sandboxes */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListedSandbox"][]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/metrics": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List metrics for given sandboxes */ - get: { - parameters: { - query: { - /** @description Comma-separated list of sandbox IDs to get metrics for */ - sandbox_ids: string[]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all running sandboxes with metrics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SandboxesWithMetrics"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/logs": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * @deprecated - * @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead. - */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - start?: number; - /** @description Maximum number of logs that should be returned */ - limit?: number; - }; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the sandbox logs */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SandboxLogs"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v2/sandboxes/{sandboxID}/logs": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get sandbox logs */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - cursor?: number; - /** @description Maximum number of logs that should be returned */ - limit?: number; - /** @description Direction of the logs that should be returned */ - direction?: components["schemas"]["LogsDirection"]; - /** @description Minimum log level to return. Logs below this level are excluded */ - level?: components["schemas"]["LogLevel"]; - /** @description Case-sensitive substring match on log message content */ - search?: string; - }; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the sandbox logs */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SandboxLogsV2Response"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get a sandbox by id */ - get: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the sandbox */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SandboxDetail"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - /** @description Kill a sandbox */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description The sandbox was killed successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/metrics": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get sandbox metrics */ - get: { - parameters: { - query?: { - /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ - start?: number; - end?: number; - }; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the sandbox metrics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SandboxMetric"][]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/pause": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Pause the sandbox */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description The sandbox was paused successfully and can be resumed */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 409: components["responses"]["409"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/resume": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * @deprecated - * @description Resume the sandbox - */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ResumedSandbox"]; - }; - }; - responses: { - /** @description The sandbox was resumed successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Sandbox"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 409: components["responses"]["409"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/connect": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ConnectSandbox"]; - }; - }; - responses: { - /** @description The sandbox was already running */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Sandbox"]; - }; - }; - /** @description The sandbox was resumed successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Sandbox"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/timeout": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int32 - * @description Timeout in seconds from the current time after which the sandbox should expire - */ - timeout: number; - }; - }; - }; - responses: { - /** @description Successfully set the sandbox timeout */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/refreshes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Refresh the sandbox extending its time to live */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** @description Duration for which the sandbox should be kept alive in seconds */ - duration?: number; - }; - }; - }; - responses: { - /** @description Successfully refreshed the sandbox */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/sandboxes/{sandboxID}/snapshots": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime. */ - post: { - parameters: { - query?: never; - header?: never; - path: { - sandboxID: components["parameters"]["sandboxID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @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; - }; - }; - }; - responses: { - /** @description Snapshot created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SnapshotInfo"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/snapshots": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all snapshots for the team */ - get: { - parameters: { - query?: { - sandboxID?: string; - /** @description Maximum number of items to return per page */ - limit?: components["parameters"]["paginationLimit"]; - /** @description Cursor to start the list from */ - nextToken?: components["parameters"]["paginationNextToken"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned snapshots */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SnapshotInfo"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/templates": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Create a new template */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateBuildRequestV3"]; - }; - }; - responses: { - /** @description The build was requested successfully */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateRequestResponseV3"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v2/templates": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * @deprecated - * @description Create a new template - */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateBuildRequestV2"]; - }; - }; - responses: { - /** @description The build was requested successfully */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateLegacy"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/{templateID}/files/{hash}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get an upload link for a tar file containing build layer files */ - get: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - hash: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description The upload link where to upload the tar file */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateBuildFileUpload"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all templates */ - get: { - parameters: { - query?: { - teamID?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all templates */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Template"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** - * @deprecated - * @description Create a new template - */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateBuildRequest"]; - }; - }; - responses: { - /** @description The build was accepted */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateLegacy"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/{templateID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all builds for a template */ - get: { - parameters: { - query?: { - /** @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: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the template with its builds */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateWithBuilds"]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** - * @deprecated - * @description Rebuild an template - */ - post: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateBuildRequest"]; - }; - }; - responses: { - /** @description The build was accepted */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateLegacy"]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - /** @description Delete a template */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description The template was deleted successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - /** - * @deprecated - * @description Update template - */ - patch: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateUpdateRequest"]; - }; - }; - responses: { - /** @description The template was updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - trace?: never; - }; - "/templates/{templateID}/builds/{buildID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * @deprecated - * @description Start the build - */ - post: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - buildID: components["parameters"]["buildID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description The build has started */ - 202: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v2/templates/{templateID}/builds/{buildID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Start the build */ - post: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - buildID: components["parameters"]["buildID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateBuildStartV2"]; - }; - }; - responses: { - /** @description The build has started */ - 202: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v2/templates/{templateID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - /** @description Update template */ - patch: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TemplateUpdateRequest"]; - }; - }; - responses: { - /** @description The template was updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateUpdateResponse"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - trace?: never; - }; - "/templates/{templateID}/builds/{buildID}/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get template build info */ - get: { - parameters: { - query?: { - /** @description Index of the starting build log that should be returned with the template */ - logsOffset?: number; - /** @description Maximum number of logs that should be returned */ - limit?: number; - level?: components["schemas"]["LogLevel"]; - }; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - buildID: components["parameters"]["buildID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the template */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateBuildInfo"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/{templateID}/builds/{buildID}/logs": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get template build logs */ - get: { - parameters: { - query?: { - /** @description Starting timestamp of the logs that should be returned in milliseconds */ - cursor?: number; - /** @description Maximum number of logs that should be returned */ - limit?: number; - direction?: components["schemas"]["LogsDirection"]; - level?: components["schemas"]["LogLevel"]; - /** @description Source of the logs that should be returned from */ - source?: components["schemas"]["LogsSource"]; - }; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - buildID: components["parameters"]["buildID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the template build logs */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateBuildLogsResponse"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/tags": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Assign tag(s) to a template build */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AssignTemplateTagsRequest"]; - }; - }; - responses: { - /** @description Tag assigned successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AssignedTemplateTags"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - /** @description Delete multiple tags from templates */ - delete: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["DeleteTemplateTagsRequest"]; - }; - }; - responses: { - /** @description Tags deleted successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/{templateID}/tags": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all tags for a template */ - get: { - parameters: { - query?: never; - header?: never; - path: { - templateID: components["parameters"]["templateID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the template tags */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateTag"][]; - }; - }; - 401: components["responses"]["401"]; - 403: components["responses"]["403"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/templates/aliases/{alias}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Check if template with given alias exists */ - get: { - parameters: { - query?: never; - header?: never; - path: { - alias: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully queried template by alias */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TemplateAliasResponse"]; - }; - }; - 400: components["responses"]["400"]; - 403: components["responses"]["403"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/nodes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all nodes */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all nodes */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Node"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/nodes/{nodeID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get node info */ - get: { - parameters: { - query?: { - /** @description Identifier of the cluster */ - clusterID?: string; - }; - header?: never; - path: { - nodeID: components["parameters"]["nodeID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned the node */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["NodeDetail"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** @description Change status of a node */ - post: { - parameters: { - query?: never; - header?: never; - path: { - nodeID: components["parameters"]["nodeID"]; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["NodeStatusChange"]; - }; - }; - responses: { - /** @description The node status was changed successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/admin/teams/{teamID}/sandboxes/kill": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Kill all sandboxes for a team - * @description Kills all sandboxes for the specified team - */ - post: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - teamID: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully killed sandboxes */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AdminSandboxKillResult"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/admin/teams/{teamID}/builds/cancel": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Cancel all builds for a team - * @description Cancels all in-progress and pending builds for the specified team - */ - post: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - teamID: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully cancelled builds */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AdminBuildCancelResult"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/access-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Create a new access token */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["NewAccessToken"]; - }; - }; - responses: { - /** @description Access token created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["CreatedAccessToken"]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/access-tokens/{accessTokenID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** @description Delete an access token */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - accessTokenID: components["parameters"]["accessTokenID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Access token deleted successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api-keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all team API keys */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully returned all team API keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TeamAPIKey"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** @description Create a new team API key */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["NewTeamAPIKey"]; - }; - }; - responses: { - /** @description Team API key created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["CreatedTeamAPIKey"]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api-keys/{apiKeyID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** @description Delete a team API key */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - apiKeyID: components["parameters"]["apiKeyID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Team API key deleted successfully */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - /** @description Update a team API key */ - patch: { - parameters: { - query?: never; - header?: never; - path: { - apiKeyID: components["parameters"]["apiKeyID"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateTeamAPIKey"]; - }; - }; - responses: { - /** @description Team API key updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - trace?: never; - }; - "/volumes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description List all team volumes */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully listed all team volumes */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Volume"][]; - }; - }; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - /** @description Create a new team volume */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["NewVolume"]; - }; - }; - responses: { - /** @description Successfully created a new team volume */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Volume"]; - }; - }; - 400: components["responses"]["400"]; - 401: components["responses"]["401"]; - 500: components["responses"]["500"]; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/volumes/{volumeID}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get team volume info */ - get: { - parameters: { - query?: never; - header?: never; - path: { - volumeID: components["parameters"]["volumeID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully retrieved a team volume */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Volume"]; - }; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - put?: never; - post?: never; - /** @description Delete a team volume */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - volumeID: components["parameters"]["volumeID"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully deleted a team volume */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["401"]; - 404: components["responses"]["404"]; - 500: components["responses"]["500"]; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; -} -export type webhooks = Record; -export interface components { - schemas: { - Team: { - /** @description Identifier of the team */ - teamID: string; - /** @description Name of the team */ - name: string; - /** @description API key for the team */ - apiKey: string; - /** @description Whether the team is the default team */ - isDefault: boolean; - }; - TeamUser: { - /** - * Format: uuid - * @description Identifier of the user - */ - id: string; - /** @description Email of the user */ - email: string; - }; - TemplateUpdateRequest: { - /** @description Whether the template is public or only accessible by the team */ - public?: boolean; - }; - TemplateUpdateResponse: { - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[]; - }; - /** - * Format: int32 - * @description CPU cores for the sandbox - */ - CPUCount: number; - /** - * Format: int32 - * @description Memory for the sandbox in MiB - */ - MemoryMB: number; - /** - * Format: int32 - * @description Disk size for the sandbox in MiB - */ - DiskSizeMB: number; - /** @description Version of the envd running in the sandbox */ - EnvdVersion: string; - SandboxMetadata: { - [key: string]: string; - }; - /** - * @description State of the sandbox - * @enum {string} - */ - SandboxState: "running" | "paused"; - SnapshotInfo: { - /** @description Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default). */ - snapshotID: string; - /** @description Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2) */ - names: string[]; - }; - EnvVars: { - [key: string]: string; - }; - /** @description MCP configuration for the sandbox */ - Mcp: { - [key: string]: unknown; - } | null; - SandboxNetworkConfig: { - /** - * @description Specify if the sandbox URLs should be accessible only with authentication. - * @default true - */ - allowPublicTraffic: boolean; - /** @description List of allowed CIDR blocks or IP addresses for egress traffic. Allowed addresses always take precedence over blocked addresses. */ - allowOut?: string[]; - /** @description List of denied CIDR blocks or IP addresses for egress traffic */ - denyOut?: string[]; - /** @description Specify host mask which will be used for all sandbox requests */ - maskRequestHost?: string; - }; - /** - * @description Auto-resume policy for paused sandboxes. Default is off. - * @default off - * @enum {string} - */ - SandboxAutoResumePolicy: "any" | "off"; - /** @description Auto-resume configuration for paused sandboxes. Default is off. */ - SandboxAutoResumeConfig: { - policy: components["schemas"]["SandboxAutoResumePolicy"]; - }; - /** @description Log entry with timestamp and line */ - SandboxLog: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string; - /** @description Log line content */ - line: string; - }; - SandboxLogEntry: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string; - /** @description Log message content */ - message: string; - level: components["schemas"]["LogLevel"]; - fields: { - [key: string]: string; - }; - }; - SandboxLogs: { - /** @description Logs of the sandbox */ - logs: components["schemas"]["SandboxLog"][]; - /** @description Structured logs of the sandbox */ - logEntries: components["schemas"]["SandboxLogEntry"][]; - }; - SandboxLogsV2Response: { - /** - * @description Sandbox logs structured - * @default [] - */ - logs: components["schemas"]["SandboxLogEntry"][]; - }; - /** @description Metric entry with timestamp and line */ - SandboxMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string; - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number; - /** - * Format: int32 - * @description Number of CPU cores - */ - cpuCount: number; - /** - * Format: float - * @description CPU usage percentage - */ - cpuUsedPct: number; - /** - * Format: int64 - * @description Memory used in bytes - */ - memUsed: number; - /** - * Format: int64 - * @description Total memory in bytes - */ - memTotal: number; - /** - * Format: int64 - * @description Disk used in bytes - */ - diskUsed: number; - /** - * Format: int64 - * @description Total disk space in bytes - */ - diskTotal: number; - }; - SandboxVolumeMount: { - /** @description Name of the volume */ - name: string; - /** @description Path of the volume */ - path: string; - }; - Sandbox: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string; - /** @description Identifier of the sandbox */ - sandboxID: string; - /** @description Alias of the template */ - alias?: string; - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string; - envdVersion: components["schemas"]["EnvdVersion"]; - /** @description Access token used for envd communication */ - envdAccessToken?: string; - /** @description Token required for accessing sandbox via proxy. */ - trafficAccessToken?: string | null; - /** @description Base domain where the sandbox traffic is accessible */ - domain?: string | null; - }; - SandboxDetail: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string; - /** @description Alias of the template */ - alias?: string; - /** @description Identifier of the sandbox */ - sandboxID: string; - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string; - /** - * Format: date-time - * @description Time when the sandbox was started - */ - startedAt: string; - /** - * Format: date-time - * @description Time when the sandbox will expire - */ - endAt: string; - envdVersion: components["schemas"]["EnvdVersion"]; - /** @description Access token used for envd communication */ - envdAccessToken?: string; - /** @description Base domain where the sandbox traffic is accessible */ - domain?: string | null; - cpuCount: components["schemas"]["CPUCount"]; - memoryMB: components["schemas"]["MemoryMB"]; - diskSizeMB: components["schemas"]["DiskSizeMB"]; - metadata?: components["schemas"]["SandboxMetadata"]; - state: components["schemas"]["SandboxState"]; - volumeMounts: components["schemas"]["SandboxVolumeMount"][]; - }; - ListedSandbox: { - /** @description Identifier of the template from which is the sandbox created */ - templateID: string; - /** @description Alias of the template */ - alias?: string; - /** @description Identifier of the sandbox */ - sandboxID: string; - /** - * @deprecated - * @description Identifier of the client - */ - clientID: string; - /** - * Format: date-time - * @description Time when the sandbox was started - */ - startedAt: string; - /** - * Format: date-time - * @description Time when the sandbox will expire - */ - endAt: string; - cpuCount: components["schemas"]["CPUCount"]; - memoryMB: components["schemas"]["MemoryMB"]; - diskSizeMB: components["schemas"]["DiskSizeMB"]; - metadata?: components["schemas"]["SandboxMetadata"]; - state: components["schemas"]["SandboxState"]; - envdVersion: components["schemas"]["EnvdVersion"]; - volumeMounts: components["schemas"]["SandboxVolumeMount"][]; - }; - SandboxesWithMetrics: { - sandboxes: { - [key: string]: components["schemas"]["SandboxMetric"]; - }; - }; - NewSandbox: { - /** @description Identifier of the required template */ - templateID: string; - /** - * Format: int32 - * @description Time to live for the sandbox in seconds. - * @default 15 - */ - timeout: number; - /** - * @description Automatically pauses the sandbox after the timeout - * @default false - */ - autoPause: boolean; - autoResume?: components["schemas"]["SandboxAutoResumeConfig"]; - /** @description Secure all system communication with sandbox */ - secure?: boolean; - /** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */ - allow_internet_access?: boolean; - network?: components["schemas"]["SandboxNetworkConfig"]; - metadata?: components["schemas"]["SandboxMetadata"]; - envVars?: components["schemas"]["EnvVars"]; - mcp?: components["schemas"]["Mcp"]; - volumeMounts?: components["schemas"]["SandboxVolumeMount"][]; - }; - ResumedSandbox: { - /** - * Format: int32 - * @description Time to live for the sandbox in seconds. - * @default 15 - */ - timeout: number; - /** - * @deprecated - * @description Automatically pauses the sandbox after the timeout - */ - autoPause?: boolean; - }; - ConnectSandbox: { + '/health': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Health check */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Request was successful */ + 200: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/teams': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all teams */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all teams */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Team'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/teams/{teamID}/metrics': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get metrics for the team */ + get: { + parameters: { + query?: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number + end?: number + } + header?: never + path: { + teamID: components['parameters']['teamID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the team metrics */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TeamMetric'][] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 403: components['responses']['403'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/teams/{teamID}/metrics/max': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get the maximum metrics for the team in the given interval */ + get: { + parameters: { + query: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number + end?: number + /** @description Metric to retrieve the maximum value for */ + metric: 'concurrent_sandboxes' | 'sandbox_start_rate' + } + header?: never + path: { + teamID: components['parameters']['teamID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the team metrics */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['MaxTeamMetric'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 403: components['responses']['403'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all running sandboxes */ + get: { + parameters: { + query?: { + /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ + metadata?: string + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all running sandboxes */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ListedSandbox'][] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + /** @description Create a sandbox from the template */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['NewSandbox'] + } + } + responses: { + /** @description The sandbox was created successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Sandbox'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/sandboxes': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all sandboxes */ + get: { + parameters: { + query?: { + /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */ + metadata?: string + /** @description Filter sandboxes by one or more states */ + state?: components['schemas']['SandboxState'][] + /** @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 running sandboxes */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ListedSandbox'][] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/metrics': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List metrics for given sandboxes */ + get: { + parameters: { + query: { + /** @description Comma-separated list of sandbox IDs to get metrics for */ + sandbox_ids: string[] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all running sandboxes with metrics */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SandboxesWithMetrics'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/logs': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** + * @deprecated + * @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead. + */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + start?: number + /** @description Maximum number of logs that should be returned */ + limit?: number + } + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the sandbox logs */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SandboxLogs'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/sandboxes/{sandboxID}/logs': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get sandbox logs */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + cursor?: number + /** @description Maximum number of logs that should be returned */ + limit?: number + /** @description Direction of the logs that should be returned */ + direction?: components['schemas']['LogsDirection'] + /** @description Minimum log level to return. Logs below this level are excluded */ + level?: components['schemas']['LogLevel'] + /** @description Case-sensitive substring match on log message content */ + search?: string + } + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the sandbox logs */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SandboxLogsV2Response'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get a sandbox by id */ + get: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the sandbox */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SandboxDetail'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + /** @description Kill a sandbox */ + delete: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description The sandbox was killed successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/metrics': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get sandbox metrics */ + get: { + parameters: { + query?: { + /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */ + start?: number + end?: number + } + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the sandbox metrics */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SandboxMetric'][] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/pause': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Pause the sandbox */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description The sandbox was paused successfully and can be resumed */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 409: components['responses']['409'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/resume': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * @deprecated + * @description Resume the sandbox + */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['ResumedSandbox'] + } + } + responses: { + /** @description The sandbox was resumed successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Sandbox'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 409: components['responses']['409'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/connect': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['ConnectSandbox'] + } + } + responses: { + /** @description The sandbox was already running */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Sandbox'] + } + } + /** @description The sandbox was resumed successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Sandbox'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/timeout': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: { + content: { + 'application/json': { /** * Format: int32 * @description Timeout in seconds from the current time after which the sandbox should expire */ - timeout: number; - }; - /** @description Team metric with timestamp */ - TeamMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string; - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number; - /** - * Format: int32 - * @description The number of concurrent sandboxes for the team - */ - concurrentSandboxes: number; - /** - * Format: float - * @description Number of sandboxes started per second - */ - sandboxStartRate: number; - }; - /** @description Team metric with timestamp */ - MaxTeamMetric: { - /** - * Format: date-time - * @deprecated - * @description Timestamp of the metric entry - */ - timestamp: string; - /** - * Format: int64 - * @description Timestamp of the metric entry in Unix time (seconds since epoch) - */ - timestampUnix: number; - /** @description The maximum value of the requested metric in the given interval */ - value: number; - }; - AdminSandboxKillResult: { - /** @description Number of sandboxes successfully killed */ - killedCount: number; - /** @description Number of sandboxes that failed to kill */ - failedCount: number; - }; - AdminBuildCancelResult: { - /** @description Number of builds successfully cancelled */ - cancelledCount: number; - /** @description Number of builds that failed to cancel */ - failedCount: number; - }; - Template: { - /** @description Identifier of the template */ - templateID: string; - /** @description Identifier of the last successful build for given template */ - buildID: string; - cpuCount: components["schemas"]["CPUCount"]; - memoryMB: components["schemas"]["MemoryMB"]; - diskSizeMB: components["schemas"]["DiskSizeMB"]; - /** @description Whether the template is public or only accessible by the team */ - public: boolean; - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[]; - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[]; - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string; - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string; - createdBy: components["schemas"]["TeamUser"] | null; - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null; - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number; - /** - * Format: int32 - * @description Number of times the template was built - */ - buildCount: number; - envdVersion: components["schemas"]["EnvdVersion"]; - buildStatus: components["schemas"]["TemplateBuildStatus"]; - }; - TemplateRequestResponseV3: { - /** @description Identifier of the template */ - templateID: string; - /** @description Identifier of the last successful build for given template */ - buildID: string; - /** @description Whether the template is public or only accessible by the team */ - public: boolean; - /** @description Names of the template */ - names: string[]; - /** @description Tags assigned to the template build */ - tags: string[]; - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[]; - }; - TemplateLegacy: { - /** @description Identifier of the template */ - templateID: string; - /** @description Identifier of the last successful build for given template */ - buildID: string; - cpuCount: components["schemas"]["CPUCount"]; - memoryMB: components["schemas"]["MemoryMB"]; - diskSizeMB: components["schemas"]["DiskSizeMB"]; - /** @description Whether the template is public or only accessible by the team */ - public: boolean; - /** @description Aliases of the template */ - aliases: string[]; - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string; - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string; - createdBy: components["schemas"]["TeamUser"] | null; - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null; - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number; - /** - * Format: int32 - * @description Number of times the template was built - */ - buildCount: number; - envdVersion: components["schemas"]["EnvdVersion"]; - }; - TemplateBuild: { - /** - * Format: uuid - * @description Identifier of the build - */ - buildID: string; - status: components["schemas"]["TemplateBuildStatus"]; - /** - * Format: date-time - * @description Time when the build was created - */ - createdAt: string; - /** - * Format: date-time - * @description Time when the build was last updated - */ - updatedAt: string; - /** - * Format: date-time - * @description Time when the build was finished - */ - finishedAt?: string; - cpuCount: components["schemas"]["CPUCount"]; - memoryMB: components["schemas"]["MemoryMB"]; - diskSizeMB?: components["schemas"]["DiskSizeMB"]; - envdVersion?: components["schemas"]["EnvdVersion"]; - }; - TemplateWithBuilds: { - /** @description Identifier of the template */ - templateID: string; - /** @description Whether the template is public or only accessible by the team */ - public: boolean; - /** - * @deprecated - * @description Aliases of the template - */ - aliases: string[]; - /** @description Names of the template (namespace/alias format when namespaced) */ - names: string[]; - /** - * Format: date-time - * @description Time when the template was created - */ - createdAt: string; - /** - * Format: date-time - * @description Time when the template was last updated - */ - updatedAt: string; - /** - * Format: date-time - * @description Time when the template was last used - */ - lastSpawnedAt: string | null; - /** - * Format: int64 - * @description Number of times the template was used - */ - spawnCount: number; - /** @description List of builds for the template */ - builds: components["schemas"]["TemplateBuild"][]; - }; - TemplateAliasResponse: { - /** @description Identifier of the template */ - templateID: string; - /** @description Whether the template is public or only accessible by the team */ - public: boolean; - }; - TemplateBuildRequest: { - /** @description Alias of the template */ - alias?: string; - /** @description Dockerfile for the template */ - dockerfile: string; - /** @description Identifier of the team */ - teamID?: string; - /** @description Start command to execute in the template after the build */ - startCmd?: string; - /** @description Ready check command to execute in the template after the build */ - readyCmd?: string; - cpuCount?: components["schemas"]["CPUCount"]; - memoryMB?: components["schemas"]["MemoryMB"]; - }; - /** @description Step in the template build process */ - TemplateStep: { - /** @description Type of the step */ - type: string; - /** - * @description Arguments for the step - * @default [] - */ - args: string[]; - /** @description Hash of the files used in the step */ - filesHash?: string; - /** - * @description Whether the step should be forced to run regardless of the cache - * @default false - */ - force: boolean; - }; - TemplateBuildRequestV3: { - /** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */ - name?: string; - /** @description Tags to assign to the template build */ - tags?: string[]; - /** - * @deprecated - * @description Alias of the template. Deprecated, use name instead. - */ - alias?: string; - /** - * @deprecated - * @description Identifier of the team - */ - teamID?: string; - cpuCount?: components["schemas"]["CPUCount"]; - memoryMB?: components["schemas"]["MemoryMB"]; - }; - TemplateBuildRequestV2: { - /** @description Alias of the template */ - alias: string; - /** - * @deprecated - * @description Identifier of the team - */ - teamID?: string; - cpuCount?: components["schemas"]["CPUCount"]; - memoryMB?: components["schemas"]["MemoryMB"]; - }; - FromImageRegistry: components["schemas"]["AWSRegistry"] | components["schemas"]["GCPRegistry"] | components["schemas"]["GeneralRegistry"]; - AWSRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: "aws"; - /** @description AWS Access Key ID for ECR authentication */ - awsAccessKeyId: string; - /** @description AWS Secret Access Key for ECR authentication */ - awsSecretAccessKey: string; - /** @description AWS Region where the ECR registry is located */ - awsRegion: string; - }; - GCPRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: "gcp"; - /** @description Service Account JSON for GCP authentication */ - serviceAccountJson: string; - }; - GeneralRegistry: { - /** - * @description Type of registry authentication (enum property replaced by openapi-typescript) - * @enum {string} - */ - type: "registry"; - /** @description Username to use for the registry */ - username: string; - /** @description Password to use for the registry */ - password: string; - }; - TemplateBuildStartV2: { - /** @description Image to use as a base for the template build */ - fromImage?: string; - /** @description Template to use as a base for the template build */ - fromTemplate?: string; - fromImageRegistry?: components["schemas"]["FromImageRegistry"]; - /** - * @description Whether the whole build should be forced to run regardless of the cache - * @default false - */ - force: boolean; - /** - * @description List of steps to execute in the template build - * @default [] - */ - steps: components["schemas"]["TemplateStep"][]; - /** @description Start command to execute in the template after the build */ - startCmd?: string; - /** @description Ready check command to execute in the template after the build */ - readyCmd?: string; - }; - TemplateBuildFileUpload: { - /** @description Whether the file is already present in the cache */ - present: boolean; - /** @description Url where the file should be uploaded to */ - url?: string; - }; - /** - * @description State of the sandbox - * @enum {string} - */ - LogLevel: "debug" | "info" | "warn" | "error"; - BuildLogEntry: { - /** - * Format: date-time - * @description Timestamp of the log entry - */ - timestamp: string; - /** @description Log message content */ - message: string; - level: components["schemas"]["LogLevel"]; - /** @description Step in the build process related to the log entry */ - step?: string; - }; - BuildStatusReason: { - /** @description Message with the status reason, currently reporting only for error status */ - message: string; - /** @description Step that failed */ - step?: string; - /** - * @description Log entries related to the status reason - * @default [] - */ - logEntries: components["schemas"]["BuildLogEntry"][]; - }; - /** - * @description Status of the template build - * @enum {string} - */ - TemplateBuildStatus: "building" | "waiting" | "ready" | "error"; - TemplateBuildInfo: { - /** - * @description Build logs - * @default [] - */ - logs: string[]; - /** - * @description Build logs structured - * @default [] - */ - logEntries: components["schemas"]["BuildLogEntry"][]; - /** @description Identifier of the template */ - templateID: string; - /** @description Identifier of the build */ - buildID: string; - status: components["schemas"]["TemplateBuildStatus"]; - reason?: components["schemas"]["BuildStatusReason"]; - }; - TemplateBuildLogsResponse: { - /** - * @description Build logs structured - * @default [] - */ - logs: components["schemas"]["BuildLogEntry"][]; - }; - /** - * @description Direction of the logs that should be returned - * @enum {string} - */ - LogsDirection: "forward" | "backward"; - /** - * @description Source of the logs that should be returned - * @enum {string} - */ - LogsSource: "temporary" | "persistent"; - /** - * @description Status of the node - * @enum {string} - */ - NodeStatus: "ready" | "draining" | "connecting" | "unhealthy"; - NodeStatusChange: { - /** - * Format: uuid - * @description Identifier of the cluster - */ - clusterID?: string; - status: components["schemas"]["NodeStatus"]; - }; - DiskMetrics: { - /** @description Mount point of the disk */ - mountPoint: string; - /** @description Device name */ - device: string; - /** @description Filesystem type (e.g., ext4, xfs) */ - filesystemType: string; - /** - * Format: uint64 - * @description Used space in bytes - */ - usedBytes: number; - /** - * Format: uint64 - * @description Total space in bytes - */ - totalBytes: number; - }; - /** @description Node metrics */ - NodeMetrics: { - /** - * Format: uint32 - * @description Number of allocated CPU cores - */ - allocatedCPU: number; - /** - * Format: uint32 - * @description Node CPU usage percentage - */ - cpuPercent: number; - /** - * Format: uint32 - * @description Total number of CPU cores on the node - */ - cpuCount: number; - /** - * Format: uint64 - * @description Amount of allocated memory in bytes - */ - allocatedMemoryBytes: number; - /** - * Format: uint64 - * @description Node memory used in bytes - */ - memoryUsedBytes: number; - /** - * Format: uint64 - * @description Total node memory in bytes - */ - memoryTotalBytes: number; - /** @description Detailed metrics for each disk/mount point */ - disks: components["schemas"]["DiskMetrics"][]; - }; - MachineInfo: { - /** @description CPU family of the node */ - cpuFamily: string; - /** @description CPU model of the node */ - cpuModel: string; - /** @description CPU model name of the node */ - cpuModelName: string; - /** @description CPU architecture of the node */ - cpuArchitecture: string; - }; - Node: { - /** @description Version of the orchestrator */ - version: string; - /** @description Commit of the orchestrator */ - commit: string; - /** @description Identifier of the node */ - id: string; - /** @description Service instance identifier of the node */ - serviceInstanceID: string; - /** @description Identifier of the cluster */ - clusterID: string; - machineInfo: components["schemas"]["MachineInfo"]; - status: components["schemas"]["NodeStatus"]; - /** - * Format: uint32 - * @description Number of sandboxes running on the node - */ - sandboxCount: number; - metrics: components["schemas"]["NodeMetrics"]; - /** - * Format: uint64 - * @description Number of sandbox create successes - */ - createSuccesses: number; - /** - * Format: uint64 - * @description Number of sandbox create fails - */ - createFails: number; - /** - * Format: int - * @description Number of starting Sandboxes - */ - sandboxStartingCount: number; - }; - NodeDetail: { - /** @description Identifier of the cluster */ - clusterID: string; - /** @description Version of the orchestrator */ - version: string; - /** @description Commit of the orchestrator */ - commit: string; - /** @description Identifier of the node */ - id: string; - /** @description Service instance identifier of the node */ - serviceInstanceID: string; - machineInfo: components["schemas"]["MachineInfo"]; - status: components["schemas"]["NodeStatus"]; - /** - * Format: uint32 - * @description Number of sandboxes running on the node - */ - sandboxCount: number; - metrics: components["schemas"]["NodeMetrics"]; - /** @description List of cached builds id on the node */ - cachedBuilds: string[]; - /** - * Format: uint64 - * @description Number of sandbox create successes - */ - createSuccesses: number; - /** - * Format: uint64 - * @description Number of sandbox create fails - */ - createFails: number; - }; - CreatedAccessToken: { - /** - * Format: uuid - * @description Identifier of the access token - */ - id: string; - /** @description Name of the access token */ - name: string; - /** @description The fully created access token */ - token: string; - mask: components["schemas"]["IdentifierMaskingDetails"]; - /** - * Format: date-time - * @description Timestamp of access token creation - */ - createdAt: string; - }; - NewAccessToken: { - /** @description Name of the access token */ - name: string; - }; - TeamAPIKey: { - /** - * Format: uuid - * @description Identifier of the API key - */ - id: string; - /** @description Name of the API key */ - name: string; - mask: components["schemas"]["IdentifierMaskingDetails"]; - /** - * Format: date-time - * @description Timestamp of API key creation - */ - createdAt: string; - createdBy?: components["schemas"]["TeamUser"] | null; - /** - * Format: date-time - * @description Last time this API key was used - */ - lastUsed?: string | null; - }; - CreatedTeamAPIKey: { - /** - * Format: uuid - * @description Identifier of the API key - */ - id: string; - /** @description Raw value of the API key */ - key: string; - mask: components["schemas"]["IdentifierMaskingDetails"]; - /** @description Name of the API key */ - name: string; - /** - * Format: date-time - * @description Timestamp of API key creation - */ - createdAt: string; - createdBy?: components["schemas"]["TeamUser"] | null; - /** - * Format: date-time - * @description Last time this API key was used - */ - lastUsed?: string | null; - }; - NewTeamAPIKey: { - /** @description Name of the API key */ - name: string; - }; - UpdateTeamAPIKey: { - /** @description New name for the API key */ - name: string; - }; - AssignedTemplateTags: { - /** @description Assigned tags of the template */ - tags: string[]; - /** - * Format: uuid - * @description Identifier of the build associated with these tags - */ - buildID: string; - }; - TemplateTag: { - /** @description The tag name */ - tag: string; - /** - * Format: uuid - * @description Identifier of the build associated with this tag - */ - buildID: string; - /** - * Format: date-time - * @description Time when the tag was assigned - */ - createdAt: string; - }; - AssignTemplateTagsRequest: { - /** @description Target template in "name:tag" format */ - target: string; - /** @description Tags to assign to the template */ - tags: string[]; - }; - DeleteTemplateTagsRequest: { - /** @description Name of the template */ - name: string; - /** @description Tags to delete */ - tags: string[]; - }; - Error: { - /** - * Format: int32 - * @description Error code - */ - code: number; - /** @description Error */ - message: string; - }; - IdentifierMaskingDetails: { - /** @description Prefix that identifies the token or key type */ - prefix: string; - /** @description Length of the token or key */ - valueLength: number; - /** @description Prefix used in masked version of the token or key */ - maskedValuePrefix: string; - /** @description Suffix used in masked version of the token or key */ - maskedValueSuffix: string; - }; - Volume: { - /** @description ID of the volume */ - volumeID: string; - /** @description Name of the volume */ - name: string; - }; - NewVolume: { - /** @description Name of the volume */ - name: string; - }; - }; - responses: { - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Authentication error */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Conflict */ - 409: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + timeout: number + } + } + } + responses: { + /** @description Successfully set the sandbox timeout */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/refreshes': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Refresh the sandbox extending its time to live */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody?: { + content: { + 'application/json': { + /** @description Duration for which the sandbox should be kept alive in seconds */ + duration?: number + } + } + } + responses: { + /** @description Successfully refreshed the sandbox */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/sandboxes/{sandboxID}/snapshots': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime. */ + post: { + parameters: { + query?: never + header?: never + path: { + sandboxID: components['parameters']['sandboxID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': { + /** @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 + } + } + } + responses: { + /** @description Snapshot created successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SnapshotInfo'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/snapshots': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all snapshots for the team */ + get: { + parameters: { + query?: { + sandboxID?: string + /** @description Maximum number of items to return per page */ + limit?: components['parameters']['paginationLimit'] + /** @description Cursor to start the list from */ + nextToken?: components['parameters']['paginationNextToken'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned snapshots */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SnapshotInfo'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v3/templates': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Create a new template */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateBuildRequestV3'] + } + } + responses: { + /** @description The build was requested successfully */ + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateRequestResponseV3'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/templates': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * @deprecated + * @description Create a new template + */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateBuildRequestV2'] + } + } + responses: { + /** @description The build was requested successfully */ + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateLegacy'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/{templateID}/files/{hash}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get an upload link for a tar file containing build layer files */ + get: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + hash: string + } + cookie?: never + } + requestBody?: never + responses: { + /** @description The upload link where to upload the tar file */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateBuildFileUpload'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all templates */ + get: { + parameters: { + query?: { + teamID?: string + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all templates */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Template'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + /** + * @deprecated + * @description Create a new template + */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateBuildRequest'] + } + } + responses: { + /** @description The build was accepted */ + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateLegacy'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/{templateID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all builds for a template */ + get: { + parameters: { + query?: { + /** @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: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the template with its builds */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateWithBuilds'] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + /** + * @deprecated + * @description Rebuild an template + */ + post: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateBuildRequest'] + } + } + responses: { + /** @description The build was accepted */ + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateLegacy'] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + /** @description Delete a template */ + delete: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description The template was deleted successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + /** + * @deprecated + * @description Update template + */ + patch: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateUpdateRequest'] + } + } + responses: { + /** @description The template was updated successfully */ + 200: { + headers: { + [name: string]: unknown + } + content?: never + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + trace?: never + } + '/templates/{templateID}/builds/{buildID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * @deprecated + * @description Start the build + */ + post: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + buildID: components['parameters']['buildID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description The build has started */ + 202: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/templates/{templateID}/builds/{buildID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Start the build */ + post: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + buildID: components['parameters']['buildID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateBuildStartV2'] + } + } + responses: { + /** @description The build has started */ + 202: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/templates/{templateID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post?: never + delete?: never + options?: never + head?: never + /** @description Update template */ + patch: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['TemplateUpdateRequest'] + } + } + responses: { + /** @description The template was updated successfully */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateUpdateResponse'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + trace?: never + } + '/templates/{templateID}/builds/{buildID}/status': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get template build info */ + get: { + parameters: { + query?: { + /** @description Index of the starting build log that should be returned with the template */ + logsOffset?: number + /** @description Maximum number of logs that should be returned */ + limit?: number + level?: components['schemas']['LogLevel'] + } + header?: never + path: { + templateID: components['parameters']['templateID'] + buildID: components['parameters']['buildID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the template */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateBuildInfo'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/{templateID}/builds/{buildID}/logs': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get template build logs */ + get: { + parameters: { + query?: { + /** @description Starting timestamp of the logs that should be returned in milliseconds */ + cursor?: number + /** @description Maximum number of logs that should be returned */ + limit?: number + direction?: components['schemas']['LogsDirection'] + level?: components['schemas']['LogLevel'] + /** @description Source of the logs that should be returned from */ + source?: components['schemas']['LogsSource'] + } + header?: never + path: { + templateID: components['parameters']['templateID'] + buildID: components['parameters']['buildID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the template build logs */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateBuildLogsResponse'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/tags': { parameters: { - templateID: string; - buildID: string; - sandboxID: string; - teamID: string; - nodeID: string; - apiKeyID: string; - accessTokenID: string; - snapshotID: string; - tag: string; - /** @description Maximum number of items to return per page */ - paginationLimit: number; - /** @description Cursor to start the list from */ - paginationNextToken: string; - volumeID: string; - }; - requestBodies: never; - headers: never; - pathItems: never; + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Assign tag(s) to a template build */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['AssignTemplateTagsRequest'] + } + } + responses: { + /** @description Tag assigned successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['AssignedTemplateTags'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + /** @description Delete multiple tags from templates */ + delete: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['DeleteTemplateTagsRequest'] + } + } + responses: { + /** @description Tags deleted successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/{templateID}/tags': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all tags for a template */ + get: { + parameters: { + query?: never + header?: never + path: { + templateID: components['parameters']['templateID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the template tags */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateTag'][] + } + } + 401: components['responses']['401'] + 403: components['responses']['403'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/templates/aliases/{alias}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Check if template with given alias exists */ + get: { + parameters: { + query?: never + header?: never + path: { + alias: string + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully queried template by alias */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TemplateAliasResponse'] + } + } + 400: components['responses']['400'] + 403: components['responses']['403'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/nodes': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all nodes */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all nodes */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Node'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/nodes/{nodeID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get node info */ + get: { + parameters: { + query?: { + /** @description Identifier of the cluster */ + clusterID?: string + } + header?: never + path: { + nodeID: components['parameters']['nodeID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned the node */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NodeDetail'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + /** @description Change status of a node */ + post: { + parameters: { + query?: never + header?: never + path: { + nodeID: components['parameters']['nodeID'] + } + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['NodeStatusChange'] + } + } + responses: { + /** @description The node status was changed successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/admin/teams/{teamID}/sandboxes/kill': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Kill all sandboxes for a team + * @description Kills all sandboxes for the specified team + */ + post: { + parameters: { + query?: never + header?: never + path: { + /** @description Team ID */ + teamID: string + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully killed sandboxes */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['AdminSandboxKillResult'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/admin/teams/{teamID}/builds/cancel': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Cancel all builds for a team + * @description Cancels all in-progress and pending builds for the specified team + */ + post: { + parameters: { + query?: never + header?: never + path: { + /** @description Team ID */ + teamID: string + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully cancelled builds */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['AdminBuildCancelResult'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/access-tokens': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** @description Create a new access token */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['NewAccessToken'] + } + } + responses: { + /** @description Access token created successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CreatedAccessToken'] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/access-tokens/{accessTokenID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post?: never + /** @description Delete an access token */ + delete: { + parameters: { + query?: never + header?: never + path: { + accessTokenID: components['parameters']['accessTokenID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Access token deleted successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + patch?: never + trace?: never + } + '/api-keys': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all team API keys */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully returned all team API keys */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TeamAPIKey'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + /** @description Create a new team API key */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['NewTeamAPIKey'] + } + } + responses: { + /** @description Team API key created successfully */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CreatedTeamAPIKey'] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/api-keys/{apiKeyID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post?: never + /** @description Delete a team API key */ + delete: { + parameters: { + query?: never + header?: never + path: { + apiKeyID: components['parameters']['apiKeyID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Team API key deleted successfully */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + /** @description Update a team API key */ + patch: { + parameters: { + query?: never + header?: never + path: { + apiKeyID: components['parameters']['apiKeyID'] + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['UpdateTeamAPIKey'] + } + } + responses: { + /** @description Team API key updated successfully */ + 200: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + trace?: never + } + '/volumes': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description List all team volumes */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully listed all team volumes */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Volume'][] + } + } + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + put?: never + /** @description Create a new team volume */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['NewVolume'] + } + } + responses: { + /** @description Successfully created a new team volume */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Volume'] + } + } + 400: components['responses']['400'] + 401: components['responses']['401'] + 500: components['responses']['500'] + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/volumes/{volumeID}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** @description Get team volume info */ + get: { + parameters: { + query?: never + header?: never + path: { + volumeID: components['parameters']['volumeID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully retrieved a team volume */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Volume'] + } + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + put?: never + post?: never + /** @description Delete a team volume */ + delete: { + parameters: { + query?: never + header?: never + path: { + volumeID: components['parameters']['volumeID'] + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Successfully deleted a team volume */ + 204: { + headers: { + [name: string]: unknown + } + content?: never + } + 401: components['responses']['401'] + 404: components['responses']['404'] + 500: components['responses']['500'] + } + } + options?: never + head?: never + patch?: never + trace?: never + } +} +export type webhooks = Record +export interface components { + schemas: { + Team: { + /** @description Identifier of the team */ + teamID: string + /** @description Name of the team */ + name: string + /** @description API key for the team */ + apiKey: string + /** @description Whether the team is the default team */ + isDefault: boolean + } + TeamUser: { + /** + * Format: uuid + * @description Identifier of the user + */ + id: string + /** @description Email of the user */ + email: string + } + TemplateUpdateRequest: { + /** @description Whether the template is public or only accessible by the team */ + public?: boolean + } + TemplateUpdateResponse: { + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[] + } + /** + * Format: int32 + * @description CPU cores for the sandbox + */ + CPUCount: number + /** + * Format: int32 + * @description Memory for the sandbox in MiB + */ + MemoryMB: number + /** + * Format: int32 + * @description Disk size for the sandbox in MiB + */ + DiskSizeMB: number + /** @description Version of the envd running in the sandbox */ + EnvdVersion: string + SandboxMetadata: { + [key: string]: string + } + /** + * @description State of the sandbox + * @enum {string} + */ + SandboxState: 'running' | 'paused' + SnapshotInfo: { + /** @description Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default). */ + snapshotID: string + /** @description Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2) */ + names: string[] + } + EnvVars: { + [key: string]: string + } + /** @description MCP configuration for the sandbox */ + Mcp: { + [key: string]: unknown + } | null + SandboxNetworkConfig: { + /** + * @description Specify if the sandbox URLs should be accessible only with authentication. + * @default true + */ + allowPublicTraffic: boolean + /** @description List of allowed CIDR blocks or IP addresses for egress traffic. Allowed addresses always take precedence over blocked addresses. */ + allowOut?: string[] + /** @description List of denied CIDR blocks or IP addresses for egress traffic */ + denyOut?: string[] + /** @description Specify host mask which will be used for all sandbox requests */ + maskRequestHost?: string + } + /** + * @description Auto-resume policy for paused sandboxes. Default is off. + * @default off + * @enum {string} + */ + SandboxAutoResumePolicy: 'any' | 'off' + /** @description Auto-resume configuration for paused sandboxes. Default is off. */ + SandboxAutoResumeConfig: { + policy: components['schemas']['SandboxAutoResumePolicy'] + } + /** @description Log entry with timestamp and line */ + SandboxLog: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string + /** @description Log line content */ + line: string + } + SandboxLogEntry: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string + /** @description Log message content */ + message: string + level: components['schemas']['LogLevel'] + fields: { + [key: string]: string + } + } + SandboxLogs: { + /** @description Logs of the sandbox */ + logs: components['schemas']['SandboxLog'][] + /** @description Structured logs of the sandbox */ + logEntries: components['schemas']['SandboxLogEntry'][] + } + SandboxLogsV2Response: { + /** + * @description Sandbox logs structured + * @default [] + */ + logs: components['schemas']['SandboxLogEntry'][] + } + /** @description Metric entry with timestamp and line */ + SandboxMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number + /** + * Format: int32 + * @description Number of CPU cores + */ + cpuCount: number + /** + * Format: float + * @description CPU usage percentage + */ + cpuUsedPct: number + /** + * Format: int64 + * @description Memory used in bytes + */ + memUsed: number + /** + * Format: int64 + * @description Total memory in bytes + */ + memTotal: number + /** + * Format: int64 + * @description Disk used in bytes + */ + diskUsed: number + /** + * Format: int64 + * @description Total disk space in bytes + */ + diskTotal: number + } + SandboxVolumeMount: { + /** @description Name of the volume */ + name: string + /** @description Path of the volume */ + path: string + } + Sandbox: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string + /** @description Identifier of the sandbox */ + sandboxID: string + /** @description Alias of the template */ + alias?: string + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string + envdVersion: components['schemas']['EnvdVersion'] + /** @description Access token used for envd communication */ + envdAccessToken?: string + /** @description Token required for accessing sandbox via proxy. */ + trafficAccessToken?: string | null + /** @description Base domain where the sandbox traffic is accessible */ + domain?: string | null + } + SandboxDetail: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string + /** @description Alias of the template */ + alias?: string + /** @description Identifier of the sandbox */ + sandboxID: string + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string + /** + * Format: date-time + * @description Time when the sandbox was started + */ + startedAt: string + /** + * Format: date-time + * @description Time when the sandbox will expire + */ + endAt: string + envdVersion: components['schemas']['EnvdVersion'] + /** @description Access token used for envd communication */ + envdAccessToken?: string + /** @description Base domain where the sandbox traffic is accessible */ + domain?: string | null + cpuCount: components['schemas']['CPUCount'] + memoryMB: components['schemas']['MemoryMB'] + diskSizeMB: components['schemas']['DiskSizeMB'] + metadata?: components['schemas']['SandboxMetadata'] + state: components['schemas']['SandboxState'] + volumeMounts: components['schemas']['SandboxVolumeMount'][] + } + ListedSandbox: { + /** @description Identifier of the template from which is the sandbox created */ + templateID: string + /** @description Alias of the template */ + alias?: string + /** @description Identifier of the sandbox */ + sandboxID: string + /** + * @deprecated + * @description Identifier of the client + */ + clientID: string + /** + * Format: date-time + * @description Time when the sandbox was started + */ + startedAt: string + /** + * Format: date-time + * @description Time when the sandbox will expire + */ + endAt: string + cpuCount: components['schemas']['CPUCount'] + memoryMB: components['schemas']['MemoryMB'] + diskSizeMB: components['schemas']['DiskSizeMB'] + metadata?: components['schemas']['SandboxMetadata'] + state: components['schemas']['SandboxState'] + envdVersion: components['schemas']['EnvdVersion'] + volumeMounts: components['schemas']['SandboxVolumeMount'][] + } + SandboxesWithMetrics: { + sandboxes: { + [key: string]: components['schemas']['SandboxMetric'] + } + } + NewSandbox: { + /** @description Identifier of the required template */ + templateID: string + /** + * Format: int32 + * @description Time to live for the sandbox in seconds. + * @default 15 + */ + timeout: number + /** + * @description Automatically pauses the sandbox after the timeout + * @default false + */ + autoPause: boolean + autoResume?: components['schemas']['SandboxAutoResumeConfig'] + /** @description Secure all system communication with sandbox */ + secure?: boolean + /** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */ + allow_internet_access?: boolean + network?: components['schemas']['SandboxNetworkConfig'] + metadata?: components['schemas']['SandboxMetadata'] + envVars?: components['schemas']['EnvVars'] + mcp?: components['schemas']['Mcp'] + volumeMounts?: components['schemas']['SandboxVolumeMount'][] + } + ResumedSandbox: { + /** + * Format: int32 + * @description Time to live for the sandbox in seconds. + * @default 15 + */ + timeout: number + /** + * @deprecated + * @description Automatically pauses the sandbox after the timeout + */ + autoPause?: boolean + } + ConnectSandbox: { + /** + * Format: int32 + * @description Timeout in seconds from the current time after which the sandbox should expire + */ + timeout: number + } + /** @description Team metric with timestamp */ + TeamMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number + /** + * Format: int32 + * @description The number of concurrent sandboxes for the team + */ + concurrentSandboxes: number + /** + * Format: float + * @description Number of sandboxes started per second + */ + sandboxStartRate: number + } + /** @description Team metric with timestamp */ + MaxTeamMetric: { + /** + * Format: date-time + * @deprecated + * @description Timestamp of the metric entry + */ + timestamp: string + /** + * Format: int64 + * @description Timestamp of the metric entry in Unix time (seconds since epoch) + */ + timestampUnix: number + /** @description The maximum value of the requested metric in the given interval */ + value: number + } + AdminSandboxKillResult: { + /** @description Number of sandboxes successfully killed */ + killedCount: number + /** @description Number of sandboxes that failed to kill */ + failedCount: number + } + AdminBuildCancelResult: { + /** @description Number of builds successfully cancelled */ + cancelledCount: number + /** @description Number of builds that failed to cancel */ + failedCount: number + } + Template: { + /** @description Identifier of the template */ + templateID: string + /** @description Identifier of the last successful build for given template */ + buildID: string + cpuCount: components['schemas']['CPUCount'] + memoryMB: components['schemas']['MemoryMB'] + diskSizeMB: components['schemas']['DiskSizeMB'] + /** @description Whether the template is public or only accessible by the team */ + public: boolean + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[] + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[] + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string + createdBy: components['schemas']['TeamUser'] | null + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number + /** + * Format: int32 + * @description Number of times the template was built + */ + buildCount: number + envdVersion: components['schemas']['EnvdVersion'] + buildStatus: components['schemas']['TemplateBuildStatus'] + } + TemplateRequestResponseV3: { + /** @description Identifier of the template */ + templateID: string + /** @description Identifier of the last successful build for given template */ + buildID: string + /** @description Whether the template is public or only accessible by the team */ + public: boolean + /** @description Names of the template */ + names: string[] + /** @description Tags assigned to the template build */ + tags: string[] + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[] + } + TemplateLegacy: { + /** @description Identifier of the template */ + templateID: string + /** @description Identifier of the last successful build for given template */ + buildID: string + cpuCount: components['schemas']['CPUCount'] + memoryMB: components['schemas']['MemoryMB'] + diskSizeMB: components['schemas']['DiskSizeMB'] + /** @description Whether the template is public or only accessible by the team */ + public: boolean + /** @description Aliases of the template */ + aliases: string[] + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string + createdBy: components['schemas']['TeamUser'] | null + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number + /** + * Format: int32 + * @description Number of times the template was built + */ + buildCount: number + envdVersion: components['schemas']['EnvdVersion'] + } + TemplateBuild: { + /** + * Format: uuid + * @description Identifier of the build + */ + buildID: string + status: components['schemas']['TemplateBuildStatus'] + /** + * Format: date-time + * @description Time when the build was created + */ + createdAt: string + /** + * Format: date-time + * @description Time when the build was last updated + */ + updatedAt: string + /** + * Format: date-time + * @description Time when the build was finished + */ + finishedAt?: string + cpuCount: components['schemas']['CPUCount'] + memoryMB: components['schemas']['MemoryMB'] + diskSizeMB?: components['schemas']['DiskSizeMB'] + envdVersion?: components['schemas']['EnvdVersion'] + } + TemplateWithBuilds: { + /** @description Identifier of the template */ + templateID: string + /** @description Whether the template is public or only accessible by the team */ + public: boolean + /** + * @deprecated + * @description Aliases of the template + */ + aliases: string[] + /** @description Names of the template (namespace/alias format when namespaced) */ + names: string[] + /** + * Format: date-time + * @description Time when the template was created + */ + createdAt: string + /** + * Format: date-time + * @description Time when the template was last updated + */ + updatedAt: string + /** + * Format: date-time + * @description Time when the template was last used + */ + lastSpawnedAt: string | null + /** + * Format: int64 + * @description Number of times the template was used + */ + spawnCount: number + /** @description List of builds for the template */ + builds: components['schemas']['TemplateBuild'][] + } + TemplateAliasResponse: { + /** @description Identifier of the template */ + templateID: string + /** @description Whether the template is public or only accessible by the team */ + public: boolean + } + TemplateBuildRequest: { + /** @description Alias of the template */ + alias?: string + /** @description Dockerfile for the template */ + dockerfile: string + /** @description Identifier of the team */ + teamID?: string + /** @description Start command to execute in the template after the build */ + startCmd?: string + /** @description Ready check command to execute in the template after the build */ + readyCmd?: string + cpuCount?: components['schemas']['CPUCount'] + memoryMB?: components['schemas']['MemoryMB'] + } + /** @description Step in the template build process */ + TemplateStep: { + /** @description Type of the step */ + type: string + /** + * @description Arguments for the step + * @default [] + */ + args: string[] + /** @description Hash of the files used in the step */ + filesHash?: string + /** + * @description Whether the step should be forced to run regardless of the cache + * @default false + */ + force: boolean + } + TemplateBuildRequestV3: { + /** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */ + name?: string + /** @description Tags to assign to the template build */ + tags?: string[] + /** + * @deprecated + * @description Alias of the template. Deprecated, use name instead. + */ + alias?: string + /** + * @deprecated + * @description Identifier of the team + */ + teamID?: string + cpuCount?: components['schemas']['CPUCount'] + memoryMB?: components['schemas']['MemoryMB'] + } + TemplateBuildRequestV2: { + /** @description Alias of the template */ + alias: string + /** + * @deprecated + * @description Identifier of the team + */ + teamID?: string + cpuCount?: components['schemas']['CPUCount'] + memoryMB?: components['schemas']['MemoryMB'] + } + FromImageRegistry: + | components['schemas']['AWSRegistry'] + | components['schemas']['GCPRegistry'] + | components['schemas']['GeneralRegistry'] + AWSRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: 'aws' + /** @description AWS Access Key ID for ECR authentication */ + awsAccessKeyId: string + /** @description AWS Secret Access Key for ECR authentication */ + awsSecretAccessKey: string + /** @description AWS Region where the ECR registry is located */ + awsRegion: string + } + GCPRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: 'gcp' + /** @description Service Account JSON for GCP authentication */ + serviceAccountJson: string + } + GeneralRegistry: { + /** + * @description Type of registry authentication (enum property replaced by openapi-typescript) + * @enum {string} + */ + type: 'registry' + /** @description Username to use for the registry */ + username: string + /** @description Password to use for the registry */ + password: string + } + TemplateBuildStartV2: { + /** @description Image to use as a base for the template build */ + fromImage?: string + /** @description Template to use as a base for the template build */ + fromTemplate?: string + fromImageRegistry?: components['schemas']['FromImageRegistry'] + /** + * @description Whether the whole build should be forced to run regardless of the cache + * @default false + */ + force: boolean + /** + * @description List of steps to execute in the template build + * @default [] + */ + steps: components['schemas']['TemplateStep'][] + /** @description Start command to execute in the template after the build */ + startCmd?: string + /** @description Ready check command to execute in the template after the build */ + readyCmd?: string + } + TemplateBuildFileUpload: { + /** @description Whether the file is already present in the cache */ + present: boolean + /** @description Url where the file should be uploaded to */ + url?: string + } + /** + * @description State of the sandbox + * @enum {string} + */ + LogLevel: 'debug' | 'info' | 'warn' | 'error' + BuildLogEntry: { + /** + * Format: date-time + * @description Timestamp of the log entry + */ + timestamp: string + /** @description Log message content */ + message: string + level: components['schemas']['LogLevel'] + /** @description Step in the build process related to the log entry */ + step?: string + } + BuildStatusReason: { + /** @description Message with the status reason, currently reporting only for error status */ + message: string + /** @description Step that failed */ + step?: string + /** + * @description Log entries related to the status reason + * @default [] + */ + logEntries: components['schemas']['BuildLogEntry'][] + } + /** + * @description Status of the template build + * @enum {string} + */ + TemplateBuildStatus: 'building' | 'waiting' | 'ready' | 'error' + TemplateBuildInfo: { + /** + * @description Build logs + * @default [] + */ + logs: string[] + /** + * @description Build logs structured + * @default [] + */ + logEntries: components['schemas']['BuildLogEntry'][] + /** @description Identifier of the template */ + templateID: string + /** @description Identifier of the build */ + buildID: string + status: components['schemas']['TemplateBuildStatus'] + reason?: components['schemas']['BuildStatusReason'] + } + TemplateBuildLogsResponse: { + /** + * @description Build logs structured + * @default [] + */ + logs: components['schemas']['BuildLogEntry'][] + } + /** + * @description Direction of the logs that should be returned + * @enum {string} + */ + LogsDirection: 'forward' | 'backward' + /** + * @description Source of the logs that should be returned + * @enum {string} + */ + LogsSource: 'temporary' | 'persistent' + /** + * @description Status of the node + * @enum {string} + */ + NodeStatus: 'ready' | 'draining' | 'connecting' | 'unhealthy' + NodeStatusChange: { + /** + * Format: uuid + * @description Identifier of the cluster + */ + clusterID?: string + status: components['schemas']['NodeStatus'] + } + DiskMetrics: { + /** @description Mount point of the disk */ + mountPoint: string + /** @description Device name */ + device: string + /** @description Filesystem type (e.g., ext4, xfs) */ + filesystemType: string + /** + * Format: uint64 + * @description Used space in bytes + */ + usedBytes: number + /** + * Format: uint64 + * @description Total space in bytes + */ + totalBytes: number + } + /** @description Node metrics */ + NodeMetrics: { + /** + * Format: uint32 + * @description Number of allocated CPU cores + */ + allocatedCPU: number + /** + * Format: uint32 + * @description Node CPU usage percentage + */ + cpuPercent: number + /** + * Format: uint32 + * @description Total number of CPU cores on the node + */ + cpuCount: number + /** + * Format: uint64 + * @description Amount of allocated memory in bytes + */ + allocatedMemoryBytes: number + /** + * Format: uint64 + * @description Node memory used in bytes + */ + memoryUsedBytes: number + /** + * Format: uint64 + * @description Total node memory in bytes + */ + memoryTotalBytes: number + /** @description Detailed metrics for each disk/mount point */ + disks: components['schemas']['DiskMetrics'][] + } + MachineInfo: { + /** @description CPU family of the node */ + cpuFamily: string + /** @description CPU model of the node */ + cpuModel: string + /** @description CPU model name of the node */ + cpuModelName: string + /** @description CPU architecture of the node */ + cpuArchitecture: string + } + Node: { + /** @description Version of the orchestrator */ + version: string + /** @description Commit of the orchestrator */ + commit: string + /** @description Identifier of the node */ + id: string + /** @description Service instance identifier of the node */ + serviceInstanceID: string + /** @description Identifier of the cluster */ + clusterID: string + machineInfo: components['schemas']['MachineInfo'] + status: components['schemas']['NodeStatus'] + /** + * Format: uint32 + * @description Number of sandboxes running on the node + */ + sandboxCount: number + metrics: components['schemas']['NodeMetrics'] + /** + * Format: uint64 + * @description Number of sandbox create successes + */ + createSuccesses: number + /** + * Format: uint64 + * @description Number of sandbox create fails + */ + createFails: number + /** + * Format: int + * @description Number of starting Sandboxes + */ + sandboxStartingCount: number + } + NodeDetail: { + /** @description Identifier of the cluster */ + clusterID: string + /** @description Version of the orchestrator */ + version: string + /** @description Commit of the orchestrator */ + commit: string + /** @description Identifier of the node */ + id: string + /** @description Service instance identifier of the node */ + serviceInstanceID: string + machineInfo: components['schemas']['MachineInfo'] + status: components['schemas']['NodeStatus'] + /** + * Format: uint32 + * @description Number of sandboxes running on the node + */ + sandboxCount: number + metrics: components['schemas']['NodeMetrics'] + /** @description List of cached builds id on the node */ + cachedBuilds: string[] + /** + * Format: uint64 + * @description Number of sandbox create successes + */ + createSuccesses: number + /** + * Format: uint64 + * @description Number of sandbox create fails + */ + createFails: number + } + CreatedAccessToken: { + /** + * Format: uuid + * @description Identifier of the access token + */ + id: string + /** @description Name of the access token */ + name: string + /** @description The fully created access token */ + token: string + mask: components['schemas']['IdentifierMaskingDetails'] + /** + * Format: date-time + * @description Timestamp of access token creation + */ + createdAt: string + } + NewAccessToken: { + /** @description Name of the access token */ + name: string + } + TeamAPIKey: { + /** + * Format: uuid + * @description Identifier of the API key + */ + id: string + /** @description Name of the API key */ + name: string + mask: components['schemas']['IdentifierMaskingDetails'] + /** + * Format: date-time + * @description Timestamp of API key creation + */ + createdAt: string + createdBy?: components['schemas']['TeamUser'] | null + /** + * Format: date-time + * @description Last time this API key was used + */ + lastUsed?: string | null + } + CreatedTeamAPIKey: { + /** + * Format: uuid + * @description Identifier of the API key + */ + id: string + /** @description Raw value of the API key */ + key: string + mask: components['schemas']['IdentifierMaskingDetails'] + /** @description Name of the API key */ + name: string + /** + * Format: date-time + * @description Timestamp of API key creation + */ + createdAt: string + createdBy?: components['schemas']['TeamUser'] | null + /** + * Format: date-time + * @description Last time this API key was used + */ + lastUsed?: string | null + } + NewTeamAPIKey: { + /** @description Name of the API key */ + name: string + } + UpdateTeamAPIKey: { + /** @description New name for the API key */ + name: string + } + AssignedTemplateTags: { + /** @description Assigned tags of the template */ + tags: string[] + /** + * Format: uuid + * @description Identifier of the build associated with these tags + */ + buildID: string + } + TemplateTag: { + /** @description The tag name */ + tag: string + /** + * Format: uuid + * @description Identifier of the build associated with this tag + */ + buildID: string + /** + * Format: date-time + * @description Time when the tag was assigned + */ + createdAt: string + } + AssignTemplateTagsRequest: { + /** @description Target template in "name:tag" format */ + target: string + /** @description Tags to assign to the template */ + tags: string[] + } + DeleteTemplateTagsRequest: { + /** @description Name of the template */ + name: string + /** @description Tags to delete */ + tags: string[] + } + Error: { + /** + * Format: int32 + * @description Error code + */ + code: number + /** @description Error */ + message: string + } + IdentifierMaskingDetails: { + /** @description Prefix that identifies the token or key type */ + prefix: string + /** @description Length of the token or key */ + valueLength: number + /** @description Prefix used in masked version of the token or key */ + maskedValuePrefix: string + /** @description Suffix used in masked version of the token or key */ + maskedValueSuffix: string + } + Volume: { + /** @description ID of the volume */ + volumeID: string + /** @description Name of the volume */ + name: string + } + NewVolume: { + /** @description Name of the volume */ + name: string + } + } + responses: { + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + /** @description Authentication error */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + /** @description Forbidden */ + 403: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + /** @description Conflict */ + 409: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + /** @description Server error */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Error'] + } + } + } + parameters: { + templateID: string + buildID: string + sandboxID: string + teamID: string + nodeID: string + apiKeyID: string + accessTokenID: string + snapshotID: string + tag: string + /** @description Maximum number of items to return per page */ + paginationLimit: number + /** @description Cursor to start the list from */ + paginationNextToken: string + volumeID: string + } + requestBodies: never + headers: never + pathItems: never } -export type $defs = Record; -export type operations = Record; +export type $defs = Record +export type operations = Record From dcf6600f08941700e7a4068cc6e4a00f86173301 Mon Sep 17 00:00:00 2001 From: ben-fornefeld Date: Mon, 2 Mar 2026 16:23:50 -0800 Subject: [PATCH 3/6] chore: address comments --- src/features/dashboard/common/log-level-filter.tsx | 4 +++- src/features/dashboard/sandbox/logs/logs.tsx | 4 +++- src/server/api/routers/sandbox.ts | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/features/dashboard/common/log-level-filter.tsx b/src/features/dashboard/common/log-level-filter.tsx index aa6c3ff51..b2818e2dc 100644 --- a/src/features/dashboard/common/log-level-filter.tsx +++ b/src/features/dashboard/common/log-level-filter.tsx @@ -22,6 +22,7 @@ interface LogLevelFilterProps { onLevelChange: (level: LogLevelValue | null) => void options?: Array<{ value: LogLevelValue; label: string }> renderOption?: (level: LogLevelValue) => ReactNode + className?: string } export function LogLevelFilter({ @@ -29,12 +30,13 @@ export function LogLevelFilter({ onLevelChange, options = DEFAULT_OPTIONS, renderOption, + className, }: LogLevelFilterProps) { const selectedLevel = level ?? 'debug' const selectedLabel = options.find((o) => o.value === selectedLevel)?.label return ( -
+