saltfish
Version:
An interactive video-guided tour system for web applications
56 lines • 1.45 kB
TypeScript
/**
* Manager class for handling session and run identification
*
* This class is responsible for:
* - Managing persistent sessionId (30 minute expiry)
* - Generating unique runId for each playlist execution
* - Updating session activity timestamps
*/
export declare class SessionManager {
private sessionId;
private currentRunId;
constructor();
/**
* Gets or creates a persistent session ID
* @returns The current session ID
*/
private getOrCreateSession;
/**
* Updates the session activity timestamp
* @param sessionId - The session ID to update
*/
private updateSessionActivity;
/**
* Generates a unique ID using UUID v4 format
* @returns A unique ID string
*/
private generateUniqueId;
/**
* Gets the current session ID
* @returns The current session ID
*/
getSessionId(): string;
/**
* Starts a new run and returns the run ID
* @returns A new unique run ID
*/
startNewRun(): string;
/**
* Gets the current run ID
* @returns The current run ID or null if no run is active
*/
getCurrentRunId(): string | null;
/**
* Ends the current run
*/
endCurrentRun(): void;
/**
* Forces session expiry (for testing or manual logout)
*/
expireSession(): void;
/**
* Cleans up resources
*/
destroy(): void;
}
//# sourceMappingURL=SessionManager.d.ts.map