/** SQLite reads used to assemble one inbound User_Input polling state. */ import type { TypedSheetsEntityMapping } from "../../../../contracts/sync-orm/mapping/contracts.js"; import type { SqlExecutor } from "../../../../contracts/storage/sql.js"; export interface RowBindingSqlRow { readonly row_binding_id: string; readonly logical_sheet_id: string; readonly anchor_reference: string; readonly entity_id: string | null; readonly state: string; readonly candidate_epoch: number; } export interface EntitySqlRow { readonly entity_id: string; readonly entity_revision: number; readonly status: string; } export interface EntityFieldSqlRow { readonly entity_id: string; readonly field_name: string; readonly normalized_value: string; readonly field_revision: number; } export interface BusinessKeySqlRow { readonly logical_sheet_id: string; readonly field_name: string; readonly normalized_key: string; readonly entity_id: string; readonly state: string; } export interface ConflictSqlRow { readonly conflict_id: string; readonly conflict_group_id: string | null; readonly event_id: string; readonly logical_sheet_id: string; readonly entity_id: string; readonly row_binding_id: string; readonly field_name: string; readonly user_value: string; readonly user_base_revision: number; readonly canonical_value_at_detection: string; readonly canonical_revision_at_detection: number; readonly current_canonical_value: string; readonly current_canonical_revision: number; readonly candidate_epoch: number; readonly candidate_visible_revision: number | null; readonly candidate_visible_hash: string | null; readonly status: string; readonly resolution_command_id: string | null; } export interface VisibleStateSqlRow { readonly physical_sheet_id: string; readonly row_binding_id: string; readonly confirmed_snapshot_hash: string; readonly confirmed_visible_revision: number; readonly confirmed_entity_revision: number | null; } export interface PendingEffectSqlRow { readonly row_binding_id: string; } export interface MappedPollingRows { readonly bindings: readonly RowBindingSqlRow[]; readonly entities: readonly EntitySqlRow[]; readonly fields: readonly EntityFieldSqlRow[]; readonly businessKeys: readonly BusinessKeySqlRow[]; readonly conflicts: readonly ConflictSqlRow[]; readonly visible: readonly VisibleStateSqlRow[]; /** * Bindings whose Sheet effect is still in the outbox (not yet delivered * or superseded). The check-column gate uses it to keep an in-flight OWN * write from reading as a false human-input mismatch. */ readonly pendingEffects: readonly PendingEffectSqlRow[]; } /** Reads all SQLite rows needed before User_Input snapshot inspection. */ export declare function readMappedPollingRows(sql: SqlExecutor, mappings: readonly TypedSheetsEntityMapping[]): Promise; //# sourceMappingURL=MikroOrmUserInputPollingSql.d.ts.map