UNPKG

@better-auth-ui/core

Version:

Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.

20 lines (19 loc) 1.09 kB
import { MutationOptions } from '@tanstack/query-core'; import { BetterFetchError } from 'better-auth/client'; import { AuthClient } from '../lib/auth-client'; export type UnlinkAccountParams<TAuthClient extends AuthClient> = Parameters<TAuthClient["unlinkAccount"]>[0]; type UnlinkAccountMutationOptions<TAuthClient extends AuthClient> = ReturnType<typeof unlinkAccountOptions<TAuthClient>>; export type UnlinkAccountOptions<TAuthClient extends AuthClient> = Omit<UnlinkAccountMutationOptions<TAuthClient>, "mutationKey" | "mutationFn" | "meta"> & { meta?: Record<string, unknown>; }; /** * Mutation options factory for unlinking a social provider from the current user. * * @param authClient - The Better Auth client. */ export declare function unlinkAccountOptions<TAuthClient extends AuthClient>(authClient: TAuthClient, userId?: string): MutationOptions<Awaited<ReturnType<(params: UnlinkAccountParams<TAuthClient>) => Promise<{ status: boolean; }>>>, BetterFetchError, Parameters<(params: UnlinkAccountParams<TAuthClient>) => Promise<{ status: boolean; }>>[0]>; export {};