Interface ApisauceInstance

interface ApisauceInstance {
    addAsyncRequestTransform: (transform: AsyncRequestTransform) => void;
    addAsyncResponseTransform: (transform: AsyncResponseTransform) => void;
    addMonitor: (
        monitor: (response: ApiResponse<unknown, unknown>) => void,
    ) => void;
    addRequestTransform: (transform: RequestTransform) => void;
    addResponseTransform: (transform: ResponseTransform) => void;
    any: <T, U = T>(config: AxiosRequestConfig) => Promise<ApiResponse<T, U>>;
    asyncRequestTransforms: AsyncRequestTransform[];
    asyncResponseTransforms: AsyncResponseTransform[];
    axiosInstance: AxiosInstance | AxiosCacheInstance;
    delete: <T, U = T>(
        url: string,
        params?: object,
        axiosConfig?: AxiosRequestConfig,
    ) => Promise<ApiResponse<T, U>>;
    deleteHeader: (name: string) => AxiosInstance;
    get: <T, U = T>(
        url: string,
        params?: object,
        axiosConfig?: AxiosRequestConfig,
    ) => Promise<ApiResponse<T, U>>;
    getBaseURL: () => string;
    headers: Record<string, AxiosHeaderValue>;
    monitors: (response: ApiResponse<unknown, unknown>) => void[];
    patch: <T, U = T>(
        url: string,
        data?: object,
        axiosConfig?: AxiosRequestConfig,
    ) => Promise<ApiResponse<T, U>>;
    post: <T, U = T>(
        url: string,
        data?: object,
        axiosConfig?: AxiosRequestConfig,
    ) => Promise<ApiResponse<T, U>>;
    put: <T, U = T>(
        url: string,
        data?: object,
        axiosConfig?: AxiosRequestConfig,
    ) => Promise<ApiResponse<T, U>>;
    requestTransforms: RequestTransform[];
    responseTransforms: ResponseTransform[];
    setBaseURL: (baseUrl: string) => AxiosInstance;
    setHeader: (key: string, value: string) => AxiosInstance;
    setHeaders: (headers: Record<string, string>) => AxiosInstance;
}

Properties

addAsyncRequestTransform: (transform: AsyncRequestTransform) => void
addAsyncResponseTransform: (transform: AsyncResponseTransform) => void
addMonitor: (monitor: (response: ApiResponse<unknown, unknown>) => void) => void
addRequestTransform: (transform: RequestTransform) => void
addResponseTransform: (transform: ResponseTransform) => void
any: <T, U = T>(config: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
asyncRequestTransforms: AsyncRequestTransform[]
asyncResponseTransforms: AsyncResponseTransform[]
axiosInstance: AxiosInstance | AxiosCacheInstance
delete: <T, U = T>(
    url: string,
    params?: object,
    axiosConfig?: AxiosRequestConfig,
) => Promise<ApiResponse<T, U>>
deleteHeader: (name: string) => AxiosInstance
get: <T, U = T>(
    url: string,
    params?: object,
    axiosConfig?: AxiosRequestConfig,
) => Promise<ApiResponse<T, U>>
getBaseURL: () => string
headers: Record<string, AxiosHeaderValue>
monitors: (response: ApiResponse<unknown, unknown>) => void[]
patch: <T, U = T>(
    url: string,
    data?: object,
    axiosConfig?: AxiosRequestConfig,
) => Promise<ApiResponse<T, U>>
post: <T, U = T>(
    url: string,
    data?: object,
    axiosConfig?: AxiosRequestConfig,
) => Promise<ApiResponse<T, U>>
put: <T, U = T>(
    url: string,
    data?: object,
    axiosConfig?: AxiosRequestConfig,
) => Promise<ApiResponse<T, U>>
requestTransforms: RequestTransform[]
responseTransforms: ResponseTransform[]
setBaseURL: (baseUrl: string) => AxiosInstance
setHeader: (key: string, value: string) => AxiosInstance
setHeaders: (headers: Record<string, string>) => AxiosInstance