import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
import { PrismaService } from '@hed-hog/api-prisma';
import { HttpService } from '@nestjs/axios';
import { SecurityService } from '../security/security.service';
import { SettingService } from '../setting/setting.service';
import { TokenService } from '../token/token.service';
import { UserService } from '../user/user.service';
export declare class SessionService {
    private prisma;
    private security;
    private readonly setting;
    private readonly token;
    private readonly http;
    private readonly user;
    private readonly paginationService;
    private readonly logger;
    constructor(prisma: PrismaService, security: SecurityService, setting: SettingService, token: TokenService, http: HttpService, user: UserService, paginationService: PaginationService);
    create(locale: string, userId: number, ipAddress: string, userAgent: string): Promise<{
        token: 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;
        };
    }>;
    refresh(locale: string, refreshToken: string, ipAddress: string, userAgent: string): Promise<{
        token: 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;
        };
    }>;
    deleteRefreshTokenCookie(res: any, refreshToken: string): Promise<{
        count: number;
        userId: number;
    }>;
    getUserSessions(paginationParams: PaginationDTO, userId: number, locale: string): Promise<{
        data: any[];
        total: any;
        lastPage: number;
        page: number;
        pageSize: number;
    }>;
    getUserSessionsActive(paginationParams: PaginationDTO, userId: number, locale: string): Promise<{
        data: any[];
        total: any;
        lastPage: number;
        page: number;
        pageSize: number;
    }>;
    private fetchGeoByIp;
    private markRevokedByFilter;
    revokeAllOtherSessions(userId: number, sessionId: number): Promise<import("@prisma/client").Prisma.BatchPayload>;
    revokeAllSessions(userId: number): Promise<import("@prisma/client").Prisma.BatchPayload>;
    revokeUserSession(userId: number, sessionId: number, locale: string): Promise<{
        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;
    }>;
    /**
     * Enforce maximum concurrent sessions limit for a user.
     * If the limit is reached, expires the oldest sessions to make room for new ones.
     *
     * @param userId - The user ID to check
     * @param maxSessions - Maximum number of concurrent sessions allowed
     * @param isRotation - When true, the calling flow is replacing an existing session (refresh),
     *   not adding a new one, so no extra slot needs to be freed.
     */
    private enforceSessionLimit;
}
//# sourceMappingURL=session.service.d.ts.map