-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathschemas.ts
42 lines (30 loc) · 1.04 KB
/
schemas.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { z } from "zod";
export const zContributor = z.object({
avatar_url: z.string(),
contributions: z.array(z.string()),
login: z.string(),
name: z.string(),
profile: z.string(),
});
export type Contributor = z.infer<typeof zContributor>;
export const zReadme = z.object({
additional: z.string().optional(),
explainer: z.string().optional(),
footnotes: z.string().optional(),
usage: z.string(),
});
export type Readme = z.infer<typeof zReadme>;
export const zDocumentation = z.object({
development: z.string().optional(),
readme: zReadme,
});
export type Documentation = z.infer<typeof zDocumentation>;
export const zWorkflowVersion = z.object({
hash: z.string().optional(),
pinned: z.boolean().optional(),
});
export type WorkflowVersion = z.infer<typeof zWorkflowVersion>;
export const zWorkflowVersions = z.record(zWorkflowVersion);
export type WorkflowVersions = z.infer<typeof zWorkflowVersions>;
export const zWorkflowsVersions = z.record(zWorkflowVersions);
export type WorkflowsVersions = z.infer<typeof zWorkflowsVersions>;