UNPKG

io.parrots

Version:

Parrots.io App

24 lines (23 loc) 847 B
export interface IUserSession { checkTimeout(): Promise<boolean>; /** * parameter 'body' for sending to http * return Response as result If status was 200 then checkTimeout will fire. * ## login and save sessionId into sessionStorage */ login(requestData: any): Promise<Response>; /** * ## logout and remove sessionId from localStorage/sessionStorage */ logout(): Promise<Response>; /** * ## get sessionId from sessionStorage if sessionId was undefined or null so get sessionId from localStorage * ## then return promise that resolve sesstionId that setDefaultHeader */ load(): Promise<string>; /** * ## save sessionId into localStorage and remove if sessionId was set into null or undefined or '' */ save(): Promise<string>; getSessionId(): string; }