/** Stable Sync_Conflicts audit projection schema and row materialization helpers. */ import type { SyncConflict } from "../../domain/model/types.js"; import type { NormalizedCell } from "../../encoding/types.js"; import { CoreErrorException } from "../../domain/errors/index.js"; /** * Stable error categories for Sync_Conflicts audit projection misuse. * * The audit state union is Sheets-tab semantics owned by this provider * package: projecting a resolved conflict as unresolved (or vice versa, or * with a mismatched command identity) is a projection inconsistency. The * code string preserves the pre-move stable value so persisted diagnostics * and existing assertions keep matching; only the error identity moved with * the module. Code strings are stable and must never change. */ export declare const SYNC_CONFLICT_PROJECTION_ERROR_CODES: { readonly INCONSISTENT_AUDIT_STATE: "resolution_storage_inconsistent"; }; export type SyncConflictProjectionErrorCode = (typeof SYNC_CONFLICT_PROJECTION_ERROR_CODES)[keyof typeof SYNC_CONFLICT_PROJECTION_ERROR_CODES]; /** Error raised when a conflict record violates the audit projection state union. */ export declare class SyncConflictProjectionError extends CoreErrorException<"runtime.sync_sheets", SyncConflictProjectionErrorCode> { constructor(code: SyncConflictProjectionErrorCode, message: string); } /** Fixed audit headers shared by every entity-specific Sync_Conflicts tab. */ export declare const SYNC_CONFLICT_PROJECTION_HEADERS: readonly ["Conflict_ID", "Conflict_Group_ID", "Event_ID", "Entity_ID", "Field_Name", "User_Value", "User_Base_Revision", "Canonical_Value_At_Detection", "Canonical_Revision_At_Detection", "Current_Canonical_Value", "Current_Canonical_Revision", "Candidate_Epoch", "Status", "Resolution", "Resolution_Command_ID"]; /** Registered range covering the fixed Sync_Conflicts audit schema. */ export declare const SYNC_CONFLICT_PROJECTION_REGISTERED_RANGE = "A:O"; /** Resolution value written when the canonical SQLite value wins automatically. */ export declare const SYNC_CONFLICT_RESOLUTIONS: { readonly SYSTEM_WINS: "system_wins"; }; /** * Builds the audit row for an unresolved conflict (OPEN or NEEDS_REBASE). * * The audit state union requires blank Resolution and Resolution_Command_ID * cells while a conflict is not resolved, and an unresolved conflict must * never carry a resolution command identity; only the RESOLVED variant * carries the system_wins marker and its durable command identity. Any * combination that would emit a command ID from an unresolved row is a * projection-inconsistency failure. */ export declare function openSyncConflictAuditProjectionFields(conflict: SyncConflict): Readonly>; /** * Builds the audit row for a system-wins resolved conflict. * * The audit state union requires a RESOLVED conflict carrying its applied * resolution command identity; projecting anything else as resolved is a * projection-inconsistency failure. */ export declare function resolvedSyncConflictAuditProjectionFields(conflict: SyncConflict): Readonly>; //# sourceMappingURL=conflictProjection.d.ts.map