Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/lib/api/schema/compute/set-detailed-state.ts
Views: 688
import { z } from "../../framework";12import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";34import { ProjectIdSchema } from "../projects/common";56import { ComputeServerIdSchema } from "./common";78// OpenAPI spec9//10export const SetDetailedServerStateInputSchema = z11.object({12id: ComputeServerIdSchema,13project_id: ProjectIdSchema,14name: z15.string()16.describe(17`Optional JSON path to select a particular property of the compute18server's detailed state.`,19)20.optional(),21state: z22.string()23.describe(24`The value of the state field to be set. If this value is empty, the state variable25specified in the \`name\` field is removed.`,26)27.optional(),28extra: z.string().describe("State metadata.").optional(),29timeout: z30.number()31.min(0)32.describe("Specifies a duration for which this state variable is valid.")33.optional(),34progress: z.number().optional(),35})36.describe(37`Set detailed state for a compute server; detailed state maps component name to38something like \`{state:'running',time:Date.now()}\` and is used to provide users with39insight into what's currently happening on their compute server. The \`name\`40must be provided to specify a particular (possibly nested) state property to be set.41_This is mainly used from the backend to convey information to user about what is42going on in a compute server._`,43);4445export const SetDetailedServerStateOutputSchema = z.union([46FailedAPIOperationSchema,47OkAPIOperationSchema,48]);4950export type SetDetailedServerStateInput = z.infer<51typeof SetDetailedServerStateInputSchema52>;53export type SetDetailedServerStateOutput = z.infer<54typeof SetDetailedServerStateOutputSchema55>;565758