import { Op } from 'sharedb/lib/client'; import DeltaOp from 'quill-delta/dist/Op'; import { DocBlock, DocComment, EditorDoc } from "../../../commons/doc"; export { DocBlock, EditorDoc, DocComment, BlockLockInfo, BlockBase, TextAlign, Doc2MarkdownOptionalOptions, } from "../../../commons/doc"; export declare type MessageCallback = (msg: object) => void; export interface DocContainer { data: () => any; initPresence: () => Promise; insertBlock: (rootObjectName: string, index: number, block: DocBlock) => Promise; deleteObject: (rootObjectName: string, index: number) => Promise; updateObject: (rootObjectName: string, index: number, obj: Object) => boolean; replaceObject: (rootObjectName: string, index: number, obj: Object) => Promise; submitRichTextBlockOps: (rootObjectName: string, index: number, ops: DeltaOp[]) => Promise; insertRootObject: (rootObjectName: string, obj: Object) => Promise; createComment: (id: string, groupId: string, userId: string, userName: string, avatarUrl: string, doc: EditorDoc, abstract: string) => Promise; deleteComment: (id: string) => Promise; updateComment: (id: string, data: EditorDoc) => Promise; subscribe: (callback: (err: { code: number; message: string; } | null) => void) => void; onOp(callback: ((ops: Op[], source: boolean) => void)): void; onNothingPending(callback: () => void): void; onCreate(callback: (source: boolean) => void): void; onDelete(callback: (data: any, source: boolean) => void): void; broadcastMessage: (msg: object) => Promise; getComment: (id: string) => DocComment; getComments(): DocComment[][]; getGroupComments(groupId: string): DocComment[]; applyOps(ops: any): void; delDoc: () => Promise; createDoc: (data: EditorDoc) => Promise; destroy(): void; } export declare function commentsMapToCommentArray(doc: EditorDoc): DocComment[][];