import { isDestroyed, isNew, isTouched } from "./symbol"; export declare type SessionRecord = Record; export declare type SessionData = { cookie: Cookie; } & T; export declare type Session = { id: string; touch(): void; commit(): Promise; destroy(): Promise; [isNew]?: boolean; [isTouched]?: boolean; [isDestroyed]?: boolean; } & SessionData; declare type Cookie = { httpOnly: boolean; path: string; domain?: string | undefined; secure: boolean; sameSite?: boolean | "lax" | "strict" | "none"; } & ({ maxAge?: undefined; expires?: undefined; } | { maxAge: number; expires: Date; }); export interface SessionStore { get(sid: string): Promise; set(sid: string, sess: SessionData): Promise; destroy(sid: string): Promise; touch?(sid: string, sess: SessionData): Promise; } export interface Options { name?: string; store?: SessionStore; genid?: () => string; encode?: (rawSid: string) => string; decode?: (encryptedSid: string) => string | null; touchAfter?: number; cookie?: Partial>; autoCommit?: boolean; } export {};