import { Patch } from '../../../json-crdt-patch'; import type { JsonNode } from '../../nodes'; import type { ModelApi } from './nodes'; export declare const enum ChangeEventOrigin { Local = 0, Remote = 1, Reset = 2 } export type RawEventData = /** Emitted by RESET event, set of nodes directly affected by the reset. */ Set /** Emitted by LOCAL event, the starting index in the un-flushed patch. */ | number /** Emitted by `.applyPatch(patch: Patch)`. */ | Patch; export declare class ChangeEvent { readonly raw: RawEventData; readonly api: ModelApi; constructor(raw: RawEventData, api: ModelApi); origin(): ChangeEventOrigin; isLocal(): boolean; isReset(): boolean; private _direct; /** * JSON CRDT nodes directly affected by this change event, i.e. nodes * which are direct targets of operations in the change. */ direct(): Set; private _parents; /** * JSON CRDT nodes which are parents of directly affected nodes in this * change event. */ parents(): Set; }