import { ExtendedError } from "../error"; import { HttpError } from "../shared/http.types"; export type WalletApiErrorResponse = { serviceName: string; errorCode: string; description: string; userMessage: string; dateTime: string; traceId: string; }; /** * * * @export * @class WalletApiError * @extends {ExtendedError} */ export declare class WalletApiError extends ExtendedError { readonly response: WalletApiErrorResponse; readonly dateTime: Date; readonly serviceName: string; /** * Creates an instance of WalletApiError. * @param {WalletApiErrorResponse} response * @param {HttpError} [cause] * @memberof WalletApiError */ constructor(response: WalletApiErrorResponse, cause: HttpError); } export type WalletApiShortErrorResponse = { message: string; code: string; }; /** * * * @export * @class WalletApiShortError * @extends {ExtendedError} */ export declare class WalletApiShortError extends ExtendedError { readonly response: WalletApiShortErrorResponse; readonly code: string; /** * Creates an instance of WalletApiShortError. * @param {WalletApiShortErrorResponse} response * @param {HttpError} [cause] * @memberof WalletApiShortError */ constructor(response: WalletApiShortErrorResponse, cause?: HttpError); } /** * * * @export * @class WalletAuthorizationError * @extends {ExtendedError} */ export declare class WalletAuthorizationError extends ExtendedError { cause?: HttpError | undefined; /** * Creates an instance of WalletAuthorizationError. * @memberof WalletAuthorizationError */ constructor(cause?: HttpError | undefined); } /** * * * @export * @param {HttpError} error * @return {*} */ export declare function mapHttpErrors(error: HttpError): WalletApiError | HttpError | WalletApiShortError | WalletAuthorizationError;