17 lines
472 B
TypeScript
17 lines
472 B
TypeScript
import { z } from "zod/v4";
|
|
|
|
export const createUserSchema = z.object({
|
|
name: z.string().min(1).max(200),
|
|
email: z.string().email().max(320),
|
|
password: z.string().min(8).max(128),
|
|
role: z.enum(["user", "admin"]).default("user"),
|
|
});
|
|
|
|
export type CreateUserInput = z.infer<typeof createUserSchema>;
|
|
|
|
export const resendVerificationSchema = z.object({
|
|
email: z.string().email(),
|
|
});
|
|
|
|
export type ResendVerificationInput = z.infer<typeof resendVerificationSchema>;
|