CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/api/schema/compute/get-server-state.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema } from "../common";
4
5
import { ComputeServerIdSchema, ComputeServerStateSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const GetComputeServerStateInputSchema = z
10
.object({
11
id: ComputeServerIdSchema,
12
})
13
.describe(
14
"Get server state from the cloud provider for a particular compute server.",
15
);
16
17
export const GetComputeServerStateOutputSchema = z.union([
18
FailedAPIOperationSchema,
19
ComputeServerStateSchema,
20
]);
21
22
export type GetComputeServerStateInput = z.infer<
23
typeof GetComputeServerStateInputSchema
24
>;
25
export type GetComputeServerStateOutput = z.infer<
26
typeof GetComputeServerStateOutputSchema
27
>;
28
29