import { WORK_OFFICE_COLLABORATION_PROTOCOL, WORK_OFFICE_COLLABORATION_VERSION, type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration'; export declare const WORK_OFFICE_COLLABORATION_DEFAULT_MAX_TRANSPORT_PAYLOAD_BYTES: number; export declare const WORK_OFFICE_COLLABORATION_MAX_TRANSPORT_PAYLOAD_BYTES: number; export type WorkOfficeCollaborationTransportMessageType = 'sync-step-1' | 'sync-step-2' | 'update'; /** * A structured-clone-safe envelope around standard Yjs v1 state vectors and * updates. The host may encode this envelope for its own wire protocol. */ export interface WorkOfficeCollaborationTransportMessage { readonly protocol: typeof WORK_OFFICE_COLLABORATION_PROTOCOL; readonly version: typeof WORK_OFFICE_COLLABORATION_VERSION; readonly artifactId: string; readonly artifactKind: WorkOfficeCollaborationSession['kind']; readonly namespace: string; readonly senderClientId: number; readonly type: WorkOfficeCollaborationTransportMessageType; readonly payload: Uint8Array; /** Present only for incremental updates whose Yjs transaction had a typed origin. */ readonly origin?: WorkOfficeCollaborationOrigin; } /** * Host-owned room channel. It owns connectivity, buffering, authentication, * authorization, persistence, and delivery ordering. */ export interface WorkOfficeCollaborationTransport { publish(message: WorkOfficeCollaborationTransportMessage): void; subscribe(listener: (message: unknown) => void): () => void; } export interface WorkOfficeCollaborationTransportBindingOptions { /** * Sends one SyncStep1 immediately after subscribing. Disable when the host * must wait for a room connection, then call `synchronize()` on connect. */ autoSynchronize?: boolean; maxPayloadBytes?: number; } export interface WorkOfficeCollaborationTransportBinding { /** Send a fresh state vector. Call this after every transport reconnect. */ synchronize(): void; destroy(): void; } export declare function createWorkOfficeCollaborationTransportBinding(session: WorkOfficeCollaborationSession, transport: WorkOfficeCollaborationTransport, options?: WorkOfficeCollaborationTransportBindingOptions): WorkOfficeCollaborationTransportBinding;