export declare type UseDisconnectConfig = { /** Function to invoke when an error is thrown while connecting. */ onError?: (error: Error, context: unknown) => void | Promise; /** * Function fires before mutation function and is passed same variables mutation function would receive. * Value returned from this function will be passed to both onError and onSettled functions in event of a mutation failure. */ onMutate?: () => unknown; /** Function to invoke when connect is settled (either successfully connected, or an error has thrown). */ onSettled?: (error: Error | null, context: unknown) => void | Promise; /** Function fires when mutation is successful and will be passed the mutation's result */ onSuccess?: (context: unknown) => void | Promise; }; export declare const mutationKey: { entity: string; }[]; export declare function useDisconnect({ onError, onMutate, onSettled, onSuccess, }?: UseDisconnectConfig): { readonly disconnect: import("react-query").UseMutateFunction; readonly disconnectAsync: import("react-query").UseMutateAsyncFunction; readonly error: Error | null; readonly isError: boolean; readonly isIdle: boolean; readonly isLoading: boolean; readonly isSuccess: boolean; readonly reset: () => void; readonly status: "error" | "loading" | "success" | "idle"; };