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-images-google.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema } from "../common";
4
5
import { RequestNoCacheSchema } from "../common";
6
7
// OpenAPI spec
8
//
9
export const GetComputeServerGoogleImagesInputSchema = z
10
.object({
11
noCache: RequestNoCacheSchema.optional(),
12
})
13
.describe(
14
"Used to get available compute server images for deployment to GCP.",
15
);
16
17
export const GetComputeServerGoogleImagesOutputSchema = z.union([
18
FailedAPIOperationSchema,
19
z.record(
20
z.string().describe("Image name"),
21
z
22
.object({
23
labels: z
24
.object({
25
image: z.string().describe("CoCalc image name"),
26
tag: z.string().describe("Image tag"),
27
arch: z.enum(["x86-64", "arm64"]).describe("Image architecture"),
28
tested: z.string().describe("`true` if the image has been tested."),
29
})
30
.describe(
31
"Map of server image labels to values (e.g. architecture, etc.)",
32
),
33
diskSizeGb: z.number().min(0).describe("Disk size in GB"),
34
creationTimestamp: z
35
.string()
36
.describe("ISO 8601 timestamp indicating image creation time."),
37
})
38
.describe(
39
`Map of server image keys to detailed JSON information about the server image (e.g.,
40
image architecture, disk size, etc.`,
41
),
42
),
43
]);
44
45
export type GetComputeServerGoogleImagesInput = z.infer<
46
typeof GetComputeServerGoogleImagesInputSchema
47
>;
48
export type GetComputeServerGoogleImagesOutput = z.infer<
49
typeof GetComputeServerGoogleImagesOutputSchema
50
>;
51
52