/** * Append-only observation and event ledger operations. * * These helpers run within the observation writer's already-fenced immediate * transaction. They do not perform canonical or conflict mutation themselves. */ import type { FieldConflict } from "../../../contracts/domain/evaluate/contracts.js"; import type { ObservedEditBatch, ObservedRowChange } from "../../../contracts/domain/model/types.js"; import type { Presence, LookupResult } from "../../../contracts/state/types.js"; import type { SqlExecutor } from "../../../contracts/storage/sql.js"; import { type ObservationCompletionState } from "./observationConstants.js"; import type { ActiveCandidateRow, CreatedEvent, EventRow, ObservationAppendResult, ObservationAttemptInput, PersistObservedRowInput, RowBindingRow } from "./observationTypes.js"; /** * Appends an observation occurrence through the active async SQL transaction * and classifies receipt replay semantics without leaking SQL nullability. */ export declare function appendObservationWithSql(sql: SqlExecutor, batch: ObservedEditBatch, physicalSheetId: string, observation: ObservationAttemptInput): Promise; /** Completes one observation receipt through the active async SQL transaction. */ export declare function completeObservationWithSql(sql: SqlExecutor, logicalSheetId: string, observation: ObservationAttemptInput, eventId: Presence, state: ObservationCompletionState): Promise; /** Requires a row binding through the active async SQL transaction. */ export declare function requireKnownBindingWithSql(sql: SqlExecutor, logicalSheetId: string, rowBindingId: string): Promise; /** Finds an unchanged active conflict candidate through the active async SQL transaction. */ export declare function findMatchingCandidateEventIdWithSql(sql: SqlExecutor, input: PersistObservedRowInput, row: ObservedRowChange, binding: RowBindingRow): Promise>; /** Reads the active candidate through the active async SQL transaction. */ export declare function readActiveCandidateWithSql(sql: SqlExecutor, physicalSheetId: string, projection: string, rowBindingId: string, fieldName: string): Promise>; /** Finds an idempotent event key through the active async SQL transaction. */ export declare function findEventByKeyWithSql(sql: SqlExecutor, logicalSheetId: string, eventKey: string): Promise>; /** Creates the event and its evidence through the active async SQL transaction. */ export declare function createEventWithSql(sql: SqlExecutor, input: PersistObservedRowInput, row: ObservedRowChange): Promise; /** Updates observed row and field hashes through the active async SQL transaction. */ export declare function persistObservedHashesWithSql(sql: SqlExecutor, input: PersistObservedRowInput, row: ObservedRowChange): Promise; /** Produces the idempotency hash for a visible unresolved field candidate. */ export declare function candidateHash(conflict: FieldConflict): string; //# sourceMappingURL=observationLedger.d.ts.map