"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get changePasswordSchema () {
        return changePasswordSchema;
    },
    get isRootUserSchema () {
        return isRootUserSchema;
    },
    get isVerifiedSchema () {
        return isVerifiedSchema;
    },
    get registerUserSchema () {
        return registerUserSchema;
    },
    get registerUserWithRolesSchema () {
        return registerUserWithRolesSchema;
    },
    get setUserRolesSchema () {
        return setUserRolesSchema;
    },
    get usernameSchema () {
        return usernameSchema;
    }
});
const _zod = require("zod");
const _serverconstants = require("../../server.constants");
const _authorizationconstants = require("../../constants/authorization.constants");
const roleNameSchema = _zod.z.enum([
    _authorizationconstants.ROLES.ADMIN,
    _authorizationconstants.ROLES.OPERATOR,
    _authorizationconstants.ROLES.GUEST
]);
const registerUserSchema = _zod.z.object({
    username: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_USERNAME_MINLEN).nonempty(),
    password: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_PASSWORD_MINLEN).nonempty()
});
const changePasswordSchema = _zod.z.object({
    oldPassword: _zod.z.string().nonempty(),
    newPassword: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_PASSWORD_MINLEN).nonempty()
});
const registerUserWithRolesSchema = _zod.z.object({
    username: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_USERNAME_MINLEN).nonempty(),
    password: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_PASSWORD_MINLEN).nonempty(),
    roles: _zod.z.array(roleNameSchema)
});
const setUserRolesSchema = _zod.z.object({
    roles: _zod.z.array(roleNameSchema)
});
const usernameSchema = _zod.z.object({
    username: _zod.z.string().min(_serverconstants.AppConstants.DEFAULT_USERNAME_MINLEN).nonempty()
});
const isVerifiedSchema = _zod.z.object({
    isVerified: _zod.z.boolean()
});
const isRootUserSchema = _zod.z.object({
    isRootUser: _zod.z.boolean()
});

//# sourceMappingURL=user-controller.validation.js.map