-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
29 lines (29 loc) · 1.05 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { SessionData, Store } from 'express-session';
import { Ottoman, Schema } from 'ottoman';
interface OttomanStoreOptions {
client: Ottoman;
sessionSchema?: Schema;
scopeName?: string;
collectionName?: string;
modelName?: string;
maxExpiry?: number;
prefix?: string;
}
declare class OttomanStore extends Store {
client: Ottoman;
sessionSchema: Schema | undefined;
scopeName: string;
collectionName: string;
modelName: string;
maxExpiry: number;
prefix: string;
SessionModel?: any;
constructor(options: OttomanStoreOptions);
get(sid: string, callback: (err: any, session?: SessionData | null) => void): Promise<void>;
set(sid: string, session: SessionData, callback?: (err?: any) => void): Promise<void>;
destroy(sid: string, callback?: (err?: any) => void): Promise<void>;
touch(sid: string, session: SessionData, callback?: () => void): Promise<void>;
clear(callback?: (err?: any) => void): Promise<void>;
}
export declare const SessionSchema: Schema;
export default OttomanStore;