import { Map } from 'immutable'; import { ReplaySubject } from 'rxjs/ReplaySubject'; import { Subject } from 'rxjs/Subject'; import { PathUtilService } from './path-util.service'; import { KeysStoreService } from './keys-store.service'; import { JsonPatch, JsonPatchesByPath } from '../interfaces'; export declare class JsonStoreService { private pathUtilService; private keysStoreService; readonly patchesByPath$: ReplaySubject; readonly json$: Subject>; readonly jsonPatches$: Subject; private json; private jsonPatches; patchesByPath: JsonPatchesByPath; private history; constructor(pathUtilService: PathUtilService, keysStoreService: KeysStoreService); setIn(path: Array, value: any, allowUndo?: boolean): void; private setEmptyListBeforeEachIndexInPath(path); getIn(path: Array, notSetValue?: any): any; removeIn(path: Array): void; private pushRevertPatchToHistory(path, revertOp); addIn(path: Array, value: any): void; private toImmutable(value); /** * Moves the element at given index UP or DOWN within the list * @param listPath path to a list in json * @param index index of the element that is being moved * @param direction 1 for DOWN, -1 for UP movement * @return new path of the moved element */ moveIn(listPath: Array, index: number, direction: number): Array; setJson(json: Map): void; setJsonPatches(patches: Array): void; rollbackLastChange(): string; applyPatch(patch: JsonPatch, allowUndo?: boolean): void; rejectPatch(patch: JsonPatch): void; hasPatch(path: string): boolean; hasPatchOrChildrenHavePatch(path: string): boolean; removeJsonPatch(patch: JsonPatch): void; private getComponentPathForPatch(patch); private getParentPath(path); getPatchesIncludingPath(path: string): JsonPatch[]; deletePatchForElement(path: any): void; }