Path: blob/master/src/packages/next/lib/api/schema/compute/scripts.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { ComputeServerIdSchema } from "./common";56// OpenAPI spec7//8export const ComputeServerScriptsInputSchema = z9.object({10id: ComputeServerIdSchema,11api_key: z12.string()13.describe("Used to get the project associated with the compute server. "),14action: z15.enum(["start", "stop", "deprovision"])16.describe(17"Determines which script is to be returned from this API call.",18),19})20.describe(21`Returns a bash script that when run as root starts a compute server and22connects it to a project. This is meant to be used for on prem compute23servers, hence it includes installing the \`/cocalc\` code and the24\`user\` user.`,25);2627export const ComputeServerScriptsOutputSchema = z.union([28FailedAPIOperationSchema,29z.string().describe("The script of interest."),30]);3132export type ComputeServerScriptsInput = z.infer<33typeof ComputeServerScriptsInputSchema34>;35export type ComputeServerScriptsOutput = z.infer<36typeof ComputeServerScriptsOutputSchema37>;383940