import { UseMutationResult, UseMutationOptions } from "@tanstack/react-query"; import { DeleteOneResponse, MutationMode, PrevContext as DeleteContext, BaseRecord, BaseKey, HttpError, SuccessErrorNotification, MetaDataQuery, IQueryKeys } from "../../interfaces"; export declare type DeleteParams = { id: BaseKey; resource: string; mutationMode?: MutationMode; undoableTimeout?: number; onCancel?: (cancelMutation: () => void) => void; metaData?: MetaDataQuery; dataProviderName?: string; invalidates?: Array; values?: TVariables; } & SuccessErrorNotification; export declare type UseDeleteReturnType = UseMutationResult, TError, DeleteParams, DeleteContext>; export declare type UseDeleteProps = { mutationOptions?: Omit, TError, DeleteParams, DeleteContext>, "mutationFn" | "onError" | "onSuccess" | "onSettled" | "onMutate">; }; /** * `useDelete` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for delete mutations. * * It uses `deleteOne` method as mutation function from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/api-references/hooks/data/useDelete} 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 params. default `{}` * */ export declare const useDelete: ({ mutationOptions, }?: UseDeleteProps) => UseDeleteReturnType; //# sourceMappingURL=useDelete.d.ts.map