/** * Privacy-safe storage failures which the push protocol is allowed to turn * into durable application-write rejections. Database-specific errors remain * attached only as an internal cause and never cross the protocol boundary. */ export declare class StorageConstraintError extends Error { readonly name = "StorageConstraintError"; readonly opIndex: number | undefined; constructor(cause: unknown, opIndex?: number); } /** Stable, privacy-safe failures for trusted server storage queries. */ export type StorageQueryErrorCode = 'sync.storage.scan_requires_scope' | 'sync.storage.index_not_found' | 'sync.storage.index_not_materialized' | 'sync.storage.index_value_count_mismatch' | 'sync.storage.invalid_limit'; /** * Host-only query error. Messages never include identifiers, values, SQL, * paths, or row data; callers branch on `code`, never message text. */ export declare class StorageQueryError extends Error { readonly name = "StorageQueryError"; readonly code: StorageQueryErrorCode; constructor(code: StorageQueryErrorCode); } /** SQLite primary/extended constraint result codes (`SQLITE_CONSTRAINT*`). */ export declare function isSqliteConstraintError(error: unknown): boolean; /** PostgreSQL SQLSTATE class 23: integrity constraint violation. */ export declare function isPostgresConstraintError(error: unknown): boolean; /** * D1 may preserve SQLite's structured code or expose only a bounded platform * prefix. The text fallback is adapter-private classification only: no part of * the original message is copied to the public StorageConstraintError. */ export declare function isD1ConstraintError(error: unknown): boolean;