@ckeditor/ckeditor-cloud-services-collaboration 52.0.1 → 52.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/ckeditorcloudserviceserror.js +2 -2
- package/src/ckeditorcloudservicesservererror.js +2 -2
- package/src/collaborativeeditingservice/collaborativeeditingservice.js +2 -2
- package/src/collaborativeeditingservice/descriptors/operationmetadatadescriptor.js +2 -2
- package/src/collaborativeeditingservice/helpers/operationmetadatahelpers.js +2 -2
- package/src/collaborativeeditingservice/messages/collaborativeeditingconnectmessage.js +2 -2
- package/src/collaborativeeditingservice/messages/collaborativeeditingreconnectmessage.js +2 -2
- package/src/collaborativeeditingservice/messages/collaborativeeditingupdatemessage.js +2 -2
- package/src/collaborativeeditingservice/messages/getdocumentdetailsmessage.js +2 -2
- package/src/collaborativeeditingservice/responses/collaborativeeditingconnectresponse.js +2 -2
- package/src/collaborativeeditingservice/responses/collaborativeeditingresponse.js +2 -2
- package/src/collaborativeeditingservice/responses/getdocumentdetailsresponse.js +2 -2
- package/src/comments-v2/commentsservice.js +2 -2
- package/src/comments-v2/descriptors/commentdescriptor.js +2 -2
- package/src/comments-v2/descriptors/commentsthreaddescriptor.js +2 -2
- package/src/comments-v2/descriptors/commentthreadaddedcomment.js +2 -2
- package/src/comments-v2/messages/addcommentmessage.js +2 -2
- package/src/comments-v2/messages/comment-threads/addcommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/comment-threads/reopencommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/comment-threads/resolvecommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/comment-threads/updatecommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/connectmessage.js +2 -2
- package/src/comments-v2/messages/getcommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/getdocumentthreadsmessage.js +2 -2
- package/src/comments-v2/messages/removecommentmessage.js +2 -2
- package/src/comments-v2/messages/removecommentthreadmessage.js +2 -2
- package/src/comments-v2/messages/updatecommentmessage.js +2 -2
- package/src/comments-v2/responses/addcommentresponse.js +2 -2
- package/src/comments-v2/responses/comment-threads/addcommentthreadresponse.js +2 -2
- package/src/comments-v2/responses/comment-threads/resolvecommentthreadresponse.js +2 -2
- package/src/comments-v2/responses/connectresponse.js +2 -2
- package/src/comments-v2/responses/getcommentthreadresponse.js +2 -2
- package/src/comments-v2/responses/getdocumentthreadsresponse.js +2 -2
- package/src/compiledmessages.d.ts +8313 -9
- package/src/compiledmessages.js +2 -2
- package/src/descriptor.js +2 -2
- package/src/descriptors/keyvaluedescriptor.js +2 -2
- package/src/editor/editorservice.js +2 -2
- package/src/editor/messages/iseditorbundleuploadedmessage.js +2 -2
- package/src/editor/responses/iseditorbundleuploadedresponse.js +2 -2
- package/src/errors/ServiceNotConnectedError.js +2 -2
- package/src/index.js +2 -2
- package/src/message.js +2 -2
- package/src/messagescompressor.js +2 -2
- package/src/messagesmapper.js +2 -2
- package/src/revision-history/descriptors/revisiondescriptor.js +2 -2
- package/src/revision-history/messages/revisionhistoryconnectmessage.js +2 -2
- package/src/revision-history/messages/revisionhistorygetrevisionmessage.js +2 -2
- package/src/revision-history/messages/revisionhistoryreconnectmessage.js +2 -2
- package/src/revision-history/messages/revisionhistoryupdaterevisionsmessage.js +2 -2
- package/src/revision-history/responses/revisionhistoryconnectresponse.js +2 -2
- package/src/revision-history/responses/revisionhistorygetrevisionresponse.js +2 -2
- package/src/revision-history/responses/revisionhistoryupdaterevisionsresponse.js +2 -2
- package/src/revision-history/revision.js +2 -2
- package/src/revision-history/revisionhistoryservice.js +2 -2
- package/src/services.js +2 -2
- package/src/sessions/descriptors/sessiondescriptor.js +2 -2
- package/src/sessions/messages/sessionsconnectmessage.js +2 -2
- package/src/sessions/messages/socketconnectmessage.js +2 -2
- package/src/sessions/messages/socketdisconnectmessage.js +2 -2
- package/src/sessions/responses/sessionsconnectresponse.js +2 -2
- package/src/sessions/sessioncollection.js +2 -2
- package/src/sessions/sessions.js +2 -2
- package/src/track-changes/descriptors/suggestiondescriptor.js +2 -2
- package/src/track-changes/messages/addsuggestionmessage.js +2 -2
- package/src/track-changes/messages/batchUpdateSuggestionsStateMessage.js +2 -2
- package/src/track-changes/messages/connectmessage.js +2 -2
- package/src/track-changes/messages/getallsuggestionsmessage.js +2 -2
- package/src/track-changes/messages/getsuggestionmessage.js +2 -2
- package/src/track-changes/messages/updatesuggestionmessage.js +2 -2
- package/src/track-changes/responses/addsuggestionresponse.js +2 -2
- package/src/track-changes/responses/connectresponse.js +2 -2
- package/src/track-changes/responses/getallsuggestionsresponse.js +2 -2
- package/src/track-changes/responses/getsuggestionresponse.js +2 -2
- package/src/track-changes/trackchangesservice.js +2 -2
- package/src/types.js +2 -2
- package/src/users/descriptors/userdescriptor.js +2 -2
- package/src/users/messages/getmanyusersmessage.js +2 -2
- package/src/users/messages/getusermessage.js +2 -2
- package/src/users/responses/getmanyusersresponse.js +2 -2
- package/src/users/responses/getuserresponse.js +2 -2
- package/src/users/user.js +2 -2
- package/src/version.js +2 -2
- package/src/websocketgateway/channel.js +2 -2
- package/src/websocketgateway/messages/channelmessage.js +2 -2
- package/src/websocketgateway/parser/packetparser.js +2 -2
- package/src/websocketgateway/parser/packets/bytesbytespacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/numberbytespacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/numbernumberpacketdatamessag.js +2 -2
- package/src/websocketgateway/parser/packets/numberobjectpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/numberstringpacketdatamessag.js +2 -2
- package/src/websocketgateway/parser/packets/objectbufferpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/objectobjectpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/packagedatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/packetmessage.js +2 -2
- package/src/websocketgateway/parser/packets/packetoptionsmessage.js +2 -2
- package/src/websocketgateway/parser/packets/stringbytespacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/stringnumberpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/stringobjectpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/packets/stringstringpacketdatamessage.js +2 -2
- package/src/websocketgateway/parser/parser.js +2 -2
- package/src/websocketgateway/parser/parserutils.js +2 -2
- package/src/websocketgateway/requestsmanager.js +2 -2
- package/src/websocketgateway/websocketgateway.js +2 -2
- package/src/ckeditorcloudserviceserror.d.ts +0 -8
- package/src/ckeditorcloudservicesservererror.d.ts +0 -15
- package/src/collaborativeeditingservice/collaborativeeditingservice.d.ts +0 -127
- package/src/collaborativeeditingservice/descriptors/operationmetadatadescriptor.d.ts +0 -18
- package/src/collaborativeeditingservice/helpers/operationmetadatahelpers.d.ts +0 -11
- package/src/collaborativeeditingservice/messages/collaborativeeditingconnectmessage.d.ts +0 -24
- package/src/collaborativeeditingservice/messages/collaborativeeditingreconnectmessage.d.ts +0 -19
- package/src/collaborativeeditingservice/messages/collaborativeeditingupdatemessage.d.ts +0 -38
- package/src/collaborativeeditingservice/messages/getdocumentdetailsmessage.d.ts +0 -16
- package/src/collaborativeeditingservice/responses/collaborativeeditingconnectresponse.d.ts +0 -68
- package/src/collaborativeeditingservice/responses/collaborativeeditingresponse.d.ts +0 -51
- package/src/collaborativeeditingservice/responses/getdocumentdetailsresponse.d.ts +0 -28
- package/src/comments-v2/commentsservice.d.ts +0 -72
- package/src/comments-v2/descriptors/commentdescriptor.d.ts +0 -23
- package/src/comments-v2/descriptors/commentsthreaddescriptor.d.ts +0 -31
- package/src/comments-v2/descriptors/commentthreadaddedcomment.d.ts +0 -15
- package/src/comments-v2/messages/addcommentmessage.d.ts +0 -30
- package/src/comments-v2/messages/comment-threads/addcommentthreadmessage.d.ts +0 -32
- package/src/comments-v2/messages/comment-threads/reopencommentthreadmessage.d.ts +0 -17
- package/src/comments-v2/messages/comment-threads/resolvecommentthreadmessage.d.ts +0 -21
- package/src/comments-v2/messages/comment-threads/updatecommentthreadmessage.d.ts +0 -23
- package/src/comments-v2/messages/connectmessage.d.ts +0 -15
- package/src/comments-v2/messages/getcommentthreadmessage.d.ts +0 -17
- package/src/comments-v2/messages/getdocumentthreadsmessage.d.ts +0 -15
- package/src/comments-v2/messages/removecommentmessage.d.ts +0 -19
- package/src/comments-v2/messages/removecommentthreadmessage.d.ts +0 -17
- package/src/comments-v2/messages/updatecommentmessage.d.ts +0 -28
- package/src/comments-v2/responses/addcommentresponse.d.ts +0 -17
- package/src/comments-v2/responses/comment-threads/addcommentthreadresponse.d.ts +0 -22
- package/src/comments-v2/responses/comment-threads/resolvecommentthreadresponse.d.ts +0 -19
- package/src/comments-v2/responses/connectresponse.d.ts +0 -19
- package/src/comments-v2/responses/getcommentthreadresponse.d.ts +0 -33
- package/src/comments-v2/responses/getdocumentthreadsresponse.d.ts +0 -17
- package/src/descriptor.d.ts +0 -13
- package/src/descriptors/keyvaluedescriptor.d.ts +0 -5
- package/src/editor/editorservice.d.ts +0 -11
- package/src/editor/messages/iseditorbundleuploadedmessage.d.ts +0 -15
- package/src/editor/responses/iseditorbundleuploadedresponse.d.ts +0 -13
- package/src/errors/ServiceNotConnectedError.d.ts +0 -4
- package/src/index.d.ts +0 -66
- package/src/message.d.ts +0 -17
- package/src/messagescompressor.d.ts +0 -15
- package/src/messagesmapper.d.ts +0 -9
- package/src/revision-history/descriptors/revisiondescriptor.d.ts +0 -42
- package/src/revision-history/messages/revisionhistoryconnectmessage.d.ts +0 -15
- package/src/revision-history/messages/revisionhistorygetrevisionmessage.d.ts +0 -17
- package/src/revision-history/messages/revisionhistoryreconnectmessage.d.ts +0 -17
- package/src/revision-history/messages/revisionhistoryupdaterevisionsmessage.d.ts +0 -41
- package/src/revision-history/responses/revisionhistoryconnectresponse.d.ts +0 -30
- package/src/revision-history/responses/revisionhistorygetrevisionresponse.d.ts +0 -30
- package/src/revision-history/responses/revisionhistoryupdaterevisionsresponse.d.ts +0 -13
- package/src/revision-history/revision.d.ts +0 -15
- package/src/revision-history/revisionhistoryservice.d.ts +0 -75
- package/src/services.d.ts +0 -8
- package/src/sessions/descriptors/sessiondescriptor.d.ts +0 -5
- package/src/sessions/messages/sessionsconnectmessage.d.ts +0 -17
- package/src/sessions/messages/socketconnectmessage.d.ts +0 -21
- package/src/sessions/messages/socketdisconnectmessage.d.ts +0 -15
- package/src/sessions/responses/sessionsconnectresponse.d.ts +0 -21
- package/src/sessions/sessioncollection.d.ts +0 -39
- package/src/sessions/sessions.d.ts +0 -14
- package/src/track-changes/descriptors/suggestiondescriptor.d.ts +0 -25
- package/src/track-changes/messages/addsuggestionmessage.d.ts +0 -25
- package/src/track-changes/messages/batchUpdateSuggestionsStateMessage.d.ts +0 -19
- package/src/track-changes/messages/connectmessage.d.ts +0 -15
- package/src/track-changes/messages/getallsuggestionsmessage.d.ts +0 -15
- package/src/track-changes/messages/getsuggestionmessage.d.ts +0 -17
- package/src/track-changes/messages/updatesuggestionmessage.d.ts +0 -25
- package/src/track-changes/responses/addsuggestionresponse.d.ts +0 -27
- package/src/track-changes/responses/connectresponse.d.ts +0 -19
- package/src/track-changes/responses/getallsuggestionsresponse.d.ts +0 -17
- package/src/track-changes/responses/getsuggestionresponse.d.ts +0 -27
- package/src/track-changes/trackchangesservice.d.ts +0 -62
- package/src/types.d.ts +0 -7
- package/src/users/descriptors/userdescriptor.d.ts +0 -5
- package/src/users/messages/getmanyusersmessage.d.ts +0 -15
- package/src/users/messages/getusermessage.d.ts +0 -15
- package/src/users/responses/getmanyusersresponse.d.ts +0 -13
- package/src/users/responses/getuserresponse.d.ts +0 -13
- package/src/users/user.d.ts +0 -41
- package/src/version.d.ts +0 -2
- package/src/websocketgateway/channel.d.ts +0 -31
- package/src/websocketgateway/messages/channelmessage.d.ts +0 -21
- package/src/websocketgateway/parser/packetparser.d.ts +0 -15
- package/src/websocketgateway/parser/packets/bytesbytespacketdatamessage.d.ts +0 -18
- package/src/websocketgateway/parser/packets/numberbytespacketdatamessage.d.ts +0 -18
- package/src/websocketgateway/parser/packets/numbernumberpacketdatamessag.d.ts +0 -17
- package/src/websocketgateway/parser/packets/numberobjectpacketdatamessage.d.ts +0 -17
- package/src/websocketgateway/parser/packets/numberstringpacketdatamessag.d.ts +0 -17
- package/src/websocketgateway/parser/packets/objectbufferpacketdatamessage.d.ts +0 -18
- package/src/websocketgateway/parser/packets/objectobjectpacketdatamessage.d.ts +0 -17
- package/src/websocketgateway/parser/packets/packagedatamessage.d.ts +0 -16
- package/src/websocketgateway/parser/packets/packetmessage.d.ts +0 -31
- package/src/websocketgateway/parser/packets/packetoptionsmessage.d.ts +0 -18
- package/src/websocketgateway/parser/packets/stringbytespacketdatamessage.d.ts +0 -18
- package/src/websocketgateway/parser/packets/stringnumberpacketdatamessage.d.ts +0 -17
- package/src/websocketgateway/parser/packets/stringobjectpacketdatamessage.d.ts +0 -17
- package/src/websocketgateway/parser/packets/stringstringpacketdatamessage.d.ts +0 -17
- package/src/websocketgateway/parser/parser.d.ts +0 -14
- package/src/websocketgateway/parser/parserutils.d.ts +0 -27
- package/src/websocketgateway/requestsmanager.d.ts +0 -20
- package/src/websocketgateway/websocketgateway.d.ts +0 -164
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import CollaborativeEditingConnectMessage from './messages/collaborativeeditingconnectmessage';
|
|
3
|
-
import CollaborativeEditingReconnectMessage from './messages/collaborativeeditingreconnectmessage';
|
|
4
|
-
import CollaborativeEditingResponse from './responses/collaborativeeditingresponse';
|
|
5
|
-
import CollaborativeEditingConnectResponse from './responses/collaborativeeditingconnectresponse';
|
|
6
|
-
import { IWebSocketGateway } from './../websocketgateway/websocketgateway';
|
|
7
|
-
import SessionCollection from '../sessions/sessioncollection';
|
|
8
|
-
import GetDocumentDetailsResponse from './responses/getdocumentdetailsresponse';
|
|
9
|
-
export declare const _SERVICE: number;
|
|
10
|
-
export interface IOperationsData {
|
|
11
|
-
buffers: (Buffer | Uint8Array)[];
|
|
12
|
-
types: number[];
|
|
13
|
-
}
|
|
14
|
-
declare const CollaborativeEditingService_base: {
|
|
15
|
-
new (): import("ckeditor5/src/utils").Emitter;
|
|
16
|
-
prototype: import("ckeditor5/src/utils").Emitter;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* General purpose CollaborativeEditingService used to synchronize data store values with other collaborative nodes.
|
|
20
|
-
*/
|
|
21
|
-
declare class CollaborativeEditingService extends CollaborativeEditingService_base {
|
|
22
|
-
static _SERVICE: number;
|
|
23
|
-
private readonly _bundleVersion;
|
|
24
|
-
private readonly _id;
|
|
25
|
-
private _isConnected;
|
|
26
|
-
private _wsGateway?;
|
|
27
|
-
private _channel?;
|
|
28
|
-
private _connectedSessions?;
|
|
29
|
-
/**
|
|
30
|
-
* Create CollaborativeEditingService instance.
|
|
31
|
-
*
|
|
32
|
-
* const collabWritingService = new CollaborativeEditingService( '0.9.0', 'post-456-text' );
|
|
33
|
-
*
|
|
34
|
-
* @throws {TypeError}
|
|
35
|
-
* Throws when bundleVersion param is not provided.
|
|
36
|
-
*/
|
|
37
|
-
constructor(bundleVersion: string, serviceId?: string);
|
|
38
|
-
getId(): string;
|
|
39
|
-
/**
|
|
40
|
-
* Indicates that CollaborativeEditingService is connected to CKEditor Cloud Services.
|
|
41
|
-
*/
|
|
42
|
-
isConnected(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Connects CollaborativeEditingService to CKEditor Cloud Services.
|
|
45
|
-
*
|
|
46
|
-
* const myDocument = new CollaborativeEditingService( '0.9.0', 'article-1234' );
|
|
47
|
-
*
|
|
48
|
-
* await myDocument.connect( wsGateway );
|
|
49
|
-
*
|
|
50
|
-
* @throws {CKEditorCloudServicesError}
|
|
51
|
-
* Thrown in the case of errors on the backend side.
|
|
52
|
-
*/
|
|
53
|
-
connect(wsGateway: IWebSocketGateway, data?: {
|
|
54
|
-
buffers: Buffer[];
|
|
55
|
-
types: number[];
|
|
56
|
-
}, lastOperationId?: string): Promise<CollaborativeEditingConnectResponse | void>;
|
|
57
|
-
/**
|
|
58
|
-
* Reconnects CollaborativeEditingService to CKEditor Cloud Services.
|
|
59
|
-
*
|
|
60
|
-
* const myDocument = new CollaborativeEditingService( '0.9.0', 'article-1234' );
|
|
61
|
-
*
|
|
62
|
-
* await myDocument.connect( wsGateway );
|
|
63
|
-
*
|
|
64
|
-
* wsGateway.on( 'change:state', ( event, property, value ) => {
|
|
65
|
-
* if( value === 'disconnected' ) {
|
|
66
|
-
* await myDocument.reconnect( wsGateway, 123 );
|
|
67
|
-
* }
|
|
68
|
-
* } );
|
|
69
|
-
*
|
|
70
|
-
* @throws {CKEditorCloudServicesError}
|
|
71
|
-
* Thrown when connection already exists or in the case of errors on the backend side.
|
|
72
|
-
*/
|
|
73
|
-
reconnect(wsGateway: IWebSocketGateway, lastKnowVersion: number): Promise<CollaborativeEditingConnectResponse>;
|
|
74
|
-
/**
|
|
75
|
-
* Disconnects CollaborativeEditingService from CKEditor Cloud Services.
|
|
76
|
-
*
|
|
77
|
-
* @throws {CKEditorCloudServicesError}
|
|
78
|
-
* Thrown in the case of errors on the backend side.
|
|
79
|
-
*/
|
|
80
|
-
disconnect(): void;
|
|
81
|
-
/**
|
|
82
|
-
* Gets document details from CKEditor Cloud Services.
|
|
83
|
-
*
|
|
84
|
-
* @throws {CKEditorCloudServicesError}
|
|
85
|
-
* Thrown in the case of errors on the backend side.
|
|
86
|
-
*/
|
|
87
|
-
getDocumentDetails(): Promise<GetDocumentDetailsResponse>;
|
|
88
|
-
/**
|
|
89
|
-
* Sends update to connected service. This will propagate update to other connected CollaborativeEditingService.
|
|
90
|
-
* Data update will not be stored on CollaborativeEditingService server instance.
|
|
91
|
-
*
|
|
92
|
-
* @throws {CKEditorCloudServicesError}
|
|
93
|
-
* Throws when baseVersion or data is not provided, data is empty, or in the case of errors on the backend side.
|
|
94
|
-
*
|
|
95
|
-
* @throws {ServiceNotConnectedError}
|
|
96
|
-
* Throws when collaborative editing service is not connected.
|
|
97
|
-
*/
|
|
98
|
-
sendOperations(data: IOperationsData, baseVersion: number | string, lastOperationId: string): Promise<CollaborativeEditingResponse>;
|
|
99
|
-
/**
|
|
100
|
-
* Returns read-only observable collection with EndUsers Sessions for collaborative editing service.
|
|
101
|
-
*
|
|
102
|
-
* @throws {CKEditorCloudServicesError}
|
|
103
|
-
* Thrown in the case of errors on the backend side.
|
|
104
|
-
*/
|
|
105
|
-
getConnectedSessions(): Promise<SessionCollection>;
|
|
106
|
-
/**
|
|
107
|
-
* Returns a Promise that resolves with read-only observable collection with EndUsers Sessions for given id.
|
|
108
|
-
*
|
|
109
|
-
* const sessions = await CollaborativeEditingService.getConnectedSessions( 'my-document-id' );
|
|
110
|
-
*
|
|
111
|
-
* @deprecated Use not static version of getConnectedSessions method.
|
|
112
|
-
*
|
|
113
|
-
* @throws {CKEditorCloudServicesError}
|
|
114
|
-
* Throws in the case of errors on the backend side.
|
|
115
|
-
*/
|
|
116
|
-
static getConnectedSessions(wsGateway: IWebSocketGateway, id: string): Promise<SessionCollection>;
|
|
117
|
-
_connect(wsGateway: IWebSocketGateway, message: CollaborativeEditingConnectMessage | CollaborativeEditingReconnectMessage): Promise<CollaborativeEditingConnectResponse | void>;
|
|
118
|
-
/**
|
|
119
|
-
* Connects given CollaborativeEditingService to channel.
|
|
120
|
-
*/
|
|
121
|
-
protected _connectToChannel(wsGateway: IWebSocketGateway, channelName: string): void;
|
|
122
|
-
/**
|
|
123
|
-
* WebSocketGateway "change:state" events handler.
|
|
124
|
-
*/
|
|
125
|
-
private _onWsGatewayStateChange;
|
|
126
|
-
}
|
|
127
|
-
export default CollaborativeEditingService;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Descriptor, { IDescriptorBody } from './../../descriptor';
|
|
2
|
-
interface IBaseOperationMetadata {
|
|
3
|
-
userId: string;
|
|
4
|
-
type?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IOperationMetadata extends IBaseOperationMetadata {
|
|
7
|
-
createdAt?: Date;
|
|
8
|
-
}
|
|
9
|
-
export interface IOperationMetadataJSON extends IBaseOperationMetadata {
|
|
10
|
-
createdAt?: string;
|
|
11
|
-
}
|
|
12
|
-
export default class OperationMetadataDescriptor extends Descriptor {
|
|
13
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
14
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
15
|
-
static toJSON({ createdAt, ...metadata }: IOperationMetadata): IOperationMetadataJSON;
|
|
16
|
-
static fromJSON({ createdAt, ...metadata }: IOperationMetadataJSON): IOperationMetadata;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IOperationMetadata, IOperationMetadataJSON } from '../descriptors/operationmetadatadescriptor';
|
|
2
|
-
export default class OperationMetadataHelpers {
|
|
3
|
-
/**
|
|
4
|
-
* Prepares metadata data for all operations. Adds metadata to operations with type 0.
|
|
5
|
-
*/
|
|
6
|
-
static prepareMetadataForOperations(types: number[], metadata: IOperationMetadataJSON[]): IOperationMetadataJSON[];
|
|
7
|
-
/**
|
|
8
|
-
* Removes unnecessary metadata for operations with type 0.
|
|
9
|
-
*/
|
|
10
|
-
static removeUnnecessaryMetadata(types: number[], metadata: IOperationMetadata[]): IOperationMetadata[];
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import Message, { IMessage } from './../../message';
|
|
3
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
4
|
-
export interface ICollaborativeEditingConnectMessage extends IMessage {
|
|
5
|
-
id: string;
|
|
6
|
-
bundleVersion: string;
|
|
7
|
-
buffers: Buffer[];
|
|
8
|
-
types: number[];
|
|
9
|
-
lastOperationId?: string;
|
|
10
|
-
}
|
|
11
|
-
export default class CollaborativeEditingConnectMessage extends Message {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly buffers: Buffer[];
|
|
14
|
-
readonly types: number[];
|
|
15
|
-
readonly bundleVersion: string;
|
|
16
|
-
readonly lastOperationId: string;
|
|
17
|
-
static readonly TYPE: string;
|
|
18
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
19
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
20
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
21
|
-
constructor(id: string, buffers: Buffer[], types: number[], bundleVersion: string, lastOperationId?: string);
|
|
22
|
-
toJSON(): ICollaborativeEditingConnectMessage;
|
|
23
|
-
static fromJSON(data: ICollaborativeEditingConnectMessage): CollaborativeEditingConnectMessage;
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Message, { IMessage } from './../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
3
|
-
export interface ICollaborativeEditingReconnectMessage extends IMessage {
|
|
4
|
-
id: string;
|
|
5
|
-
lastKnowVersion: number;
|
|
6
|
-
bundleVersion: string;
|
|
7
|
-
}
|
|
8
|
-
export default class CollaborativeEditingReconnectMessage extends Message {
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly lastKnowVersion: number;
|
|
11
|
-
readonly bundleVersion: string;
|
|
12
|
-
static readonly TYPE: string;
|
|
13
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
14
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
15
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
16
|
-
constructor(id: string, lastKnowVersion: number, bundleVersion: string);
|
|
17
|
-
toJSON(): ICollaborativeEditingReconnectMessage;
|
|
18
|
-
static fromJSON(data: ICollaborativeEditingReconnectMessage): CollaborativeEditingReconnectMessage;
|
|
19
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import Message, { IMessage } from './../../message';
|
|
3
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
4
|
-
import { IOperationMetadata, IOperationMetadataJSON } from '../descriptors/operationmetadatadescriptor';
|
|
5
|
-
export interface ICollaborativeEditingUpdateMessage extends IMessage {
|
|
6
|
-
id: string;
|
|
7
|
-
buffers: Buffer[] | Uint8Array[];
|
|
8
|
-
types: number[];
|
|
9
|
-
baseVersion: number;
|
|
10
|
-
metadata: IOperationMetadataJSON[];
|
|
11
|
-
lastOperationId?: string;
|
|
12
|
-
}
|
|
13
|
-
interface ICollaborativeEditingUpdateData {
|
|
14
|
-
buffers: Buffer[] | Uint8Array[];
|
|
15
|
-
types: number[];
|
|
16
|
-
baseVersion: number;
|
|
17
|
-
lastOperationId?: string;
|
|
18
|
-
}
|
|
19
|
-
export default class CollaborativeEditingUpdateMessage extends Message {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly buffers: Buffer[] | Uint8Array[];
|
|
22
|
-
readonly types: number[];
|
|
23
|
-
readonly baseVersion: number;
|
|
24
|
-
readonly metadata: IOperationMetadata[];
|
|
25
|
-
readonly lastOperationId: string;
|
|
26
|
-
static readonly TYPE: string;
|
|
27
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
28
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
29
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
30
|
-
constructor(id: string, buffers: Buffer[] | Uint8Array[], types: number[], baseVersion: number, metadata?: IOperationMetadata[], lastOperationId?: string);
|
|
31
|
-
/**
|
|
32
|
-
* Returns compressed data of the operations.
|
|
33
|
-
*/
|
|
34
|
-
get data(): ICollaborativeEditingUpdateData;
|
|
35
|
-
toJSON(): ICollaborativeEditingUpdateMessage;
|
|
36
|
-
static fromJSON(data: ICollaborativeEditingUpdateMessage): CollaborativeEditingUpdateMessage;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Message from '../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
3
|
-
export interface IGetDocumentDetailsMessage {
|
|
4
|
-
documentId: string;
|
|
5
|
-
}
|
|
6
|
-
export default class GetDocumentDetailsMessage extends Message {
|
|
7
|
-
readonly documentId: string;
|
|
8
|
-
static readonly TYPE: string;
|
|
9
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
10
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
11
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
12
|
-
constructor(documentId: string);
|
|
13
|
-
get data(): IGetDocumentDetailsMessage;
|
|
14
|
-
toJSON(): IGetDocumentDetailsMessage;
|
|
15
|
-
static fromJSON(data: IGetDocumentDetailsMessage): GetDocumentDetailsMessage;
|
|
16
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import Message, { IMessage } from './../../message';
|
|
3
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
4
|
-
import { IOperationMetadata, IOperationMetadataJSON } from '../descriptors/operationmetadatadescriptor';
|
|
5
|
-
export interface ICollaborativeEditingConnectResponse extends IMessage {
|
|
6
|
-
channel: string;
|
|
7
|
-
offset: number;
|
|
8
|
-
version: number;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
buffers: Buffer[] | Uint8Array[];
|
|
11
|
-
types: number[];
|
|
12
|
-
metadata: IOperationMetadataJSON[];
|
|
13
|
-
initData: string;
|
|
14
|
-
isInitialized: boolean;
|
|
15
|
-
lastOperationId?: string;
|
|
16
|
-
sessionCreatedAt: string | null;
|
|
17
|
-
}
|
|
18
|
-
interface ICollaborativeEditingConnectResponseParams {
|
|
19
|
-
channel: string;
|
|
20
|
-
version: number;
|
|
21
|
-
sessionId?: string;
|
|
22
|
-
buffers?: Buffer[] | Uint8Array[];
|
|
23
|
-
types?: number[];
|
|
24
|
-
offset?: number;
|
|
25
|
-
metadata?: IOperationMetadata[];
|
|
26
|
-
initData?: string | null;
|
|
27
|
-
lastOperationId?: string;
|
|
28
|
-
sessionCreatedAt: Date | null;
|
|
29
|
-
}
|
|
30
|
-
interface ICollaborativeEditingConnectResponseData {
|
|
31
|
-
buffers: Buffer[] | Uint8Array[];
|
|
32
|
-
types: number[];
|
|
33
|
-
baseVersion: number;
|
|
34
|
-
lastOperationId?: string;
|
|
35
|
-
sessionCreatedAt: Date | null;
|
|
36
|
-
}
|
|
37
|
-
export default class CollaborativeEditingConnectResponse extends Message {
|
|
38
|
-
readonly channel: string;
|
|
39
|
-
readonly version: number;
|
|
40
|
-
readonly buffers: Buffer[] | Uint8Array[];
|
|
41
|
-
readonly types: number[];
|
|
42
|
-
readonly offset: number;
|
|
43
|
-
readonly metadata: IOperationMetadata[];
|
|
44
|
-
readonly initData: string | null;
|
|
45
|
-
readonly sessionId: string;
|
|
46
|
-
readonly lastOperationId: string;
|
|
47
|
-
readonly sessionCreatedAt: Date | null;
|
|
48
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
49
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated - Use CollaborativeEditingConnectResponse.create factory method instead.
|
|
52
|
-
*
|
|
53
|
-
* @param channel - Name of channel on which messages will be published.
|
|
54
|
-
* @param version - Version of the document.
|
|
55
|
-
* @param buffers - List of operations compressed to the binary format.
|
|
56
|
-
* @param types - List of compressor identifiers.
|
|
57
|
-
* @param offset - Number of changes in previous editing sessions.
|
|
58
|
-
* @param metadata - Metadata of changes.
|
|
59
|
-
* @param initData - Initialization data of the document.
|
|
60
|
-
*/
|
|
61
|
-
constructor(channel: string, version: number, buffers?: Buffer[] | Uint8Array[], types?: number[], offset?: number, metadata?: IOperationMetadata[], initData?: string | null, sessionId?: string, lastOperationId?: string, sessionCreatedAt?: Date | null);
|
|
62
|
-
get data(): ICollaborativeEditingConnectResponseData;
|
|
63
|
-
get wereChangesApplied(): boolean;
|
|
64
|
-
toJSON(): ICollaborativeEditingConnectResponse;
|
|
65
|
-
static create(params: ICollaborativeEditingConnectResponseParams): CollaborativeEditingConnectResponse;
|
|
66
|
-
static fromJSON(data: ICollaborativeEditingConnectResponse): CollaborativeEditingConnectResponse;
|
|
67
|
-
}
|
|
68
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import Message, { IMessage } from './../../message';
|
|
3
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
4
|
-
import { IOperationMetadata, IOperationMetadataJSON } from '../descriptors/operationmetadatadescriptor';
|
|
5
|
-
export interface ICollaborativeEditingResponse extends IMessage {
|
|
6
|
-
version: number;
|
|
7
|
-
buffers: Buffer[];
|
|
8
|
-
types: number[];
|
|
9
|
-
metadata: IOperationMetadataJSON[];
|
|
10
|
-
lastOperationId: string;
|
|
11
|
-
lastOperationAcceptedAt: string | null;
|
|
12
|
-
}
|
|
13
|
-
interface ICollaborativeEditingResponseParams {
|
|
14
|
-
version: number;
|
|
15
|
-
buffers?: Buffer[];
|
|
16
|
-
types?: number[];
|
|
17
|
-
metadata?: IOperationMetadata[];
|
|
18
|
-
lastOperationId?: string;
|
|
19
|
-
lastOperationAcceptedAt?: string | null;
|
|
20
|
-
}
|
|
21
|
-
interface ICollaborativeEditingResponseData {
|
|
22
|
-
buffers: Buffer[];
|
|
23
|
-
types: number[];
|
|
24
|
-
baseVersion: number;
|
|
25
|
-
lastOperationId: string;
|
|
26
|
-
lastOperationAcceptedAt: Date | null;
|
|
27
|
-
}
|
|
28
|
-
export default class CollaborativeEditingResponse extends Message {
|
|
29
|
-
readonly version: number;
|
|
30
|
-
readonly buffers: Buffer[];
|
|
31
|
-
readonly types: number[];
|
|
32
|
-
readonly metadata: IOperationMetadata[];
|
|
33
|
-
readonly lastOperationId: string;
|
|
34
|
-
readonly lastOperationAcceptedAt: Date | null;
|
|
35
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
36
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated - Use CollaborativeEditingResponse.create factory method instead.
|
|
39
|
-
* @param version - Version of the document.
|
|
40
|
-
* @param buffers - List of operations compressed to the binary format.
|
|
41
|
-
* @param types - List of compressor identifiers.
|
|
42
|
-
* @param metadata - Metadata of changes.
|
|
43
|
-
*/
|
|
44
|
-
constructor(version: number, buffers?: Buffer[], types?: number[], metadata?: IOperationMetadata[], lastOperationId?: string, lastOperationAcceptedAt?: Date | null);
|
|
45
|
-
get data(): ICollaborativeEditingResponseData;
|
|
46
|
-
get wereChangesApplied(): boolean;
|
|
47
|
-
toJSON(): ICollaborativeEditingResponse;
|
|
48
|
-
static fromJSON(data: ICollaborativeEditingResponse): CollaborativeEditingResponse;
|
|
49
|
-
static create(data: ICollaborativeEditingResponseParams): CollaborativeEditingResponse;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
2
|
-
import Message, { IMessage } from './../../message';
|
|
3
|
-
export interface IGetDocumentDetailsResponse extends IMessage {
|
|
4
|
-
lastDocumentSessionId?: string;
|
|
5
|
-
lastDocumentSessionOperationId?: string;
|
|
6
|
-
currentDocumentSessionId?: string;
|
|
7
|
-
currentDocumentSessionVersion?: number;
|
|
8
|
-
currentDocumentSessionOperationId?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ICurrentDocumentSession {
|
|
11
|
-
lastOperationId?: string;
|
|
12
|
-
version?: number;
|
|
13
|
-
id?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ILastDocumentSession {
|
|
16
|
-
id?: string;
|
|
17
|
-
lastOperationId?: string;
|
|
18
|
-
}
|
|
19
|
-
export default class GetDocumentDetailsResponse extends Message {
|
|
20
|
-
readonly lastDocumentSession?: ILastDocumentSession | undefined;
|
|
21
|
-
readonly currentDocumentSession?: ICurrentDocumentSession | undefined;
|
|
22
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
23
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
24
|
-
constructor(lastDocumentSession?: ILastDocumentSession | undefined, currentDocumentSession?: ICurrentDocumentSession | undefined);
|
|
25
|
-
get data(): IGetDocumentDetailsResponse;
|
|
26
|
-
toJSON(): IGetDocumentDetailsResponse;
|
|
27
|
-
static fromJSON(data: IGetDocumentDetailsResponse): GetDocumentDetailsResponse;
|
|
28
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import AddCommentResponse from './responses/addcommentresponse';
|
|
2
|
-
import { IWebSocketGateway } from './../websocketgateway/websocketgateway';
|
|
3
|
-
import { IThread } from './descriptors/commentsthreaddescriptor';
|
|
4
|
-
import SessionCollection from '../sessions/sessioncollection';
|
|
5
|
-
import { IComment } from './descriptors/commentdescriptor';
|
|
6
|
-
import AddCommentThreadResponse from './responses/comment-threads/addcommentthreadresponse';
|
|
7
|
-
import ResolveCommentThreadResponse from './responses/comment-threads/resolvecommentthreadresponse';
|
|
8
|
-
export declare const _SERVICE: number;
|
|
9
|
-
export interface IAddCommentThreadParams {
|
|
10
|
-
commentThreadId: string;
|
|
11
|
-
context?: Record<string, unknown> | null;
|
|
12
|
-
comments?: IComment[];
|
|
13
|
-
resolvedAt?: Date | string | null;
|
|
14
|
-
createdAt?: Date | string | null;
|
|
15
|
-
resolvedBy?: string | null;
|
|
16
|
-
deletedAt?: Date | null | string;
|
|
17
|
-
attributes?: Record<string, unknown> | null;
|
|
18
|
-
}
|
|
19
|
-
export interface IUpdateCommentThreadParams {
|
|
20
|
-
commentThreadId: string;
|
|
21
|
-
context?: Record<string, unknown> | null;
|
|
22
|
-
attributes?: Record<string, unknown> | null;
|
|
23
|
-
unlinkedAt?: Date | null | string;
|
|
24
|
-
}
|
|
25
|
-
declare const CommentsService_base: {
|
|
26
|
-
new (): import("ckeditor5/src/utils").Emitter;
|
|
27
|
-
prototype: import("ckeditor5/src/utils").Emitter;
|
|
28
|
-
};
|
|
29
|
-
declare class CommentsService extends CommentsService_base {
|
|
30
|
-
private readonly _documentId;
|
|
31
|
-
private _isConnected;
|
|
32
|
-
private _wsGateway?;
|
|
33
|
-
private _channel?;
|
|
34
|
-
private _connectedSessions?;
|
|
35
|
-
private static readonly _SERVICE;
|
|
36
|
-
constructor(_documentId: string);
|
|
37
|
-
get isConnected(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Connects to WebSocketGateway and starts listening on channel.
|
|
40
|
-
*/
|
|
41
|
-
connect(wsGateway: IWebSocketGateway): Promise<IThread[] | void>;
|
|
42
|
-
/**
|
|
43
|
-
* Disconnects CommentsService from CKEditor Cloud Services.
|
|
44
|
-
*/
|
|
45
|
-
disconnect(): void;
|
|
46
|
-
addComment(commentThreadId: string, commentId: string, content: string, attributes?: Record<string, unknown>): Promise<AddCommentResponse>;
|
|
47
|
-
updateComment(commentThreadId: string, commentId: string, content: string, attributes?: Record<string, unknown>): Promise<void>;
|
|
48
|
-
removeComment(commentThreadId: string, commentId: string): Promise<void>;
|
|
49
|
-
removeCommentThread(commentThreadId: string): Promise<void>;
|
|
50
|
-
addCommentThread(addCommentThreadParams: IAddCommentThreadParams): Promise<AddCommentThreadResponse>;
|
|
51
|
-
resolveCommentThread(commentThreadId: string): Promise<ResolveCommentThreadResponse>;
|
|
52
|
-
reopenCommentThread(commentThreadId: string): Promise<void>;
|
|
53
|
-
updateCommentThread(params: IUpdateCommentThreadParams): Promise<void>;
|
|
54
|
-
getCommentThread(commentThreadId: string, attempt?: number): Promise<IThread>;
|
|
55
|
-
getDocumentThreads(): Promise<{
|
|
56
|
-
threads: IThread[];
|
|
57
|
-
}>;
|
|
58
|
-
/**
|
|
59
|
-
* Returns read-only observable collection with EndUsers Sessions for comments service.
|
|
60
|
-
*/
|
|
61
|
-
getConnectedSessions(): Promise<SessionCollection>;
|
|
62
|
-
/**
|
|
63
|
-
* Starts to listen on a given channel.
|
|
64
|
-
*/
|
|
65
|
-
private _connectToChannel;
|
|
66
|
-
/**
|
|
67
|
-
* Processes websocket gateway state changes.
|
|
68
|
-
*/
|
|
69
|
-
private _onWsGatewayStateChange;
|
|
70
|
-
private _sendRequest;
|
|
71
|
-
}
|
|
72
|
-
export default CommentsService;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Descriptor, { IDescriptorBody } from './../../descriptor';
|
|
2
|
-
interface ICommonComment {
|
|
3
|
-
commentId: string;
|
|
4
|
-
commentThreadId: string;
|
|
5
|
-
userId: string;
|
|
6
|
-
content: string;
|
|
7
|
-
documentId: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ICommentJSON extends ICommonComment {
|
|
10
|
-
createdAt: string;
|
|
11
|
-
attributes: string | null;
|
|
12
|
-
}
|
|
13
|
-
export interface IComment extends ICommonComment {
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
attributes: Record<string, unknown> | null;
|
|
16
|
-
}
|
|
17
|
-
export default class CommentDescriptor extends Descriptor {
|
|
18
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
19
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
20
|
-
static toJSON(comment: IComment): ICommentJSON;
|
|
21
|
-
static fromJSON(comment: ICommentJSON): IComment;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Descriptor, { IDescriptorBody } from './../../descriptor';
|
|
2
|
-
import { IComment, ICommentJSON } from './commentdescriptor';
|
|
3
|
-
interface ICommonThread {
|
|
4
|
-
commentThreadId: string;
|
|
5
|
-
resolvedBy?: string | null;
|
|
6
|
-
}
|
|
7
|
-
export interface IThreadJSON extends ICommonThread {
|
|
8
|
-
comments?: ICommentJSON[];
|
|
9
|
-
attributes?: string | null;
|
|
10
|
-
createdAt?: string;
|
|
11
|
-
deletedAt?: string | null;
|
|
12
|
-
resolvedAt?: string | null;
|
|
13
|
-
context?: string | null;
|
|
14
|
-
unlinkedAt?: string | null;
|
|
15
|
-
}
|
|
16
|
-
export interface IThread extends ICommonThread {
|
|
17
|
-
comments?: IComment[];
|
|
18
|
-
createdAt?: Date;
|
|
19
|
-
deletedAt?: Date | null;
|
|
20
|
-
resolvedAt?: Date | null;
|
|
21
|
-
attributes?: Record<string, unknown> | null;
|
|
22
|
-
context?: Record<string, unknown> | null;
|
|
23
|
-
unlinkedAt?: Date | null;
|
|
24
|
-
}
|
|
25
|
-
export default class CommentsThreadDescriptor extends Descriptor {
|
|
26
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
27
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
28
|
-
static toJSON(thread: IThread): IThreadJSON;
|
|
29
|
-
static fromJSON(thread: IThreadJSON): IThread;
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Descriptor, { IDescriptorBody } from '../../descriptor';
|
|
2
|
-
export interface ICommentThreadAddedCommentJSON {
|
|
3
|
-
commentId: string;
|
|
4
|
-
createdAt: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ICommentThreadAddedComment {
|
|
7
|
-
commentId: string;
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
}
|
|
10
|
-
export default class CommentThreadAddedCommentDescriptor extends Descriptor {
|
|
11
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
12
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
13
|
-
static toJSON(comment: ICommentThreadAddedComment): ICommentThreadAddedCommentJSON;
|
|
14
|
-
static fromJSON(comment: ICommentThreadAddedCommentJSON): ICommentThreadAddedComment;
|
|
15
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import Message, { IMessage } from './../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../descriptor';
|
|
3
|
-
import { IThread, IThreadJSON } from '../descriptors/commentsthreaddescriptor';
|
|
4
|
-
export interface IAddCommentMessage extends IMessage {
|
|
5
|
-
commentThreadId: string;
|
|
6
|
-
content: string;
|
|
7
|
-
documentId: string;
|
|
8
|
-
commentId: string;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
userId: string;
|
|
11
|
-
attributes: string;
|
|
12
|
-
commentThread?: IThreadJSON;
|
|
13
|
-
}
|
|
14
|
-
export default class AddCommentMessage extends Message {
|
|
15
|
-
readonly documentId: string;
|
|
16
|
-
readonly commentThreadId: string;
|
|
17
|
-
readonly content: string;
|
|
18
|
-
readonly commentId: string;
|
|
19
|
-
readonly userId: string;
|
|
20
|
-
readonly attributes: Record<string, unknown> | null;
|
|
21
|
-
readonly commentThread?: IThread | undefined;
|
|
22
|
-
readonly createdAt: Date | string;
|
|
23
|
-
static readonly TYPE: string;
|
|
24
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
25
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
26
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
27
|
-
constructor(documentId: string, commentThreadId: string, content: string, commentId?: string, createdAt?: string | Date, userId?: string, attributes?: Record<string, unknown> | null, commentThread?: IThread | undefined);
|
|
28
|
-
toJSON(): IAddCommentMessage;
|
|
29
|
-
static fromJSON(object: IAddCommentMessage): AddCommentMessage;
|
|
30
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import Message, { IMessage } from '../../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../../descriptor';
|
|
3
|
-
import { IComment, ICommentJSON } from '../../descriptors/commentdescriptor';
|
|
4
|
-
export interface IAddCommentThreadMessage extends IMessage {
|
|
5
|
-
commentThreadId: string;
|
|
6
|
-
documentId: string;
|
|
7
|
-
context: string | null | undefined;
|
|
8
|
-
resolvedAt: string;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
resolvedBy: string | null;
|
|
11
|
-
deletedAt: string;
|
|
12
|
-
attributes: string | null;
|
|
13
|
-
comments: ICommentJSON[];
|
|
14
|
-
}
|
|
15
|
-
export default class AddCommentThreadMessage extends Message {
|
|
16
|
-
readonly documentId: string;
|
|
17
|
-
readonly commentThreadId: string;
|
|
18
|
-
readonly comments: IComment[];
|
|
19
|
-
readonly context?: Record<string, unknown> | null | undefined;
|
|
20
|
-
readonly resolvedBy: string | null;
|
|
21
|
-
readonly attributes: Record<string, unknown> | null;
|
|
22
|
-
readonly createdAt: Date | string;
|
|
23
|
-
readonly resolvedAt: Date | string;
|
|
24
|
-
readonly deletedAt: Date | string;
|
|
25
|
-
static readonly TYPE: string;
|
|
26
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
27
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
28
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
29
|
-
constructor(documentId: string, commentThreadId: string, comments?: IComment[], context?: Record<string, unknown> | null | undefined, resolvedBy?: string | null, createdAt?: string | Date | null, resolvedAt?: string | Date | null, deletedAt?: string | Date | null, attributes?: Record<string, unknown> | null);
|
|
30
|
-
toJSON(): IAddCommentThreadMessage;
|
|
31
|
-
static fromJSON(object: IAddCommentThreadMessage): AddCommentThreadMessage;
|
|
32
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Message, { IMessage } from '../../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../../descriptor';
|
|
3
|
-
export interface IReopenCommentThreadMessage extends IMessage {
|
|
4
|
-
commentThreadId: string;
|
|
5
|
-
documentId: string;
|
|
6
|
-
}
|
|
7
|
-
export default class ReopenCommentThreadMessage extends Message {
|
|
8
|
-
readonly commentThreadId: string;
|
|
9
|
-
readonly documentId: string;
|
|
10
|
-
static readonly TYPE: string;
|
|
11
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
12
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
13
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
14
|
-
constructor(commentThreadId: string, documentId: string);
|
|
15
|
-
toJSON(): IReopenCommentThreadMessage;
|
|
16
|
-
static fromJSON(object: IReopenCommentThreadMessage): ReopenCommentThreadMessage;
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Message, { IMessage } from '../../../message';
|
|
2
|
-
import { IDescriptorBody } from '../../../descriptor';
|
|
3
|
-
export interface IResolveCommentThreadMessage extends IMessage {
|
|
4
|
-
commentThreadId: string;
|
|
5
|
-
documentId: string;
|
|
6
|
-
resolvedBy?: string;
|
|
7
|
-
resolvedAt?: string;
|
|
8
|
-
}
|
|
9
|
-
export default class ResolveCommentThreadMessage extends Message {
|
|
10
|
-
readonly commentThreadId: string;
|
|
11
|
-
readonly documentId: string;
|
|
12
|
-
readonly resolvedBy?: string | undefined;
|
|
13
|
-
readonly resolvedAt?: Date;
|
|
14
|
-
static readonly TYPE: string;
|
|
15
|
-
static readonly READABLE_TYPE_NAME: string;
|
|
16
|
-
static readonly DESCRIPTOR_NAME: string;
|
|
17
|
-
static readonly DESCRIPTOR: IDescriptorBody;
|
|
18
|
-
constructor(commentThreadId: string, documentId: string, resolvedBy?: string | undefined, resolvedAt?: string);
|
|
19
|
-
toJSON(): IResolveCommentThreadMessage;
|
|
20
|
-
static fromJSON(object: IResolveCommentThreadMessage): ResolveCommentThreadMessage;
|
|
21
|
-
}
|