import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query"; import { CreateResponse, BaseRecord, HttpError, SuccessErrorNotification, MetaDataQuery } from "../../interfaces"; interface UseCustomMutationConfig { headers?: {}; } declare type useCustomMutationParams = { url: string; method: "post" | "put" | "patch" | "delete"; values: TVariables; metaData?: MetaDataQuery; dataProviderName?: string; config?: UseCustomMutationConfig; } & SuccessErrorNotification; export declare type UseCustomMutationReturnType = UseMutationResult, TError, useCustomMutationParams, unknown>; export declare type UseCustomMutationProps = { mutationOptions?: Omit, TError, useCustomMutationParams, unknown>, "mutationFn" | "onError" | "onSuccess">; }; /** * `useCustomMutation` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for create mutations. * * It uses the `custom` method from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/api-references/hooks/data/useCustomMutation} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`} * @typeParam TVariables - Values for mutation function * */ export declare const useCustomMutation: ({ mutationOptions, }?: UseCustomMutationProps) => UseCustomMutationReturnType; export {}; //# sourceMappingURL=useCustomMutation.d.ts.map