import { InfiniteData, QueryClient, QueryFilters, QueryKey, SetDataOptions } from '@tanstack/query-core';
import { PlainObjectType } from '../types/generic.types';
import { InfiniteQueryResultType, QueryResultType } from '../types/query.types';

export declare function findAnyExistingItem<TDataItem extends PlainObjectType>(queryData: InfiniteData<InfiniteQueryResultType<TDataItem>> | QueryResultType<TDataItem> | undefined, propertyName: string, value: string, copy?: boolean): boolean | TDataItem | undefined;
export declare function addToQueryData<TDataItem extends PlainObjectType>(queryData: InfiniteData<InfiniteQueryResultType<TDataItem>> | QueryResultType<TDataItem> | undefined, item: TDataItem, sorting?: {
    by?: string;
    descending?: boolean;
}, previousId?: number): InfiniteData<InfiniteQueryResultType<TDataItem>, unknown> | QueryResultType<TDataItem> | undefined;
export declare function updateQueryData<TDataItem extends PlainObjectType>(queryData: InfiniteData<InfiniteQueryResultType<TDataItem>> | InfiniteQueryResultType<TDataItem> | QueryResultType<TDataItem> | undefined, select: number | ((item: TDataItem & PlainObjectType) => boolean), fnUpdater: Function): InfiniteQueryResultType<TDataItem> | InfiniteData<InfiniteQueryResultType<TDataItem>, unknown> | {
    data: TDataItem[];
} | {
    data: TDataItem[];
    pages: InfiniteQueryResultType<TDataItem>[];
    pageParams: unknown[];
} | undefined;
export declare function removeQueryData<TDataItem extends PlainObjectType>(queryData: InfiniteData<InfiniteQueryResultType<TDataItem>> | QueryResultType<TDataItem> | undefined, select: number | ((item: TDataItem & PlainObjectType) => boolean)): InfiniteData<InfiniteQueryResultType<TDataItem>, unknown> | QueryResultType<TDataItem> | undefined;
export declare const addCacheItem: <T extends PlainObjectType>(queryClient: QueryClient, key: QueryKey, item: T, tempId?: number, sorting?: {
    by?: string;
    descending?: boolean;
}) => T | void;
export declare const addCacheItems: <T extends PlainObjectType>(queryClient: QueryClient, filters: QueryFilters, item: T, tempId?: number, sorting?: {
    by?: string;
    descending?: boolean;
}) => T | void;
export declare const updateCacheItem: <T extends PlainObjectType>(queryClient: QueryClient, key: QueryKey, select: number | ((item: T) => boolean), fnUpdater: Function) => T | void;
export declare const updateCacheItems: <T extends PlainObjectType>(queryClient: QueryClient, filters: QueryFilters, select: number | ((item: T) => boolean), fnUpdater: Function) => T | void;
export declare const removeCacheItem: <T extends PlainObjectType>(queryClient: QueryClient, key: QueryKey, select: number | ((item: T) => boolean)) => T | void;
export declare const removeCacheItems: <T extends PlainObjectType>(queryClient: QueryClient, filters: QueryFilters, select: number | ((item: T) => boolean)) => T | void;
export declare function keepFirstPage(queryClient: QueryClient, queryKey: QueryKey, options?: SetDataOptions): void;
//# sourceMappingURL=query-cache.d.ts.map