UNPKG

@refinedev/core

Version:

Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.

18 lines 1.07 kB
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query"; import type { AuthActionResponse } from "../../../contexts/auth/types"; import type { RefineError } from "../../../contexts/data/types"; export type UseLoginProps<TVariables> = { mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, TVariables, unknown>, "mutationFn">; }; export type UseLoginReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, TVariables, unknown>; /** * `useLogin` calls `login` method from {@link https://refine.dev/docs/api-reference/core/providers/auth-provider `authProvider`} under the hood. * * @see {@link https://refine.dev/docs/api-reference/core/hooks/auth/useLogin} for more details. * * @typeParam TData - Result data of the query * @typeParam TVariables - Values for mutation function. default `{}` * */ export declare function useLogin<TVariables = {}>({ mutationOptions, }?: UseLoginProps<TVariables>): UseLoginReturnType<TVariables>; //# sourceMappingURL=index.d.ts.map