export interface IAuthError extends Error { code: number; message: string; toString(): string; } export type ErrorCodes = { [key: number]: string; }; export declare abstract class AuthError extends Error implements IAuthError { code: number; message: string; constructor(code: number, message?: string); toJSON(): IAuthError; toString(): string; } export declare class InitializationError extends AuthError { protected static messages: ErrorCodes; constructor(code: number, message?: string); static fromCode(code: number, extraMessage?: string): AuthError; static invalidParams(extraMessage?: string): AuthError; static notInitialized(extraMessage?: string): AuthError; } /** * login errors */ export declare class LoginError extends AuthError { protected static messages: ErrorCodes; constructor(code: number, message?: string); static fromCode(code: number, extraMessage?: string): AuthError; static invalidLoginParams(extraMessage?: string): AuthError; static userNotLoggedIn(extraMessage?: string): AuthError; static popupClosed(extraMessage?: string): AuthError; static loginFailed(extraMessage?: string): AuthError; static popupBlocked(extraMessage?: string): AuthError; static mfaAlreadyEnabled(extraMessage?: string): AuthError; static mfaNotEnabled(extraMessage?: string): AuthError; }