import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query"; import { CreateResponse, BaseRecord, HttpError, SuccessErrorNotification, MetaDataQuery, IQueryKeys } from "../../interfaces"; declare type useCreateParams = { /** * Resource name for API data interactions */ resource: string; /** * Values for mutation function */ values: TVariables; /** * Metadata query for `dataProvider` */ metaData?: MetaDataQuery; /** * If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use. */ dataProviderName?: string; /** * You can use it to manage the invalidations that will occur at the end of the mutation. */ invalidates?: Array; } & SuccessErrorNotification; export declare type UseCreateReturnType = UseMutationResult, TError, useCreateParams, unknown>; export declare type UseCreateProps = { mutationOptions?: Omit, TError, useCreateParams, unknown>, "mutationFn" | "onError" | "onSuccess">; }; /** * `useCreate` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for create mutations. * * It uses `create` method as mutation function from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/api-references/hooks/data/useCreate} 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 useCreate: ({ mutationOptions, }?: UseCreateProps) => UseCreateReturnType; export {}; //# sourceMappingURL=useCreate.d.ts.map