"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NestAuthEvents = exports.DEFAULT_GUARD_NAME = exports.NEST_AUTH_TRUST_DEVICE_KEY = exports.REFRESH_TOKEN_COOKIE_NAME = exports.ACCESS_TOKEN_COOKIE_NAME = exports.REFRESH_TOKEN_EXPIRED = exports.REFRESH_TOKEN_INVALID = exports.USER_NOT_ACTIVE_ERROR = exports.SESSION_NOT_FOUND_ERROR = exports.INVALID_REFRESH_TOKEN_EXCEPTION_CODE = exports.INVALID_MFA_EXCEPTION_CODE = exports.UNAUTHORIZED_EXCEPTION_CODE = exports.USER_NOT_FOUND_EXCEPTION_CODE = exports.ERROR_CODES = exports.TENANT_ERROR_CODES = exports.USER_ERROR_CODES = exports.OTP_ERROR_CODES = exports.VALIDATION_ERROR_CODES = exports.API_KEY_ERROR_CODES = exports.GUARD_ERROR_CODES = exports.SESSION_ERROR_CODES = exports.MFA_ERROR_CODES = exports.AUTH_ERROR_CODES = exports.PHONE_AUTH_PROVIDER = exports.EMAIL_AUTH_PROVIDER = exports.GITHUB_AUTH_PROVIDER = exports.APPLE_AUTH_PROVIDER = exports.FACEBOOK_AUTH_PROVIDER = exports.GOOGLE_AUTH_PROVIDER = exports.JWT_AUTH_PROVIDER = exports.NEST_AUTH_ASYNC_OPTIONS_PROVIDER = exports.AUTH_MODULE_OPTIONS = void 0;
exports.AUTH_MODULE_OPTIONS = 'NEST_AUTH_AUTH_MODULE_OPTIONS';
exports.NEST_AUTH_ASYNC_OPTIONS_PROVIDER = 'NEST_AUTH_ASYNC_OPTIONS_PROVIDER';
exports.JWT_AUTH_PROVIDER = 'jwt';
exports.GOOGLE_AUTH_PROVIDER = 'google';
exports.FACEBOOK_AUTH_PROVIDER = 'facebook';
exports.APPLE_AUTH_PROVIDER = 'apple';
exports.GITHUB_AUTH_PROVIDER = 'github';
exports.EMAIL_AUTH_PROVIDER = 'email';
exports.PHONE_AUTH_PROVIDER = 'phone';
exports.AUTH_ERROR_CODES = {
    REGISTRATION_DISABLED: 'REGISTRATION_DISABLED',
    EMAIL_ALREADY_EXISTS: 'EMAIL_ALREADY_EXISTS',
    PHONE_ALREADY_EXISTS: 'PHONE_ALREADY_EXISTS',
    PROVIDER_NOT_FOUND: 'PROVIDER_NOT_FOUND',
    INVALID_CREDENTIALS: 'INVALID_CREDENTIALS',
    INVALID_PROVIDER: 'INVALID_PROVIDER',
    MISSING_REQUIRED_FIELDS: 'MISSING_REQUIRED_FIELDS',
    USER_NOT_FOUND: 'USER_NOT_FOUND',
    ACCOUNT_SUSPENDED: 'ACCOUNT_SUSPENDED',
    ACCOUNT_INACTIVE: 'ACCOUNT_INACTIVE',
    EMAIL_NOT_VERIFIED: 'EMAIL_NOT_VERIFIED',
    CURRENT_PASSWORD_INCORRECT: 'CURRENT_PASSWORD_INCORRECT',
    NEW_PASSWORD_SAME_AS_CURRENT: 'NEW_PASSWORD_SAME_AS_CURRENT',
    PASSWORD_RESET_INVALID_REQUEST: 'PASSWORD_RESET_INVALID_REQUEST',
    PASSWORD_RESET_TOKEN_INVALID: 'PASSWORD_RESET_TOKEN_INVALID',
    PASSWORD_RESET_TOKEN_EXPIRED: 'PASSWORD_RESET_TOKEN_EXPIRED',
    REFRESH_TOKEN_INVALID: 'REFRESH_TOKEN_INVALID',
    REFRESH_TOKEN_EXPIRED: 'REFRESH_TOKEN_EXPIRED',
    INVALID_TOKEN: 'INVALID_TOKEN',
    TOKEN_EXPIRED: 'TOKEN_EXPIRED',
    EMAIL_ALREADY_VERIFIED: 'EMAIL_ALREADY_VERIFIED',
    VERIFICATION_CODE_INVALID: 'VERIFICATION_CODE_INVALID',
    VERIFICATION_CODE_EXPIRED: 'VERIFICATION_CODE_EXPIRED',
    NO_EMAIL_ADDRESS: 'NO_EMAIL_ADDRESS',
    NO_PHONE_NUMBER: 'NO_PHONE_NUMBER',
};
exports.MFA_ERROR_CODES = {
    MFA_NOT_ENABLED: 'MFA_NOT_ENABLED',
    MFA_REQUIRED: 'MFA_REQUIRED',
    MFA_CODE_INVALID: 'MFA_CODE_INVALID',
    MFA_CODE_EXPIRED: 'MFA_CODE_EXPIRED',
    MFA_METHOD_NOT_AVAILABLE: 'MFA_METHOD_NOT_AVAILABLE',
    MFA_TOGGLING_NOT_ALLOWED: 'MFA_TOGGLING_NOT_ALLOWED',
    MFA_CANNOT_ENABLE_WITHOUT_METHOD: 'MFA_CANNOT_ENABLE_WITHOUT_METHOD',
    MFA_RECOVERY_CODE_INVALID: 'MFA_RECOVERY_CODE_INVALID',
    TOTP_SETUP_FAILED: 'TOTP_SETUP_FAILED',
    TOTP_VERIFICATION_FAILED: 'TOTP_VERIFICATION_FAILED',
};
exports.SESSION_ERROR_CODES = {
    SESSION_NOT_FOUND: 'SESSION_NOT_FOUND',
    SESSION_EXPIRED: 'SESSION_EXPIRED',
    SESSION_INVALID: 'SESSION_INVALID',
    MAX_SESSIONS_REACHED: 'MAX_SESSIONS_REACHED',
};
exports.GUARD_ERROR_CODES = {
    NO_AUTH_PROVIDED: 'NO_AUTH_PROVIDED',
    INVALID_AUTH_FORMAT: 'INVALID_AUTH_FORMAT',
    INVALID_AUTH_TYPE: 'INVALID_AUTH_TYPE',
    UNAUTHORIZED: 'UNAUTHORIZED',
    ACCESS_DENIED: 'ACCESS_DENIED',
    FORBIDDEN: 'FORBIDDEN',
    NO_ROLES_ASSIGNED: 'NO_ROLES_ASSIGNED',
    MISSING_REQUIRED_ROLES: 'MISSING_REQUIRED_ROLES',
    MISSING_REQUIRED_PERMISSIONS: 'MISSING_REQUIRED_PERMISSIONS',
};
exports.API_KEY_ERROR_CODES = {
    INVALID_API_KEY_FORMAT: 'INVALID_API_KEY_FORMAT',
    INVALID_API_KEY: 'INVALID_API_KEY',
    API_KEY_EXPIRED: 'API_KEY_EXPIRED',
    API_KEY_DEACTIVATED: 'API_KEY_DEACTIVATED',
    API_KEY_NOT_FOUND: 'API_KEY_NOT_FOUND',
};
exports.VALIDATION_ERROR_CODES = {
    EMAIL_OR_PHONE_REQUIRED: 'EMAIL_OR_PHONE_REQUIRED',
    TENANT_ID_REQUIRED: 'TENANT_ID_REQUIRED',
    INVALID_INPUT: 'INVALID_INPUT',
    MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD',
    INVALID_EMAIL_FORMAT: 'INVALID_EMAIL_FORMAT',
    INVALID_PHONE_FORMAT: 'INVALID_PHONE_FORMAT',
};
exports.OTP_ERROR_CODES = {
    OTP_INVALID: 'OTP_INVALID',
    OTP_EXPIRED: 'OTP_EXPIRED',
    OTP_ALREADY_USED: 'OTP_ALREADY_USED',
    OTP_NOT_FOUND: 'OTP_NOT_FOUND',
};
exports.USER_ERROR_CODES = {
    USER_NOT_FOUND: 'USER_NOT_FOUND',
    USER_ALREADY_EXISTS: 'USER_ALREADY_EXISTS',
    USER_CREATION_FAILED: 'USER_CREATION_FAILED',
    USER_UPDATE_FAILED: 'USER_UPDATE_FAILED',
    USER_DELETION_FAILED: 'USER_DELETION_FAILED',
};
exports.TENANT_ERROR_CODES = {
    TENANT_NOT_FOUND: 'TENANT_NOT_FOUND',
    TENANT_ALREADY_EXISTS: 'TENANT_ALREADY_EXISTS',
    INVALID_TENANT: 'INVALID_TENANT',
};
exports.ERROR_CODES = {
    ...exports.AUTH_ERROR_CODES,
    ...exports.MFA_ERROR_CODES,
    ...exports.SESSION_ERROR_CODES,
    ...exports.GUARD_ERROR_CODES,
    ...exports.API_KEY_ERROR_CODES,
    ...exports.VALIDATION_ERROR_CODES,
    ...exports.OTP_ERROR_CODES,
    ...exports.USER_ERROR_CODES,
    ...exports.TENANT_ERROR_CODES,
};
exports.USER_NOT_FOUND_EXCEPTION_CODE = exports.AUTH_ERROR_CODES.USER_NOT_FOUND;
exports.UNAUTHORIZED_EXCEPTION_CODE = exports.GUARD_ERROR_CODES.UNAUTHORIZED;
exports.INVALID_MFA_EXCEPTION_CODE = exports.MFA_ERROR_CODES.MFA_CODE_INVALID;
exports.INVALID_REFRESH_TOKEN_EXCEPTION_CODE = exports.AUTH_ERROR_CODES.REFRESH_TOKEN_INVALID;
exports.SESSION_NOT_FOUND_ERROR = exports.SESSION_ERROR_CODES.SESSION_NOT_FOUND;
exports.USER_NOT_ACTIVE_ERROR = exports.AUTH_ERROR_CODES.ACCOUNT_INACTIVE;
exports.REFRESH_TOKEN_INVALID = exports.AUTH_ERROR_CODES.REFRESH_TOKEN_INVALID;
exports.REFRESH_TOKEN_EXPIRED = exports.AUTH_ERROR_CODES.REFRESH_TOKEN_EXPIRED;
exports.ACCESS_TOKEN_COOKIE_NAME = 'accessToken';
exports.REFRESH_TOKEN_COOKIE_NAME = 'refreshToken';
exports.NEST_AUTH_TRUST_DEVICE_KEY = 'nest_auth_device_trust';
exports.DEFAULT_GUARD_NAME = 'web';
exports.NestAuthEvents = {
    EMAIL_VERIFICATION_REQUESTED: 'email.verification.requested',
    EMAIL_VERIFIED: 'email.verified',
    LOGGED_IN: 'nest_auth.logged_in',
    REGISTERED: 'nest_auth.registered',
    TWO_FACTOR_VERIFIED: 'nest_auth.two_factor_verified',
    TWO_FACTOR_CODE_SENT: 'nest_auth.two_factor_code_sent',
    REFRESH_TOKEN: 'nest_auth.refresh_token',
    PASSWORD_RESET_REQUESTED: 'nest_auth.password_reset_requested',
    PASSWORD_RESET: 'nest_auth.password_reset',
    LOGGED_OUT: 'nest_auth.logged_out',
    LOGGED_OUT_ALL: 'nest_auth.logged_out_all',
    PASSWORD_CHANGED: 'nest_auth.password_changed',
    TWO_FACTOR_ENABLED: 'nest_auth.two_factor_enabled',
    TWO_FACTOR_DISABLED: 'nest_auth.two_factor_disabled',
    USER_CREATED: 'nest_auth.user.created',
    USER_UPDATED: 'nest_auth.user.updated',
    USER_DELETED: 'nest_auth.user.deleted',
    TENANT_CREATED: 'nest_auth.tenant.created',
    TENANT_UPDATED: 'nest_auth.tenant.updated',
    TENANT_DELETED: 'nest_auth.tenant.deleted',
    ACCESS_KEY_CREATED: 'nest_auth.access_key.created',
    ACCESS_KEY_DELETED: 'nest_auth.access_key.deleted',
    ACCESS_KEY_UPDATED: 'nest_auth.access_key.updated',
    ACCESS_KEY_DEACTIVATED: 'nest_auth.access_key.deactivated',
};
//# sourceMappingURL=auth.constants.js.map