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/common.ts
Views: 688
1
import { z } from "../../framework";
2
3
export const ProjectIdSchema = z.string().uuid().describe("Project id.");
4
5
export type ProjectId = z.infer<typeof ProjectIdSchema>;
6
7
export const ProjectTitleSchema = z
8
.string()
9
.describe(
10
"The short title of the project. Should use no special formatting, except hashtags.",
11
);
12
13
export type ProjectTitle = z.infer<typeof ProjectTitleSchema>;
14
15
export const ProjectDescriptionSchema = z.string().describe(
16
`A longer textual description of the project. This can include hashtags and should
17
be formatted using markdown.`,
18
);
19
20
export type ProjectDescription = z.infer<typeof ProjectDescriptionSchema>;
21
22
export const ProjectNameSchema = z.string().describe(
23
`The optional name of this project. Must be globally unique (up to case) across all
24
projects with a given *owner*. It can be between 1 and 100 characters from a-z, A-Z,
25
0-9, period, and dash.`,
26
);
27
28
export type ProjectName = z.infer<typeof ProjectNameSchema>;
29
30