import { QueryObserverResult, UseQueryOptions } from "react-query"; import { ArgsProps } from "antd/lib/notification"; import { GetListResponse, CrudFilters, Pagination, BaseRecord, HttpError, CrudSorting, MetaDataQuery, LiveModeProps } from "../../interfaces"; interface UseListConfig { pagination?: Pagination; sort?: CrudSorting; filters?: CrudFilters; } export declare type UseListProps = { resource: string; config?: UseListConfig; queryOptions?: UseQueryOptions, TError>; successNotification?: ArgsProps | false; errorNotification?: ArgsProps | false; metaData?: MetaDataQuery; } & 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/api-references/hooks/data/useList} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`} * */ export declare const useList: ({ resource, config, queryOptions, successNotification, errorNotification, metaData, liveMode, onLiveEvent, liveParams, }: UseListProps) => QueryObserverResult, TError>; export {};