import { PrismaService, user } from '@hed-hog/api-prisma';
import { JwtService } from '@nestjs/jwt';
import { ChallengeService } from '../challenge/challenge.service';
import { MailService } from '../mail/mail.service';
import { SecurityService } from '../security/security.service';
import { SettingService } from '../setting/setting.service';
import { TokenService } from '../token/token.service';
import { UserService } from '../user/user.service';
import { ChangeEmailDto } from './dto/change-email.dto';
import { ChangePasswordDto } from './dto/change-password.dto';
import { EmailVerificationDto } from './dto/email-verification-confirm.dto';
import { SendEmailVerificationDto } from './dto/send-email-verification.dto';
import { SetPreferencesDto } from './dto/set-preferences.dto';
import { UpdateDto } from './dto/update.dto';
export declare class ProfileService {
    private readonly prisma;
    private readonly user;
    private readonly jwt;
    private readonly setting;
    private readonly security;
    private readonly challenge;
    private readonly token;
    private readonly mail;
    constructor(prisma: PrismaService, user: UserService, jwt: JwtService, setting: SettingService, security: SecurityService, challenge: ChallengeService, token: TokenService, mail: MailService);
    changeEmail(locale: string, userId: number, { email, password, pin }: ChangeEmailDto): Promise<{
        requireEmailVerification: boolean;
    }>;
    updatePreferences(locale: string, userId: number, { theme, language }: SetPreferencesDto): Promise<{
        success: boolean;
    }>;
    confirmEmailVerificationMfa(locale: string, userId: number, { pin, challengeId, name }: EmailVerificationDto): Promise<{
        codes: string[];
        token: string;
    }>;
    confirmEmailVerification(locale: string, userId: number, { pin, challengeId }: EmailVerificationDto): Promise<{
        success: boolean;
    }>;
    sendEmailVerificationMfa(locale: string, userId: number, { email }: SendEmailVerificationDto): Promise<{
        challengeId: number;
    }>;
    sendEmailVerification(locale: string, userId: number, { email }: SendEmailVerificationDto): Promise<{
        challengeId: number;
    }>;
    sendCodeToRemove(locale: any, userId: any, email: any): Promise<{
        challengeId: number;
    }>;
    getEmailIdentifier(userId: number): Promise<{
        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;
    }>;
    getProfile(userId: number): Promise<{
        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;
    }>;
    getMFAMethods(userId: number): Promise<({
        user_mfa_email: {
            id: number;
            email: string;
            created_at: Date;
            updated_at: Date;
            user_mfa_id: number;
        }[];
        user_mfa_totp: {
            id: number;
            secret: import("@prisma/client/runtime/library").Bytes;
            created_at: Date;
            updated_at: Date;
            user_mfa_id: number;
        }[];
        user_mfa_webauthn: {
            id: number;
            created_at: Date;
            updated_at: Date;
            last_used_at: Date | null;
            user_mfa_id: number;
            credential_id: import("@prisma/client/runtime/library").Bytes;
            public_key: import("@prisma/client/runtime/library").Bytes;
            sign_count: number;
        }[];
    } & {
        name: string;
        type: import("@prisma/client").$Enums.user_mfa_type_4ce08a626e_enum;
        id: number;
        user_id: number;
        created_at: Date;
        updated_at: Date;
        suspended_until: Date | null;
        verified_at: Date | null;
    })[]>;
    updateMFA(userId: number, mfaId: number, { name }: UpdateDto): Promise<{
        name: string;
        type: import("@prisma/client").$Enums.user_mfa_type_4ce08a626e_enum;
        id: number;
        user_id: number;
        created_at: Date;
        updated_at: Date;
        suspended_until: Date | null;
        verified_at: Date | null;
    }>;
    update(userid: number, { name }: UpdateDto): Promise<{
        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;
    }>;
    updateAvatar(locale: string, userId: number, file: MulterFile): Promise<{
        id: number;
        path: string;
    }>;
    changePassword(locale: string, userId: number, { currentPassword, newPassword }: ChangePasswordDto, ipAddress?: string, userAgent?: string): Promise<{
        success: boolean;
    }>;
    generateRecoveryCodes(count?: number): string[];
    createMfaRecoveryCodes(userId: number): Promise<string[]>;
    getToken(user: user): Promise<{
        token: string;
    }>;
    verifyMfaTotp(locale: string, userId: number, token: string, secret: string, name?: string): Promise<{
        codes: string[];
        token: string;
    }>;
    generateMfaTotp(locale: string, userId: number): Promise<{
        otpauthUrl: any;
        qrCode: any;
        secret: string;
    }>;
    removeMfaTotp(locale: string, userId: number, mfaId: number, token: string): Promise<{
        token: string;
    }>;
    removeMfaEmail(locale: string, userId: number, mfaId: number, token: string, providedHash: string): Promise<{
        token: string;
    }>;
    removeMfaWithRecoveryCode(locale: string, userId: number, mfaId: number, recoveryCode: string): Promise<{
        token: string;
    }>;
    removeMfa(locale: string, userId: number, mfaId: number, data: {
        token?: string;
        hash?: string;
        verificationType?: 'totp' | 'email' | 'recovery' | 'webauthn';
        assertionResponse?: any;
    }): Promise<{
        token: string;
    }>;
    checkMfaBeforeAdd(locale: string, userId: number): Promise<{
        requiresVerification: boolean;
        availableMethods?: undefined;
        hasWebAuthn?: undefined;
        hasRecoveryCodes?: undefined;
        verificationType?: undefined;
    } | {
        requiresVerification: boolean;
        availableMethods: ("email" | "totp")[];
        hasWebAuthn: boolean;
        hasRecoveryCodes: boolean;
        verificationType?: undefined;
    } | {
        requiresVerification: boolean;
        verificationType: "email" | "totp";
        hasWebAuthn: boolean;
        hasRecoveryCodes: boolean;
        availableMethods?: undefined;
    }>;
    checkMfaBeforeRemove(locale: string, userId: number): Promise<{
        requiresVerification: boolean;
        availableMethods: ("email" | "totp")[];
        hasWebAuthn: boolean;
        hasRecoveryCodes: boolean;
    }>;
    verifyBeforeAddMfa(locale: string, userId: number, data: {
        verificationCode?: string;
        hash?: string;
        verificationType: 'totp' | 'email' | 'recovery' | 'webauthn';
        assertionResponse?: any;
    }): Promise<{
        success: boolean;
    }>;
    sendRecoveryCodesVerification(locale: string, userId: number): Promise<{
        requiresVerification: boolean;
        availableMethods?: undefined;
        hasWebAuthn?: undefined;
        hasRecoveryCodes?: undefined;
        verificationType?: undefined;
    } | {
        requiresVerification: boolean;
        availableMethods: ("email" | "totp")[];
        hasWebAuthn: boolean;
        hasRecoveryCodes: boolean;
        verificationType?: undefined;
    } | {
        requiresVerification: boolean;
        verificationType: "email" | "totp";
        hasWebAuthn: boolean;
        hasRecoveryCodes: boolean;
        availableMethods?: undefined;
    }>;
    regenerateRecoveryCodes(locale: string, userId: number, data: {
        verificationCode?: string;
        hash?: string;
        verificationType?: 'totp' | 'email' | 'recovery' | 'webauthn';
        assertionResponse?: any;
    }): Promise<{
        codes: string[];
    }>;
    generateWebAuthnRegistrationOptions(locale: string, userId: number, name: string): Promise<import("@simplewebauthn/server").PublicKeyCredentialCreationOptionsJSON>;
    verifyWebAuthnRegistration(locale: string, userId: number, name: string, attestationResponse: any): Promise<{
        success: boolean;
        codes: string[];
    }>;
    generateWebAuthnAuthenticationOptions(locale: string, userId: number): Promise<import("@simplewebauthn/server").PublicKeyCredentialRequestOptionsJSON>;
    verifyWebAuthnAuthentication(userId: number, assertionResponse: any): Promise<{
        success: boolean;
    }>;
    removeWebAuthnMfa(locale: string, userId: number, mfaId: number): Promise<{
        success: boolean;
    }>;
    generateWebAuthnAuthenticationOptionsForLogin(locale: string, mfaToken: string): Promise<import("@simplewebauthn/server").PublicKeyCredentialRequestOptionsJSON>;
    verifyWebAuthnAuthenticationForLogin(locale: string, mfaToken: string, assertionResponse: any): Promise<{
        accessToken: string;
        refreshToken: string;
    }>;
    getUserToken(userId: number): Promise<{
        token: string;
    }>;
}
//# sourceMappingURL=profile.service.d.ts.map