{
  "version": 3,
  "sources": ["../../../src/providers/http-polling/types.ts"],
  "sourcesContent": ["export type LocalAwarenessState = object | null;\n\nexport type AwarenessState = Record< string, LocalAwarenessState >;\n\n/**\n * Update types for the sync protocol:\n * - sync_step1: State vector announcement\n * - sync_step2: Acknowledgment, missing updates response\n * - update: Regular document update (persisted until save)\n * - compaction: Merged updates using Y.mergeUpdates replacing all prior updates\n */\nexport enum SyncUpdateType {\n\tCOMPACTION = 'compaction',\n\tSYNC_STEP_1 = 'sync_step1',\n\tSYNC_STEP_2 = 'sync_step2',\n\tUPDATE = 'update',\n}\n\nexport interface SyncUpdate {\n\tdata: string; // base64-encoded Yjs update\n\ttype: SyncUpdateType;\n}\n\ninterface SyncEnvelopeFromClient {\n\tafter: number;\n\tawareness: LocalAwarenessState;\n\tclient_id: number;\n\troom: string;\n\tupdates: SyncUpdate[];\n}\n\ninterface SyncEnvelopeFromServer {\n\tawareness: AwarenessState;\n\tcompaction_request?: SyncUpdate[]; // deprecated\n\tend_cursor: number; // use as `after` in next request\n\tshould_compact?: boolean;\n\troom: string;\n\tupdates: SyncUpdate[];\n}\n\nexport interface SyncPayload {\n\trooms: SyncEnvelopeFromClient[];\n}\n\nexport interface SyncResponse {\n\trooms: SyncEnvelopeFromServer[];\n}\n\nexport interface UpdateQueue {\n\tadd: ( update: SyncUpdate ) => void;\n\taddBulk: ( updates: SyncUpdate[] ) => void;\n\tclear: () => void;\n\tget: () => SyncUpdate[];\n\tpause: () => void;\n\trestore: ( updates: SyncUpdate[] ) => void;\n\tresume: () => void;\n\tsize: () => number;\n}\n"],
  "mappings": ";AAWO,IAAK,iBAAL,kBAAKA,oBAAL;AACN,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,iBAAc;AACd,EAAAA,gBAAA,iBAAc;AACd,EAAAA,gBAAA,YAAS;AAJE,SAAAA;AAAA,GAAA;",
  "names": ["SyncUpdateType"]
}
