import { MapSession } from './map-session.js'; import { SessionRepository } from './types.js'; import '../core/index.js'; interface SessionEntity { primaryId: string; sessionId: string; creationTime: number; lastAccessTime: number; maxInactiveInterval: number; expiryTime: number; attributes: Record; principalName?: string | null; } declare class DBSession extends MapSession { isNew: boolean; primaryId: string; constructor(cached: MapSession, isNew: boolean); } interface DBAdapter { save(session: SessionEntity): Promise; deleteById(sessionId: string): Promise; findById(sessionId: string): Promise; findByPrincipalName(principalName: string): Promise; cleanupExpiredSessions(cleanupCount?: number): Promise; } declare class DBIndexedSessionRepository implements SessionRepository { private defaultMaxInactiveInterval; private db; constructor(db: DBAdapter); setDefaultMaxInactiveInterval(interval: number): void; private mapSessionToEntity; private mapEntityToSession; private getSession; createSession(): DBSession; save(session: DBSession): Promise; findById(sessionId: string): Promise; deleteById(sessionId: string): Promise; findByIndexNameAndIndexValue(indexName: string, indexValue: string): Promise>; findByPrincipalName(principalName: string): Promise>; cleanupExpiredSessions(cleanupCount?: number): Promise; } export { type DBAdapter, DBIndexedSessionRepository };