import { MutationKey, UseMutationOptions } from '@tanstack/react-query'; import { BetterFetchError } from 'better-auth/client'; import { AuthMutationFn, AuthMutationFnData, AuthMutationFnVariables } from '../mutations/auth-mutation-options'; type UseAuthMutationOptions = Omit, BetterFetchError, AuthMutationFnVariables>, "mutationKey" | "mutationFn">; /** * Escape-hatch hook for Better Auth write endpoints that don't have a * purpose-built mutation hook in this library yet. Thin wrapper over * `useMutation` and `authMutationOptions`. * * @param authFn - Better Auth client method (e.g. `authClient.emailOtp.sendVerificationOtp`). * @param mutationKey - Stable key for the mutation. Prefer an entry from * `authMutationKeys` over an inline tuple so `useIsMutating` and global * `MutationCache` observers line up. * @param options - React Query options forwarded to `useMutation`. */ export declare function useAuthMutation(authFn: TFn, mutationKey: TMutationKey, options?: UseAuthMutationOptions): import('@tanstack/react-query').UseMutationResult>, BetterFetchError, AuthMutationFnVariables, unknown>; export {};