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-title.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema } from "../common";
4
5
import {
6
ComputeServerColorSchema,
7
ComputeServerIdSchema,
8
ComputeServerTitleSchema,
9
} from "./common";
10
11
// OpenAPI spec
12
//
13
export const GetComputeServerTitleInputSchema = z
14
.object({
15
id: ComputeServerIdSchema,
16
})
17
.describe("Get server title and color for a particular compute server.");
18
19
export const GetComputeServerTitleOutputSchema = z.union([
20
FailedAPIOperationSchema,
21
z.object({
22
color: ComputeServerColorSchema,
23
title: ComputeServerTitleSchema,
24
project_specific_id: ComputeServerIdSchema,
25
}),
26
]);
27
28
export type GetComputeServerTitleInput = z.infer<
29
typeof GetComputeServerTitleInputSchema
30
>;
31
export type GetComputeServerTitleOutput = z.infer<
32
typeof GetComputeServerTitleOutputSchema
33
>;
34
35