import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; import { BaseParamType, Route } from "../types/route"; import { CatchFunction } from "../types/catchFunction"; import { ResponseHandleFunction } from "../types/responseHandleFunction"; export declare type WithPayloadHTTPMethods = "post" | "put" | "patch"; export declare const withPayloadRequestMethods: Record; export interface WithPayloadRequestFactoryProps { catchFunction?: CatchFunction; responseHandleFunction?: ResponseHandleFunction; axios: AxiosInstance; prefix: string; method: WithPayloadHTTPMethods; } /** * Util Method For Sending HTTP Requests * @param axios - Axios Instance * @param prefix - Request Route Prefix * @param method - HTTP Method with Payload * @returns - Request Function of selected method with route: "prefix/route" */ export declare const withPayloadRequest: ({ axios, prefix, method, catchFunction, responseHandleFunction, }: WithPayloadRequestFactoryProps) => (route?: Route | undefined, key?: string | undefined, config?: AxiosRequestConfig | undefined) => (data: PayloadType) => Promise>; /** * Util Method For Sending HTTP Requests * @param axios - Axios Instance * @param prefix - Request Route Prefix * @param method - HTTP Method with Payload * @returns - Request Function of selected method with route: "prefix/route" */ export declare const withPayloadRequestByParam: ({ axios, prefix, method, catchFunction, responseHandleFunction, }: WithPayloadRequestFactoryProps) => (route?: Route | undefined, key?: string | undefined, config?: AxiosRequestConfig | undefined) => (param: ParamType, data: PayloadType) => Promise>;