Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/api/schema/projects/delete.ts
1451 views
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 DeleteProjectInputSchema = z
10
.object({
11
project_id: ProjectIdSchema,
12
})
13
.describe(
14
`Deletes a specific project. This causes three operations to occur in succession.
15
Firstly, all project licenses associated with the project are removed. Next, the
16
project is stopped. Finally, the project's \`delete\` flag in the database is
17
set, which removes it from the user interface. This operation may be reversed by
18
restoring the project via the API, with the proviso that all information about
19
applied project licenses is lost in the delete operation.`,
20
);
21
22
export const DeleteProjectOutputSchema = z.union([
23
FailedAPIOperationSchema,
24
OkAPIOperationSchema,
25
]);
26
27
export type DeleteProjectInput = z.infer<typeof DeleteProjectInputSchema>;
28
export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
29
30