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-api-key.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema } from "../common";
4
5
import { ComputeServerIdSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const GetComputeServerAPIKeyInputSchema = z
10
.object({
11
id: ComputeServerIdSchema,
12
})
13
.describe(
14
`Gets the api key of the compute server. This operation always invalidates
15
any existing key for this server and creates a new one. Only allowed for on-prem
16
servers.`,
17
);
18
19
export const GetComputeServerAPIKeyOutputSchema = z.union([
20
FailedAPIOperationSchema,
21
z.string().describe("API key for the compute server."),
22
]);
23
24
export type GetComputeServerAPIKeyInput = z.infer<
25
typeof GetComputeServerAPIKeyInputSchema
26
>;
27
export type GetComputeServerAPIKeyOutput = z.infer<
28
typeof GetComputeServerAPIKeyOutputSchema
29
>;
30
31