import { DataTag, QueryClient } from '@tanstack/react-query'; import { APIError } from 'better-auth'; import { OrganizationAuthServer } from '../../../lib/auth-server'; export type ListOrganizationsData = Awaited>; export type ListOrganization = NonNullable>[number]; export type ListOrganizationsParams = Parameters[0]; /** * Query options factory for organizations the current user belongs to. * * @param auth - The Better Auth server instance. * @param userId - The signed-in user's ID. Used for cache partitioning so * the key matches the client-side `listOrganizationsOptions` for SSR hydration. * @param params - Parameters forwarded to `auth.api.listOrganizations`. */ export declare function listOrganizationsOptions(auth: TAuth, userId: string, params: ListOrganizationsParams): (import('@tanstack/query-core').OmitKeyof>, APIError, Awaited>, readonly ["auth", "user", string | undefined, "organization", "list", Record | null]>, "queryFn"> & { queryFn?: import('@tanstack/query-core').QueryFunction>, readonly ["auth", "user", string | undefined, "organization", "list", Record | null], never> | undefined; } & { queryKey: readonly ["auth", "user", string | undefined, "organization", "list", Record | null] & { [dataTagSymbol]: Awaited>; [dataTagErrorSymbol]: APIError; }; }) & { queryKey: DataTag | null], Awaited>, APIError>; }; export declare const ensureListOrganizations: (queryClient: QueryClient, auth: TAuth, userId: string, params: ListOrganizationsParams) => Promise>>; export declare const prefetchListOrganizations: (queryClient: QueryClient, auth: TAuth, userId: string, params: ListOrganizationsParams) => Promise; export declare const fetchListOrganizations: (queryClient: QueryClient, auth: TAuth, userId: string, params: ListOrganizationsParams) => Promise>>;