import { PrismaService } from '@hed-hog/api-prisma';
import { ChallengeService } from '../challenge/challenge.service';
import { MailService as MailManagerService } from '../mail/mail.service';
import { SecurityService } from '../security/security.service';
import { SessionService } from '../session/session.service';
import { SettingService } from '../setting/setting.service';
import { TokenService } from '../token/token.service';
import { UserService } from '../user/user.service';
import { ForgetDTO } from './dto/forget.dto';
import { LoginDTO } from './dto/login.dto';
export declare class AuthService {
    private readonly prisma;
    private readonly mail;
    private readonly setting;
    private readonly security;
    private readonly token;
    private readonly session;
    private readonly user;
    private readonly challenge;
    constructor(prisma: PrismaService, mail: MailManagerService, setting: SettingService, security: SecurityService, token: TokenService, session: SessionService, user: UserService, challenge: ChallengeService);
    getAuthenticationPayload(locale: string, userId: number, ipAddress: string, userAgent: string): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
    }>;
    private hasPendingPasswordReset;
    private getRequiresPasswordResetByUserId;
    requiresMfaForLogin(locale: string, email: string, user: any): Promise<{
        requiresMfa: boolean;
        token: string;
    }>;
    requiresEmailVerificationForLogin(locale: string, email: string, user: any): Promise<{
        requiresEmailVerification: boolean;
        token: string;
    }>;
    emailVerificationLoginResend(locale: string, token: string): any;
    emailVerificationLogin(locale: string, token: string, code: string, ipAddress: string, userAgent: string, res: any): Promise<{
        accessToken: string;
        refreshToken: string;
        requiresPasswordReset: boolean;
    } | {
        accessToken: string;
        requiresPasswordReset: boolean;
        refreshToken?: undefined;
    }>;
    private login;
    loginWithEmailAndPassword(res: any, locale: string, ipAddress: string, userAgent: string, { email, password }: LoginDTO): Promise<{
        requiresMfa: boolean;
        token: string;
    } | {
        requiresEmailVerification: boolean;
        token: string;
    } | {
        accessToken: string;
        refreshToken: string;
        requiresPasswordReset: boolean;
    } | {
        accessToken: string;
        requiresPasswordReset: boolean;
        refreshToken?: undefined;
    } | {
        requiresMfa: boolean;
        mfaToken: string;
        mfaMethods: {
            type: import("@prisma/client").$Enums.user_mfa_type_4ce08a626e_enum;
            id: number;
        }[];
    }>;
    verifyRoles(_locale: string, userId: number): Promise<{
        slug: string;
    }[]>;
    verifyUser(locale: string, userId: number): Promise<{
        requires_password_reset: boolean;
        user_identifier: {
            type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
            id: number;
            value: string;
            enabled: boolean;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            verified_at: Date | null;
        }[];
        role_user: ({
            role: {
                id: number;
                created_at: Date;
                updated_at: Date;
                slug: string;
            };
        } & {
            id: number;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            role_id: number;
        })[];
        user_account: {
            id: number;
            email: string | null;
            provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            provider_user_id: string;
            scopes: string | null;
            refresh_token: import("@prisma/client/runtime/library").Bytes | null;
            token_expires_at: Date | null;
        }[];
        user_activity: {
            id: number;
            action: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
        }[];
        user_credential: {
            type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
            id: number;
            hash: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            expires_at: Date | null;
            revoked_at: Date | null;
            requires_reset: boolean;
        }[];
        user_session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        }[];
        name: string;
        id: number;
        created_at: Date;
        updated_at: Date;
        photo_id: number | null;
        suspended_until: Date | null;
        last_login_at: Date | null;
        suspended_reason: string | null;
        deactivated_at: Date | null;
    }>;
    refreshAccessToken(locale: string, refreshToken: string, ipAddress: string, userAgent: string): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
    }>;
    forgotPassword(locale: string, { email }: ForgetDTO): Promise<{
        success: boolean;
    }>;
    logout(res: any, req: any, refreshToken: string): Promise<{
        success: boolean;
    }>;
    forgotResetPassword(locale: string, password: string, code: string, ipAddress: string, userAgent: string): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
    }>;
    verifyMfaCode(locale: string, mfaToken: string, code: string, ipAddress: string, userAgent: string, methodType?: 'totp' | 'email' | 'recovery'): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
        requiresPasswordReset: boolean;
    }>;
    verifyMfaRecoveryCode(locale: string, mfaToken: string, recoveryCode: string, ipAddress: string, userAgent: string): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
        requiresPasswordReset: boolean;
    }>;
    resendMfaCode(locale: string, mfaToken: string): Promise<{
        success: boolean;
        hasEmailMfa: boolean;
    }>;
    generateWebAuthnAuthenticationOptions(locale: string, mfaToken: string): Promise<import("@simplewebauthn/server").PublicKeyCredentialRequestOptionsJSON>;
    verifyWebAuthnAuthentication(locale: string, mfaToken: string, assertionResponse: any, ipAddress: string, userAgent: string): Promise<{
        accessToken: string;
        refreshToken: string;
        session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        };
        requiresPasswordReset: boolean;
    }>;
}
//# sourceMappingURL=auth.service.d.ts.map