Path: blob/master/src/packages/next/lib/api/schema/compute/check-in.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { ComputeServerIdSchema } from "./common";56const VpnSha1Schema = z.string().describe("SHA1 VPN hash").optional();78const StorageSha1Schema = z.string().describe("SHA-1 storage hash").optional();910// OpenAPI spec11//12export const ComputeServerCheckInInputSchema = z13.object({14id: ComputeServerIdSchema,15vpn_sha1: VpnSha1Schema,16storage_sha1: StorageSha1Schema,17})18.describe(19`Used by compute servers to periodically checking in with CoCalc using a project api20key.`,21);2223export const ComputeServerCheckInOutputSchema = z.union([24FailedAPIOperationSchema,25z.object({26vpn: z.object({27image: z.string().describe("VPN image name and tag."),28nodes: z.array(z.object({})),29}),30storage: z.array(z.object({})),31vpn_sha1: VpnSha1Schema,32storage_sha1: StorageSha1Schema,33}),34]);3536export type ComputeServerCheckInInput = z.infer<37typeof ComputeServerCheckInInputSchema38>;39export type ComputeServerCheckInOutput = z.infer<40typeof ComputeServerCheckInOutputSchema41>;424344