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/projects/restore.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";
4
5
import { ProjectIdSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const RestoreProjectInputSchema = z
10
.object({
11
project_id: ProjectIdSchema,
12
})
13
.describe(
14
`Restores a specific project from its deleted state, which clears the project's
15
\`delete\` flag in the database and restores it to the user interface. Note that any
16
previously applied project licenses must be re-applied to the project upon
17
restoration.`,
18
);
19
20
export const RestoreProjectOutputSchema = z.union([
21
FailedAPIOperationSchema,
22
OkAPIOperationSchema,
23
]);
24
25
export type RestoreProjectInput = z.infer<typeof RestoreProjectInputSchema>;
26
export type RestoreProjectOutput = z.infer<typeof RestoreProjectOutputSchema>;
27
28