UNPKG

@awhere/api

Version:

The awesome aWhere API for JavaScript.

43 lines (42 loc) 1.39 kB
interface IStoredOAuth { ssoId: string; appId: string; aWhereUrl: string; scope: string[]; signedIn: boolean; popup: boolean; callbackUrl?: string; popupCallbackUrl?: string; locale?: string; codeVerifier?: string; accessToken?: string; refreshToken?: string; expirationDate?: number; codeChallengeMethod?: string; state?: string; toBeSignedIn?: boolean; remember?: boolean; } export declare const storage: { cookie: { getItem(key: string): Promise<any>; setItem(key: string, value: any, expires?: number): Promise<void>; remove(key: string): Promise<void>; }; local: { getItem(key: string): Promise<any>; setItem(key: string, value: any): Promise<void>; remove(key: string): Promise<any>; }; session: { getItem(key: string): Promise<any>; setItem(key: string, value: any): Promise<void>; remove(key: string): Promise<any>; }; }; export declare const setState: (state: string, value: IStoredOAuth) => Promise<void>; export declare const getState: (state: string) => Promise<IStoredOAuth | void>; export declare const setOAuth: (props: IStoredOAuth) => Promise<void>; export declare const getOAuth: (ssoId: string) => Promise<IStoredOAuth | void>; export declare const removeOAuth: (ssoId: string) => Promise<void>; export {};