import { type DrizzleExecutor } from "../drizzle.js"; import { type DocumentRealtimeAudience, type DocumentSummary } from "./types.js"; /** * Appends one client batch of opaque Yjs updates as the next sequenced row in * `documentUpdates` and advances the head sequence on `documents`, replaying an already * accepted `clientUpdateId` idempotently instead of writing twice. The owner may always * write; another actor must be able to post in any attached channel, with denial reported * as `not_found` so attachment is not probeable. Every * `DOCUMENT_COMPACTION_INTERVAL` batches the same transaction merges the log into the * `documents` snapshot and trims rows older than the replay-retention window, so storage * stays bounded while retried batches keep detecting their earlier commit. */ export declare function documentApplyUpdates(executor: DrizzleExecutor, input: { actorUserId: string; documentId: string; clientUpdateId: string; updates: readonly unknown[]; }): Promise<{ document: DocumentSummary; acceptedSequence: string; replayed: boolean; audience: DocumentRealtimeAudience; }>; //# sourceMappingURL=documentApplyUpdates.d.ts.map