ci-validation
Version:
🇺🇾 Complete TypeScript/JavaScript library for validating Uruguayan CI (Cédula de Identidad) with official algorithm and government service integration
55 lines • 1.55 kB
TypeScript
import { ISessionStorage, SessionData, SessionStorageOptions } from "../interfaces/ISessionStorage";
/**
* File-based session storage implementation
* Stores sessions as JSON files in the filesystem
*/
export declare class FileSessionStorage implements ISessionStorage {
private readonly sessionDir;
private readonly expirationTime;
private readonly autoCleanup;
private cleanupTimer?;
constructor(options?: SessionStorageOptions & {
sessionDir?: string;
});
/**
* Ensures the session directory exists
*/
private ensureSessionDirectory;
/**
* Gets the file path for a session
*/
private getSessionFilePath;
/**
* Save session data to file
*/
saveSession(sessionId: string, sessionData: SessionData): Promise<void>;
/**
* Load session data from file
*/
loadSession(sessionId: string): Promise<SessionData | null>;
/**
* Delete session file
*/
deleteSession(sessionId: string): Promise<void>;
/**
* Check if session file exists
*/
sessionExists(sessionId: string): Promise<boolean>;
/**
* Update session's last used timestamp
*/
touchSession(sessionId: string): Promise<void>;
/**
* Load session data without updating last used timestamp
*/
private loadSessionRaw;
/**
* Clean up expired session files
*/
cleanupExpiredSessions(): Promise<void>;
/**
* Cleanup resources
*/
destroy(): void;
}
//# sourceMappingURL=FileSessionStorage.d.ts.map