/** Quarantine persistence for invalid or unresolvable observed rows. */ import type { ObservedRowChange, QuarantinePlan } from "../../../contracts/domain/model/types.js"; import type { Presence } from "../../../contracts/state/types.js"; import type { QuarantineReason } from "../../../contracts/domain/model/constants.js"; import type { SqlExecutor } from "../../../contracts/storage/sql.js"; import { type FencingContext } from "@hikoutei/ikisaki"; import type { ObservationIntegrityDiscriminator } from "./observationConstants.js"; import type { PersistObservedRowInput } from "./observationTypes.js"; export declare const POLLING_QUARANTINE_WRITE_RESULT_KINDS: { readonly INSERTED: "inserted"; readonly DUPLICATE: "duplicate"; readonly FENCED_OUT: "fenced_out"; }; export type PollingQuarantineWriteResult = { readonly kind: typeof POLLING_QUARANTINE_WRITE_RESULT_KINDS.INSERTED; readonly quarantineId: string; } | { readonly kind: typeof POLLING_QUARANTINE_WRITE_RESULT_KINDS.DUPLICATE; readonly quarantineId: string; } | { readonly kind: typeof POLLING_QUARANTINE_WRITE_RESULT_KINDS.FENCED_OUT; }; /** Persists an integrity quarantine through the active async SQL transaction. */ export declare function persistIntegrityQuarantineWithSql(sql: SqlExecutor, input: PersistObservedRowInput, row: ObservedRowChange, eventId: Presence, discriminator: ObservationIntegrityDiscriminator): Promise; /** Inserts a core-provided quarantine plan through the active async SQL transaction. */ export declare function persistQuarantineWithSql(sql: SqlExecutor, input: PersistObservedRowInput, quarantine: QuarantinePlan, eventId: Presence): Promise; /** Raw invalid polling evidence that cannot enter the evaluator. */ export interface PollingQuarantineInput { readonly logicalSheetId: string; readonly physicalSheetId: string; readonly rowBindingId: string; /** Row-local evidence used for idempotent invalid-row deduplication. */ readonly rowEvidenceHash: string; readonly reason: QuarantineReason; readonly beforeRowJson: string | null; readonly afterRowJson: string | null; readonly fieldsJson: string; readonly payloadJson: string; readonly detectedAt: number; } /** * Persists invalid polling evidence without pretending that it was an entity * event. This path is fenced like normal observation writes but has no event * identity or canonical mutation because the row never passed normalization. */ export declare function persistPollingQuarantineWithSql(sql: SqlExecutor, fence: FencingContext, input: PollingQuarantineInput): Promise; //# sourceMappingURL=observationQuarantine.d.ts.map