import { CustomError } from "ts-custom-error"; export interface IOpenloginError extends CustomError { code: number; message: string; toString(): string; } export type ErrorCodes = { [key: number]: string; }; export declare abstract class OpenloginError extends CustomError implements IOpenloginError { code: number; message: string; constructor(code: number, message?: string); toJSON(): IOpenloginError; toString(): string; } export declare class InitializationError extends OpenloginError { protected static messages: ErrorCodes; constructor(code: number, message?: string); static fromCode(code: number, extraMessage?: string): OpenloginError; static invalidParams(extraMessage?: string): OpenloginError; static notInitialized(extraMessage?: string): OpenloginError; } /** * login errors */ export declare class LoginError extends OpenloginError { protected static messages: ErrorCodes; constructor(code: number, message?: string); static fromCode(code: number, extraMessage?: string): OpenloginError; static invalidLoginParams(extraMessage?: string): OpenloginError; static userNotLoggedIn(extraMessage?: string): OpenloginError; static popupClosed(extraMessage?: string): OpenloginError; static loginFailed(extraMessage?: string): OpenloginError; static popupBlocked(extraMessage?: string): OpenloginError; static mfaAlreadyEnabled(extraMessage?: string): OpenloginError; static mfaNotEnabled(extraMessage?: string): OpenloginError; }