import { Redis } from 'ioredis'; import { MapSession } from './map-session.js'; import { SessionRepository, Session, Namespace, KVRepository } from './types.js'; import '../core/index.js'; declare class RedisSession implements Session { private readonly cached; isNew: boolean; delta: Map; originalSessionId: string; originalPrincipalName: string | null; originalLastAccessTime: number | null; constructor(cached: MapSession, isNew: boolean); getSessionAttrNameKey(name: string): string; setLastAccessedTime(lastAccessedTime: number): void; isExpired(): boolean; getCreationTime(): number; getId(): string; changeSessionId(): `${string}-${string}-${string}-${string}-${string}`; getLastAccessedTime(): number; setMaxInactiveInterval(interval: number): void; getMaxInactiveInterval(): number; getAttribute(name: string): string | number | null; getAttributeNames(): string[]; setAttribute(name: string, value: string): void; removeAttribute(name: string): void; } declare class RedisIndexedSessionRepository implements SessionRepository { private readonly redis; private readonly namespace; private readonly expirationStore; private defaultMaxInactiveInterval; constructor(redis: Redis, namespace?: Namespace); setDefaultMaxInactiveInterval(interval: number): void; private getSessionKey; private getExpiredKey; private getSessionAttrNameKey; private getPrincipalKey; private getSession; private saveDelta; private saveChangeSessionId; createSession(): RedisSession; save(session: RedisSession): Promise; findById(sessionId: string): Promise; deleteById(sessionId: string): Promise; findByIndexNameAndIndexValue(indexName: string, indexValue: string): Promise>; findByPrincipalName(principalName: string): Promise>; cleanupExpiredSessions(cleanupCount?: number): Promise; } declare class RedisKVRepository implements KVRepository { private readonly redis; constructor(redis: Redis); setItem(key: string, value: string, expiresIn?: number): Promise; getItem(key: string): Promise; removeItem(key: string): Promise; } export { RedisIndexedSessionRepository, RedisKVRepository };