import type { ChangeSet, Mutation, PropertyValue } from './types.js'; /** Adapter over the store's id table, supplied by the caller at freeze time. */ export interface EntityIdentityResolver { /** The entity's IFC `GlobalId`, when present and trusted. */ globalIdOf(expressId: number): string | undefined; /** IFC type name, used by the content-derived fallback. */ ifcTypeOf?(expressId: number): string | undefined; /** Stable spatial parent path (e.g. `/project/storey-EG`). */ spatialParentPathOf?(expressId: number): string | undefined; /** Entity `Name`, used by the content-derived fallback. */ nameOf?(expressId: number): string | undefined; } /** Identity-map entry mirroring `ifclite::provenance.identity_map`. */ export interface DerivedIdentityEntry { base: string; here: string; reason: string; } /** * Component-granular semantic ops, in the shared componentKey vocabulary * (`pset:`, `qset:`, `attr:core`). Values carry only what the * change set knows; the publish path composes them onto the draft state. */ export type ChangeSetOp = { op: 'set-component'; entity: string; componentKey: string; /** Property/attribute values; `null` removes the member. */ values: Record; } | { op: 'tombstone-component'; entity: string; componentKey: string; } | { op: 'add-entity'; entity: string; ifcType?: string; } | { op: 'tombstone-entity'; entity: string; }; export interface ChangeSetOpsResult { ops: ChangeSetOp[]; /** Content-derived identities, for the manifest's identity_map. */ identityMap: DerivedIdentityEntry[]; /** expressIds for which no identity could be established at all. */ unresolved: number[]; /** * Mutations with no component representation (unknown/future types). * Reported so callers can warn instead of silently under-publishing. */ skipped: Mutation[]; } /** Content-derived fallback identity (04 ยง4.1(3)). */ export declare function deriveEntityIdentity(input: { ifcType?: string; spatialParentPath?: string; name?: string; }): string; /** * Map a change set's mutations onto component-granular ops keyed by * stable entity identity. Mutations fold LWW per (entity, componentKey) * in change-set order, matching layer composition semantics. */ export declare function changeSetToOps(changeSet: ChangeSet, resolver: EntityIdentityResolver): ChangeSetOpsResult; //# sourceMappingURL=change-set-to-ops.d.ts.map