import { CookieOptions as ExpressCookieOptions } from 'express';
import { NestAuthUser } from '../../user/entities/user.entity';
import { SessionDataPayload, SessionPayload, JWTTokenPayload } from './token-payload.interface';
export declare enum SessionStorageType {
    REDIS = "redis",
    DATABASE = "database",
    MEMORY = "memory"
}
export interface RedisSessionOptions {
    url?: string;
    host?: string;
    port?: number;
    password?: string;
    db?: number;
    tls?: Record<string, any>;
    keyPrefix?: string;
    ttlSeconds?: number;
    enableOfflineQueue?: boolean;
    retryStrategy?: (times: number) => number | null;
    reconnectOnError?: (error: Error) => boolean | number;
    maxRetriesPerRequest?: number | null;
}
export interface SessionOptions {
    storageType?: SessionStorageType;
    redisUrl?: string;
    redis?: RedisSessionOptions;
    sessionExpiry?: number | string;
    refreshTokenExpiry?: number | string;
    maxSessionsPerUser?: number;
    slidingExpiration?: boolean;
    customizeSessionData?: (defaultData: SessionDataPayload, user: NestAuthUser) => Promise<SessionDataPayload> | SessionDataPayload;
    customizeTokenPayload?: (defaultPayload: JWTTokenPayload, session: SessionPayload) => Promise<JWTTokenPayload> | JWTTokenPayload;
    onCreated?: (session: SessionPayload, user: any) => Promise<void> | void;
    onRefreshed?: (oldSession: SessionPayload, newSession: SessionPayload) => Promise<void> | void;
    onRevoked?: (session: SessionPayload, reason: 'logout' | 'expired' | 'admin' | 'security' | 'password_change') => Promise<void> | void;
}
export type CookieOptions = Omit<ExpressCookieOptions, 'maxAge'>;
//# sourceMappingURL=session-options.interface.d.ts.map