import type { BlackoutError } from '../../types/index.js'; import type { DefaultErrorAdapterData, LegacyErrorAdapterData } from './types/index.js'; export declare const defaultError: { code: string; message: string; }; /** * Method responsible for adapting the request error to fit the application error * format. * * @param data - Error data. * @param status - The request status code. * * @returns Error in a new format to apply to the application. */ export declare const legacyErrorAdapter: ({ errorMessage, errorCode, ...rest }: LegacyErrorAdapterData, status: number) => { code: string; } & Record; /** * Method responsible for adapting the FO type request error to fit the application * error format. * * @param data - Error data. * @param status - The request status code. * * @returns Error in a new format to apply to the application. */ export declare const defaultErrorAdapter: ({ message, code, developerMessage, ...rest }: DefaultErrorAdapterData, status: number) => { code: string; } & Record; /** * Method responsible for adapting error thrown either it was thrown by the API or * by Axios to fit the application error format. * * @param error - Error thrown. * * @returns Error adapted. */ export declare const adaptError: (error: unknown) => BlackoutError; /** * Check and cast Error to BlackoutError if it is type. * * @param error - error data. * @returns Error typed as BlackoutError */ export declare const isBlackoutErrorType: (error: unknown) => error is BlackoutError; /** * Method responsible for cast any error to known Error type. * * @param error - Error ocurred. * @returns casted error to known error type. */ export declare const toBlackoutError: (error: unknown) => BlackoutError;