/**
 * Branch heads — mutable pointers into the commit chain
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query';
import type { RefSelect, RefWithRelations } from '../../orm/input-types';
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
export type { RefSelect, RefWithRelations } from '../../orm/input-types';
/** Query key factory - re-exported from query-keys.ts */
export declare const refQueryKey: (id: string | number) => readonly ["ref", "detail", string | number];
/**
 * Branch heads — mutable pointers into the commit chain
 *
 * @example
 * ```tsx
 * const { data, isLoading } = useRefQuery({
 *   id: 'some-id',
 *   selection: { fields: { id: true, name: true } },
 * });
 * ```
 */
export declare function useRefQuery<S extends RefSelect, TData = {
    ref: InferSelectResult<RefWithRelations, S> | null;
}>(params: {
    id: string;
    selection: {
        fields: S;
    } & HookStrictSelect<NoInfer<S>, RefSelect>;
} & Omit<UseQueryOptions<{
    ref: InferSelectResult<RefWithRelations, S> | null;
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
/**
 * Branch heads — mutable pointers into the commit chain
 *
 * @example
 * ```ts
 * const data = await fetchRefQuery({
 *   id: 'some-id',
 *   selection: { fields: { id: true } },
 * });
 * ```
 */
export declare function fetchRefQuery<S extends RefSelect>(params: {
    id: string;
    selection: {
        fields: S;
    } & HookStrictSelect<NoInfer<S>, RefSelect>;
}): Promise<{
    ref: InferSelectResult<RefWithRelations, S> | null;
}>;
/**
 * Branch heads — mutable pointers into the commit chain
 *
 * @example
 * ```ts
 * await prefetchRefQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
 * ```
 */
export declare function prefetchRefQuery<S extends RefSelect>(queryClient: QueryClient, params: {
    id: string;
    selection: {
        fields: S;
    } & HookStrictSelect<NoInfer<S>, RefSelect>;
}): Promise<void>;
