import { ExtendedError } from "../error"; import { HttpError } from "../shared/http.types"; import type { BillStatusNotificationBody } from "./p2p.types"; export type P2pApiErrorResponse = { serviceName: string; errorCode: string; description: string; userMessage: string; dateTime: string; traceId: string; }; /** * * * @export * @class P2pApiError * @extends {ExtendedError} */ export declare class P2pApiError extends ExtendedError { readonly response: P2pApiErrorResponse; readonly dateTime: Date; readonly serviceName: string; /** * Creates an instance of P2pApiError. * @param {P2pApiErrorResponse} response * @param {HttpError} [cause] * @memberof P2pApiError */ constructor(response: P2pApiErrorResponse, cause?: HttpError); } /** * * * @export * @class P2pAuthorizationError * @extends {ExtendedError} */ export declare class P2pAuthorizationError extends ExtendedError { /** * Creates an instance of P2pAuthorizationError. * @param {HttpError} [cause] * @memberof P2pAuthorizationError */ constructor(cause?: HttpError); } /** * * * @export * @class P2pBillNotificationError * @extends {ExtendedError} */ export declare class P2pBillNotificationError extends ExtendedError { notification: BillStatusNotificationBody; /** * Creates an instance of P2pBillNotificationError. * @memberof P2pBillNotificationError */ constructor(notification: BillStatusNotificationBody); } /** * * * @export * @param {HttpError} error * @return {*} */ export declare function mapHttpErrors(error: HttpError): P2pApiError | HttpError | P2pAuthorizationError;