import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; import { CustomResponse, CrudSorting, CrudFilters, BaseRecord, HttpError, MetaDataQuery, SuccessErrorNotification } from "../../interfaces"; interface UseCustomConfig { sort?: CrudSorting; filters?: CrudFilters; query?: TQuery; payload?: TPayload; headers?: {}; } export declare type UseCustomProps = { /** * request's URL */ url: string; /** * request's method (`GET`, `POST`, etc.) */ method: "get" | "delete" | "head" | "options" | "post" | "put" | "patch"; /** * The config of your request. You can send headers, payload, query, filters and sort using this field */ config?: UseCustomConfig; /** * react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options" */ queryOptions?: UseQueryOptions, TError>; /** * Metadata query for `dataProvider` */ metaData?: MetaDataQuery; /** * If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use. */ dataProviderName?: string; } & SuccessErrorNotification; /** * `useCustom` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for custom requests. * * It uses the `custom` method from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/core/hooks/data/useCustom} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`} * @typeParam TQuery - Values for query params * @typeParam TPayload - Values for params * */ export declare const useCustom: ({ url, method, config, queryOptions, successNotification, errorNotification, metaData, dataProviderName, }: UseCustomProps) => QueryObserverResult, TError>; export {}; //# sourceMappingURL=useCustom.d.ts.map