mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
22 lines (21 loc) • 694 B
JavaScript
import * as z from "zod";
export const postPatchSchema = z.object({
title: z.string().min(3).max(128).optional(),
// TODO: Type this properly from editorjs block types?
content: z.any().optional(),
});
export const postListQueryInputSchema = z.object({
keyword: z.string().optional(),
siteId: z.string().optional(),
categoryId: z.number().optional(),
slug: z.string().optional(),
tags: z.string().optional(),
limit: z.number().min(1).max(100).optional(),
cursor: z.string().nullish(),
});
export const createPostInputSchema = z.object({
blogId: z.number(),
title: z.string(),
content: z.string(),
tags: z.array(z.string()).optional()
});