import { AxiosError, AxiosResponse } from "axios"; import { Callout } from "./Callout.js"; export type ApiCalloutMiddleware = (apiInstance: T) => CalloutMiddleware; export type CalloutMiddleware

, T> = (params: CalloutMiddlewareParams) => any; export type CalloutMiddlewareParams = { response?: AxiosResponse; error?: AxiosError; params?: Array; chain: any; callout: Callout; }; export type CalloutState = { isLoading: boolean | undefined; message: string | null | undefined; }; export type CalloutMiddlewareConditions = { forHTTPCodes?: Array; excludeHTTPCodes?: Array; forServerCodes?: Array; excludeServerCodes?: Array; };