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-server-cloud.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";
4
5
import { ComputeServerCloudSchema, ComputeServerIdSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const SetComputeServerCloudInputSchema = z
10
.object({
11
id: ComputeServerIdSchema,
12
cloud: ComputeServerCloudSchema,
13
})
14
.describe(
15
`Set the cloud of a compute server. The owner is the only one allowed to do this.
16
Changing the cloud clears the configuration, since it is not meaningful between
17
clouds.`,
18
);
19
20
export const SetComputeServerCloudOutputSchema = z.union([
21
FailedAPIOperationSchema,
22
OkAPIOperationSchema,
23
]);
24
25
export type SetComputeServerCloudInput = z.infer<
26
typeof SetComputeServerCloudInputSchema
27
>;
28
export type SetComputeServerCloudOutput = z.infer<
29
typeof SetComputeServerCloudOutputSchema
30
>;
31
32