import type { JsonValue } from "../../core/types.js"; import type { LiveMapDocumentAttributeValue, LiveMapDocumentAttrs, LiveMapDocumentContent, LiveMapDocumentRequestTarget } from "../../types/livemap.types.js"; import type { EchoDocumentAuthority } from "./echo.document-authority-registry.js"; export { echo_document_authority_for, register_echo_document_authority, unregister_echo_document_authority, } from "./echo.document-authority-registry.js"; export type { EchoDocumentAuthority } from "./echo.document-authority-registry.js"; export type EchoDocumentAction = Readonly<{ name: "document.attrs.set"; payload: { target: LiveMapDocumentRequestTarget; name: string; value: LiveMapDocumentAttributeValue; }; }> | Readonly<{ name: "document.attrs.drop"; payload: { target: LiveMapDocumentRequestTarget; name: string; }; }> | Readonly<{ name: "document.attrs.setMany"; payload: { target: LiveMapDocumentRequestTarget; values: LiveMapDocumentAttrs; }; }> | Readonly<{ name: "document.attrs.dropMany"; payload: { target: LiveMapDocumentRequestTarget; names: readonly string[]; }; }> | Readonly<{ name: "document.attrs.clear"; payload: { target: LiveMapDocumentRequestTarget; }; }> | Readonly<{ name: "document.attrs.replace"; payload: { target: LiveMapDocumentRequestTarget; values: LiveMapDocumentAttrs; }; }> | Readonly<{ name: "document.content.replace"; payload: { target: LiveMapDocumentRequestTarget; index: number; replacement: LiveMapDocumentContent; }; }> | Readonly<{ name: "document.content.insert"; payload: { target: LiveMapDocumentRequestTarget; index: number; content: LiveMapDocumentContent; }; }> | Readonly<{ name: "document.content.remove"; payload: { target: LiveMapDocumentRequestTarget; index: number; }; }> | Readonly<{ name: "document.content.move"; payload: { target: LiveMapDocumentRequestTarget; from: number; to: number; }; }>; type EchoDocumentStreamIdentity = Readonly<{ logicalMapId: string; incarnationId: string; }>; type EchoDocumentDispatchResult = Readonly<{ accepted: boolean; completionRev?: number; error?: Readonly<{ code?: string; message: string; }>; }>; export declare function make_echo_document_authority(dispatch: (action: EchoDocumentAction, identity: EchoDocumentStreamIdentity) => Promise, revision: () => number, observe: (listener: () => void) => () => void, replicaReady?: () => boolean, onReplicaDispose?: (listener: (reason: Error) => void) => () => void, waitUntilReplicaReady?: () => Promise, streamIdentity?: () => Readonly<{ logicalMapId: string; incarnationId: string | undefined; }>, onReplicaStateChange?: (listener: () => void) => () => void, replicaFailure?: () => unknown): EchoDocumentAuthority; export declare function document_action_payload_with_library(action: EchoDocumentAction, library: string): JsonValue; //# sourceMappingURL=echo.document-authority.d.ts.map