import { ExtraDataStore } from './Data/extra-data-store';
import { DataEntity, DataOptions, GroupValue, ItemFields, MappedStorableItem, StorableItemMapper } from './data-entity';
import DataStore from './data-store';
export default class StorableDataService<TClient extends DataEntity, TServer extends DataEntity> {
    private readonly dataStore;
    private readonly extraDataStores;
    private readonly mapper;
    constructor(dataStore: DataStore<TClient>, mapper?: StorableItemMapper<TClient, TServer>, extraDataStores?: ExtraDataStore<TClient>[]);
    loadAll(action: string, loadFunc: (ids?: GroupValue[]) => Promise<TServer[]>, options?: DataOptions): Promise<TClient[]>;
    loadMany(action: string, loadFunc: (ids?: number[]) => Promise<TServer[]>, ids: number[], options?: DataOptions): Promise<TClient[]>;
    private loadInChunks;
    load(action: string, loadFunc: () => Promise<TServer>, id: number, options?: DataOptions): Promise<TClient>;
    modify(action: string, updateFunc: () => Promise<TServer>, onUpdate?: (modifiedItems: MappedStorableItem<any>) => void): Promise<TClient>;
    modifyMany(action: string, updateFunc: () => Promise<TServer[]>, fields?: ItemFields, onUpdate?: (modifiedItems: MappedStorableItem<any>[]) => void): Promise<TClient[]>;
    delete(action: string, deleteFunc: () => Promise<any>, id: number): Promise<TClient>;
    deleteMany(action: string, deleteFunc: () => Promise<any>, ids: number[]): Promise<TClient[]>;
    mapItem(item: TServer, extraMapperParams?: any): MappedStorableItem<TClient>;
    updateInStores(item: TServer, action?: string, fields?: ItemFields, extraMapperParams?: any): MappedStorableItem<TClient>;
    updateManyInStores(items: TServer[], action?: string, fields?: ItemFields, extraMapperParams?: any): MappedStorableItem<TClient>[];
    removeFromStores(id: number): TClient;
    getFromStores(ids: number[], fields?: ItemFields): TClient[];
}
