/** * Adapter-neutral conversion from an accepted canonical observation to an * application entity mutation. * * The storage writer remains responsible for validating and committing the * Sheet observation first. This helper only translates that already-approved * canonical result, so an ORM adapter cannot accidentally promote a conflict * or quarantined user edit into an entity-table write. */ import type { CanonicalCommitInput } from "../../storage/state/canonical/canonicalCommit.js"; import { type TypedSheetsEntityMapping } from "./entityMapping.js"; /** Runtime kinds of entity-table mutations derived from accepted observations. */ export declare const MAPPED_OBSERVATION_ENTITY_MUTATION_KINDS: { readonly NONE: "none"; readonly INSERT: "insert"; readonly UPDATE: "update"; readonly DELETE: "delete"; }; /** A safe entity-table mutation derived only from a canonical commit. */ export type MappedObservationEntityMutation = { readonly kind: typeof MAPPED_OBSERVATION_ENTITY_MUTATION_KINDS.NONE; } | { readonly kind: typeof MAPPED_OBSERVATION_ENTITY_MUTATION_KINDS.INSERT; readonly entityId: string | number; readonly data: Readonly>; } | { readonly kind: typeof MAPPED_OBSERVATION_ENTITY_MUTATION_KINDS.UPDATE; readonly entityId: string | number; readonly data: Readonly>; } | { readonly kind: typeof MAPPED_OBSERVATION_ENTITY_MUTATION_KINDS.DELETE; readonly entityId: string | number; }; /** * Translates one accepted canonical commit into a local entity-table mutation. * * Insert and update values come exclusively from canonical field writes, never * from a raw Sheet payload. This preserves the evaluator's per-field conflict * decision when an observation has both accepted and conflicting fields. */ export declare function planMappedObservationEntityMutation(mapping: TypedSheetsEntityMapping, commit: CanonicalCommitInput, entityIdOverride?: string | number): MappedObservationEntityMutation; //# sourceMappingURL=observationMapping.d.ts.map