"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listUsersSchema = exports.updateUserSchema = exports.createUserSchema = void 0;
const zod_1 = require("zod");
const client_1 = require("@prisma/client");
exports.createUserSchema = zod_1.z.object({
    email: zod_1.z.string().email(),
    password: zod_1.z.string()
        .min(12, 'Password must be at least 12 characters')
        .regex(/[A-Z]/, 'Password must contain at least one uppercase letter')
        .regex(/[a-z]/, 'Password must contain at least one lowercase letter')
        .regex(/[0-9]/, 'Password must contain at least one digit'),
    name: zod_1.z.string().optional(),
    phone: zod_1.z.string().optional(),
    pronouns: zod_1.z.string().max(50).optional(),
    role: zod_1.z.nativeEnum(client_1.UserRole).optional(),
    roles: zod_1.z.array(zod_1.z.nativeEnum(client_1.UserRole)).optional(),
    status: zod_1.z.nativeEnum(client_1.UserStatus).optional(),
    expiresAt: zod_1.z.string().datetime().optional(),
    expireDays: zod_1.z.number().int().positive().optional(),
});
exports.updateUserSchema = zod_1.z.object({
    email: zod_1.z.string().email().optional(),
    password: zod_1.z.string()
        .min(12, 'Password must be at least 12 characters')
        .regex(/[A-Z]/, 'Password must contain at least one uppercase letter')
        .regex(/[a-z]/, 'Password must contain at least one lowercase letter')
        .regex(/[0-9]/, 'Password must contain at least one digit')
        .optional(),
    name: zod_1.z.string().optional(),
    phone: zod_1.z.string().optional(),
    pronouns: zod_1.z.string().max(50).nullable().optional(),
    role: zod_1.z.nativeEnum(client_1.UserRole).optional(),
    roles: zod_1.z.array(zod_1.z.nativeEnum(client_1.UserRole)).optional(),
    status: zod_1.z.nativeEnum(client_1.UserStatus).optional(),
    expiresAt: zod_1.z.string().datetime().nullable().optional(),
    expireDays: zod_1.z.number().int().positive().nullable().optional(),
});
exports.listUsersSchema = zod_1.z.object({
    page: zod_1.z.coerce.number().int().positive().default(1),
    limit: zod_1.z.coerce.number().int().positive().max(100).default(20),
    search: zod_1.z.string().optional(),
    role: zod_1.z.nativeEnum(client_1.UserRole).optional(),
    status: zod_1.z.nativeEnum(client_1.UserStatus).optional(),
});
//# sourceMappingURL=users.schemas.js.map