@ckeditor/ckeditor-cloud-services-collaboration 47.0.1 → 48.0.0

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.
Files changed (205) hide show
  1. package/package.json +10 -5
  2. package/src/ckeditorcloudserviceserror.d.ts +8 -0
  3. package/src/ckeditorcloudserviceserror.js +1 -1
  4. package/src/ckeditorcloudservicesservererror.d.ts +15 -0
  5. package/src/ckeditorcloudservicesservererror.js +1 -1
  6. package/src/collaborativeeditingservice/collaborativeeditingservice.d.ts +127 -0
  7. package/src/collaborativeeditingservice/collaborativeeditingservice.js +1 -1
  8. package/src/collaborativeeditingservice/descriptors/operationmetadatadescriptor.d.ts +18 -0
  9. package/src/collaborativeeditingservice/descriptors/operationmetadatadescriptor.js +1 -1
  10. package/src/collaborativeeditingservice/helpers/operationmetadatahelpers.d.ts +11 -0
  11. package/src/collaborativeeditingservice/helpers/operationmetadatahelpers.js +1 -1
  12. package/src/collaborativeeditingservice/messages/collaborativeeditingconnectmessage.d.ts +24 -0
  13. package/src/collaborativeeditingservice/messages/collaborativeeditingconnectmessage.js +1 -1
  14. package/src/collaborativeeditingservice/messages/collaborativeeditingreconnectmessage.d.ts +19 -0
  15. package/src/collaborativeeditingservice/messages/collaborativeeditingreconnectmessage.js +1 -1
  16. package/src/collaborativeeditingservice/messages/collaborativeeditingupdatemessage.d.ts +38 -0
  17. package/src/collaborativeeditingservice/messages/collaborativeeditingupdatemessage.js +1 -1
  18. package/src/collaborativeeditingservice/messages/getdocumentdetailsmessage.d.ts +16 -0
  19. package/src/collaborativeeditingservice/messages/getdocumentdetailsmessage.js +1 -1
  20. package/src/collaborativeeditingservice/responses/collaborativeeditingconnectresponse.d.ts +68 -0
  21. package/src/collaborativeeditingservice/responses/collaborativeeditingconnectresponse.js +1 -1
  22. package/src/collaborativeeditingservice/responses/collaborativeeditingresponse.d.ts +51 -0
  23. package/src/collaborativeeditingservice/responses/collaborativeeditingresponse.js +1 -1
  24. package/src/collaborativeeditingservice/responses/getdocumentdetailsresponse.d.ts +28 -0
  25. package/src/collaborativeeditingservice/responses/getdocumentdetailsresponse.js +1 -1
  26. package/src/comments-v2/commentsservice.d.ts +71 -0
  27. package/src/comments-v2/commentsservice.js +1 -1
  28. package/src/comments-v2/descriptors/commentdescriptor.d.ts +23 -0
  29. package/src/comments-v2/descriptors/commentdescriptor.js +1 -1
  30. package/src/comments-v2/descriptors/commentsthreaddescriptor.d.ts +29 -0
  31. package/src/comments-v2/descriptors/commentsthreaddescriptor.js +1 -1
  32. package/src/comments-v2/descriptors/commentthreadaddedcomment.d.ts +15 -0
  33. package/src/comments-v2/descriptors/commentthreadaddedcomment.js +1 -1
  34. package/src/comments-v2/messages/addcommentmessage.d.ts +30 -0
  35. package/src/comments-v2/messages/addcommentmessage.js +1 -1
  36. package/src/comments-v2/messages/comment-threads/addcommentthreadmessage.d.ts +32 -0
  37. package/src/comments-v2/messages/comment-threads/addcommentthreadmessage.js +1 -1
  38. package/src/comments-v2/messages/comment-threads/reopencommentthreadmessage.d.ts +17 -0
  39. package/src/comments-v2/messages/comment-threads/reopencommentthreadmessage.js +1 -1
  40. package/src/comments-v2/messages/comment-threads/resolvecommentthreadmessage.d.ts +21 -0
  41. package/src/comments-v2/messages/comment-threads/resolvecommentthreadmessage.js +1 -1
  42. package/src/comments-v2/messages/comment-threads/updatecommentthreadmessage.d.ts +21 -0
  43. package/src/comments-v2/messages/comment-threads/updatecommentthreadmessage.js +1 -1
  44. package/src/comments-v2/messages/connectmessage.d.ts +15 -0
  45. package/src/comments-v2/messages/connectmessage.js +1 -1
  46. package/src/comments-v2/messages/getcommentthreadmessage.d.ts +17 -0
  47. package/src/comments-v2/messages/getcommentthreadmessage.js +1 -1
  48. package/src/comments-v2/messages/getdocumentthreadsmessage.d.ts +15 -0
  49. package/src/comments-v2/messages/getdocumentthreadsmessage.js +1 -1
  50. package/src/comments-v2/messages/removecommentmessage.d.ts +19 -0
  51. package/src/comments-v2/messages/removecommentmessage.js +1 -1
  52. package/src/comments-v2/messages/removecommentthreadmessage.d.ts +17 -0
  53. package/src/comments-v2/messages/removecommentthreadmessage.js +1 -1
  54. package/src/comments-v2/messages/updatecommentmessage.d.ts +28 -0
  55. package/src/comments-v2/messages/updatecommentmessage.js +1 -1
  56. package/src/comments-v2/responses/addcommentresponse.d.ts +17 -0
  57. package/src/comments-v2/responses/addcommentresponse.js +1 -1
  58. package/src/comments-v2/responses/comment-threads/addcommentthreadresponse.d.ts +22 -0
  59. package/src/comments-v2/responses/comment-threads/addcommentthreadresponse.js +1 -1
  60. package/src/comments-v2/responses/comment-threads/resolvecommentthreadresponse.d.ts +19 -0
  61. package/src/comments-v2/responses/comment-threads/resolvecommentthreadresponse.js +1 -1
  62. package/src/comments-v2/responses/connectresponse.d.ts +19 -0
  63. package/src/comments-v2/responses/connectresponse.js +1 -1
  64. package/src/comments-v2/responses/getcommentthreadresponse.d.ts +31 -0
  65. package/src/comments-v2/responses/getcommentthreadresponse.js +1 -1
  66. package/src/comments-v2/responses/getdocumentthreadsresponse.d.ts +17 -0
  67. package/src/comments-v2/responses/getdocumentthreadsresponse.js +1 -1
  68. package/src/compiledmessages.d.ts +9 -0
  69. package/src/compiledmessages.js +1 -1
  70. package/src/descriptor.d.ts +13 -0
  71. package/src/descriptor.js +1 -1
  72. package/src/descriptors/keyvaluedescriptor.d.ts +5 -0
  73. package/src/descriptors/keyvaluedescriptor.js +1 -1
  74. package/src/editor/editorservice.d.ts +11 -0
  75. package/src/editor/editorservice.js +1 -1
  76. package/src/editor/messages/iseditorbundleuploadedmessage.d.ts +15 -0
  77. package/src/editor/messages/iseditorbundleuploadedmessage.js +1 -1
  78. package/src/editor/responses/iseditorbundleuploadedresponse.d.ts +13 -0
  79. package/src/editor/responses/iseditorbundleuploadedresponse.js +1 -1
  80. package/src/errors/ServiceNotConnectedError.d.ts +4 -0
  81. package/src/errors/ServiceNotConnectedError.js +1 -1
  82. package/src/index.d.ts +66 -0
  83. package/src/index.js +1 -1
  84. package/src/message.d.ts +17 -0
  85. package/src/message.js +1 -1
  86. package/src/messagescompressor.d.ts +15 -0
  87. package/src/messagescompressor.js +1 -1
  88. package/src/messagesmapper.d.ts +9 -0
  89. package/src/messagesmapper.js +1 -1
  90. package/src/revision-history/descriptors/revisiondescriptor.d.ts +42 -0
  91. package/src/revision-history/descriptors/revisiondescriptor.js +1 -1
  92. package/src/revision-history/messages/revisionhistoryconnectmessage.d.ts +15 -0
  93. package/src/revision-history/messages/revisionhistoryconnectmessage.js +1 -1
  94. package/src/revision-history/messages/revisionhistorygetrevisionmessage.d.ts +17 -0
  95. package/src/revision-history/messages/revisionhistorygetrevisionmessage.js +1 -1
  96. package/src/revision-history/messages/revisionhistoryreconnectmessage.d.ts +17 -0
  97. package/src/revision-history/messages/revisionhistoryreconnectmessage.js +1 -1
  98. package/src/revision-history/messages/revisionhistoryupdaterevisionsmessage.d.ts +41 -0
  99. package/src/revision-history/messages/revisionhistoryupdaterevisionsmessage.js +1 -1
  100. package/src/revision-history/responses/revisionhistoryconnectresponse.d.ts +30 -0
  101. package/src/revision-history/responses/revisionhistoryconnectresponse.js +1 -1
  102. package/src/revision-history/responses/revisionhistorygetrevisionresponse.d.ts +30 -0
  103. package/src/revision-history/responses/revisionhistorygetrevisionresponse.js +1 -1
  104. package/src/revision-history/responses/revisionhistoryupdaterevisionsresponse.d.ts +13 -0
  105. package/src/revision-history/responses/revisionhistoryupdaterevisionsresponse.js +1 -1
  106. package/src/revision-history/revision.d.ts +15 -0
  107. package/src/revision-history/revisionhistoryservice.d.ts +75 -0
  108. package/src/revision-history/revisionhistoryservice.js +1 -1
  109. package/src/services.d.ts +8 -0
  110. package/src/services.js +23 -0
  111. package/src/sessions/descriptors/sessiondescriptor.d.ts +5 -0
  112. package/src/sessions/descriptors/sessiondescriptor.js +1 -1
  113. package/src/sessions/messages/sessionsconnectmessage.d.ts +17 -0
  114. package/src/sessions/messages/sessionsconnectmessage.js +1 -1
  115. package/src/sessions/messages/socketconnectmessage.d.ts +21 -0
  116. package/src/sessions/messages/socketconnectmessage.js +1 -1
  117. package/src/sessions/messages/socketdisconnectmessage.d.ts +15 -0
  118. package/src/sessions/messages/socketdisconnectmessage.js +1 -1
  119. package/src/sessions/responses/sessionsconnectresponse.d.ts +21 -0
  120. package/src/sessions/responses/sessionsconnectresponse.js +1 -1
  121. package/src/sessions/sessioncollection.d.ts +39 -0
  122. package/src/sessions/sessioncollection.js +1 -1
  123. package/src/sessions/sessions.d.ts +14 -0
  124. package/src/sessions/sessions.js +1 -1
  125. package/src/track-changes/descriptors/suggestiondescriptor.d.ts +25 -0
  126. package/src/track-changes/descriptors/suggestiondescriptor.js +1 -1
  127. package/src/track-changes/messages/addsuggestionmessage.d.ts +25 -0
  128. package/src/track-changes/messages/addsuggestionmessage.js +1 -1
  129. package/src/track-changes/messages/batchUpdateSuggestionsStateMessage.d.ts +19 -0
  130. package/src/track-changes/messages/batchUpdateSuggestionsStateMessage.js +1 -1
  131. package/src/track-changes/messages/connectmessage.d.ts +15 -0
  132. package/src/track-changes/messages/connectmessage.js +1 -1
  133. package/src/track-changes/messages/getallsuggestionsmessage.d.ts +15 -0
  134. package/src/track-changes/messages/getallsuggestionsmessage.js +1 -1
  135. package/src/track-changes/messages/getsuggestionmessage.d.ts +17 -0
  136. package/src/track-changes/messages/getsuggestionmessage.js +1 -1
  137. package/src/track-changes/messages/updatesuggestionmessage.d.ts +25 -0
  138. package/src/track-changes/messages/updatesuggestionmessage.js +1 -1
  139. package/src/track-changes/responses/addsuggestionresponse.d.ts +27 -0
  140. package/src/track-changes/responses/addsuggestionresponse.js +1 -1
  141. package/src/track-changes/responses/connectresponse.d.ts +19 -0
  142. package/src/track-changes/responses/connectresponse.js +1 -1
  143. package/src/track-changes/responses/getallsuggestionsresponse.d.ts +17 -0
  144. package/src/track-changes/responses/getallsuggestionsresponse.js +1 -1
  145. package/src/track-changes/responses/getsuggestionresponse.d.ts +27 -0
  146. package/src/track-changes/responses/getsuggestionresponse.js +1 -1
  147. package/src/track-changes/trackchangesservice.d.ts +62 -0
  148. package/src/track-changes/trackchangesservice.js +1 -1
  149. package/src/types.d.ts +7 -0
  150. package/src/users/descriptors/userdescriptor.d.ts +5 -0
  151. package/src/users/descriptors/userdescriptor.js +1 -1
  152. package/src/users/messages/getmanyusersmessage.d.ts +15 -0
  153. package/src/users/messages/getmanyusersmessage.js +1 -1
  154. package/src/users/messages/getusermessage.d.ts +15 -0
  155. package/src/users/messages/getusermessage.js +1 -1
  156. package/src/users/responses/getmanyusersresponse.d.ts +13 -0
  157. package/src/users/responses/getmanyusersresponse.js +1 -1
  158. package/src/users/responses/getuserresponse.d.ts +13 -0
  159. package/src/users/responses/getuserresponse.js +1 -1
  160. package/src/users/user.d.ts +41 -0
  161. package/src/users/user.js +1 -1
  162. package/src/version.d.ts +2 -0
  163. package/src/version.js +1 -1
  164. package/src/websocketgateway/channel.d.ts +31 -0
  165. package/src/websocketgateway/channel.js +1 -1
  166. package/src/websocketgateway/messages/channelmessage.d.ts +21 -0
  167. package/src/websocketgateway/messages/channelmessage.js +1 -1
  168. package/src/websocketgateway/parser/packetparser.d.ts +15 -0
  169. package/src/websocketgateway/parser/packetparser.js +1 -1
  170. package/src/websocketgateway/parser/packets/bytesbytespacketdatamessage.d.ts +18 -0
  171. package/src/websocketgateway/parser/packets/bytesbytespacketdatamessage.js +1 -1
  172. package/src/websocketgateway/parser/packets/numberbytespacketdatamessage.d.ts +18 -0
  173. package/src/websocketgateway/parser/packets/numberbytespacketdatamessage.js +1 -1
  174. package/src/websocketgateway/parser/packets/numbernumberpacketdatamessag.d.ts +17 -0
  175. package/src/websocketgateway/parser/packets/numbernumberpacketdatamessag.js +1 -1
  176. package/src/websocketgateway/parser/packets/numberobjectpacketdatamessage.d.ts +17 -0
  177. package/src/websocketgateway/parser/packets/numberobjectpacketdatamessage.js +1 -1
  178. package/src/websocketgateway/parser/packets/numberstringpacketdatamessag.d.ts +17 -0
  179. package/src/websocketgateway/parser/packets/numberstringpacketdatamessag.js +1 -1
  180. package/src/websocketgateway/parser/packets/objectbufferpacketdatamessage.d.ts +18 -0
  181. package/src/websocketgateway/parser/packets/objectbufferpacketdatamessage.js +1 -1
  182. package/src/websocketgateway/parser/packets/objectobjectpacketdatamessage.d.ts +17 -0
  183. package/src/websocketgateway/parser/packets/objectobjectpacketdatamessage.js +1 -1
  184. package/src/websocketgateway/parser/packets/packagedatamessage.d.ts +16 -0
  185. package/src/websocketgateway/parser/packets/packagedatamessage.js +1 -1
  186. package/src/websocketgateway/parser/packets/packetmessage.d.ts +31 -0
  187. package/src/websocketgateway/parser/packets/packetmessage.js +1 -1
  188. package/src/websocketgateway/parser/packets/packetoptionsmessage.d.ts +18 -0
  189. package/src/websocketgateway/parser/packets/packetoptionsmessage.js +1 -1
  190. package/src/websocketgateway/parser/packets/stringbytespacketdatamessage.d.ts +18 -0
  191. package/src/websocketgateway/parser/packets/stringbytespacketdatamessage.js +1 -1
  192. package/src/websocketgateway/parser/packets/stringnumberpacketdatamessage.d.ts +17 -0
  193. package/src/websocketgateway/parser/packets/stringnumberpacketdatamessage.js +1 -1
  194. package/src/websocketgateway/parser/packets/stringobjectpacketdatamessage.d.ts +17 -0
  195. package/src/websocketgateway/parser/packets/stringobjectpacketdatamessage.js +1 -1
  196. package/src/websocketgateway/parser/packets/stringstringpacketdatamessage.d.ts +17 -0
  197. package/src/websocketgateway/parser/packets/stringstringpacketdatamessage.js +1 -1
  198. package/src/websocketgateway/parser/parser.d.ts +14 -0
  199. package/src/websocketgateway/parser/parser.js +1 -1
  200. package/src/websocketgateway/parser/parserutils.d.ts +27 -0
  201. package/src/websocketgateway/parser/parserutils.js +1 -1
  202. package/src/websocketgateway/requestsmanager.d.ts +20 -0
  203. package/src/websocketgateway/requestsmanager.js +1 -1
  204. package/src/websocketgateway/websocketgateway.d.ts +164 -0
  205. package/src/websocketgateway/websocketgateway.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x166faf){return _0x166faf&&_0x166faf['__esModule']?_0x166faf:{'default':_0x166faf};};Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['_SERVICE']=void 0x0;const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0x309a85,_0x42cc44,_0x416738){const _0x3cfd0f=new sessioncollection_1['default'](_0x42cc44,_0x416738);return await _0x3cfd0f['connect'](_0x309a85),_0x3cfd0f;}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x540210){return _0x540210&&_0x540210['__esModule']?_0x540210:{'default':_0x540210};};Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['_SERVICE']=void 0x0;const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0x570544,_0x212b40,_0x312874){const _0x4912fd=new sessioncollection_1['default'](_0x212b40,_0x312874);return await _0x4912fd['connect'](_0x570544),_0x4912fd;}};
