@cauca-911/core
Version:
Run `npm install @cauca-911/core` to add this library to your project
28 lines (27 loc) • 1.06 kB
TypeScript
import { LogLevel } from './log-level.enum';
import { RefreshToken } from './refresh-token';
export type LoginUrlFunction = () => string;
export type RefreshUrlFunction = () => string;
export type LogErrorFunction = (level: LogLevel, message: string, data: any) => void;
export type UpdateTokenFunction = (newToken: RefreshToken) => void;
export type HttpErrorFunction = (error: any, method: string, url: string) => void;
export declare class CoreModuleOptions {
logLevel: LogLevel;
apiUrl: string;
languages: string[];
autoLoadMaterialLocales: boolean;
refreshLoginURL: string | RefreshUrlFunction;
allowRefreshToken: boolean;
libraries: string[];
i18nPaths: string[];
locale: string;
jsonConfigFile: string;
nbRetryOnNetworkError: number;
contentSecurityPolicyActivated: boolean;
loginURL: string | LoginUrlFunction;
keepReturnUrlWhenRedirectingToLogin: boolean;
useLogoutService: boolean;
logError: LogErrorFunction;
updateToken: UpdateTokenFunction;
onHttpError: HttpErrorFunction;
}