///
import type { ServerResponse, IncomingMessage } from 'http';
import type { JSONValue } from './utils';
import { CreateContext } from '.';
export declare type SessionStrategy = {
start: (args: {
res: ServerResponse;
data: StoredSessionData | StartSessionData;
createContext: CreateContext;
}) => Promise;
end: (args: {
req: IncomingMessage;
res: ServerResponse;
createContext: CreateContext;
}) => Promise;
get: (args: {
req: IncomingMessage;
createContext: CreateContext;
}) => Promise;
};
export declare type SessionStore = {
connect?: () => Promise;
disconnect?: () => Promise;
get(key: string): undefined | JSONValue | Promise;
set(key: string, value: JSONValue): any | Promise;
delete(key: string): void | boolean | Promise;
};
export declare type SessionStoreFunction = (args: {
/**
* The number of seconds that a cookie session be valid for
*/
maxAge: number;
}) => SessionStore;