/** Validates observed User_Input rows and prepares accepted entity changes. */ import type { ObservedExistingRowChange } from "../../../../contracts/domain/model/types.js"; import type { SyncSheetsSnapshot, SyncObservedSnapshot, SyncSnapshotRow } from "../../../../contracts/sheets/syncSheets.js"; import type { TypedSheetsEntityFieldMapping, TypedSheetsEntityMapping } from "../../../../contracts/sync-orm/mapping/contracts.js"; import type { MappedUserInputInvalidReason } from "../../../../contracts/sheets/userInputPolling.js"; import { type EntityStateRecord, type MappedPollingState, type RowBindingStateRecord } from "./MikroOrmUserInputPollingState.js"; export { MAPPED_USER_INPUT_INVALID_REASONS, validateSnapshotCell, } from "../../../../contracts/sheets/userInputPolling.js"; export type { MappedUserInputInvalidReason } from "../../../../contracts/sheets/userInputPolling.js"; export interface PreparedRow { readonly mapping: TypedSheetsEntityMapping; readonly snapshot: SyncSheetsSnapshot; readonly snapshotHash: string; readonly snapshotRow: SyncSnapshotRow; readonly binding: RowBindingStateRecord; readonly canonical: EntityStateRecord; readonly row: ObservedExistingRowChange; } export interface InvalidRow { readonly mapping: TypedSheetsEntityMapping; readonly snapshot: SyncSheetsSnapshot; readonly snapshotRow: SyncSnapshotRow; readonly rowNumber: number; readonly reason: MappedUserInputInvalidReason; } export interface SheetAccumulator { readonly mapping: TypedSheetsEntityMapping; rowsScanned: number; changedRows: number; appliedRows: number; conflictRows: number; quarantinedRows: number; duplicateRows: number; staleRows: number; fencedRows: number; invalidRows: number; unknownBusinessKeyRows: number; duplicateBusinessKeyRows: number; } /** Inspects one projection snapshot and appends changed rows to the batch. */ export declare function inspectSnapshot(mapping: TypedSheetsEntityMapping, observed: SyncObservedSnapshot, state: MappedPollingState, accumulator: SheetAccumulator, preparedRows: PreparedRow[]): readonly InvalidRow[]; /** Derives duplicate business-key values from one normalized snapshot. */ export declare function duplicateBusinessKeysForSnapshot(snapshot: SyncSheetsSnapshot, businessKey: TypedSheetsEntityFieldMapping): ReadonlySet; /** Computes the stable snapshot identity used by observation deduplication. */ export declare function snapshotHash(snapshot: SyncSheetsSnapshot): string; //# sourceMappingURL=MikroOrmUserInputPollingInspection.d.ts.map