import { z } from 'zod'; import { roleSchema } from './enums'; export const createUserSchema = z.object({ username: z.string().min(1).max(50), email: z.string().email(), displayName: z.string().min(1).max(100), password: z.string().min(8).optional(), role: roleSchema.default('AGENT'), }); export const updateUserSchema = z.object({ displayName: z.string().min(1).max(100).optional(), email: z.string().email().optional(), password: z.string().min(8).optional(), role: roleSchema.optional(), regenerateApiKey: z.boolean().optional(), }); export type CreateUserInput = z.infer; export type UpdateUserInput = z.infer;