import { OnModuleInit } from '@nestjs/common';
import { JwtService } from '@nestjs/jwt';
import { AppConfigService } from '../config/app-config.service';
export interface ActiveSession {
    userId: string;
    login: string;
    name: string;
    role: string;
    ip: string;
    loginAt: string;
    lastSeen: string;
    ua: string;
}
export declare class AuthService implements OnModuleInit {
    private readonly jwt;
    private readonly appCfg;
    private readonly logger;
    private readonly sessions;
    private readonly ipScores;
    private readonly ipBans;
    constructor(jwt: JwtService, appCfg: AppConfigService);
    onModuleInit(): void;
    login(loginOrEmail: string, password: string, ip: string, ua: string): Promise<{
        token: any;
        user: {
            id: string;
            login: string;
            name: string;
            role: string;
            dept: string;
            ext: string;
            sipExt: string;
        };
    }>;
    logout(jti: string, userId: string, login: string, ip: string): Promise<void>;
    touchSession(jti: string): void;
    getMe(userId: string): any;
    getOnline(): ActiveSession[];
    forgotPassword(email: string, baseUrl: string, ip: string): Promise<any>;
    resetPassword(token: string, password: string, ip: string): Promise<void>;
    get sessionCount(): number;
    scoreIP(ip: string, pts: number): void;
    isBanned(ip: string): boolean;
    unban(ip: string): void;
    getBannedIPs(): {
        ip: string;
        until: string;
    }[];
    private get dataDir();
    private readJson;
    private writeJson;
    private readUsers;
    private writeUsers;
    private readResets;
    private writeResets;
    private audit;
    private sendEmail;
    private cleanupSessions;
    private ensureDefaultUsers;
}
