import type { Request, Response } from 'express';
import { type HostedDemoAuthSessionStore, type HostedDemoAuthStoreValue } from './HostedDemoAuthSessionStore';
type HostedDemoAuthSessionValue = HostedDemoAuthStoreValue;
/**
 * Stores browser-scoped auth state for hosted demo mode.
 */
export declare class HostedDemoAuthSessionService {
    private readonly authBySessionId;
    private readonly cleanupTimer;
    private readonly store;
    private readonly now;
    constructor(options?: {
        store?: HostedDemoAuthSessionStore;
        now?: () => number;
    });
    initialize(): Promise<void>;
    private getCookieSessionId;
    private setCookieSessionId;
    getOrCreateSessionId(req: Request, res: Response): string;
    getAuthForRequest(req: Request): HostedDemoAuthSessionValue | null;
    getAuthForSessionId(sessionId: string): HostedDemoAuthSessionValue | null;
    storeAuthForRequest(req: Request, res: Response, auth: {
        token: string;
        email: string;
        refreshToken?: string;
        userId?: string;
    }): string;
    storeAuthForSessionId(sessionId: string, res: Response, auth: {
        token: string;
        email: string;
        refreshToken?: string;
        userId?: string;
    }): string;
    getActiveDemoSessionIdForRequest(req: Request): string | null;
    storeActiveDemoSessionIdForRequest(req: Request, res: Response, demoSessionId: string): void;
    storeActiveDemoSessionIdForSessionId(sessionId: string, res: Response, demoSessionId: string): void;
    clearActiveDemoSessionIdForRequest(req: Request, res: Response): void;
    clearActiveDemoSessionIdForSessionId(sessionId: string, res: Response): void;
    /**
     * Fully clears the browser-scoped auth for this request (logout): drops the
     * in-memory + persisted record and expires the session cookie so the next
     * /api/config read sees an unauthenticated session.
     */
    clearAuthForRequest(req: Request, res: Response): void;
    shutdown(): void;
    private cleanupExpiredSessions;
    private persist;
}
export {};
//# sourceMappingURL=HostedDemoAuthSessionService.d.ts.map