import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; import { GetListResponse, CrudFilters, Pagination, BaseRecord, HttpError, CrudSorting, MetaDataQuery, SuccessErrorNotification, LiveModeProps } from "../../interfaces"; export interface UseListConfig { pagination?: Pagination; hasPagination?: boolean; sort?: CrudSorting; filters?: CrudFilters; } export declare type UseListProps = { /** * Resource name for API data interactions */ resource: string; /** * Configuration for pagination, sorting and filtering * @type [`UseListConfig`](/docs/api-reference/core/hooks/data/useList/#config-parameters) */ config?: UseListConfig; /** * react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options, */ queryOptions?: UseQueryOptions, 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; /** * `useList` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} 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/useList} 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 useList: ({ resource, config, queryOptions, successNotification, errorNotification, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseListProps) => QueryObserverResult, TError>; //# sourceMappingURL=useList.d.ts.map