import AddCommentResponse from './responses/addcommentresponse.js'; import { IWebSocketGateway } from './../websocketgateway/websocketgateway.js'; import { IThread } from './descriptors/commentsthreaddescriptor.js'; import SessionCollection from '../sessions/sessioncollection.js'; import { IComment } from './descriptors/commentdescriptor.js'; import AddCommentThreadResponse from './responses/comment-threads/addcommentthreadresponse.js'; import ResolveCommentThreadResponse from './responses/comment-threads/resolvecommentthreadresponse.js'; export declare const _SERVICE: number; export interface IAddCommentThreadParams { commentThreadId: string; context?: Record | null; comments?: IComment[]; resolvedAt?: Date | string | null; createdAt?: Date | string | null; resolvedBy?: string | null; deletedAt?: Date | null | string; attributes?: Record | null; } export interface IUpdateCommentThreadParams { commentThreadId: string; context?: Record | null; attributes?: Record | null; unlinkedAt?: Date | null | string; } declare const CommentsService_base: { new (): import("ckeditor5/src/utils.js").Emitter; prototype: import("ckeditor5/src/utils.js").Emitter; }; declare class CommentsService extends /* #__PURE__ -- @preserve */ CommentsService_base { private readonly _documentId; private _isConnected; private _wsGateway?; private _channel?; private _connectedSessions?; private static readonly _SERVICE; constructor(_documentId: string); get isConnected(): boolean; /** * Connects to WebSocketGateway and starts listening on channel. */ connect(wsGateway: IWebSocketGateway): Promise; /** * Disconnects CommentsService from CKEditor Cloud Services. */ disconnect(): void; addComment(commentThreadId: string, commentId: string, content: string, attributes?: Record): Promise; updateComment(commentThreadId: string, commentId: string, content: string, attributes?: Record): Promise; removeComment(commentThreadId: string, commentId: string): Promise; removeCommentThread(commentThreadId: string): Promise; addCommentThread(addCommentThreadParams: IAddCommentThreadParams): Promise; resolveCommentThread(commentThreadId: string): Promise; reopenCommentThread(commentThreadId: string): Promise; updateCommentThread(params: IUpdateCommentThreadParams): Promise; getCommentThread(commentThreadId: string, attempt?: number): Promise; getDocumentThreads(): Promise<{ threads: IThread[]; }>; /** * Returns read-only observable collection with EndUsers Sessions for comments service. */ getConnectedSessions(): Promise; /** * Starts to listen on a given channel. */ private _connectToChannel; /** * Processes websocket gateway state changes. */ private _onWsGatewayStateChange; private _sendRequest; } export default CommentsService;