/**
 * Universal Entity Data Hook
 *
 * Provides CRUD operations for any entity based on configuration.
 * Now powered by TanStack Query for:
 * - Automatic caching (5min stale, 1hr gc)
 * - Request deduplication
 * - Optimistic updates
 * - Parallel fetching
 * - Background refetch
 */
import type { EntityConfig } from '../lib/entities/types';
export interface UseEntityOptions {
    entityConfig: EntityConfig;
    enableRealtime?: boolean;
    enableCache?: boolean;
    pageSize?: number;
    includeChildren?: boolean;
    autoFetch?: boolean;
}
export interface EntityHookResult {
    items: Record<string, unknown>[];
    item: Record<string, unknown> | null;
    childData: Record<string, unknown>;
    isLoading: boolean;
    isCreating: boolean;
    isUpdating: boolean;
    isDeleting: boolean;
    error: string | null;
    validationErrors: Record<string, string>;
    currentPage: number;
    totalPages: number;
    totalItems: number;
    searchQuery: string;
    filters: Record<string, unknown>;
    sort: {
        field: string;
        direction: 'asc' | 'desc';
    } | null;
    canCreate: boolean;
    canRead: boolean;
    canUpdate: boolean;
    canDelete: boolean;
    fetchAll: (options?: {
        page?: number;
        search?: string;
        filters?: Record<string, unknown>;
    }) => Promise<void>;
    fetchOne: (id: string) => Promise<void>;
    create: (data: Record<string, unknown>) => Promise<unknown>;
    update: (id: string, data: Record<string, unknown>) => Promise<unknown>;
    delete: (id: string) => Promise<void>;
    bulkDelete: (ids: string[]) => Promise<void>;
    setSearchQuery: (query: string) => void;
    setFilters: (filters: Record<string, unknown>) => void;
    setSort: (field: string, direction: 'asc' | 'desc') => void;
    createChild: () => Promise<void>;
    updateChild: () => Promise<void>;
    deleteChild: () => Promise<void>;
    refresh: () => Promise<void>;
    reset: () => void;
}
/**
 * useEntity - TanStack Query powered entity hook
 *
 * Provides complete entity management with automatic caching and optimizations
 */
export declare function useEntity(options: UseEntityOptions): EntityHookResult;
//# sourceMappingURL=useEntity.d.ts.map