export interface Protocol { } export interface ApiResponse extends Protocol { errorDescription?: string; errorStack?: string; message?: string; status?: number; statusName?: string; } export interface ApiRequest extends Protocol { } export declare type STATUS_CODE_TYPE = number; export declare enum STATUS_CODE_BASE { SUCCESS = 0, UNKNOWN_ERROR = 1, NO_RESPONSE = 2, NOT_IMPLEMENT = 3, INVALID_INPUT = 4, DATA_NOT_EXISTS = 5, LOGIN_REQUIRED = 6, HTTP_ERROR = 7, } export interface ErrorMap { [id: string]: number; } export declare function registerStatusCodeSubClass(map: object): void; export declare type ErrorDescriber = (code: string, err?: Error) => string; export declare type ExceptionDescriber = (code: string, stack: string, err?: Error) => string | void; export declare function getErrorMessage(code: STATUS_CODE_BASE, error?: Error): string; export declare function registerErrorDescriber(fn: ErrorDescriber): void; export declare function registerExceptionDescriber(fn: ExceptionDescriber): void;