@ckeditor/ckeditor-cloud-services-collaboration 26.0.0 → 29.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 (96) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +2 -3
  3. package/package.json +4 -3
  4. package/src/@types/ckeditor5-utils.js +1 -1
  5. package/src/ckeditorcloudserviceserror.js +2 -2
  6. package/src/collaborativeeditingservice/collaborativeeditingservice.js +2 -2
  7. package/src/collaborativeeditingservice/descriptors/operationmetadatadescriptor.js +2 -2
  8. package/src/collaborativeeditingservice/helpers/operationmetadatahelpers.js +2 -2
  9. package/src/collaborativeeditingservice/messages/collaborativeeditingconnectmessage.js +2 -2
  10. package/src/collaborativeeditingservice/messages/collaborativeeditingreconnectmessage.js +2 -2
  11. package/src/collaborativeeditingservice/messages/collaborativeeditingupdatemessage.js +2 -2
  12. package/src/collaborativeeditingservice/messages/getdocumentdetailsmessage.js +23 -0
  13. package/src/collaborativeeditingservice/responses/collaborativeeditingconnectresponse.js +2 -2
  14. package/src/collaborativeeditingservice/responses/collaborativeeditingresponse.js +2 -2
  15. package/src/collaborativeeditingservice/responses/getdocumentdetailsresponse.js +23 -0
  16. package/src/comments-v2/commentsservice.js +2 -2
  17. package/src/comments-v2/descriptors/commentdescriptor.js +2 -2
  18. package/src/comments-v2/descriptors/commentsthreaddescriptor.js +2 -2
  19. package/src/comments-v2/messages/addcommentmessage.js +2 -2
  20. package/src/comments-v2/messages/connectmessage.js +2 -2
  21. package/src/comments-v2/messages/getcommentthreadmessage.js +2 -2
  22. package/src/comments-v2/messages/getdocumentthreadsmessage.js +2 -2
  23. package/src/comments-v2/messages/removecommentmessage.js +2 -2
  24. package/src/comments-v2/messages/removecommentthreadmessage.js +2 -2
  25. package/src/comments-v2/messages/updatecommentmessage.js +2 -2
  26. package/src/comments-v2/responses/addcommentresponse.js +2 -2
  27. package/src/comments-v2/responses/connectresponse.js +2 -2
  28. package/src/comments-v2/responses/getcommentthreadresponse.js +2 -2
  29. package/src/comments-v2/responses/getdocumentthreadsresponse.js +2 -2
  30. package/src/descriptor.js +2 -2
  31. package/src/descriptors/keyvaluedescriptor.js +2 -2
  32. package/src/editor/editorservice.js +23 -0
  33. package/src/editor/messages/iseditorbundleuploadedmessage.js +23 -0
  34. package/src/editor/responses/iseditorbundleuploadedresponse.js +23 -0
  35. package/src/errors/ServiceNotConnectedError.js +2 -2
  36. package/src/index.js +2 -2
  37. package/src/message.js +2 -2
  38. package/src/messagescompressor.js +2 -2
  39. package/src/messagesmapper.js +2 -2
  40. package/src/revision-history/descriptors/revisiondescriptor.js +23 -0
  41. package/src/revision-history/messages/revisionhistoryconnectmessage.js +23 -0
  42. package/src/revision-history/messages/revisionhistorygetrevisionmessage.js +23 -0
  43. package/src/revision-history/messages/revisionhistoryreconnectmessage.js +23 -0
  44. package/src/revision-history/messages/revisionhistoryupdaterevisionsmessage.js +23 -0
  45. package/src/revision-history/responses/revisionhistoryconnectresponse.js +23 -0
  46. package/src/revision-history/responses/revisionhistorygetrevisionresponse.js +23 -0
  47. package/src/revision-history/responses/revisionhistoryupdaterevisionsresponse.js +23 -0
  48. package/src/revision-history/revision.js +23 -0
  49. package/src/revision-history/revisionhistoryservice.js +23 -0
  50. package/src/sessions/descriptors/sessiondescriptor.js +2 -2
  51. package/src/sessions/messages/sessionsconnectmessage.js +2 -2
  52. package/src/sessions/messages/socketconnectmessage.js +2 -2
  53. package/src/sessions/messages/socketdisconnectmessage.js +2 -2
  54. package/src/sessions/responses/sessionsconnectresponse.js +2 -2
  55. package/src/sessions/sessioncollection.js +2 -2
  56. package/src/sessions/sessions.js +2 -2
  57. package/src/track-changes/descriptors/suggestiondescriptor.js +2 -2
  58. package/src/track-changes/messages/addsuggestionmessage.js +2 -2
  59. package/src/track-changes/messages/connectmessage.js +2 -2
  60. package/src/track-changes/messages/getallsuggestionsmessage.js +2 -2
  61. package/src/track-changes/messages/getsuggestionmessage.js +2 -2
  62. package/src/track-changes/messages/updatesuggestionmessage.js +2 -2
  63. package/src/track-changes/responses/addsuggestionresponse.js +2 -2
  64. package/src/track-changes/responses/connectresponse.js +2 -2
  65. package/src/track-changes/responses/getallsuggestionsresponse.js +2 -2
  66. package/src/track-changes/responses/getsuggestionresponse.js +2 -2
  67. package/src/track-changes/trackchangesservice.js +2 -2
  68. package/src/types.js +1 -1
  69. package/src/users/descriptors/userdescriptor.js +2 -2
  70. package/src/users/messages/getmanyusersmessage.js +2 -2
  71. package/src/users/messages/getusermessage.js +2 -2
  72. package/src/users/responses/getmanyusersresponse.js +2 -2
  73. package/src/users/responses/getuserresponse.js +2 -2
  74. package/src/users/user.js +2 -2
  75. package/src/version.js +2 -2
  76. package/src/websocketgateway/channel.js +2 -2
  77. package/src/websocketgateway/messages/channelmessage.js +2 -2
  78. package/src/websocketgateway/parser/packetparser.js +2 -2
  79. package/src/websocketgateway/parser/packets/bytesbytespacketdatamessage.js +2 -2
  80. package/src/websocketgateway/parser/packets/numberbytespacketdatamessage.js +2 -2
  81. package/src/websocketgateway/parser/packets/numbernumberpacketdatamessag.js +2 -2
  82. package/src/websocketgateway/parser/packets/numberobjectpacketdatamessage.js +2 -2
  83. package/src/websocketgateway/parser/packets/numberstringpacketdatamessag.js +2 -2
  84. package/src/websocketgateway/parser/packets/objectbufferpacketdatamessage.js +2 -2
  85. package/src/websocketgateway/parser/packets/objectobjectpacketdatamessage.js +2 -2
  86. package/src/websocketgateway/parser/packets/packagedatamessage.js +2 -2
  87. package/src/websocketgateway/parser/packets/packetmessage.js +2 -2
  88. package/src/websocketgateway/parser/packets/packetoptionsmessage.js +2 -2
  89. package/src/websocketgateway/parser/packets/stringbytespacketdatamessage.js +2 -2
  90. package/src/websocketgateway/parser/packets/stringnumberpacketdatamessage.js +2 -2
  91. package/src/websocketgateway/parser/packets/stringobjectpacketdatamessage.js +2 -2
  92. package/src/websocketgateway/parser/packets/stringstringpacketdatamessage.js +2 -2
  93. package/src/websocketgateway/parser/parser.js +2 -2
  94. package/src/websocketgateway/parser/parserutils.js +2 -2
  95. package/src/websocketgateway/requestsmanager.js +23 -0
  96. package/src/websocketgateway/websocketgateway.js +2 -2
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0xfadb17){return _0xfadb17&&_0xfadb17['__esModule']?_0xfadb17:{'default':_0xfadb17};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class RevisionHistoryUpdateRevisionsResponse extends message_1['default']{constructor(_0x268ec3){super(),this['requestId']=_0x268ec3;}['toJSON'](){return{'requestId':this['requestId']};}static['fromJSON'](_0x246d14){return new RevisionHistoryUpdateRevisionsResponse(_0x246d14['requestId']);}}exports['default']=RevisionHistoryUpdateRevisionsResponse,RevisionHistoryUpdateRevisionsResponse['DESCRIPTOR_NAME']='RevisionHistoryUpdateRevisionsResponse',RevisionHistoryUpdateRevisionsResponse['DESCRIPTOR']={'fields':{'requestId':{'type':'uint32','id':0x1}}};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ 'use strict';Object['defineProperty'](exports,'__esModule',{'value':!0x0});
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x29514e){return _0x29514e&&_0x29514e['__esModule']?_0x29514e:{'default':_0x29514e};},__importStar=this&&this['__importStar']||function(_0xdeb5bc){if(_0xdeb5bc&&_0xdeb5bc['__esModule'])return _0xdeb5bc;var _0x454348={};if(null!=_0xdeb5bc)for(var _0x201718 in _0xdeb5bc)Object['hasOwnProperty']['call'](_0xdeb5bc,_0x201718)&&(_0x454348[_0x201718]=_0xdeb5bc[_0x201718]);return _0x454348['default']=_0xdeb5bc,_0x454348;};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const utils_1=require('ckeditor5/src/utils'),messagescompressor_1=__importDefault(require('./../messagescompressor')),revisionhistorygetrevisionmessage_1=__importDefault(require('./messages/revisionhistorygetrevisionmessage')),revisionhistorygetrevisionresponse_1=__importDefault(require('./responses/revisionhistorygetrevisionresponse')),revisionhistoryupdaterevisionsmessage_1=__importDefault(require('./messages/revisionhistoryupdaterevisionsmessage')),revisionhistoryupdaterevisionsresponse_1=__importDefault(require('./responses/revisionhistoryupdaterevisionsresponse')),revisionhistoryconnectmessage_1=__importDefault(require('./messages/revisionhistoryconnectmessage')),revisionhistoryconnectresponse_1=__importDefault(require('./responses/revisionhistoryconnectresponse')),revisionhistoryreconnectmessage_1=__importDefault(require('./messages/revisionhistoryreconnectmessage')),ckeditorcloudserviceserror_1=__importDefault(require('../ckeditorcloudserviceserror')),websocketgateway_1=__importStar(require('../websocketgateway/websocketgateway')),ServiceNotConnectedError_1=__importDefault(require('../errors/ServiceNotConnectedError'));exports['_SERVICE']=0xc;class RevisionHistoryService{constructor(_0xf27206){this['_documentId']=_0xf27206,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}['connect'](_0x121d86){return this['_isConnected']?Promise['resolve']():this['_connect'](_0x121d86,new revisionhistoryconnectmessage_1['default'](this['_documentId']));}['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']());}['reconnect'](_0x3b3528,_0x266f73){if(this['isConnected'])throw new ckeditorcloudserviceserror_1['default']('Cannot\x20reconnect\x20to\x20already\x20connected\x20service.',_0x3b3528);return this['_connect'](_0x3b3528,new revisionhistoryreconnectmessage_1['default'](this['_documentId'],_0x266f73));}async['updateRevisions'](_0x47b2d1,_0x5e0408){const _0x43c42c=revisionhistoryupdaterevisionsmessage_1['default']['create']({'documentId':this['_documentId'],'requestId':_0x5e0408,'revisions':_0x47b2d1}),_0x89d37a=await this['_sendRequest'](revisionhistoryupdaterevisionsmessage_1['default']['TYPE'],_0x43c42c),{requestId:requestId}=messagescompressor_1['default']['decode'](_0x89d37a,revisionhistoryupdaterevisionsresponse_1['default']);return requestId;}async['getRevision'](_0x2c83b2){const _0x1538e4=new revisionhistorygetrevisionmessage_1['default'](this['_documentId'],_0x2c83b2),_0x4a3713=await this['_sendRequest'](revisionhistorygetrevisionmessage_1['default']['TYPE'],_0x1538e4);return messagescompressor_1['default']['decode'](_0x4a3713,revisionhistorygetrevisionresponse_1['default'])['toObject']();}async['_connect'](_0x7a74f3,_0x41d678){if(_0x7a74f3['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x7a74f3);this['_wsGateway']=_0x7a74f3,this['stopListening'](_0x7a74f3,'change:state');const _0x3c4496=await _0x7a74f3['_sendRequest'](exports['_SERVICE'],_0x41d678['constructor']['TYPE'],messagescompressor_1['default']['encode'](_0x41d678)),{channel:channel,requestId:requestId,revisions:revisions}=messagescompressor_1['default']['decode'](_0x3c4496,revisionhistoryconnectresponse_1['default'])['toObject']();return this['listenTo'](_0x7a74f3,'change:state',(_0x55429c,_0x472ddc,_0x3d7385)=>this['_onWsGatewayStateChange'](_0x3d7385),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x7a74f3,channel),this['_isConnected']=!0x0,this['fire']('connected'),{'revisions':revisions,'requestId':requestId};}['_connectToChannel'](_0x7ce6cc,_0x44c553){this['_channel']=_0x7ce6cc['_getChannel'](RevisionHistoryService['_SERVICE'],_0x44c553),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](revisionhistoryupdaterevisionsmessage_1['default']['TYPE']),(_0x158628,_0x17f766)=>{const {documentId:documentId,requestId:requestId,revisions:revisions}=messagescompressor_1['default']['decode'](_0x17f766,revisionhistoryupdaterevisionsmessage_1['default'])['toObject']();this['fire']('revisionsUpdated',{'documentId':documentId,'requestId':requestId,'revisionsData':revisions});});}['_onWsGatewayStateChange'](_0x1e78b5){_0x1e78b5===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x4c299c,_0x3a65c5){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Revision\x20History',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x4c299c,messagescompressor_1['default']['encode'](_0x3a65c5));}}RevisionHistoryService['_SERVICE']=exports['_SERVICE'],utils_1['mix'](RevisionHistoryService,utils_1['EmitterMixin']),exports['default']=RevisionHistoryService;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x3e9013){return _0x3e9013&&_0x3e9013['__esModule']?_0x3e9013:{'default':_0x3e9013};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SessionsSocketDescriptor extends descriptor_1['default']{}exports['default']=SessionsSocketDescriptor,SessionsSocketDescriptor['DESCRIPTOR_NAME']='SessionsSocketDescriptor',SessionsSocketDescriptor['DESCRIPTOR']={'fields':{'session':{'type':'string','id':0x1},'user':{'type':'string','id':0x2},'role':{'id':0x3,'type':'string'},'permissions':{'rule':'repeated','type':'string','id':0x4}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x3e0c50){return _0x3e0c50&&_0x3e0c50['__esModule']?_0x3e0c50:{'default':_0x3e0c50};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SessionsSocketDescriptor extends descriptor_1['default']{}exports['default']=SessionsSocketDescriptor,SessionsSocketDescriptor['DESCRIPTOR_NAME']='SessionsSocketDescriptor',SessionsSocketDescriptor['DESCRIPTOR']={'fields':{'session':{'type':'string','id':0x1},'user':{'type':'string','id':0x2},'role':{'id':0x3,'type':'string'},'permissions':{'rule':'repeated','type':'string','id':0x4}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x300cbf){return _0x300cbf&&_0x300cbf['__esModule']?_0x300cbf:{'default':_0x300cbf};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectMessage extends message_1['default']{constructor(_0x5135a7,_0x17f87b){super(),this['id']=_0x5135a7,this['sessionType']=_0x17f87b;}['toJSON'](){return{'id':this['id'],'sessionType':this['sessionType']};}static['fromJSON'](_0x2bcaad){return new SessionsConnectMessage(_0x2bcaad['id'],_0x2bcaad['sessionType']);}}exports['default']=SessionsConnectMessage,SessionsConnectMessage['TYPE']='31',SessionsConnectMessage['READABLE_TYPE_NAME']='getConnectedSockets',SessionsConnectMessage['DESCRIPTOR_NAME']='SessionsConnectMessage',SessionsConnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'sessionType':{'type':'uint32','id':0x2}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x540e29){return _0x540e29&&_0x540e29['__esModule']?_0x540e29:{'default':_0x540e29};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectMessage extends message_1['default']{constructor(_0x42154e,_0x35f79){super(),this['id']=_0x42154e,this['sessionType']=_0x35f79;}['toJSON'](){return{'id':this['id'],'sessionType':this['sessionType']};}static['fromJSON'](_0x544425){return new SessionsConnectMessage(_0x544425['id'],_0x544425['sessionType']);}}exports['default']=SessionsConnectMessage,SessionsConnectMessage['TYPE']='31',SessionsConnectMessage['READABLE_TYPE_NAME']='getConnectedSockets',SessionsConnectMessage['DESCRIPTOR_NAME']='SessionsConnectMessage',SessionsConnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'sessionType':{'type':'uint32','id':0x2}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x3550db){return _0x3550db&&_0x3550db['__esModule']?_0x3550db:{'default':_0x3550db};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketConnectMessage extends message_1['default']{constructor(_0x3d094e,_0x3cbb5b,_0x1d91f2,_0x69bb3b){super(),this['id']=_0x3d094e,this['userId']=_0x3cbb5b,this['role']=_0x1d91f2,this['permissions']=_0x69bb3b;}['toJSON'](){var _0x36fc23,_0x2e11c8,_0x2cd975;return{'id':this['id'],'userId':null!==(_0x36fc23=this['userId'])&&void 0x0!==_0x36fc23?_0x36fc23:void 0x0,'role':null!==(_0x2e11c8=this['role'])&&void 0x0!==_0x2e11c8?_0x2e11c8:void 0x0,'permissions':null!==(_0x2cd975=this['permissions'])&&void 0x0!==_0x2cd975?_0x2cd975:void 0x0};}static['fromJSON'](_0x3c3f76){return new SocketConnectMessage(_0x3c3f76['id'],_0x3c3f76['userId'],_0x3c3f76['role'],_0x3c3f76['permissions']);}}exports['default']=SocketConnectMessage,SocketConnectMessage['TYPE']='32',SocketConnectMessage['READABLE_TYPE_NAME']='connectSocket',SocketConnectMessage['DESCRIPTOR_NAME']='SocketConnectMessage',SocketConnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'userId':{'type':'string','id':0x2},'role':{'type':'string','id':0x3},'permissions':{'rule':'repeated','type':'string','id':0x4}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x290ff5){return _0x290ff5&&_0x290ff5['__esModule']?_0x290ff5:{'default':_0x290ff5};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketConnectMessage extends message_1['default']{constructor(_0x40c4dd,_0x343551,_0x541454,_0x36914c){super(),this['id']=_0x40c4dd,this['userId']=_0x343551,this['role']=_0x541454,this['permissions']=_0x36914c;}['toJSON'](){var _0x1572c1,_0x48f188,_0x148d3e;return{'id':this['id'],'userId':null!==(_0x1572c1=this['userId'])&&void 0x0!==_0x1572c1?_0x1572c1:void 0x0,'role':null!==(_0x48f188=this['role'])&&void 0x0!==_0x48f188?_0x48f188:void 0x0,'permissions':null!==(_0x148d3e=this['permissions'])&&void 0x0!==_0x148d3e?_0x148d3e:void 0x0};}static['fromJSON'](_0x1b05c3){return new SocketConnectMessage(_0x1b05c3['id'],_0x1b05c3['userId'],_0x1b05c3['role'],_0x1b05c3['permissions']);}}exports['default']=SocketConnectMessage,SocketConnectMessage['TYPE']='32',SocketConnectMessage['READABLE_TYPE_NAME']='connectSocket',SocketConnectMessage['DESCRIPTOR_NAME']='SocketConnectMessage',SocketConnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1},'userId':{'type':'string','id':0x2},'role':{'type':'string','id':0x3},'permissions':{'rule':'repeated','type':'string','id':0x4}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5b88db){return _0x5b88db&&_0x5b88db['__esModule']?_0x5b88db:{'default':_0x5b88db};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketDisconnectMessage extends message_1['default']{constructor(_0xa37971){super(),this['id']=_0xa37971;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x707ed9){return new SocketDisconnectMessage(_0x707ed9['id']);}}exports['default']=SocketDisconnectMessage,SocketDisconnectMessage['TYPE']='33',SocketDisconnectMessage['READABLE_TYPE_NAME']='disconnectSocket',SocketDisconnectMessage['DESCRIPTOR_NAME']='SocketDisconnectMessage',SocketDisconnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x48501f){return _0x48501f&&_0x48501f['__esModule']?_0x48501f:{'default':_0x48501f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketDisconnectMessage extends message_1['default']{constructor(_0x388f15){super(),this['id']=_0x388f15;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x7b9785){return new SocketDisconnectMessage(_0x7b9785['id']);}}exports['default']=SocketDisconnectMessage,SocketDisconnectMessage['TYPE']='33',SocketDisconnectMessage['READABLE_TYPE_NAME']='disconnectSocket',SocketDisconnectMessage['DESCRIPTOR_NAME']='SocketDisconnectMessage',SocketDisconnectMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1344bd){return _0x1344bd&&_0x1344bd['__esModule']?_0x1344bd:{'default':_0x1344bd};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectResponse extends message_1['default']{constructor(_0x4277fe,_0x3203ea=[]){super(),this['channel']=_0x4277fe,this['sockets']=_0x3203ea;}['toJSON'](){return{'channel':this['channel'],'sockets':this['sockets']['map'](_0x547ed6=>({'user':_0x547ed6['userId'],'session':_0x547ed6['id'],'role':_0x547ed6['role'],'permissions':_0x547ed6['permissions']}))};}static['fromJSON'](_0x42fbed){return new SessionsConnectResponse(_0x42fbed['channel'],_0x42fbed['sockets']['map'](_0x4f12f7=>({'id':_0x4f12f7['session'],'userId':_0x4f12f7['user'],'role':_0x4f12f7['role'],'permissions':_0x4f12f7['permissions']})));}}exports['default']=SessionsConnectResponse,SessionsConnectResponse['DESCRIPTOR_NAME']='SessionsConnectResponse',SessionsConnectResponse['DESCRIPTOR']={'fields':{'channel':{'type':'string','id':0x1},'sockets':{'rule':'repeated','type':'SessionsSocketDescriptor','id':0x2}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2360be){return _0x2360be&&_0x2360be['__esModule']?_0x2360be:{'default':_0x2360be};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectResponse extends message_1['default']{constructor(_0x2ede1f,_0x252334=[]){super(),this['channel']=_0x2ede1f,this['sockets']=_0x252334;}['toJSON'](){return{'channel':this['channel'],'sockets':this['sockets']['map'](_0x2fdbea=>({'user':_0x2fdbea['userId'],'session':_0x2fdbea['id'],'role':_0x2fdbea['role'],'permissions':_0x2fdbea['permissions']}))};}static['fromJSON'](_0x138548){return new SessionsConnectResponse(_0x138548['channel'],_0x138548['sockets']['map'](_0x2bae33=>({'id':_0x2bae33['session'],'userId':_0x2bae33['user'],'role':_0x2bae33['role'],'permissions':_0x2bae33['permissions']})));}}exports['default']=SessionsConnectResponse,SessionsConnectResponse['DESCRIPTOR_NAME']='SessionsConnectResponse',SessionsConnectResponse['DESCRIPTOR']={'fields':{'channel':{'type':'string','id':0x1},'sockets':{'rule':'repeated','type':'SessionsSocketDescriptor','id':0x2}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2d4765){return _0x2d4765&&_0x2d4765['__esModule']?_0x2d4765:{'default':_0x2d4765};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const collection_1=__importDefault(require('@ckeditor/ckeditor5-utils/src/collection')),sessions_1=require('./sessions'),user_1=__importDefault(require('./../users/user')),websocketgateway_1=__importDefault(require('./../websocketgateway/websocketgateway')),sessionsconnectresponse_1=__importDefault(require('./responses/sessionsconnectresponse')),sessionsconnectmessage_1=__importDefault(require('./messages/sessionsconnectmessage')),socketconnectmessage_1=__importDefault(require('./messages/socketconnectmessage')),socketdisconnectmessage_1=__importDefault(require('./messages/socketdisconnectmessage')),messagescompressor_1=__importDefault(require('./../messagescompressor'));class SessionCollection extends collection_1['default']{constructor(_0x3567fd,_0x205de9){super({'idProperty':'id'}),this['_id']=_0x3567fd,this['_sessionType']=_0x205de9,this['_handlers']=new Map(),this['_eventsQueue']=[],this['_isRunning']=!0x1;}async['connect'](_0x839cc9){this['_wsGateway']=_0x839cc9,this['stopListening'](_0x839cc9,'change:state');const _0x17d929=new sessionsconnectmessage_1['default'](this['_id'],this['_sessionType']);let _0x365b15;try{const _0x139e3c=await this['_wsGateway']['_sendRequest'](sessions_1['_SERVICE'],sessionsconnectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x17d929));_0x365b15=messagescompressor_1['default']['decode'](_0x139e3c,sessionsconnectresponse_1['default']);}catch(_0x3a2aac){_0x365b15=new sessionsconnectresponse_1['default'](this['_id'],[]);}this['_connectToChannel'](this['_wsGateway'],_0x365b15['channel'],this['_sessionType']);const _0xcfd6f3=await async function(_0x3663c8,_0x45aed7){const _0x154864=_0x45aed7['map'](_0x49b2c7=>_0x49b2c7['userId']),_0x1951df=_0x154864['length']?await user_1['default']['getMany'](_0x3663c8,_0x154864):[];return _0x45aed7['map'](_0x54487f=>{const _0x5793db={'id':_0x54487f['id'],'role':_0x54487f['role'],'permissions':_0x54487f['permissions']};return _0x5793db['user']=_0x54487f['userId']&&_0x1951df['find'](_0x590b14=>_0x590b14['id']===_0x54487f['userId'])||new user_1['default'](),_0x5793db;});}(this['_wsGateway'],_0x365b15['sockets']);for(const _0x536e2d of _0xcfd6f3)super['add'](_0x536e2d);this['_connected']=!0x0,this['fire']('connected'),this['listenTo'](this['_wsGateway'],'change:state',(_0x298b5a,_0x4edc69,_0x5e6db0)=>this['_onWsGatewayStateChange'](_0x5e6db0),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),await this['_runQueue']();}['disconnect'](_0x1cd541=!0x0){if(this['_connected']){for(this['_connected']=!0x1,this['_eventsQueue']=[];this['length'];)super['remove'](0x0);this['_channel']&&(this['stopListening'](this['_channel']),this['_channel']=void 0x0),this['_wsGateway']&&_0x1cd541&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['fire']('disconnected'),_0x1cd541&&this['stopListening']();}}['add'](_0x16e7af,_0x1c5985){throw new TypeError('The\x20collection\x20is\x20read-only.');}['remove'](_0x3307ec){throw new TypeError('The\x20collection\x20is\x20read-only.');}['_connectToChannel'](_0x9d1b23,_0x3a48eb,_0x5e0c45){this['_channel']=_0x9d1b23['_getChannel'](_0x5e0c45,_0x3a48eb),this['_channel']&&(this['_addHandler'](this['_channel'],socketconnectmessage_1['default']['TYPE'],async _0x25b0bb=>{const _0x528206=messagescompressor_1['default']['decode'](_0x25b0bb,socketconnectmessage_1['default']);if(-0x1===this['getIndex'](_0x528206['id'])){const _0x37a1ec={'id':_0x528206['id'],'role':_0x528206['role'],'permissions':_0x528206['permissions']};_0x528206['userId']&&(_0x37a1ec['user']=await user_1['default']['get'](_0x9d1b23,_0x528206['userId'])),super['add'](_0x37a1ec);}}),this['_addHandler'](this['_channel'],socketdisconnectmessage_1['default']['TYPE'],_0x89246a=>{const _0x543bd9=messagescompressor_1['default']['decode'](_0x89246a,socketdisconnectmessage_1['default']);-0x1!==this['getIndex'](_0x543bd9['id'])&&super['remove'](_0x543bd9['id']);}));}async['_onWsGatewayStateChange'](_0x4a919d){_0x4a919d===websocketgateway_1['default']['STATE_DISCONNECTED']&&this['disconnect'](!0x1),_0x4a919d===websocketgateway_1['default']['STATE_CONNECTED']&&await this['connect'](this['_wsGateway']);}async['_runQueue'](){if(this['_isRunning']||!this['_connected'])return;let _0x3061b1;for(this['_isRunning']=!0x0;_0x3061b1=this['_eventsQueue']['shift']();){const _0x4760c7=this['_handlers']['get'](_0x3061b1['eventName']);_0x4760c7&&await _0x4760c7(_0x3061b1['data']);}this['_isRunning']=!0x1;}['_addHandler'](_0x3a8b9f,_0x3da005,_0x5410c3){const _0x1eb467=_0x3a8b9f['getEventName'](_0x3da005,!0x0);this['listenTo'](_0x3a8b9f,_0x1eb467,async(_0x5d8dd1,_0x1fa152)=>{const _0x505a83=_0x5d8dd1['name'];this['_eventsQueue']['push']({'eventName':_0x505a83,'data':_0x1fa152}),await this['_runQueue']();}),this['_handlers']['set'](_0x1eb467,_0x5410c3);}}exports['default']=SessionCollection;
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x9c6b3e){return _0x9c6b3e&&_0x9c6b3e['__esModule']?_0x9c6b3e:{'default':_0x9c6b3e};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const utils_1=require('ckeditor5/src/utils'),sessions_1=require('./sessions'),user_1=__importDefault(require('./../users/user')),websocketgateway_1=__importDefault(require('./../websocketgateway/websocketgateway')),sessionsconnectresponse_1=__importDefault(require('./responses/sessionsconnectresponse')),sessionsconnectmessage_1=__importDefault(require('./messages/sessionsconnectmessage')),socketconnectmessage_1=__importDefault(require('./messages/socketconnectmessage')),socketdisconnectmessage_1=__importDefault(require('./messages/socketdisconnectmessage')),messagescompressor_1=__importDefault(require('./../messagescompressor'));class SessionCollection extends utils_1['Collection']{constructor(_0x4c3128,_0x163796){super({'idProperty':'id'}),this['_id']=_0x4c3128,this['_sessionType']=_0x163796,this['_handlers']=new Map(),this['_eventsQueue']=[],this['_isRunning']=!0x1;}async['connect'](_0x4a47bf){this['_wsGateway']=_0x4a47bf,this['stopListening'](_0x4a47bf,'change:state');const _0x5e3d64=new sessionsconnectmessage_1['default'](this['_id'],this['_sessionType']);let _0xfb02bd;try{const _0x15d1f0=await this['_wsGateway']['_sendRequest'](sessions_1['_SERVICE'],sessionsconnectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x5e3d64));_0xfb02bd=messagescompressor_1['default']['decode'](_0x15d1f0,sessionsconnectresponse_1['default']);}catch(_0x3f9a9e){_0xfb02bd=new sessionsconnectresponse_1['default'](this['_id'],[]);}this['_connectToChannel'](this['_wsGateway'],_0xfb02bd['channel'],this['_sessionType']);const _0x39dcb2=await async function(_0x4e2029,_0x154a57){const _0x4858de=_0x154a57['map'](_0x56094c=>_0x56094c['userId']),_0x3b4296=_0x4858de['length']?await user_1['default']['getMany'](_0x4e2029,_0x4858de):[];return _0x154a57['map'](_0xf7b2a5=>{const _0x2571d2={'id':_0xf7b2a5['id'],'role':_0xf7b2a5['role'],'permissions':_0xf7b2a5['permissions']};return _0x2571d2['user']=_0xf7b2a5['userId']&&_0x3b4296['find'](_0x4e2c69=>_0x4e2c69['id']===_0xf7b2a5['userId'])||new user_1['default'](),_0x2571d2;});}(this['_wsGateway'],_0xfb02bd['sockets']);for(const _0x4a1e24 of _0x39dcb2)super['add'](_0x4a1e24);this['_connected']=!0x0,this['fire']('connected'),this['listenTo'](this['_wsGateway'],'change:state',(_0x278b2b,_0x75b297,_0x5c8143)=>this['_onWsGatewayStateChange'](_0x5c8143),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),await this['_runQueue']();}['disconnect'](_0x3a9d2e=!0x0){if(this['_connected']){for(this['_connected']=!0x1,this['_eventsQueue']=[];this['length'];)super['remove'](0x0);this['_channel']&&(this['stopListening'](this['_channel']),this['_channel']=void 0x0),this['_wsGateway']&&_0x3a9d2e&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['fire']('disconnected'),_0x3a9d2e&&this['stopListening']();}}['add'](_0x37e813,_0x11d867){throw new TypeError('The\x20collection\x20is\x20read-only.');}['remove'](_0x32cd35){throw new TypeError('The\x20collection\x20is\x20read-only.');}['_connectToChannel'](_0x26c7da,_0x53bb43,_0x713659){this['_channel']=_0x26c7da['_getChannel'](_0x713659,_0x53bb43),this['_channel']&&(this['_addHandler'](this['_channel'],socketconnectmessage_1['default']['TYPE'],async _0x1c8768=>{const _0x1c2e6e=messagescompressor_1['default']['decode'](_0x1c8768,socketconnectmessage_1['default']);if(-0x1===this['getIndex'](_0x1c2e6e['id'])){const _0x9da6c2={'id':_0x1c2e6e['id'],'role':_0x1c2e6e['role'],'permissions':_0x1c2e6e['permissions']};_0x1c2e6e['userId']&&(_0x9da6c2['user']=await user_1['default']['get'](_0x26c7da,_0x1c2e6e['userId'])),super['add'](_0x9da6c2);}}),this['_addHandler'](this['_channel'],socketdisconnectmessage_1['default']['TYPE'],_0x468429=>{const _0x512092=messagescompressor_1['default']['decode'](_0x468429,socketdisconnectmessage_1['default']);-0x1!==this['getIndex'](_0x512092['id'])&&super['remove'](_0x512092['id']);}));}async['_onWsGatewayStateChange'](_0xf0e001){_0xf0e001===websocketgateway_1['default']['STATE_DISCONNECTED']&&this['disconnect'](!0x1),_0xf0e001===websocketgateway_1['default']['STATE_CONNECTED']&&await this['connect'](this['_wsGateway']);}async['_runQueue'](){if(this['_isRunning']||!this['_connected'])return;let _0x25e6e5;for(this['_isRunning']=!0x0;_0x25e6e5=this['_eventsQueue']['shift']();){const _0x526f62=this['_handlers']['get'](_0x25e6e5['eventName']);_0x526f62&&await _0x526f62(_0x25e6e5['data']);}this['_isRunning']=!0x1;}['_addHandler'](_0x37e8ab,_0x55b959,_0x28b18f){const _0x1f4673=_0x37e8ab['getEventName'](_0x55b959,!0x0);this['listenTo'](_0x37e8ab,_0x1f4673,async(_0x4e2fff,_0x1155da)=>{const _0x3702b7=_0x4e2fff['name'];this['_eventsQueue']['push']({'eventName':_0x3702b7,'data':_0x1155da}),await this['_runQueue']();}),this['_handlers']['set'](_0x1f4673,_0x28b18f);}}exports['default']=SessionCollection;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x19571e){return _0x19571e&&_0x19571e['__esModule']?_0x19571e:{'default':_0x19571e};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0x15e887,_0x3ffa25,_0x565617){const _0x1ec682=new sessioncollection_1['default'](_0x3ffa25,_0x565617);return await _0x1ec682['connect'](_0x15e887),_0x1ec682;}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x425f68){return _0x425f68&&_0x425f68['__esModule']?_0x425f68:{'default':_0x425f68};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0xc1bdc1,_0x2ab1bf,_0x3d618a){const _0x791626=new sessioncollection_1['default'](_0x2ab1bf,_0x3d618a);return await _0x791626['connect'](_0xc1bdc1),_0x791626;}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x7fc5d7){return _0x7fc5d7&&_0x7fc5d7['__esModule']?_0x7fc5d7:{'default':_0x7fc5d7};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x581cb6){var _0x4c311a;return Object['assign'](Object['assign']({},_0x581cb6),{'data':_0x581cb6['data']?JSON['stringify'](_0x581cb6['data']):_0x581cb6['data'],'attributes':_0x581cb6['attributes']?JSON['stringify'](_0x581cb6['attributes']):_0x581cb6['attributes'],'createdAt':null===(_0x4c311a=_0x581cb6['createdAt'])||void 0x0===_0x4c311a?void 0x0:_0x4c311a['toISOString']()});}static['fromJSON'](_0x20aa57){return Object['assign'](Object['assign']({},_0x20aa57),{'data':_0x20aa57['data']?JSON['parse'](_0x20aa57['data']):_0x20aa57['data'],'attributes':_0x20aa57['attributes']?JSON['parse'](_0x20aa57['attributes']):_0x20aa57['attributes'],'createdAt':_0x20aa57['createdAt']?new Date(_0x20aa57['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(_0x18478b){return _0x18478b&&_0x18478b['__esModule']?_0x18478b:{'default':_0x18478b};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x1d2e89){var _0x1482c7;return Object['assign'](Object['assign']({},_0x1d2e89),{'data':_0x1d2e89['data']?JSON['stringify'](_0x1d2e89['data']):_0x1d2e89['data'],'attributes':_0x1d2e89['attributes']?JSON['stringify'](_0x1d2e89['attributes']):_0x1d2e89['attributes'],'createdAt':null===(_0x1482c7=_0x1d2e89['createdAt'])||void 0x0===_0x1482c7?void 0x0:_0x1482c7['toISOString']()});}static['fromJSON'](_0x5b230d){return Object['assign'](Object['assign']({},_0x5b230d),{'data':_0x5b230d['data']?JSON['parse'](_0x5b230d['data']):_0x5b230d['data'],'attributes':_0x5b230d['attributes']?JSON['parse'](_0x5b230d['attributes']):_0x5b230d['attributes'],'createdAt':_0x5b230d['createdAt']?new Date(_0x5b230d['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'}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x16bb3a){return _0x16bb3a&&_0x16bb3a['__esModule']?_0x16bb3a:{'default':_0x16bb3a};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x328a54,_0x58fa74,_0x121a75,_0x44f903={},_0x182fc3=null,_0xf483f3=null){super(),this['id']=_0x328a54,this['documentId']=_0x58fa74,this['type']=_0x121a75,this['data']=_0x44f903,this['originalSuggestionId']=_0x182fc3,this['attributes']=_0xf483f3;}['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'](_0x3a993a){var _0x4bdafb;return new AddSuggestionMessage(_0x3a993a['id'],_0x3a993a['documentId'],_0x3a993a['type'],JSON['parse'](_0x3a993a['data']),null!==(_0x4bdafb=_0x3a993a['originalSuggestionId'])&&void 0x0!==_0x4bdafb?_0x4bdafb:null,_0x3a993a['attributes']?JSON['parse'](_0x3a993a['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(_0x4b9ce9){return _0x4b9ce9&&_0x4b9ce9['__esModule']?_0x4b9ce9:{'default':_0x4b9ce9};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x536922,_0x2f6cea,_0x5a998a,_0x293ced={},_0xab74bc=null,_0x12050b=null){super(),this['id']=_0x536922,this['documentId']=_0x2f6cea,this['type']=_0x5a998a,this['data']=_0x293ced,this['originalSuggestionId']=_0xab74bc,this['attributes']=_0x12050b;}['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'](_0x167893){var _0x418260;return new AddSuggestionMessage(_0x167893['id'],_0x167893['documentId'],_0x167893['type'],JSON['parse'](_0x167893['data']),null!==(_0x418260=_0x167893['originalSuggestionId'])&&void 0x0!==_0x418260?_0x418260:null,_0x167893['attributes']?JSON['parse'](_0x167893['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5c98f9){return _0x5c98f9&&_0x5c98f9['__esModule']?_0x5c98f9:{'default':_0x5c98f9};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x3dfe36){super(),this['documentId']=_0x3dfe36;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x297bdd){return new ConnectMessage(_0x297bdd['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(_0xefbdd5){return _0xefbdd5&&_0xefbdd5['__esModule']?_0xefbdd5:{'default':_0xefbdd5};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x54aa4f){super(),this['documentId']=_0x54aa4f;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x722b5a){return new ConnectMessage(_0x722b5a['documentId']);}}exports['default']=ConnectMessage,ConnectMessage['TYPE']='105',ConnectMessage['READABLE_TYPE_NAME']='connectToSuggestions',ConnectMessage['DESCRIPTOR_NAME']='TrackChangesConnectMessage',ConnectMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x251729){return _0x251729&&_0x251729['__esModule']?_0x251729:{'default':_0x251729};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x120a3b){super(),this['documentId']=_0x120a3b;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x1b39ca){return new GetAllSuggestionsMessage(_0x1b39ca['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(_0x14b28b){return _0x14b28b&&_0x14b28b['__esModule']?_0x14b28b:{'default':_0x14b28b};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x2da0f6){super(),this['documentId']=_0x2da0f6;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x125bf1){return new GetAllSuggestionsMessage(_0x125bf1['documentId']);}}exports['default']=GetAllSuggestionsMessage,GetAllSuggestionsMessage['TYPE']='102',GetAllSuggestionsMessage['READABLE_TYPE_NAME']='getAllSuggestions',GetAllSuggestionsMessage['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionMessage',GetAllSuggestionsMessage['DESCRIPTOR']={'fields':{'documentId':{'type':'string','id':0x1}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x34d37f){return _0x34d37f&&_0x34d37f['__esModule']?_0x34d37f:{'default':_0x34d37f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x4cc92b,_0x25688b){super(),this['id']=_0x4cc92b,this['documentId']=_0x25688b;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x13f95a){return new GetSuggestionMessage(_0x13f95a['id'],_0x13f95a['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(_0x45cda6){return _0x45cda6&&_0x45cda6['__esModule']?_0x45cda6:{'default':_0x45cda6};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x325352,_0xeaed73){super(),this['id']=_0x325352,this['documentId']=_0xeaed73;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x3f64fe){return new GetSuggestionMessage(_0x3f64fe['id'],_0x3f64fe['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1d031a){return _0x1d031a&&_0x1d031a['__esModule']?_0x1d031a:{'default':_0x1d031a};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x20da6a,_0x1426d3,_0x3293ae,_0x1f50d0,_0x2dd829,_0x4d6867=null){super(),this['id']=_0x20da6a,this['documentId']=_0x1426d3,this['hasComments']=_0x3293ae,this['isHasCommentsModified']=_0x1f50d0,this['state']=_0x2dd829,this['attributes']=_0x4d6867;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x886e7d){return new UpdateSuggestionMessage(_0x886e7d['id'],_0x886e7d['documentId'],_0x886e7d['hasComments'],_0x886e7d['isHasCommentsModified'],_0x886e7d['state'],_0x886e7d['attributes']?JSON['parse'](_0x886e7d['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(_0x11231f){return _0x11231f&&_0x11231f['__esModule']?_0x11231f:{'default':_0x11231f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x4765fa,_0x13f759,_0x5c1d97,_0x26ade1,_0x4811bc,_0x1aab03=null){super(),this['id']=_0x4765fa,this['documentId']=_0x13f759,this['hasComments']=_0x5c1d97,this['isHasCommentsModified']=_0x26ade1,this['state']=_0x4811bc,this['attributes']=_0x1aab03;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x1e482a){return new UpdateSuggestionMessage(_0x1e482a['id'],_0x1e482a['documentId'],_0x1e482a['hasComments'],_0x1e482a['isHasCommentsModified'],_0x1e482a['state'],_0x1e482a['attributes']?JSON['parse'](_0x1e482a['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1912be){return _0x1912be&&_0x1912be['__esModule']?_0x1912be:{'default':_0x1912be};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x4525d3,_0x1b6921,_0x763bd,_0x3a5e1f,_0x37d0d4,_0xebf2a8,_0x5c00cd={},_0x3c6eb4=null){super(),this['id']=_0x4525d3,this['authorId']=_0x1b6921,this['type']=_0x763bd,this['hasComments']=_0x37d0d4,this['state']=_0xebf2a8,this['data']=_0x5c00cd,this['attributes']=_0x3c6eb4,this['createdAt']=_0x3a5e1f?new Date(_0x3a5e1f):void 0x0;}['toJSON'](){var _0x4a9d74;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x4a9d74=this['createdAt'])||void 0x0===_0x4a9d74?void 0x0:_0x4a9d74['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x3e3b17){return new AddSuggestionResponse(_0x3e3b17['id'],_0x3e3b17['authorId'],_0x3e3b17['type'],_0x3e3b17['createdAt'],_0x3e3b17['hasComments'],_0x3e3b17['state'],JSON['parse'](_0x3e3b17['data']),_0x3e3b17['attributes']?JSON['parse'](_0x3e3b17['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(_0x37b0c5){return _0x37b0c5&&_0x37b0c5['__esModule']?_0x37b0c5:{'default':_0x37b0c5};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x16b371,_0x4d9d54,_0x3c38c4,_0x59d04b,_0x543fea,_0x5b76f4,_0x685555={},_0x4e96bb=null){super(),this['id']=_0x16b371,this['authorId']=_0x4d9d54,this['type']=_0x3c38c4,this['hasComments']=_0x543fea,this['state']=_0x5b76f4,this['data']=_0x685555,this['attributes']=_0x4e96bb,this['createdAt']=_0x59d04b?new Date(_0x59d04b):void 0x0;}['toJSON'](){var _0x2f0aca;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x2f0aca=this['createdAt'])||void 0x0===_0x2f0aca?void 0x0:_0x2f0aca['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x128634){return new AddSuggestionResponse(_0x128634['id'],_0x128634['authorId'],_0x128634['type'],_0x128634['createdAt'],_0x128634['hasComments'],_0x128634['state'],JSON['parse'](_0x128634['data']),_0x128634['attributes']?JSON['parse'](_0x128634['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x54ccba){return _0x54ccba&&_0x54ccba['__esModule']?_0x54ccba:{'default':_0x54ccba};};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(_0x22bf29,_0xac10d8,_0x21ece7){super(),this['channel']=_0x22bf29,this['_suggestions']=_0xac10d8,this['_suggestionsV2']=_0x21ece7,this['suggestions']=(null==_0x21ece7?void 0x0:_0x21ece7['length'])?_0x21ece7:_0xac10d8;}['toJSON'](){var _0x3662ad,_0x159fa2;return{'channel':this['channel'],'suggestions':null===(_0x3662ad=this['_suggestions'])||void 0x0===_0x3662ad?void 0x0:_0x3662ad['map'](_0x3b11a8=>JSON['stringify'](_0x3b11a8)),'suggestionsV2':null===(_0x159fa2=this['_suggestionsV2'])||void 0x0===_0x159fa2?void 0x0:_0x159fa2['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x354d88){var _0x497d68,_0x37b1ab;return new ConnectResponse(_0x354d88['channel'],null===(_0x497d68=_0x354d88['suggestions'])||void 0x0===_0x497d68?void 0x0:_0x497d68['map'](_0xfb2d76=>JSON['parse'](_0xfb2d76)),null===(_0x37b1ab=_0x354d88['suggestionsV2'])||void 0x0===_0x37b1ab?void 0x0:_0x37b1ab['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(_0x5f1bf8){return _0x5f1bf8&&_0x5f1bf8['__esModule']?_0x5f1bf8:{'default':_0x5f1bf8};};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(_0x2da0b1,_0x2f1a56,_0x270e60){super(),this['channel']=_0x2da0b1,this['_suggestions']=_0x2f1a56,this['_suggestionsV2']=_0x270e60,this['suggestions']=(null==_0x270e60?void 0x0:_0x270e60['length'])?_0x270e60:_0x2f1a56;}['toJSON'](){var _0x248dd6,_0x1d8cd0;return{'channel':this['channel'],'suggestions':null===(_0x248dd6=this['_suggestions'])||void 0x0===_0x248dd6?void 0x0:_0x248dd6['map'](_0x27b048=>JSON['stringify'](_0x27b048)),'suggestionsV2':null===(_0x1d8cd0=this['_suggestionsV2'])||void 0x0===_0x1d8cd0?void 0x0:_0x1d8cd0['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x3ccd90){var _0x451e23,_0x3c34a7;return new ConnectResponse(_0x3ccd90['channel'],null===(_0x451e23=_0x3ccd90['suggestions'])||void 0x0===_0x451e23?void 0x0:_0x451e23['map'](_0x40b900=>JSON['parse'](_0x40b900)),null===(_0x3c34a7=_0x3ccd90['suggestionsV2'])||void 0x0===_0x3c34a7?void 0x0:_0x3c34a7['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x455d09){return _0x455d09&&_0x455d09['__esModule']?_0x455d09:{'default':_0x455d09};};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(_0x35dfde,_0x454688){super(),this['_suggestions']=_0x35dfde,this['_suggestionsV2']=_0x454688,this['suggestions']=(null==_0x454688?void 0x0:_0x454688['length'])?_0x454688:_0x35dfde;}['toJSON'](){var _0x34f49d,_0x210605;return{'suggestions':null===(_0x34f49d=this['_suggestions'])||void 0x0===_0x34f49d?void 0x0:_0x34f49d['map'](_0x4b9d4c=>JSON['stringify'](_0x4b9d4c)),'suggestionsV2':null===(_0x210605=this['_suggestionsV2'])||void 0x0===_0x210605?void 0x0:_0x210605['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x5c1c11){var _0x2652f3,_0x445b40;return new GetAllSuggestionResponse(null===(_0x2652f3=_0x5c1c11['suggestions'])||void 0x0===_0x2652f3?void 0x0:_0x2652f3['map'](_suggestionFromString),null===(_0x445b40=_0x5c1c11['suggestionsV2'])||void 0x0===_0x445b40?void 0x0:_0x445b40['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x50cfb4){const _0x41b5f8=JSON['parse'](_0x50cfb4);return _0x41b5f8['createdAt']=_0x41b5f8['createdAt']?new Date(_0x41b5f8['createdAt']):void 0x0,_0x41b5f8;}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(_0x2be9e8){return _0x2be9e8&&_0x2be9e8['__esModule']?_0x2be9e8:{'default':_0x2be9e8};};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(_0x3ea6a5,_0x22883e){super(),this['_suggestions']=_0x3ea6a5,this['_suggestionsV2']=_0x22883e,this['suggestions']=(null==_0x22883e?void 0x0:_0x22883e['length'])?_0x22883e:_0x3ea6a5;}['toJSON'](){var _0x3e4512,_0x18d2a9;return{'suggestions':null===(_0x3e4512=this['_suggestions'])||void 0x0===_0x3e4512?void 0x0:_0x3e4512['map'](_0x15ee85=>JSON['stringify'](_0x15ee85)),'suggestionsV2':null===(_0x18d2a9=this['_suggestionsV2'])||void 0x0===_0x18d2a9?void 0x0:_0x18d2a9['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x1a532e){var _0x17883e,_0x141fee;return new GetAllSuggestionResponse(null===(_0x17883e=_0x1a532e['suggestions'])||void 0x0===_0x17883e?void 0x0:_0x17883e['map'](_suggestionFromString),null===(_0x141fee=_0x1a532e['suggestionsV2'])||void 0x0===_0x141fee?void 0x0:_0x141fee['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x15e7d5){const _0x135ba3=JSON['parse'](_0x15e7d5);return _0x135ba3['createdAt']=_0x135ba3['createdAt']?new Date(_0x135ba3['createdAt']):void 0x0,_0x135ba3;}exports['default']=GetAllSuggestionResponse,GetAllSuggestionResponse['DESCRIPTOR_NAME']='TrackChangesGetAllSuggestionsResponse',GetAllSuggestionResponse['DESCRIPTOR']={'fields':{'suggestions':{'type':'string','rule':'repeated','id':0x1},'suggestionsV2':{'type':'SuggestionDescriptor','rule':'repeated','id':0x2}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2d95e5){return _0x2d95e5&&_0x2d95e5['__esModule']?_0x2d95e5:{'default':_0x2d95e5};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x1c1dc3,_0x57fcac,_0x2ffbaa,_0xa1b470,_0x18875e,_0x4bd7ba,_0x582132={},_0x399c21=null){super(),this['id']=_0x1c1dc3,this['authorId']=_0x57fcac,this['type']=_0x2ffbaa,this['hasComments']=_0x18875e,this['state']=_0x4bd7ba,this['data']=_0x582132,this['attributes']=_0x399c21,this['createdAt']=new Date(_0xa1b470);}['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'](_0x377157){return new GetSuggestionResponse(_0x377157['id'],_0x377157['authorId'],_0x377157['type'],_0x377157['createdAt'],_0x377157['hasComments'],_0x377157['state'],JSON['parse'](_0x377157['data']),_0x377157['attributes']?JSON['parse'](_0x377157['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(_0xc5b7bf){return _0xc5b7bf&&_0xc5b7bf['__esModule']?_0xc5b7bf:{'default':_0xc5b7bf};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x579505,_0x2fce18,_0x1dafd4,_0x5eb8af,_0x1e2f87,_0x12fb59,_0x4a6435={},_0x3ba537=null){super(),this['id']=_0x579505,this['authorId']=_0x2fce18,this['type']=_0x1dafd4,this['hasComments']=_0x1e2f87,this['state']=_0x12fb59,this['data']=_0x4a6435,this['attributes']=_0x3ba537,this['createdAt']=new Date(_0x5eb8af);}['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'](_0x1a233c){return new GetSuggestionResponse(_0x1a233c['id'],_0x1a233c['authorId'],_0x1a233c['type'],_0x1a233c['createdAt'],_0x1a233c['hasComments'],_0x1a233c['state'],JSON['parse'](_0x1a233c['data']),_0x1a233c['attributes']?JSON['parse'](_0x1a233c['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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x253422){return _0x253422&&_0x253422['__esModule']?_0x253422:{'default':_0x253422};},__importStar=this&&this['__importStar']||function(_0x4195ff){if(_0x4195ff&&_0x4195ff['__esModule'])return _0x4195ff;var _0x5103ef={};if(null!=_0x4195ff)for(var _0xb9a01c in _0x4195ff)Object['hasOwnProperty']['call'](_0x4195ff,_0xb9a01c)&&(_0x5103ef[_0xb9a01c]=_0x4195ff[_0xb9a01c]);return _0x5103ef['default']=_0x4195ff,_0x5103ef;};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const mix_1=__importDefault(require('@ckeditor/ckeditor5-utils/src/mix')),emittermixin_1=__importDefault(require('@ckeditor/ckeditor5-utils/src/emittermixin')),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'));exports['_SERVICE']=0xa;class TrackChangesService{constructor(_0x4cfda7){this['_documentId']=_0x4cfda7,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x322066){if(this['_isConnected'])return;if(_0x322066['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x322066);const _0x56d14a=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x322066,this['stopListening'](_0x322066,'change:state');const _0x2fa128=await _0x322066['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x56d14a)),_0x2ccc2b=messagescompressor_1['default']['decode'](_0x2fa128,connectresponse_1['default']);return this['listenTo'](_0x322066,'change:state',(_0x1f6b9a,_0x22ac4f,_0x59049e)=>this['_onWsGatewayStateChange'](_0x59049e),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x322066,_0x2ccc2b['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x2ccc2b['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'](_0x369dc6,_0x2c3878,_0x4ba90d,_0x3ad708=null,_0x50b93c){const _0x280d87=new addsuggestionmessage_1['default'](_0x369dc6,this['_documentId'],_0x2c3878,_0x4ba90d,_0x3ad708,_0x50b93c),_0xfa96ac=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0x280d87);return messagescompressor_1['default']['decode'](_0xfa96ac,addsuggestionresponse_1['default']);}async['get'](_0x98e6a6,_0x4b7aca=0x1){const _0x351021=new getsuggestionmessage_1['default'](_0x98e6a6,this['_documentId']);try{const _0x2c539f=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0x351021);return messagescompressor_1['default']['decode'](_0x2c539f,getsuggestionresponse_1['default']);}catch(_0x447dc7){if(_0x447dc7 instanceof ckeditorcloudserviceserror_1['default']&&'404'===_0x447dc7['code']&&_0x4b7aca<0x5)return await(_0x9bf26b=0x64*_0x4b7aca,new Promise(_0x6a57da=>{setTimeout(_0x6a57da,_0x9bf26b);})),this['get'](_0x98e6a6,_0x4b7aca+0x1);if(_0x447dc7 instanceof ckeditorcloudserviceserror_1['default'])throw _0x447dc7;throw new ckeditorcloudserviceserror_1['default'](_0x447dc7['message'],this['_wsGateway']);}var _0x9bf26b;}async['getAll'](){const _0x51edcb=new getallsuggestionsmessage_1['default'](this['_documentId']),_0x1bc642=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x51edcb),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0x1bc642,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x205da7,_0x58a8b9={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x58a8b9,_0x42da7e=void 0x0!==hasComments,_0x4ec309=new updatesuggestionmessage_1['default'](_0x205da7,this['_documentId'],hasComments,_0x42da7e,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x4ec309);}['_connectToChannel'](_0x5f1af6,_0xf35c35){this['_channel']=_0x5f1af6['_getChannel'](TrackChangesService['_SERVICE'],_0xf35c35),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x336ffc,_0x50570b)=>{const _0x3ceb35=messagescompressor_1['default']['decode'](_0x50570b,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x3ceb35);});}['_onWsGatewayStateChange'](_0x5c9d5d){_0x5c9d5d===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x454e39,_0x394569){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x454e39,messagescompressor_1['default']['encode'](_0x394569));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],mix_1['default'](TrackChangesService,emittermixin_1['default']),exports['default']=TrackChangesService;
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x5d5e25){return _0x5d5e25&&_0x5d5e25['__esModule']?_0x5d5e25:{'default':_0x5d5e25};},__importStar=this&&this['__importStar']||function(_0x117e2d){if(_0x117e2d&&_0x117e2d['__esModule'])return _0x117e2d;var _0x392e5d={};if(null!=_0x117e2d)for(var _0x323401 in _0x117e2d)Object['hasOwnProperty']['call'](_0x117e2d,_0x323401)&&(_0x392e5d[_0x323401]=_0x117e2d[_0x323401]);return _0x392e5d['default']=_0x117e2d,_0x392e5d;};Object['defineProperty'](exports,'__esModule',{'value':!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'));exports['_SERVICE']=0xa;class TrackChangesService{constructor(_0x38e8f2){this['_documentId']=_0x38e8f2,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x3f26f3){if(this['_isConnected'])return;if(_0x3f26f3['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x3f26f3);const _0x6b6db5=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x3f26f3,this['stopListening'](_0x3f26f3,'change:state');const _0x3b2056=await _0x3f26f3['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x6b6db5)),_0x4652de=messagescompressor_1['default']['decode'](_0x3b2056,connectresponse_1['default']);return this['listenTo'](_0x3f26f3,'change:state',(_0x4f20c6,_0x31e222,_0x54bc74)=>this['_onWsGatewayStateChange'](_0x54bc74),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x3f26f3,_0x4652de['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x4652de['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'](_0x5d0f6c,_0x3eae73,_0x4c3b5f,_0x8b5153=null,_0x40d1c5){const _0xf4e851=new addsuggestionmessage_1['default'](_0x5d0f6c,this['_documentId'],_0x3eae73,_0x4c3b5f,_0x8b5153,_0x40d1c5),_0x477129=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0xf4e851);return messagescompressor_1['default']['decode'](_0x477129,addsuggestionresponse_1['default']);}async['get'](_0x29d3ae,_0x320396=0x1){const _0x13bc8f=new getsuggestionmessage_1['default'](_0x29d3ae,this['_documentId']);try{const _0x55445f=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0x13bc8f);return messagescompressor_1['default']['decode'](_0x55445f,getsuggestionresponse_1['default']);}catch(_0x5f0730){if(_0x5f0730 instanceof ckeditorcloudserviceserror_1['default']&&'404'===_0x5f0730['code']&&_0x320396<0x5)return await(_0x548ad7=0x64*_0x320396,new Promise(_0x363999=>{setTimeout(_0x363999,_0x548ad7);})),this['get'](_0x29d3ae,_0x320396+0x1);if(_0x5f0730 instanceof ckeditorcloudserviceserror_1['default'])throw _0x5f0730;throw new ckeditorcloudserviceserror_1['default'](_0x5f0730['message'],this['_wsGateway']);}var _0x548ad7;}async['getAll'](){const _0x1a34e0=new getallsuggestionsmessage_1['default'](this['_documentId']),_0x39d85b=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x1a34e0),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0x39d85b,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x46ba89,_0x15ba2c={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x15ba2c,_0x2435c1=void 0x0!==hasComments,_0x45d041=new updatesuggestionmessage_1['default'](_0x46ba89,this['_documentId'],hasComments,_0x2435c1,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x45d041);}['_connectToChannel'](_0x41f596,_0x1fb0cc){this['_channel']=_0x41f596['_getChannel'](TrackChangesService['_SERVICE'],_0x1fb0cc),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x4787c6,_0x20785c)=>{const _0x3d6bf7=messagescompressor_1['default']['decode'](_0x20785c,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x3d6bf7);});}['_onWsGatewayStateChange'](_0x6391c2){_0x6391c2===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x3dbc80,_0x332ca0){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x3dbc80,messagescompressor_1['default']['encode'](_0x332ca0));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],utils_1['mix'](TrackChangesService,utils_1['EmitterMixin']),exports['default']=TrackChangesService;
package/src/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0xcfeb1c){return _0xcfeb1c&&_0xcfeb1c['__esModule']?_0xcfeb1c:{'default':_0xcfeb1c};};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(_0x1f7245){return _0x1f7245&&_0x1f7245['__esModule']?_0x1f7245:{'default':_0x1f7245};};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}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x183758){return _0x183758&&_0x183758['__esModule']?_0x183758:{'default':_0x183758};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x32486f){super(),this['ids']=_0x32486f;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x4a78e9){return new GetManyUsersMessage(_0x4a78e9['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(_0x2ab201){return _0x2ab201&&_0x2ab201['__esModule']?_0x2ab201:{'default':_0x2ab201};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x4eb357){super(),this['ids']=_0x4eb357;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x2576bb){return new GetManyUsersMessage(_0x2576bb['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'}}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x17e06a){return _0x17e06a&&_0x17e06a['__esModule']?_0x17e06a:{'default':_0x17e06a};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetUserMessage extends message_1['default']{constructor(_0x4a448b){super(),this['id']=_0x4a448b;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x3bcc91){return new GetUserMessage(_0x3bcc91['id']);}}exports['default']=GetUserMessage,GetUserMessage['TYPE']='21',GetUserMessage['READABLE_TYPE_NAME']='getUser',GetUserMessage['DESCRIPTOR_NAME']='GetUserMessage',GetUserMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1}}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x42b0fc){return _0x42b0fc&&_0x42b0fc['__esModule']?_0x42b0fc:{'default':_0x42b0fc};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetUserMessage extends message_1['default']{constructor(_0xee56dc){super(),this['id']=_0xee56dc;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x4a3cfd){return new GetUserMessage(_0x4a3cfd['id']);}}exports['default']=GetUserMessage,GetUserMessage['TYPE']='21',GetUserMessage['READABLE_TYPE_NAME']='getUser',GetUserMessage['DESCRIPTOR_NAME']='GetUserMessage',GetUserMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1}}};