/**
 * Session Configuration Middleware
 * Standardized session management for Express applications
 */
import session from "express-session";
import { Express } from "express";
export interface SessionConfig {
    secret?: string;
    name?: string;
    maxAge?: number;
    secure?: boolean;
    sameSite?: "lax" | "strict" | "none";
    trustProxy?: boolean;
    resave?: boolean;
    saveUninitialized?: boolean;
    rolling?: boolean;
    store?: "memory" | session.Store;
}
/**
 * Configure session middleware with sensible defaults
 */
export declare function configureSession(app: Express, config?: SessionConfig): void;
/**
 * Create a Redis session store (OPTIONAL)
 *
 * Redis is an optional dependency for persistent session storage in production.
 * If Redis packages are not installed, the framework gracefully falls back to memory store.
 *
 * To enable Redis sessions:
 * 1. Install optional dependencies: `npm install connect-redis redis`
 * 2. Set REDIS_URL environment variable (optional, defaults to redis://localhost:6379)
 * 3. Use createRedisStore() in your session configuration
 *
 * For desktop applications with single users, memory store is usually sufficient.
 *
 * @param redisUrl - Optional Redis connection URL (defaults to REDIS_URL env var or redis://localhost:6379)
 * @returns Redis store instance or 'memory' string on failure
 */
export declare function createRedisStore(redisUrl?: string): Promise<any>;
/**
 * Session utilities
 */
export declare const sessionUtils: {
    /**
     * Regenerate session ID (for security after login)
     */
    regenerateSession(req: any): Promise<void>;
    /**
     * Save session explicitly
     */
    saveSession(req: any): Promise<void>;
    /**
     * Destroy session
     */
    destroySession(req: any): Promise<void>;
    /**
     * Touch session to extend expiry
     */
    touchSession(req: any): void;
};
declare const _default: {
    configureSession: typeof configureSession;
    createRedisStore: typeof createRedisStore;
    sessionUtils: {
        /**
         * Regenerate session ID (for security after login)
         */
        regenerateSession(req: any): Promise<void>;
        /**
         * Save session explicitly
         */
        saveSession(req: any): Promise<void>;
        /**
         * Destroy session
         */
        destroySession(req: any): Promise<void>;
        /**
         * Touch session to extend expiry
         */
        touchSession(req: any): void;
    };
};
export default _default;
//# sourceMappingURL=session.d.ts.map