@@ -0,0 +1,25 @@
1
+ import Descriptor, { IDescriptorBody } from './../../descriptor';
2
+ interface ICommonSuggestion {
3
+ id: string;
4
+ authorId: string;
5
+ type: string;
6
+ hasComments?: boolean;
7
+ state?: string;
8
+ }
9
+ export interface ISuggestion extends ICommonSuggestion {
10
+ createdAt?: Date;
11
+ data?: Record<string, unknown> | null;
12
+ attributes?: Record<string, unknown> | null;
13
+ }
14
+ export interface ISuggestionJSON extends ICommonSuggestion {
15
+ createdAt?: string;
16
+ data?: string | null;
17
+ attributes?: string | null;
18
+ }
19
+ export default class SuggestionDescriptor extends Descriptor {
20
+ static readonly DESCRIPTOR_NAME: string;
21
+ static readonly DESCRIPTOR: IDescriptorBody;
22
+ static toJSON(suggestion: ISuggestion): ISuggestionJSON;
23
+ static fromJSON(suggestion: ISuggestionJSON): ISuggestion;
24
+ }
25
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x22a933){return _0x22a933&&_0x22a933['__esModule']?_0x22a933:{'default':_0x22a933};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x16c12a){var _0x533fbe;return{..._0x16c12a,'data':_0x16c12a['data']?JSON['stringify'](_0x16c12a['data']):_0x16c12a['data'],'attributes':_0x16c12a['attributes']?JSON['stringify'](_0x16c12a['attributes']):_0x16c12a['attributes'],'createdAt':null===(_0x533fbe=_0x16c12a['createdAt'])||void 0x0===_0x533fbe?void 0x0:_0x533fbe['toISOString']()};}static['fromJSON'](_0x72778e){return{..._0x72778e,'data':_0x72778e['data']?JSON['parse'](_0x72778e['data']):_0x72778e['data'],'attributes':_0x72778e['attributes']?JSON['parse'](_0x72778e['attributes']):_0x72778e['attributes'],'createdAt':_0x72778e['createdAt']?new Date(_0x72778e['createdAt']):void 0x0};}}exports['default']=SuggestionDescriptor,SuggestionDescriptor['DESCRIPTOR_NAME']='SuggestionDescriptor',SuggestionDescriptor['DESCRIPTOR']={'fields':{'id':{'id':0x1,'type':'string'},'authorId':{'id':0x2,'type':'string'},'type':{'id':0x3,'type':'string'},'createdAt':{'id':0x4,'type':'string'},'data':{'id':0x5,'type':'string'},'hasComments':{'id':0x6,'type':'bool'},'state':{'id':0x7,'type':'string'},'attributes':{'id':0x8,'type':'string'}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5b3a20){return _0x5b3a20&&_0x5b3a20['__esModule']?_0x5b3a20:{'default':_0x5b3a20};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x5dacc1){var _0x59b65c;return{..._0x5dacc1,'data':_0x5dacc1['data']?JSON['stringify'](_0x5dacc1['data']):_0x5dacc1['data'],'attributes':_0x5dacc1['attributes']?JSON['stringify'](_0x5dacc1['attributes']):_0x5dacc1['attributes'],'createdAt':null===(_0x59b65c=_0x5dacc1['createdAt'])||void 0x0===_0x59b65c?void 0x0:_0x59b65c['toISOString']()};}static['fromJSON'](_0x2107a4){return{..._0x2107a4,'data':_0x2107a4['data']?JSON['parse'](_0x2107a4['data']):_0x2107a4['data'],'attributes':_0x2107a4['attributes']?JSON['parse'](_0x2107a4['attributes']):_0x2107a4['attributes'],'createdAt':_0x2107a4['createdAt']?new Date(_0x2107a4['createdAt']):void 0x0};}}exports['default']=SuggestionDescriptor,SuggestionDescriptor['DESCRIPTOR_NAME']='SuggestionDescriptor',SuggestionDescriptor['DESCRIPTOR']={'fields':{'id':{'id':0x1,'type':'string'},'authorId':{'id':0x2,'type':'string'},'type':{'id':0x3,'type':'string'},'createdAt':{'id':0x4,'type':'string'},'data':{'id':0x5,'type':'string'},'hasComments':{'id':0x6,'type':'bool'},'state':{'id':0x7,'type':'string'},'attributes':{'id':0x8,'type':'string'}}};
@@ -0,0 +1,25 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IAddSuggestionMessage extends IMessage {
4
+ id: string;
5
+ documentId: string;
6
+ type: string;
7
+ data: string;
8
+ originalSuggestionId: string | null;
9
+ attributes: string | null;
10
+ }
11
+ export default class AddSuggestionMessage extends Message {
12
+ readonly id: string;
13
+ readonly documentId: string;
14
+ readonly type: string;
15
+ readonly data: Record<string, unknown>;
16
+ readonly originalSuggestionId: string | null;
17
+ readonly attributes: Record<string, unknown> | null;
18
+ static readonly TYPE: string;
19
+ static readonly READABLE_TYPE_NAME: string;
20
+ static readonly DESCRIPTOR_NAME: string;
21
+ static readonly DESCRIPTOR: IDescriptorBody;
22
+ constructor(id: string, documentId: string, type: string, data?: Record<string, unknown>, originalSuggestionId?: string | null, attributes?: Record<string, unknown> | null);
23
+ toJSON(): IAddSuggestionMessage;
24
+ static fromJSON(object: IAddSuggestionMessage): AddSuggestionMessage;
25
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x55fbb8){return _0x55fbb8&&_0x55fbb8['__esModule']?_0x55fbb8:{'default':_0x55fbb8};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x3076c4,_0x5e8c1b,_0xdb78ea,_0x37eb22={},_0x44d9bb=null,_0x4616d0=null){super(),this['id']=_0x3076c4,this['documentId']=_0x5e8c1b,this['type']=_0xdb78ea,this['data']=_0x37eb22,this['originalSuggestionId']=_0x44d9bb,this['attributes']=_0x4616d0;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'type':this['type'],'data':JSON['stringify'](this['data']),'originalSuggestionId':this['originalSuggestionId'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x5464fb){var _0x488577;return new AddSuggestionMessage(_0x5464fb['id'],_0x5464fb['documentId'],_0x5464fb['type'],JSON['parse'](_0x5464fb['data']),null!==(_0x488577=_0x5464fb['originalSuggestionId'])&&void 0x0!==_0x488577?_0x488577:null,_0x5464fb['attributes']?JSON['parse'](_0x5464fb['attributes']):null);}}exports['default']=AddSuggestionMessage,AddSuggestionMessage['TYPE']='101',AddSuggestionMessage['READABLE_TYPE_NAME']='addSuggestion',AddSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesAddSuggestionMessage',AddSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'data':{'type':'string','id':0x4},'originalSuggestionId':{'type':'string','id':0x5},'attributes':{'type':'string','id':0x6}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x58732f){return _0x58732f&&_0x58732f['__esModule']?_0x58732f:{'default':_0x58732f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x3e331f,_0x1d8013,_0x446d58,_0x2a361a={},_0x1e0138=null,_0x18fbf6=null){super(),this['id']=_0x3e331f,this['documentId']=_0x1d8013,this['type']=_0x446d58,this['data']=_0x2a361a,this['originalSuggestionId']=_0x1e0138,this['attributes']=_0x18fbf6;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'type':this['type'],'data':JSON['stringify'](this['data']),'originalSuggestionId':this['originalSuggestionId'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x4b5be8){var _0x1a8a1f;return new AddSuggestionMessage(_0x4b5be8['id'],_0x4b5be8['documentId'],_0x4b5be8['type'],JSON['parse'](_0x4b5be8['data']),null!==(_0x1a8a1f=_0x4b5be8['originalSuggestionId'])&&void 0x0!==_0x1a8a1f?_0x1a8a1f:null,_0x4b5be8['attributes']?JSON['parse'](_0x4b5be8['attributes']):null);}}exports['default']=AddSuggestionMessage,AddSuggestionMessage['TYPE']='101',AddSuggestionMessage['READABLE_TYPE_NAME']='addSuggestion',AddSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesAddSuggestionMessage',AddSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'data':{'type':'string','id':0x4},'originalSuggestionId':{'type':'string','id':0x5},'attributes':{'type':'string','id':0x6}}};
@@ -0,0 +1,19 @@
1
+ import Message from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IBatchUpdateSuggestionsStateMessage {
4
+ ids: string[];
5
+ documentId: string;
6
+ state: string;
7
+ }
8
+ export default class BatchUpdateSuggestionsStateMessage extends Message {
9
+ ids: string[];
10
+ documentId: string;
11
+ state: 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(ids: string[], documentId: string, state: string);
17
+ toJSON(): IBatchUpdateSuggestionsStateMessage;
18
+ static fromJSON(object: IBatchUpdateSuggestionsStateMessage): BatchUpdateSuggestionsStateMessage;
19
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1a5ffe){return _0x1a5ffe&&_0x1a5ffe['__esModule']?_0x1a5ffe:{'default':_0x1a5ffe};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class BatchUpdateSuggestionsStateMessage extends message_1['default']{constructor(_0x428ce7,_0x30f107,_0x2de64f){super(),this['ids']=_0x428ce7,this['documentId']=_0x30f107,this['state']=_0x2de64f;}['toJSON'](){return{'ids':this['ids'],'documentId':this['documentId'],'state':this['state']};}static['fromJSON'](_0x54c8f9){return new BatchUpdateSuggestionsStateMessage(_0x54c8f9['ids'],_0x54c8f9['documentId'],_0x54c8f9['state']);}}exports['default']=BatchUpdateSuggestionsStateMessage,BatchUpdateSuggestionsStateMessage['TYPE']='106',BatchUpdateSuggestionsStateMessage['READABLE_TYPE_NAME']='batchUpdateSuggestionsState',BatchUpdateSuggestionsStateMessage['DESCRIPTOR_NAME']='TrackChangesBatchUpdateSuggestionsStateMessage',BatchUpdateSuggestionsStateMessage['DESCRIPTOR']={'fields':{'ids':{'type':'string','rule':'repeated','id':0x1},'documentId':{'type':'string','id':0x2},'state':{'type':'string','id':0x3}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2174ac){return _0x2174ac&&_0x2174ac['__esModule']?_0x2174ac:{'default':_0x2174ac};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class BatchUpdateSuggestionsStateMessage extends message_1['default']{constructor(_0x5deddf,_0x1cca01,_0x4913a8){super(),this['ids']=_0x5deddf,this['documentId']=_0x1cca01,this['state']=_0x4913a8;}['toJSON'](){return{'ids':this['ids'],'documentId':this['documentId'],'state':this['state']};}static['fromJSON'](_0x1cd530){return new BatchUpdateSuggestionsStateMessage(_0x1cd530['ids'],_0x1cd530['documentId'],_0x1cd530['state']);}}exports['default']=BatchUpdateSuggestionsStateMessage,BatchUpdateSuggestionsStateMessage['TYPE']='106',BatchUpdateSuggestionsStateMessage['READABLE_TYPE_NAME']='batchUpdateSuggestionsState',BatchUpdateSuggestionsStateMessage['DESCRIPTOR_NAME']='TrackChangesBatchUpdateSuggestionsStateMessage',BatchUpdateSuggestionsStateMessage['DESCRIPTOR']={'fields':{'ids':{'type':'string','rule':'repeated','id':0x1},'documentId':{'type':'string','id':0x2},'state':{'type':'string','id':0x3}}};
@@ -0,0 +1,15 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IConnectMessage extends IMessage {
4
+ documentId: string;
5
+ }
6
+ export default class ConnectMessage 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
+ toJSON(): IConnectMessage;
14
+ static fromJSON(object: IConnectMessage): ConnectMessage;
15
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5d69f0){return _0x5d69f0&&_0x5d69f0['__esModule']?_0x5d69f0:{'default':_0x5d69f0};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x4aae1d){super(),this['documentId']=_0x4aae1d;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x2599fb){return new ConnectMessage(_0x2599fb['documentId']);}}exports['default']=ConnectMessage,ConnectMessage['TYPE']='105',ConnectMessage['READABLE_TYPE_NAME']='connectToSuggestions',ConnectMessage['DESCRIPTOR_NAME']='TrackChangesConnectMessage',ConnectMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x399f36){return _0x399f36&&_0x399f36['__esModule']?_0x399f36:{'default':_0x399f36};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x30ac98){super(),this['documentId']=_0x30ac98;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x2b8c36){return new ConnectMessage(_0x2b8c36['documentId']);}}exports['default']=ConnectMessage,ConnectMessage['TYPE']='105',ConnectMessage['READABLE_TYPE_NAME']='connectToSuggestions',ConnectMessage['DESCRIPTOR_NAME']='TrackChangesConnectMessage',ConnectMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
@@ -0,0 +1,15 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IGetAllSuggestionsMessage extends IMessage {
4
+ documentId: string;
5
+ }
6
+ export default class GetAllSuggestionsMessage 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
+ toJSON(): IGetAllSuggestionsMessage;
14
+ static fromJSON(object: IGetAllSuggestionsMessage): GetAllSuggestionsMessage;
15
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1f8cab){return _0x1f8cab&&_0x1f8cab['__esModule']?_0x1f8cab:{'default':_0x1f8cab};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x112978){super(),this['documentId']=_0x112978;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x2df94d){return new GetAllSuggestionsMessage(_0x2df94d['documentId']);}}exports['default']=GetAllSuggestionsMessage,GetAllSuggestionsMessage['TYPE']='102',GetAllSuggestionsMessage['READABLE_TYPE_NAME']='getAllSuggestions',GetAllSuggestionsMessage['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionMessage',GetAllSuggestionsMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x490ce8){return _0x490ce8&&_0x490ce8['__esModule']?_0x490ce8:{'default':_0x490ce8};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x158982){super(),this['documentId']=_0x158982;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x10db05){return new GetAllSuggestionsMessage(_0x10db05['documentId']);}}exports['default']=GetAllSuggestionsMessage,GetAllSuggestionsMessage['TYPE']='102',GetAllSuggestionsMessage['READABLE_TYPE_NAME']='getAllSuggestions',GetAllSuggestionsMessage['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionMessage',GetAllSuggestionsMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
@@ -0,0 +1,17 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IGetSuggestionMessage extends IMessage {
4
+ id: string;
5
+ documentId: string;
6
+ }
7
+ export default class GetSuggestionMessage extends Message {
8
+ readonly id: 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(id: string, documentId: string);
15
+ toJSON(): IGetSuggestionMessage;
16
+ static fromJSON(object: IGetSuggestionMessage): GetSuggestionMessage;
17
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5a7d48){return _0x5a7d48&&_0x5a7d48['__esModule']?_0x5a7d48:{'default':_0x5a7d48};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x5d618f,_0x2ae0e2){super(),this['id']=_0x5d618f,this['documentId']=_0x2ae0e2;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x29640d){return new GetSuggestionMessage(_0x29640d['id'],_0x29640d['documentId']);}}exports['default']=GetSuggestionMessage,GetSuggestionMessage['TYPE']='103',GetSuggestionMessage['READABLE_TYPE_NAME']='getSuggestion',GetSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesGetSuggestionMessage',GetSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5b030c){return _0x5b030c&&_0x5b030c['__esModule']?_0x5b030c:{'default':_0x5b030c};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x40c463,_0x705959){super(),this['id']=_0x40c463,this['documentId']=_0x705959;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x46dca8){return new GetSuggestionMessage(_0x46dca8['id'],_0x46dca8['documentId']);}}exports['default']=GetSuggestionMessage,GetSuggestionMessage['TYPE']='103',GetSuggestionMessage['READABLE_TYPE_NAME']='getSuggestion',GetSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesGetSuggestionMessage',GetSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2}}};
@@ -0,0 +1,25 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IUpdateSuggestionMessage extends IMessage {
4
+ id: string;
5
+ documentId: string;
6
+ hasComments?: boolean;
7
+ isHasCommentsModified: boolean;
8
+ state?: string;
9
+ attributes: string;
10
+ }
11
+ export default class UpdateSuggestionMessage extends Message {
12
+ readonly id: string;
13
+ readonly documentId: string;
14
+ readonly hasComments: boolean | undefined;
15
+ readonly isHasCommentsModified: boolean;
16
+ readonly state?: string | undefined;
17
+ readonly attributes: Record<string, unknown> | null;
18
+ static readonly TYPE: string;
19
+ static readonly READABLE_TYPE_NAME: string;
20
+ static readonly DESCRIPTOR_NAME: string;
21
+ static readonly DESCRIPTOR: IDescriptorBody;
22
+ constructor(id: string, documentId: string, hasComments: boolean | undefined, isHasCommentsModified: boolean, state?: string | undefined, attributes?: Record<string, unknown> | null);
23
+ toJSON(): IUpdateSuggestionMessage;
24
+ static fromJSON(object: IUpdateSuggestionMessage): UpdateSuggestionMessage;
25
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1b6871){return _0x1b6871&&_0x1b6871['__esModule']?_0x1b6871:{'default':_0x1b6871};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x53137c,_0x3f2820,_0x5a6127,_0x383d01,_0x310494,_0x29d164=null){super(),this['id']=_0x53137c,this['documentId']=_0x3f2820,this['hasComments']=_0x5a6127,this['isHasCommentsModified']=_0x383d01,this['state']=_0x310494,this['attributes']=_0x29d164;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x236ac6){return new UpdateSuggestionMessage(_0x236ac6['id'],_0x236ac6['documentId'],_0x236ac6['hasComments'],_0x236ac6['isHasCommentsModified'],_0x236ac6['state'],_0x236ac6['attributes']?JSON['parse'](_0x236ac6['attributes']):null);}}exports['default']=UpdateSuggestionMessage,UpdateSuggestionMessage['TYPE']='104',UpdateSuggestionMessage['READABLE_TYPE_NAME']='updateSuggestion',UpdateSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesUpdateSuggestionMessage',UpdateSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2},'hasComments':{'type':'bool','id':0x3},'isHasCommentsModified':{'type':'bool','id':0x4},'state':{'type':'string','id':0x5},'attributes':{'type':'string','id':0x6}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2618e9){return _0x2618e9&&_0x2618e9['__esModule']?_0x2618e9:{'default':_0x2618e9};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x50e176,_0x3ce522,_0x23dd68,_0x5cb5f2,_0x9e5f75,_0x43c95c=null){super(),this['id']=_0x50e176,this['documentId']=_0x3ce522,this['hasComments']=_0x23dd68,this['isHasCommentsModified']=_0x5cb5f2,this['state']=_0x9e5f75,this['attributes']=_0x43c95c;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x110444){return new UpdateSuggestionMessage(_0x110444['id'],_0x110444['documentId'],_0x110444['hasComments'],_0x110444['isHasCommentsModified'],_0x110444['state'],_0x110444['attributes']?JSON['parse'](_0x110444['attributes']):null);}}exports['default']=UpdateSuggestionMessage,UpdateSuggestionMessage['TYPE']='104',UpdateSuggestionMessage['READABLE_TYPE_NAME']='updateSuggestion',UpdateSuggestionMessage['DESCRIPTOR_NAME']='TrackChangesUpdateSuggestionMessage',UpdateSuggestionMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'documentId':{'type':'string','id':0x2},'hasComments':{'type':'bool','id':0x3},'isHasCommentsModified':{'type':'bool','id':0x4},'state':{'type':'string','id':0x5},'attributes':{'type':'string','id':0x6}}};
@@ -0,0 +1,27 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IAddSuggestionResponse extends IMessage {
4
+ id: string;
5
+ authorId: string;
6
+ type: string;
7
+ createdAt?: string;
8
+ data: string;
9
+ hasComments?: boolean;
10
+ state?: string;
11
+ attributes: string | null;
12
+ }
13
+ export default class AddSuggestionResponse extends Message {
14
+ readonly id: string;
15
+ readonly authorId: string;
16
+ readonly type: string;
17
+ readonly hasComments?: boolean | undefined;
18
+ readonly state?: string | undefined;
19
+ readonly data: Record<string, unknown> | null;
20
+ readonly attributes: Record<string, unknown> | null;
21
+ readonly createdAt?: Date;
22
+ static readonly DESCRIPTOR_NAME: string;
23
+ static readonly DESCRIPTOR: IDescriptorBody;
24
+ constructor(id: string, authorId: string, type: string, createdAt?: string, hasComments?: boolean | undefined, state?: string | undefined, data?: Record<string, unknown> | null, attributes?: Record<string, unknown> | null);
25
+ toJSON(): IAddSuggestionResponse;
26
+ static fromJSON(data: IAddSuggestionResponse): AddSuggestionResponse;
27
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x403953){return _0x403953&&_0x403953['__esModule']?_0x403953:{'default':_0x403953};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x5456ad,_0x20d0cd,_0x46b86d,_0x17fa3f,_0x4630b8,_0x53e0c2,_0x45790f={},_0x4f85b7=null){super(),this['id']=_0x5456ad,this['authorId']=_0x20d0cd,this['type']=_0x46b86d,this['hasComments']=_0x4630b8,this['state']=_0x53e0c2,this['data']=_0x45790f,this['attributes']=_0x4f85b7,this['createdAt']=_0x17fa3f?new Date(_0x17fa3f):void 0x0;}['toJSON'](){var _0x4ce2b7;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x4ce2b7=this['createdAt'])||void 0x0===_0x4ce2b7?void 0x0:_0x4ce2b7['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x3a859e){return new AddSuggestionResponse(_0x3a859e['id'],_0x3a859e['authorId'],_0x3a859e['type'],_0x3a859e['createdAt'],_0x3a859e['hasComments'],_0x3a859e['state'],JSON['parse'](_0x3a859e['data']),_0x3a859e['attributes']?JSON['parse'](_0x3a859e['attributes']):null);}}exports['default']=AddSuggestionResponse,AddSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesAddSuggestionResponse',AddSuggestionResponse['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'authorId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'createdAt':{'type':'string','id':0x4},'data':{'type':'string','id':0x5},'hasComments':{'type':'bool','id':0x6},'state':{'type':'string','id':0x7},'attributes':{'type':'string','id':0x8}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x40f32b){return _0x40f32b&&_0x40f32b['__esModule']?_0x40f32b:{'default':_0x40f32b};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x84a8c9,_0x182960,_0x27beb7,_0x52cf7a,_0x51895e,_0x17531f,_0x474ce9={},_0x119666=null){super(),this['id']=_0x84a8c9,this['authorId']=_0x182960,this['type']=_0x27beb7,this['hasComments']=_0x51895e,this['state']=_0x17531f,this['data']=_0x474ce9,this['attributes']=_0x119666,this['createdAt']=_0x52cf7a?new Date(_0x52cf7a):void 0x0;}['toJSON'](){var _0x40d1bb;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x40d1bb=this['createdAt'])||void 0x0===_0x40d1bb?void 0x0:_0x40d1bb['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x4a4935){return new AddSuggestionResponse(_0x4a4935['id'],_0x4a4935['authorId'],_0x4a4935['type'],_0x4a4935['createdAt'],_0x4a4935['hasComments'],_0x4a4935['state'],JSON['parse'](_0x4a4935['data']),_0x4a4935['attributes']?JSON['parse'](_0x4a4935['attributes']):null);}}exports['default']=AddSuggestionResponse,AddSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesAddSuggestionResponse',AddSuggestionResponse['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'authorId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'createdAt':{'type':'string','id':0x4},'data':{'type':'string','id':0x5},'hasComments':{'type':'bool','id':0x6},'state':{'type':'string','id':0x7},'attributes':{'type':'string','id':0x8}}};
@@ -0,0 +1,19 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ import { ISuggestion, ISuggestionJSON } from '../descriptors/suggestiondescriptor';
4
+ export interface IConnectResponse extends IMessage {
5
+ channel: string;
6
+ suggestions?: string[];
7
+ suggestionsV2?: ISuggestionJSON[];
8
+ }
9
+ export default class ConnectResponse extends Message {
10
+ readonly channel: string;
11
+ private readonly _suggestions?;
12
+ private readonly _suggestionsV2?;
13
+ readonly suggestions: ISuggestion[];
14
+ static readonly DESCRIPTOR_NAME: string;
15
+ static readonly DESCRIPTOR: IDescriptorBody;
16
+ constructor(channel: string, _suggestions?: ISuggestion[] | undefined, _suggestionsV2?: ISuggestion[] | undefined);
17
+ toJSON(): IConnectResponse;
18
+ static fromJSON(object: IConnectResponse): ConnectResponse;
19
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0xed4617){return _0xed4617&&_0xed4617['__esModule']?_0xed4617:{'default':_0xed4617};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message')),suggestiondescriptor_1=__importDefault(require('../descriptors/suggestiondescriptor'));class ConnectResponse extends message_1['default']{constructor(_0x104b0b,_0x59655f,_0x42213d){super(),this['channel']=_0x104b0b,this['_suggestions']=_0x59655f,this['_suggestionsV2']=_0x42213d,this['suggestions']=(null==_0x42213d?void 0x0:_0x42213d['length'])?_0x42213d:_0x59655f;}['toJSON'](){var _0x5c9b76,_0x2085c3;return{'channel':this['channel'],'suggestions':null===(_0x5c9b76=this['_suggestions'])||void 0x0===_0x5c9b76?void 0x0:_0x5c9b76['map'](_0xbdbef1=>JSON['stringify'](_0xbdbef1)),'suggestionsV2':null===(_0x2085c3=this['_suggestionsV2'])||void 0x0===_0x2085c3?void 0x0:_0x2085c3['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x4f1322){var _0x6f315e,_0x2aed96;return new ConnectResponse(_0x4f1322['channel'],null===(_0x6f315e=_0x4f1322['suggestions'])||void 0x0===_0x6f315e?void 0x0:_0x6f315e['map'](_0x18a83f=>JSON['parse'](_0x18a83f)),null===(_0x2aed96=_0x4f1322['suggestionsV2'])||void 0x0===_0x2aed96?void 0x0:_0x2aed96['map'](suggestiondescriptor_1['default']['fromJSON']));}}exports['default']=ConnectResponse,ConnectResponse['DESCRIPTOR_NAME']='TrackChangesConnectResponse',ConnectResponse['DESCRIPTOR']={'fields':{'channel':{'type':'string','id':0x1},'suggestions':{'type':'string','rule':'repeated','id':0x2},'suggestionsV2':{'type':'SuggestionDescriptor','rule':'repeated','id':0x3}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5340f0){return _0x5340f0&&_0x5340f0['__esModule']?_0x5340f0:{'default':_0x5340f0};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message')),suggestiondescriptor_1=__importDefault(require('../descriptors/suggestiondescriptor'));class ConnectResponse extends message_1['default']{constructor(_0x447361,_0x544551,_0x5e9551){super(),this['channel']=_0x447361,this['_suggestions']=_0x544551,this['_suggestionsV2']=_0x5e9551,this['suggestions']=(null==_0x5e9551?void 0x0:_0x5e9551['length'])?_0x5e9551:_0x544551;}['toJSON'](){var _0xf6bee2,_0xe3b4d2;return{'channel':this['channel'],'suggestions':null===(_0xf6bee2=this['_suggestions'])||void 0x0===_0xf6bee2?void 0x0:_0xf6bee2['map'](_0xa6405=>JSON['stringify'](_0xa6405)),'suggestionsV2':null===(_0xe3b4d2=this['_suggestionsV2'])||void 0x0===_0xe3b4d2?void 0x0:_0xe3b4d2['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x258915){var _0x348f24,_0x4acbb7;return new ConnectResponse(_0x258915['channel'],null===(_0x348f24=_0x258915['suggestions'])||void 0x0===_0x348f24?void 0x0:_0x348f24['map'](_0x110fdc=>JSON['parse'](_0x110fdc)),null===(_0x4acbb7=_0x258915['suggestionsV2'])||void 0x0===_0x4acbb7?void 0x0:_0x4acbb7['map'](suggestiondescriptor_1['default']['fromJSON']));}}exports['default']=ConnectResponse,ConnectResponse['DESCRIPTOR_NAME']='TrackChangesConnectResponse',ConnectResponse['DESCRIPTOR']={'fields':{'channel':{'type':'string','id':0x1},'suggestions':{'type':'string','rule':'repeated','id':0x2},'suggestionsV2':{'type':'SuggestionDescriptor','rule':'repeated','id':0x3}}};
@@ -0,0 +1,17 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ import { ISuggestion, ISuggestionJSON } from '../descriptors/suggestiondescriptor';
4
+ export interface IGetAllSuggestionResponse extends IMessage {
5
+ suggestions?: string[];
6
+ suggestionsV2?: ISuggestionJSON[];
7
+ }
8
+ export default class GetAllSuggestionResponse extends Message {
9
+ private readonly _suggestions?;
10
+ private readonly _suggestionsV2?;
11
+ readonly suggestions: ISuggestion[];
12
+ static readonly DESCRIPTOR_NAME: string;
13
+ static readonly DESCRIPTOR: IDescriptorBody;
14
+ constructor(_suggestions?: ISuggestion[] | undefined, _suggestionsV2?: ISuggestion[] | undefined);
15
+ toJSON(): IGetAllSuggestionResponse;
16
+ static fromJSON(data: IGetAllSuggestionResponse): GetAllSuggestionResponse;
17
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x55f91f){return _0x55f91f&&_0x55f91f['__esModule']?_0x55f91f:{'default':_0x55f91f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message')),suggestiondescriptor_1=__importDefault(require('../descriptors/suggestiondescriptor'));class GetAllSuggestionResponse extends message_1['default']{constructor(_0x30c534,_0x293095){super(),this['_suggestions']=_0x30c534,this['_suggestionsV2']=_0x293095,this['suggestions']=(null==_0x293095?void 0x0:_0x293095['length'])?_0x293095:_0x30c534;}['toJSON'](){var _0x2c8773,_0x50e5d3;return{'suggestions':null===(_0x2c8773=this['_suggestions'])||void 0x0===_0x2c8773?void 0x0:_0x2c8773['map'](_0x566bc3=>JSON['stringify'](_0x566bc3)),'suggestionsV2':null===(_0x50e5d3=this['_suggestionsV2'])||void 0x0===_0x50e5d3?void 0x0:_0x50e5d3['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x2665d9){var _0x402916,_0x1c1cf2;return new GetAllSuggestionResponse(null===(_0x402916=_0x2665d9['suggestions'])||void 0x0===_0x402916?void 0x0:_0x402916['map'](_suggestionFromString),null===(_0x1c1cf2=_0x2665d9['suggestionsV2'])||void 0x0===_0x1c1cf2?void 0x0:_0x1c1cf2['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x493cf4){const _0x32741f=JSON['parse'](_0x493cf4);return _0x32741f['createdAt']=_0x32741f['createdAt']?new Date(_0x32741f['createdAt']):void 0x0,_0x32741f;}exports['default']=GetAllSuggestionResponse,GetAllSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionsResponse',GetAllSuggestionResponse['DESCRIPTOR']={'fields':{'suggestions':{'type':'string','rule':'repeated','id':0x1},'suggestionsV2':{'type':'SuggestionDescriptor','rule':'repeated','id':0x2}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x17f745){return _0x17f745&&_0x17f745['__esModule']?_0x17f745:{'default':_0x17f745};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message')),suggestiondescriptor_1=__importDefault(require('../descriptors/suggestiondescriptor'));class GetAllSuggestionResponse extends message_1['default']{constructor(_0x116ad5,_0x111333){super(),this['_suggestions']=_0x116ad5,this['_suggestionsV2']=_0x111333,this['suggestions']=(null==_0x111333?void 0x0:_0x111333['length'])?_0x111333:_0x116ad5;}['toJSON'](){var _0x48319e,_0x1368b8;return{'suggestions':null===(_0x48319e=this['_suggestions'])||void 0x0===_0x48319e?void 0x0:_0x48319e['map'](_0x1ffc19=>JSON['stringify'](_0x1ffc19)),'suggestionsV2':null===(_0x1368b8=this['_suggestionsV2'])||void 0x0===_0x1368b8?void 0x0:_0x1368b8['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x54989f){var _0xdd85dc,_0x278e82;return new GetAllSuggestionResponse(null===(_0xdd85dc=_0x54989f['suggestions'])||void 0x0===_0xdd85dc?void 0x0:_0xdd85dc['map'](_suggestionFromString),null===(_0x278e82=_0x54989f['suggestionsV2'])||void 0x0===_0x278e82?void 0x0:_0x278e82['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x48a065){const _0x58a3a5=JSON['parse'](_0x48a065);return _0x58a3a5['createdAt']=_0x58a3a5['createdAt']?new Date(_0x58a3a5['createdAt']):void 0x0,_0x58a3a5;}exports['default']=GetAllSuggestionResponse,GetAllSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionsResponse',GetAllSuggestionResponse['DESCRIPTOR']={'fields':{'suggestions':{'type':'string','rule':'repeated','id':0x1},'suggestionsV2':{'type':'SuggestionDescriptor','rule':'repeated','id':0x2}}};
@@ -0,0 +1,27 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IGetSuggestionResponse extends IMessage {
4
+ id: string;
5
+ authorId: string;
6
+ type: string;
7
+ createdAt: string;
8
+ data: string;
9
+ hasComments: boolean;
10
+ state: string;
11
+ attributes: string | null;
12
+ }
13
+ export default class GetSuggestionResponse extends Message {
14
+ readonly id: string;
15
+ readonly authorId: string;
16
+ readonly type: string;
17
+ readonly hasComments: boolean;
18
+ readonly state: string;
19
+ readonly data: Record<string, unknown>;
20
+ readonly attributes: Record<string, unknown> | null;
21
+ readonly createdAt: Date;
22
+ static readonly DESCRIPTOR_NAME: string;
23
+ static readonly DESCRIPTOR: IDescriptorBody;
24
+ constructor(id: string, authorId: string, type: string, createdAt: string, hasComments: boolean, state: string, data?: Record<string, unknown>, attributes?: Record<string, unknown> | null);
25
+ toJSON(): IGetSuggestionResponse;
26
+ static fromJSON(data: IGetSuggestionResponse): GetSuggestionResponse;
27
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x32e5ea){return _0x32e5ea&&_0x32e5ea['__esModule']?_0x32e5ea:{'default':_0x32e5ea};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x15c5b2,_0x40c090,_0x4531c4,_0x47416e,_0x4f0261,_0x31e8ac,_0x1152cd={},_0x1f8c3a=null){super(),this['id']=_0x15c5b2,this['authorId']=_0x40c090,this['type']=_0x4531c4,this['hasComments']=_0x4f0261,this['state']=_0x31e8ac,this['data']=_0x1152cd,this['attributes']=_0x1f8c3a,this['createdAt']=new Date(_0x47416e);}['toJSON'](){return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':this['createdAt']['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x3a2dd9){return new GetSuggestionResponse(_0x3a2dd9['id'],_0x3a2dd9['authorId'],_0x3a2dd9['type'],_0x3a2dd9['createdAt'],_0x3a2dd9['hasComments'],_0x3a2dd9['state'],JSON['parse'](_0x3a2dd9['data']),_0x3a2dd9['attributes']?JSON['parse'](_0x3a2dd9['attributes']):null);}}exports['default']=GetSuggestionResponse,GetSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesGetSuggestionResponse',GetSuggestionResponse['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'authorId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'createdAt':{'type':'string','id':0x4},'data':{'type':'string','id':0x5},'hasComments':{'type':'bool','id':0x6},'state':{'type':'string','id':0x7},'attributes':{'type':'string','id':0x8}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x4c3dec){return _0x4c3dec&&_0x4c3dec['__esModule']?_0x4c3dec:{'default':_0x4c3dec};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x4eecde,_0x207315,_0xd2a2,_0x133922,_0x2f60ae,_0x60c0bb,_0x1dfb8c={},_0x3c6d09=null){super(),this['id']=_0x4eecde,this['authorId']=_0x207315,this['type']=_0xd2a2,this['hasComments']=_0x2f60ae,this['state']=_0x60c0bb,this['data']=_0x1dfb8c,this['attributes']=_0x3c6d09,this['createdAt']=new Date(_0x133922);}['toJSON'](){return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':this['createdAt']['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x2989d1){return new GetSuggestionResponse(_0x2989d1['id'],_0x2989d1['authorId'],_0x2989d1['type'],_0x2989d1['createdAt'],_0x2989d1['hasComments'],_0x2989d1['state'],JSON['parse'](_0x2989d1['data']),_0x2989d1['attributes']?JSON['parse'](_0x2989d1['attributes']):null);}}exports['default']=GetSuggestionResponse,GetSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesGetSuggestionResponse',GetSuggestionResponse['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'authorId':{'type':'string','id':0x2},'type':{'type':'string','id':0x3},'createdAt':{'type':'string','id':0x4},'data':{'type':'string','id':0x5},'hasComments':{'type':'bool','id':0x6},'state':{'type':'string','id':0x7},'attributes':{'type':'string','id':0x8}}};
@@ -0,0 +1,62 @@
1
+ import AddSuggestionResponse from './responses/addsuggestionresponse';
2
+ import GetSuggestionResponse from './responses/getsuggestionresponse';
3
+ import { IWebSocketGateway } from '../websocketgateway/websocketgateway';
4
+ import { ISuggestion } from './descriptors/suggestiondescriptor';
5
+ export declare const _SERVICE: number;
6
+ interface ISuggestionUpdateProps {
7
+ hasComments?: boolean;
8
+ state?: string;
9
+ attributes?: Record<string, unknown>;
10
+ }
11
+ export interface IBatchUpdateSuggestionsStateParams {
12
+ ids: string[];
13
+ state: string;
14
+ }
15
+ declare const TrackChangesService_base: {
16
+ new (): import("ckeditor5/src/utils").Emitter;
17
+ prototype: import("ckeditor5/src/utils").Emitter;
18
+ };
19
+ declare class TrackChangesService extends TrackChangesService_base {
20
+ private readonly _documentId;
21
+ private _isConnected;
22
+ private _wsGateway?;
23
+ private _channel?;
24
+ private static readonly _SERVICE;
25
+ constructor(_documentId: string);
26
+ get isConnected(): boolean;
27
+ /**
28
+ * Connects to WebSocketGateway and starts listening on channel.
29
+ */
30
+ connect(wsGateway: IWebSocketGateway): Promise<ISuggestion[] | void>;
31
+ /**
32
+ * Disconnects TrackChangesService from CKEditor Cloud Services.
33
+ */
34
+ disconnect(): void;
35
+ /**
36
+ * Adds suggestion and returns AddSuggestionResponse.
37
+ */
38
+ add(id: string, type: string, data: Record<string, unknown>, originalSuggestionId?: string | null, attributes?: Record<string, unknown>): Promise<AddSuggestionResponse>;
39
+ /**
40
+ * Returns suggestion with given id.
41
+ */
42
+ get(id: string, attempt?: number): Promise<GetSuggestionResponse>;
43
+ /**
44
+ * Returns suggestions from given documentId.
45
+ */
46
+ getAll(): Promise<ISuggestion[]>;
47
+ /**
48
+ * Updates suggestion.
49
+ */
50
+ update(id: string, props?: ISuggestionUpdateProps): Promise<void>;
51
+ batchUpdateState(params: IBatchUpdateSuggestionsStateParams): Promise<void>;
52
+ /**
53
+ * Starts to listen on a given channel.
54
+ */
55
+ private _connectToChannel;
56
+ /**
57
+ * Processes websocket gateway state changes.
58
+ */
59
+ private _onWsGatewayStateChange;
60
+ private _sendRequest;
61
+ }
62
+ export default TrackChangesService;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x2b9c70,_0x471e3d,_0x14a169,_0x2f6f28){void 0x0===_0x2f6f28&&(_0x2f6f28=_0x14a169),Object['defineProperty'](_0x2b9c70,_0x2f6f28,{'enumerable':!0x0,'get':function(){return _0x471e3d[_0x14a169];}});}:function(_0x261c86,_0x560091,_0x26f48e,_0x137664){void 0x0===_0x137664&&(_0x137664=_0x26f48e),_0x261c86[_0x137664]=_0x560091[_0x26f48e];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x4ceb57,_0x4eebfb){Object['defineProperty'](_0x4ceb57,'default',{'enumerable':!0x0,'value':_0x4eebfb});}:function(_0x475894,_0x185634){_0x475894['default']=_0x185634;}),__importStar=this&&this['__importStar']||function(_0x230314){if(_0x230314&&_0x230314['__esModule'])return _0x230314;var _0x4d80a7={};if(null!=_0x230314)for(var _0x41bf85 in _0x230314)'default'!==_0x41bf85&&Object['prototype']['hasOwnProperty']['call'](_0x230314,_0x41bf85)&&__createBinding(_0x4d80a7,_0x230314,_0x41bf85);return __setModuleDefault(_0x4d80a7,_0x230314),_0x4d80a7;},__importDefault=this&&this['__importDefault']||function(_0x5e90a8){return _0x5e90a8&&_0x5e90a8['__esModule']?_0x5e90a8:{'default':_0x5e90a8};};Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['_SERVICE']=void 0x0;const utils_1=require('ckeditor5/src/utils'),messagescompressor_1=__importDefault(require('./../messagescompressor')),addsuggestionmessage_1=__importDefault(require('./messages/addsuggestionmessage')),addsuggestionresponse_1=__importDefault(require('./responses/addsuggestionresponse')),getsuggestionmessage_1=__importDefault(require('./messages/getsuggestionmessage')),getsuggestionresponse_1=__importDefault(require('./responses/getsuggestionresponse')),getallsuggestionsmessage_1=__importDefault(require('./messages/getallsuggestionsmessage')),getallsuggestionsresponse_1=__importDefault(require('./responses/getallsuggestionsresponse')),updatesuggestionmessage_1=__importDefault(require('./messages/updatesuggestionmessage')),connectmessage_1=__importDefault(require('./messages/connectmessage')),connectresponse_1=__importDefault(require('./responses/connectresponse')),ckeditorcloudserviceserror_1=__importDefault(require('../ckeditorcloudserviceserror')),websocketgateway_1=__importStar(require('../websocketgateway/websocketgateway')),ServiceNotConnectedError_1=__importDefault(require('../errors/ServiceNotConnectedError')),ckeditorcloudservicesservererror_1=__importDefault(require('../ckeditorcloudservicesservererror')),batchUpdateSuggestionsStateMessage_1=__importDefault(require('./messages/batchUpdateSuggestionsStateMessage'));exports['_SERVICE']=0xa;class TrackChangesService extends(0x0,utils_1['EmitterMixin'])(){constructor(_0x12a518){super(),this['_documentId']=_0x12a518,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x3b94ed){if(this['_isConnected'])return;if(_0x3b94ed['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x3b94ed);const _0xeff444=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x3b94ed,this['stopListening'](_0x3b94ed,'change:state');const _0x3e470b=await _0x3b94ed['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0xeff444)),_0x2e714c=messagescompressor_1['default']['decode'](_0x3e470b,connectresponse_1['default']);return this['listenTo'](_0x3b94ed,'change:state',(_0x28cdca,_0x77bb0b,_0x5e5744)=>this['_onWsGatewayStateChange'](_0x5e5744),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x3b94ed,_0x2e714c['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x2e714c['suggestions'];}['disconnect'](){this['_isConnected']&&(this['_isConnected']=!0x1,this['_wsGateway']&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['_channel']&&(this['stopListening'](this['_channel']),this['_channel']=void 0x0),this['fire']('disconnected'),this['stopListening']());}async['add'](_0x22f651,_0x28a64f,_0x29bdbc,_0xb4f03e=null,_0x4590e7){const _0x5a5fbb=new addsuggestionmessage_1['default'](_0x22f651,this['_documentId'],_0x28a64f,_0x29bdbc,_0xb4f03e,_0x4590e7),_0x27ab0b=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0x5a5fbb);return messagescompressor_1['default']['decode'](_0x27ab0b,addsuggestionresponse_1['default']);}async['get'](_0xb696cd,_0x557876=0x1){const _0x90adaf=new getsuggestionmessage_1['default'](_0xb696cd,this['_documentId']);try{const _0x59b119=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0x90adaf);return messagescompressor_1['default']['decode'](_0x59b119,getsuggestionresponse_1['default']);}catch(_0x4ea3a9){if('CKEditorCloudServicesServerError'===_0x4ea3a9['name']&&'404'===_0x4ea3a9['code']&&_0x557876<0x5)return await(_0x3d1f9f=0x64*_0x557876,new Promise(_0x4464c7=>{setTimeout(_0x4464c7,_0x3d1f9f);})),this['get'](_0xb696cd,_0x557876+0x1);if('CKEditorCloudServicesServerError'===_0x4ea3a9['name'])throw _0x4ea3a9;throw ckeditorcloudservicesservererror_1['default']['fromPublicError'](_0x4ea3a9);}var _0x3d1f9f;}async['getAll'](){const _0x54c3e9=new getallsuggestionsmessage_1['default'](this['_documentId']),_0x4ebae6=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x54c3e9),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0x4ebae6,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x26897a,_0x4329e1={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x4329e1,_0x4d46dd=void 0x0!==hasComments,_0x569ba3=new updatesuggestionmessage_1['default'](_0x26897a,this['_documentId'],hasComments,_0x4d46dd,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x569ba3);}async['batchUpdateState'](_0x4f9f40){const _0x296fd2=new batchUpdateSuggestionsStateMessage_1['default'](_0x4f9f40['ids'],this['_documentId'],_0x4f9f40['state']);await this['_sendRequest'](batchUpdateSuggestionsStateMessage_1['default']['TYPE'],_0x296fd2);}['_connectToChannel'](_0x1bcb53,_0x24909c){this['_channel']=_0x1bcb53['_getChannel'](TrackChangesService['_SERVICE'],_0x24909c),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x43f530,_0x146ace)=>{const _0x84c257=messagescompressor_1['default']['decode'](_0x146ace,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x84c257);});}['_onWsGatewayStateChange'](_0x1f2caf){_0x1f2caf===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x39854c,_0x39c3af){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x39854c,messagescompressor_1['default']['encode'](_0x39c3af));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],exports['default']=TrackChangesService;
23
+ 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x49f043,_0x48d7cb,_0x219b70,_0x58c521){void 0x0===_0x58c521&&(_0x58c521=_0x219b70),Object['defineProperty'](_0x49f043,_0x58c521,{'enumerable':!0x0,'get':function(){return _0x48d7cb[_0x219b70];}});}:function(_0x15af0f,_0x233952,_0x219145,_0x27f566){void 0x0===_0x27f566&&(_0x27f566=_0x219145),_0x15af0f[_0x27f566]=_0x233952[_0x219145];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x42b155,_0x143510){Object['defineProperty'](_0x42b155,'default',{'enumerable':!0x0,'value':_0x143510});}:function(_0x586cf2,_0x28fb45){_0x586cf2['default']=_0x28fb45;}),__importStar=this&&this['__importStar']||function(_0x205125){if(_0x205125&&_0x205125['__esModule'])return _0x205125;var _0x2d6e4d={};if(null!=_0x205125)for(var _0x309283 in _0x205125)'default'!==_0x309283&&Object['prototype']['hasOwnProperty']['call'](_0x205125,_0x309283)&&__createBinding(_0x2d6e4d,_0x205125,_0x309283);return __setModuleDefault(_0x2d6e4d,_0x205125),_0x2d6e4d;},__importDefault=this&&this['__importDefault']||function(_0x1f1d29){return _0x1f1d29&&_0x1f1d29['__esModule']?_0x1f1d29:{'default':_0x1f1d29};};Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['_SERVICE']=void 0x0;const utils_1=require('ckeditor5/src/utils'),messagescompressor_1=__importDefault(require('./../messagescompressor')),addsuggestionmessage_1=__importDefault(require('./messages/addsuggestionmessage')),addsuggestionresponse_1=__importDefault(require('./responses/addsuggestionresponse')),getsuggestionmessage_1=__importDefault(require('./messages/getsuggestionmessage')),getsuggestionresponse_1=__importDefault(require('./responses/getsuggestionresponse')),getallsuggestionsmessage_1=__importDefault(require('./messages/getallsuggestionsmessage')),getallsuggestionsresponse_1=__importDefault(require('./responses/getallsuggestionsresponse')),updatesuggestionmessage_1=__importDefault(require('./messages/updatesuggestionmessage')),connectmessage_1=__importDefault(require('./messages/connectmessage')),connectresponse_1=__importDefault(require('./responses/connectresponse')),ckeditorcloudserviceserror_1=__importDefault(require('../ckeditorcloudserviceserror')),websocketgateway_1=__importStar(require('../websocketgateway/websocketgateway')),ServiceNotConnectedError_1=__importDefault(require('../errors/ServiceNotConnectedError')),ckeditorcloudservicesservererror_1=__importDefault(require('../ckeditorcloudservicesservererror')),batchUpdateSuggestionsStateMessage_1=__importDefault(require('./messages/batchUpdateSuggestionsStateMessage'));exports['_SERVICE']=0xa;class TrackChangesService extends(0x0,utils_1['EmitterMixin'])(){constructor(_0x586631){super(),this['_documentId']=_0x586631,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x27b510){if(this['_isConnected'])return;if(_0x27b510['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x27b510);const _0x17fa3d=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x27b510,this['stopListening'](_0x27b510,'change:state');const _0x5da7da=await _0x27b510['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x17fa3d)),_0x505b38=messagescompressor_1['default']['decode'](_0x5da7da,connectresponse_1['default']);return this['listenTo'](_0x27b510,'change:state',(_0x2ab8f9,_0x3a3cdb,_0x480f00)=>this['_onWsGatewayStateChange'](_0x480f00),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x27b510,_0x505b38['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x505b38['suggestions'];}['disconnect'](){this['_isConnected']&&(this['_isConnected']=!0x1,this['_wsGateway']&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['_channel']&&(this['stopListening'](this['_channel']),this['_channel']=void 0x0),this['fire']('disconnected'),this['stopListening']());}async['add'](_0x46a829,_0x10d1dc,_0x5a56cc,_0x40e68c=null,_0x458594){const _0x373654=new addsuggestionmessage_1['default'](_0x46a829,this['_documentId'],_0x10d1dc,_0x5a56cc,_0x40e68c,_0x458594),_0x1e4f19=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0x373654);return messagescompressor_1['default']['decode'](_0x1e4f19,addsuggestionresponse_1['default']);}async['get'](_0x523105,_0x5365dd=0x1){const _0x2b413c=new getsuggestionmessage_1['default'](_0x523105,this['_documentId']);try{const _0x2570ca=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0x2b413c);return messagescompressor_1['default']['decode'](_0x2570ca,getsuggestionresponse_1['default']);}catch(_0x1ef6d1){if('CKEditorCloudServicesServerError'===_0x1ef6d1['name']&&'404'===_0x1ef6d1['code']&&_0x5365dd<0x5)return await(_0x45e0b3=0x64*_0x5365dd,new Promise(_0x49f05d=>{setTimeout(_0x49f05d,_0x45e0b3);})),this['get'](_0x523105,_0x5365dd+0x1);if('CKEditorCloudServicesServerError'===_0x1ef6d1['name'])throw _0x1ef6d1;throw ckeditorcloudservicesservererror_1['default']['fromPublicError'](_0x1ef6d1);}var _0x45e0b3;}async['getAll'](){const _0x48649f=new getallsuggestionsmessage_1['default'](this['_documentId']),_0x385d9e=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x48649f),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0x385d9e,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x3a5061,_0x3ae88e={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x3ae88e,_0x1c2791=void 0x0!==hasComments,_0x8b1372=new updatesuggestionmessage_1['default'](_0x3a5061,this['_documentId'],hasComments,_0x1c2791,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x8b1372);}async['batchUpdateState'](_0x37af03){const _0x3b928a=new batchUpdateSuggestionsStateMessage_1['default'](_0x37af03['ids'],this['_documentId'],_0x37af03['state']);await this['_sendRequest'](batchUpdateSuggestionsStateMessage_1['default']['TYPE'],_0x3b928a);}['_connectToChannel'](_0x1cb9c3,_0x4cf733){this['_channel']=_0x1cb9c3['_getChannel'](TrackChangesService['_SERVICE'],_0x4cf733),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x5c5391,_0x1bb4b1)=>{const _0x5080b3=messagescompressor_1['default']['decode'](_0x1bb4b1,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x5080b3);});}['_onWsGatewayStateChange'](_0x22188a){_0x22188a===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x441875,_0x190412){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x441875,messagescompressor_1['default']['encode'](_0x190412));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],exports['default']=TrackChangesService;
package/src/types.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export declare type TokenChangeValueEventCallback = (event: Record<string, unknown>, name: string, value: ArrayBuffer) => void | Promise<void>;
2
+ export interface IToken {
3
+ value: string | ArrayBuffer;
4
+ refreshToken(): Promise<void> | void;
5
+ on(event: string, handler: TokenChangeValueEventCallback): void;
6
+ off(event: string, handler: TokenChangeValueEventCallback): void;
7
+ }
@@ -0,0 +1,5 @@
1
+ import Descriptor, { IDescriptorBody } from './../../descriptor';
2
+ export default class UserDescriptor extends Descriptor {
3
+ static readonly DESCRIPTOR_NAME: string;
4
+ static readonly DESCRIPTOR: IDescriptorBody;
5
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x13fdba){return _0x13fdba&&_0x13fdba['__esModule']?_0x13fdba:{'default':_0x13fdba};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class UserDescriptor extends descriptor_1['default']{}exports['default']=UserDescriptor,UserDescriptor['DESCRIPTOR_NAME']='UserDescriptor',UserDescriptor['DESCRIPTOR']={'fields':{'attributes':{'rule':'repeated','type':'KeyValueDescriptor','id':0x1}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2f6d83){return _0x2f6d83&&_0x2f6d83['__esModule']?_0x2f6d83:{'default':_0x2f6d83};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class UserDescriptor extends descriptor_1['default']{}exports['default']=UserDescriptor,UserDescriptor['DESCRIPTOR_NAME']='UserDescriptor',UserDescriptor['DESCRIPTOR']={'fields':{'attributes':{'rule':'repeated','type':'KeyValueDescriptor','id':0x1}}};
@@ -0,0 +1,15 @@
1
+ import Message, { IMessage } from './../../message';
2
+ import { IDescriptorBody } from '../../descriptor';
3
+ export interface IGetManyUsersMessage extends IMessage {
4
+ ids: string[];
5
+ }
6
+ export default class GetManyUsersMessage extends Message {
7
+ readonly ids: 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(ids: string[]);
13
+ toJSON(): IGetManyUsersMessage;
14
+ static fromJSON(data: IGetManyUsersMessage): GetManyUsersMessage;
15
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x41859f){return _0x41859f&&_0x41859f['__esModule']?_0x41859f:{'default':_0x41859f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x525ee3){super(),this['ids']=_0x525ee3;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x2362be){return new GetManyUsersMessage(_0x2362be['ids']);}}exports['default']=GetManyUsersMessage,GetManyUsersMessage['TYPE']='22',GetManyUsersMessage['READABLE_TYPE_NAME']='getManyUsers',GetManyUsersMessage['DESCRIPTOR_NAME']='GetManyUsersMessage',GetManyUsersMessage['DESCRIPTOR']={'fields':{'ids':{'id':0x1,'type':'string','rule':'repeated'}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x3753de){return _0x3753de&&_0x3753de['__esModule']?_0x3753de:{'default':_0x3753de};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x425f91){super(),this['ids']=_0x425f91;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x5b4a76){return new GetManyUsersMessage(_0x5b4a76['ids']);}}exports['default']=GetManyUsersMessage,GetManyUsersMessage['TYPE']='22',GetManyUsersMessage['READABLE_TYPE_NAME']='getManyUsers',GetManyUsersMessage['DESCRIPTOR_NAME']='GetManyUsersMessage',GetManyUsersMessage['DESCRIPTOR']={'fields':{'ids':{'id':0x1,'type':'string','rule':'repeated'}}};