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/set-template.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";
4
5
import { ComputeServerIdSchema } from "./common";
6
import { ComputeServerTemplateObjectSchema } from "./get-template";
7
8
// OpenAPI spec
9
//
10
export const SetComputeServerTemplateInputSchema = z
11
.object({
12
id: ComputeServerIdSchema.describe("Compute server template id."),
13
template: ComputeServerTemplateObjectSchema,
14
})
15
.describe(
16
"**Administrators only**. Set a specific compute server template by `id`.",
17
);
18
19
export const SetComputeServerTemplateOutputSchema = z.union([
20
FailedAPIOperationSchema,
21
OkAPIOperationSchema,
22
]);
23
24
export type SetComputeServerTemplateInput = z.infer<
25
typeof SetComputeServerTemplateInputSchema
26
>;
27
export type SetComputeServerTemplateOutput = z.infer<
28
typeof SetComputeServerTemplateOutputSchema
29
>;
30
31