import { Entity, EntityCollection, FilterValues, User } from "../../types"; /** * @group Hooks and utilities */ export interface CollectionFetchProps> { /** * Absolute collection path */ path: string; /** * collection of the entity displayed by this collection */ collection: EntityCollection; /** * Number of entities to fetch */ itemCount?: number; /** * Filter the fetched data by the property */ filterValues?: FilterValues>; /** * Sort the results by */ sortBy?: [Extract, "asc" | "desc"]; /** * Search string */ searchString?: string; } /** * @group Hooks and utilities */ export interface CollectionFetchResult> { data: Entity[]; dataLoading: boolean; noMoreToLoad: boolean; dataLoadingError?: Error; } /** * This hook is used to fetch collections using a given collection * @param path * @param collection * @param filterValues * @param sortBy * @param itemCount * @param searchString * @group Hooks and utilities */ export declare function useCollectionFetch, UserType extends User>({ path: inputPath, collection, filterValues, sortBy, itemCount, searchString }: CollectionFetchProps): CollectionFetchResult;