import { Options, SortInfo } from './types'; declare function useRestListApi(url: string, defaultValue?: T[], options?: Options): { rawResponse: RawResponse | undefined; fetch: (sorts?: SortInfo[] | undefined, searchParams?: { [x: string]: string; } | undefined) => Promise; sortWith: (sorts: SortInfo[]) => Promise; getItemById: (itemId: string) => T | undefined; updateItem: (item: T) => T; setItem: (itemId: string, itemInfo: Partial) => void; setItems: (itemsInfo: T[]) => void; addItem: (item: T, idx?: any) => void; removeItemById: (itemId: string) => void; removeItemAt: (index: number) => void; removeItemsByIds: (ids: string[]) => void; get: (id: string, isNeedUpdate?: any) => Promise; save: (itemInfo: T, isNeedUpdate?: any, idx?: number | undefined) => Promise; update: (itemInfo: T, isNeedUpdate?: any) => Promise; remove: (ids: string | string[], isNeedUpdate?: any) => Promise; defaultSearchParams: { [x: string]: string; } | undefined; query: (searchParams: { [x: string]: string; }) => Promise; reload: () => Promise; reset: () => Promise; setDefaultSearchParams: (searchParams: { [x: string]: string; }) => Promise; isError: boolean; isLoading: boolean; items: T[]; searchParams?: { [x: string]: string; } | undefined; sorts?: SortInfo[] | undefined; }; export default useRestListApi;