import { QueryClient } from '@tanstack/react-query'; import { BetterFetchError } from 'better-auth/react'; import { UsernameAuthClient } from '../../lib/auth-client'; export type SignInUsernameParams = Parameters[0]; export type SignInUsernameOptions = Omit>, "mutationKey" | "mutationFn" | "meta">; /** * Mutation options factory for username/password sign-in. * * @param authClient - The Better Auth client. */ export declare function signInUsernameOptions(authClient: TAuthClient): import('@tanstack/query-core').WithRequired & { user: import('better-auth').StripEmptyObjects<{ id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & {} & { username?: string | null | undefined; displayUsername?: string | null | undefined; }>; }, BetterFetchError, SignInUsernameParams, unknown>, "mutationKey">; /** * Create a mutation for username/password sign-in. * * On success, `MutationInvalidator` awaits invalidation of the session * query so the new session is refetched (see `meta.awaits`). * * @param authClient - The Better Auth client with the username plugin. * @param options - React Query options forwarded to `useMutation`. */ export declare function useSignInUsername(authClient: TAuthClient, options?: SignInUsernameOptions, queryClient?: QueryClient): import('@tanstack/react-query').UseMutationResult & { user: import('better-auth').StripEmptyObjects<{ id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & {} & { username?: string | null | undefined; displayUsername?: string | null | undefined; }>; }, BetterFetchError, SignInUsernameParams, unknown>;