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-title.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";
4
5
import { ComputeServerIdSchema, ComputeServerTitleSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const SetComputeServerTitleInputSchema = z
10
.object({
11
id: ComputeServerIdSchema,
12
title: ComputeServerTitleSchema,
13
})
14
.describe(
15
"Set the title of a compute server. The owner is the only one allowed to do this.",
16
);
17
18
export const SetComputeServerTitleOutputSchema = z.union([
19
FailedAPIOperationSchema,
20
OkAPIOperationSchema,
21
]);
22
23
export type SetComputeServerTitleInput = z.infer<
24
typeof SetComputeServerTitleInputSchema
25
>;
26
export type SetComputeServerTitleOutput = z.infer<
27
typeof SetComputeServerTitleOutputSchema
28
>;
29
30