import { UseInfiniteQueryOptions, InfiniteQueryObserverResult } from "@tanstack/react-query"; import { CrudFilters, Pagination, BaseRecord, HttpError, CrudSorting, MetaDataQuery, SuccessErrorNotification, LiveModeProps, GetListResponse } from "../../interfaces"; export interface UseInfiniteListConfig { pagination?: Pagination; hasPagination?: boolean; sort?: CrudSorting; filters?: CrudFilters; } export declare type UseInfiniteListProps = { /** * Resource name for API data interactions */ resource: string; /** * Configuration for pagination, sorting and filtering * @type [`useInfiniteListConfig`](/docs/api-reference/core/hooks/data/useInfiniteList/#config-parameters) */ config?: UseInfiniteListConfig; /** * react-query's [useInfiniteQuery](https://tanstack.com/query/v4/docs/react/reference/useInfiniteQuery) options, */ queryOptions?: UseInfiniteQueryOptions, TError>; /** * Metadata query for `dataProvider` */ metaData?: MetaDataQuery; /** * If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use. */ dataProviderName?: string; } & SuccessErrorNotification & LiveModeProps; /** * `useInfiniteList` is a modified version of `react-query`'s {@link https://tanstack.com/query/latest/docs/react/guides/infinite-queries `useInfiniteQuery`} used for retrieving items from a `resource` with pagination, sort, and filter configurations. * * It uses the `getList` method as the query function from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/core/hooks/data/useInfiniteList} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`} * */ export declare const useInfiniteList: ({ resource, config, queryOptions, successNotification, errorNotification, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseInfiniteListProps) => InfiniteQueryObserverResult, TError>; //# sourceMappingURL=useInfiniteList.d.ts.map