16 lines
422 B
TypeScript
16 lines
422 B
TypeScript
import { z } from "zod";
|
|
import { fileType } from "./file";
|
|
|
|
export const single = z.object({
|
|
path: z.string(),
|
|
owner: z.number().finite(),
|
|
title: z.string(),
|
|
type: fileType,
|
|
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>;
|