import { IObservableArray } from 'mobx';
import { TypedEmitter } from '../util';
import { ActionMove } from '../model';
import { QueryCache } from 'react-query/core';
interface OptimisticPatchEvents<T> {
    scheduleRemoval: (patch: OptimisticPatch<T>) => unknown;
}
export type OptimisticPatchActionType = 'move' | 'createMany' | 'updateMany' | 'updateAll' | 'updateAllConst' | 'deleteMany' | 'deleteAll';
export interface OptimisticPatchParams<T> {
    readonly patch?: (item: T, patch: OptimisticPatch<T>) => Partial<T> | undefined;
    readonly selector: (item: T, patch: OptimisticPatch<T>) => boolean;
    readonly actionType: OptimisticPatchActionType;
    readonly patchedItems: Map<string, T>;
    readonly originalItems: Map<string, T>;
    readonly originalTotal: number;
    readonly keepPosition?: boolean;
    readonly queryNames: string[];
    readonly queryCache: QueryCache;
    readonly patches: IObservableArray<OptimisticPatch<T>>;
    readonly move?: ActionMove<T>;
    readonly collectionSnapshot?: {
        [key: string]: string | number | undefined;
    };
    readonly afterItemKey?: string;
}
export declare class OptimisticPatch<T> {
    readonly patch: (item: T) => Partial<T> | undefined;
    readonly selector: (item: T) => boolean;
    readonly actionType: OptimisticPatchActionType;
    readonly patchedItems: import("mobx").ObservableMap<string, T>;
    readonly originalItems: import("mobx").ObservableMap<string, T>;
    readonly originalTotal: number;
    readonly keepPosition: boolean | undefined;
    readonly queryNames: string[];
    readonly queryCache: QueryCache;
    readonly patches: IObservableArray<OptimisticPatch<T>>;
    readonly move: ActionMove<T> | undefined;
    readonly createdAt: number;
    readonly collectionSnapshot: {
        [key: string]: string | number | undefined;
    } | undefined;
    readonly afterItemKey: string | undefined;
    isStale: boolean;
    readonly events: TypedEmitter<OptimisticPatchEvents<T>>;
    constructor(params: OptimisticPatchParams<T>);
    get patchedItemsEntries(): import("mobx").IMapEntry<string, T>[];
    onEventuallyUpdated: () => void;
}
export {};
//# sourceMappingURL=CollectionOptimisticPatch.d.ts.map