feat: add user types with zod schemas

This commit is contained in:
CREDO23 2025-12-15 11:47:40 +00:00
parent 8aedead33e
commit 42a585d880

View file

@ -0,0 +1,19 @@
import { z } from "zod";
export const user = z.object({
id: z.string().uuid(),
email: z.string().email(),
is_active: z.boolean(),
is_superuser: z.boolean(),
is_verified: z.boolean(),
pages_limit: z.number(),
pages_used: z.number(),
});
/**
* Get current user
*/
export const getMeResponse = user;
export type User = z.infer<typeof user>;
export type GetMeResponse = z.infer<typeof getMeResponse>;