15 lines
427 B
TypeScript
15 lines
427 B
TypeScript
import { z } from "zod";
|
|
|
|
export const single = z.object({
|
|
path: z.string(),
|
|
owner: z.number().finite(),
|
|
title: z.string(),
|
|
type: z.enum(['folder', 'file', 'markdown', 'canvas']),
|
|
navigable: z.boolean(),
|
|
private: z.boolean(),
|
|
order: z.number().finite(),
|
|
});
|
|
export const table = z.array(single);
|
|
|
|
export type Navigation = z.infer<typeof table>;
|
|
export type NavigationItem = z.infer<typeof single>;
|