import type { CollectionDefinition } from '../@types/collection-types.js'; import type { Field } from '../@types/field-types.js'; import type { ApplyPatchesResult, DocumentPatch, PatchPath } from './patch-types.js'; interface PathSegmentField { kind: 'field'; key: string; } interface PathSegmentIndex { kind: 'index'; index: number; } interface PathSegmentId { kind: 'id'; id: string; } type PathSegment = PathSegmentField | PathSegmentIndex | PathSegmentId; export declare function parsePatchPath(path: PatchPath): PathSegment[]; export declare function resolveFieldForPath(definition: CollectionDefinition | null | undefined, path: PatchPath): Field | null; export declare function applyPatches(definition: CollectionDefinition, doc: Record, patches: DocumentPatch[]): ApplyPatchesResult; export {};