/** Converts raw polling SQL rows into semantic lookup maps for observation. */ import type { RowBindingContext, SyncConflict } from "../../../../contracts/domain/model/types.js"; import type { NormalizedCell } from "../../../../contracts/encoding/types.js"; import type { BusinessKeySqlRow, ConflictSqlRow, EntityFieldSqlRow, EntitySqlRow, PendingEffectSqlRow, RowBindingSqlRow, VisibleStateSqlRow } from "./MikroOrmUserInputPollingSql.js"; export interface VisibleProjectionState { readonly confirmedVisibleHash: string; readonly confirmedVisibleRevision: number; readonly confirmedEntityRevision: number | null; } export interface MappedPollingState { readonly bindingsByEntityId: ReadonlyMap>; readonly entitiesById: ReadonlyMap; readonly businessKeysByLogicalAndField: ReadonlyMap>>; readonly conflictsByBindingAndField: ReadonlyMap>; readonly visibleRevisionsByPhysicalAndBinding: ReadonlyMap>; /** * Row bindings with an outbox effect whose delivery is still in flight * (pending/processing/delivery-uncertain/retryable-failed). The check- * column gate suppresses a mismatch on these rows: the remote still * (correctly) shows the PRE-write values, and treating that as human * input would fabricate a conflict against an own write. */ readonly pendingDeliveryBindingIds: ReadonlySet; } export interface RowBindingStateRecord { readonly rowBindingId: string; readonly logicalSheetId: string; readonly anchorReference: string; readonly entityId: string | null; readonly state: RowBindingContext["bindingState"]; readonly candidateEpoch: number; } export interface EntityStateRecord { readonly entityId: string; readonly entityRevision: number; readonly status: "active" | "tombstoned"; readonly fields: ReadonlyMap; } export interface CanonicalFieldRecord { readonly value: NormalizedCell; readonly fieldRevision: number; } /** Builds all lookup maps consumed by snapshot inspection and evaluation. */ export declare function buildPollingState(bindingRows: readonly RowBindingSqlRow[], entityRows: readonly EntitySqlRow[], fieldRows: readonly EntityFieldSqlRow[], businessKeyRows: readonly BusinessKeySqlRow[], conflictRows: readonly ConflictSqlRow[], visibleRows: readonly VisibleStateSqlRow[], pendingEffectRows: readonly PendingEffectSqlRow[]): MappedPollingState; //# sourceMappingURL=MikroOrmUserInputPollingState.d.ts.map