/** * Small persistence helpers shared by the lifecycle and projection modules. * * Keeping these guards and presence constructors together makes the larger * persistence flows read in terms of their domain operation instead of their * repeated boundary checks. */ import type { NormalizedCell } from "../../../contracts/encoding/types.js"; import { type ScalarEntityFlushChange } from "../../../contracts/storage/scalar.js"; import { type TypedSheetsEntityFieldMapping, type TypedSheetsEntityMapping, requireTypedSheetsEntityProjection } from "../../mapping/entityMapping.js"; import type { ResolvedWriterOptions } from "./contracts.js"; /** Returns a namespaced ID and rejects an invalid injected ID source. */ export declare function identifiedValue(prefix: string, writer: ResolvedWriterOptions): string; /** Reads one mapped field and fails before an incomplete canonical commit. */ export declare function requireEncodedField(encodedEntity: Readonly>, field: TypedSheetsEntityFieldMapping): NormalizedCell; /** Validates the primary-key value promoted by Hikoutei's scalar flush plan. * * Accepts a non-empty string or safe-integer number and normalizes both to * `String(id)` so canonical state, anchors, and outbox effects agree. */ export declare function requireChangeEntityId(mapping: TypedSheetsEntityMapping, change: ScalarEntityFlushChange): string; /** Builds the stable target ID used by a physical projection row effect. */ export declare function projectionRowTargetId(physicalSheetId: string, rowBindingId: string): string; /** Throws the common error used when a projection cannot safely be planned. */ export declare function throwProjectionBlocked(mapping: TypedSheetsEntityMapping, projection: ReturnType, reason: string): never; //# sourceMappingURL=helpers.d.ts.map