@ckeditor/ckeditor-cloud-services-collaboration 27.0.0 → 28.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 (95) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +2 -3
  3. package/package.json +2 -2
  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 +2 -2
  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 +2 -2
  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/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(_0x277118){return _0x277118&&_0x277118['__esModule']?_0x277118:{'default':_0x277118};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class RevisionHistoryUpdateRevisionsResponse extends message_1['default']{constructor(_0x2eeca1){super(),this['requestId']=_0x2eeca1;}['toJSON'](){return{'requestId':this['requestId']};}static['fromJSON'](_0x528e7b){return new RevisionHistoryUpdateRevisionsResponse(_0x528e7b['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(_0x1a010b){return _0x1a010b&&_0x1a010b['__esModule']?_0x1a010b:{'default':_0x1a010b};},__importStar=this&&this['__importStar']||function(_0x5a441e){if(_0x5a441e&&_0x5a441e['__esModule'])return _0x5a441e;var _0x5690e4={};if(null!=_0x5a441e)for(var _0x16a888 in _0x5a441e)Object['hasOwnProperty']['call'](_0x5a441e,_0x16a888)&&(_0x5690e4[_0x16a888]=_0x5a441e[_0x16a888]);return _0x5690e4['default']=_0x5a441e,_0x5690e4;};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')),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(_0x48ff16){this['_documentId']=_0x48ff16,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}['connect'](_0x3318f7){return this['_isConnected']?Promise['resolve']():this['_connect'](_0x3318f7,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'](_0x1683ad,_0x586dec){if(this['isConnected'])throw new ckeditorcloudserviceserror_1['default']('Cannot\x20reconnect\x20to\x20already\x20connected\x20service.',_0x1683ad);return this['_connect'](_0x1683ad,new revisionhistoryreconnectmessage_1['default'](this['_documentId'],_0x586dec));}async['updateRevisions'](_0x481a7f,_0x3ff26c){const _0x540cc3=revisionhistoryupdaterevisionsmessage_1['default']['create']({'documentId':this['_documentId'],'requestId':_0x3ff26c,'revisions':_0x481a7f}),_0x14e4fa=await this['_sendRequest'](revisionhistoryupdaterevisionsmessage_1['default']['TYPE'],_0x540cc3),{requestId:requestId}=messagescompressor_1['default']['decode'](_0x14e4fa,revisionhistoryupdaterevisionsresponse_1['default']);return requestId;}async['getRevision'](_0x32e104){const _0xa55e9e=new revisionhistorygetrevisionmessage_1['default'](this['_documentId'],_0x32e104),_0x4ca04a=await this['_sendRequest'](revisionhistorygetrevisionmessage_1['default']['TYPE'],_0xa55e9e);return messagescompressor_1['default']['decode'](_0x4ca04a,revisionhistorygetrevisionresponse_1['default'])['toObject']();}async['_connect'](_0x707541,_0x473619){if(_0x707541['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x707541);this['_wsGateway']=_0x707541,this['stopListening'](_0x707541,'change:state');const _0x41f812=await _0x707541['_sendRequest'](exports['_SERVICE'],_0x473619['constructor']['TYPE'],messagescompressor_1['default']['encode'](_0x473619)),{channel:channel,requestId:requestId,revisions:revisions}=messagescompressor_1['default']['decode'](_0x41f812,revisionhistoryconnectresponse_1['default'])['toObject']();return this['listenTo'](_0x707541,'change:state',(_0x7b98a7,_0x20603c,_0x191591)=>this['_onWsGatewayStateChange'](_0x191591),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x707541,channel),this['_isConnected']=!0x0,this['fire']('connected'),{'revisions':revisions,'requestId':requestId};}['_connectToChannel'](_0x3c013a,_0x56846c){this['_channel']=_0x3c013a['_getChannel'](RevisionHistoryService['_SERVICE'],_0x56846c),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](revisionhistoryupdaterevisionsmessage_1['default']['TYPE']),(_0x2eb26b,_0x55034d)=>{const {documentId:documentId,requestId:requestId,revisions:revisions}=messagescompressor_1['default']['decode'](_0x55034d,revisionhistoryupdaterevisionsmessage_1['default'])['toObject']();this['fire']('revisionsUpdated',{'documentId':documentId,'requestId':requestId,'revisionsData':revisions});});}['_onWsGatewayStateChange'](_0x3274ab){_0x3274ab===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x56aa10,_0x2ae59f){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Revision\x20History',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x56aa10,messagescompressor_1['default']['encode'](_0x2ae59f));}}RevisionHistoryService['_SERVICE']=exports['_SERVICE'],mix_1['default'](RevisionHistoryService,emittermixin_1['default']),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(_0x173d30){return _0x173d30&&_0x173d30['__esModule']?_0x173d30:{'default':_0x173d30};};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(_0x136d5e){return _0x136d5e&&_0x136d5e['__esModule']?_0x136d5e:{'default':_0x136d5e};};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(_0x25b460){return _0x25b460&&_0x25b460['__esModule']?_0x25b460:{'default':_0x25b460};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectMessage extends message_1['default']{constructor(_0x349922,_0x1ea4c9){super(),this['id']=_0x349922,this['sessionType']=_0x1ea4c9;}['toJSON'](){return{'id':this['id'],'sessionType':this['sessionType']};}static['fromJSON'](_0x260057){return new SessionsConnectMessage(_0x260057['id'],_0x260057['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(_0x2e9fc6){return _0x2e9fc6&&_0x2e9fc6['__esModule']?_0x2e9fc6:{'default':_0x2e9fc6};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectMessage extends message_1['default']{constructor(_0x4074a5,_0xf09eb3){super(),this['id']=_0x4074a5,this['sessionType']=_0xf09eb3;}['toJSON'](){return{'id':this['id'],'sessionType':this['sessionType']};}static['fromJSON'](_0x1f26eb){return new SessionsConnectMessage(_0x1f26eb['id'],_0x1f26eb['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(_0x27dfa6){return _0x27dfa6&&_0x27dfa6['__esModule']?_0x27dfa6:{'default':_0x27dfa6};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketConnectMessage extends message_1['default']{constructor(_0xbec561,_0x42954a,_0x52ad50,_0x4ac578){super(),this['id']=_0xbec561,this['userId']=_0x42954a,this['role']=_0x52ad50,this['permissions']=_0x4ac578;}['toJSON'](){var _0xb5f197,_0x57ca1b,_0x490aa5;return{'id':this['id'],'userId':null!==(_0xb5f197=this['userId'])&&void 0x0!==_0xb5f197?_0xb5f197:void 0x0,'role':null!==(_0x57ca1b=this['role'])&&void 0x0!==_0x57ca1b?_0x57ca1b:void 0x0,'permissions':null!==(_0x490aa5=this['permissions'])&&void 0x0!==_0x490aa5?_0x490aa5:void 0x0};}static['fromJSON'](_0x4fabf2){return new SocketConnectMessage(_0x4fabf2['id'],_0x4fabf2['userId'],_0x4fabf2['role'],_0x4fabf2['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(_0xd16551){return _0xd16551&&_0xd16551['__esModule']?_0xd16551:{'default':_0xd16551};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketConnectMessage extends message_1['default']{constructor(_0xdbb36b,_0x1bcd9f,_0x43da0b,_0x37f4db){super(),this['id']=_0xdbb36b,this['userId']=_0x1bcd9f,this['role']=_0x43da0b,this['permissions']=_0x37f4db;}['toJSON'](){var _0x245a82,_0x30853e,_0xf0cfd8;return{'id':this['id'],'userId':null!==(_0x245a82=this['userId'])&&void 0x0!==_0x245a82?_0x245a82:void 0x0,'role':null!==(_0x30853e=this['role'])&&void 0x0!==_0x30853e?_0x30853e:void 0x0,'permissions':null!==(_0xf0cfd8=this['permissions'])&&void 0x0!==_0xf0cfd8?_0xf0cfd8:void 0x0};}static['fromJSON'](_0x1a03a1){return new SocketConnectMessage(_0x1a03a1['id'],_0x1a03a1['userId'],_0x1a03a1['role'],_0x1a03a1['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(_0x1a88a6){return _0x1a88a6&&_0x1a88a6['__esModule']?_0x1a88a6:{'default':_0x1a88a6};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketDisconnectMessage extends message_1['default']{constructor(_0x5ee3c1){super(),this['id']=_0x5ee3c1;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x583c65){return new SocketDisconnectMessage(_0x583c65['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(_0x5a6c14){return _0x5a6c14&&_0x5a6c14['__esModule']?_0x5a6c14:{'default':_0x5a6c14};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SocketDisconnectMessage extends message_1['default']{constructor(_0x207a5a){super(),this['id']=_0x207a5a;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x11c0ed){return new SocketDisconnectMessage(_0x11c0ed['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(_0x77c727){return _0x77c727&&_0x77c727['__esModule']?_0x77c727:{'default':_0x77c727};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectResponse extends message_1['default']{constructor(_0x1e96a7,_0x2013de=[]){super(),this['channel']=_0x1e96a7,this['sockets']=_0x2013de;}['toJSON'](){return{'channel':this['channel'],'sockets':this['sockets']['map'](_0x472039=>({'user':_0x472039['userId'],'session':_0x472039['id'],'role':_0x472039['role'],'permissions':_0x472039['permissions']}))};}static['fromJSON'](_0x240a5a){return new SessionsConnectResponse(_0x240a5a['channel'],_0x240a5a['sockets']['map'](_0x3e7a7d=>({'id':_0x3e7a7d['session'],'userId':_0x3e7a7d['user'],'role':_0x3e7a7d['role'],'permissions':_0x3e7a7d['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(_0x4f9147){return _0x4f9147&&_0x4f9147['__esModule']?_0x4f9147:{'default':_0x4f9147};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class SessionsConnectResponse extends message_1['default']{constructor(_0x35078d,_0x809683=[]){super(),this['channel']=_0x35078d,this['sockets']=_0x809683;}['toJSON'](){return{'channel':this['channel'],'sockets':this['sockets']['map'](_0x1b1426=>({'user':_0x1b1426['userId'],'session':_0x1b1426['id'],'role':_0x1b1426['role'],'permissions':_0x1b1426['permissions']}))};}static['fromJSON'](_0x9a9d5e){return new SessionsConnectResponse(_0x9a9d5e['channel'],_0x9a9d5e['sockets']['map'](_0x5631ee=>({'id':_0x5631ee['session'],'userId':_0x5631ee['user'],'role':_0x5631ee['role'],'permissions':_0x5631ee['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(_0x17f98c){return _0x17f98c&&_0x17f98c['__esModule']?_0x17f98c:{'default':_0x17f98c};};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(_0x5430ff,_0x3b7369){super({'idProperty':'id'}),this['_id']=_0x5430ff,this['_sessionType']=_0x3b7369,this['_handlers']=new Map(),this['_eventsQueue']=[],this['_isRunning']=!0x1;}async['connect'](_0xfd582e){this['_wsGateway']=_0xfd582e,this['stopListening'](_0xfd582e,'change:state');const _0x2e91fd=new sessionsconnectmessage_1['default'](this['_id'],this['_sessionType']);let _0x539066;try{const _0x2eb2d7=await this['_wsGateway']['_sendRequest'](sessions_1['_SERVICE'],sessionsconnectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x2e91fd));_0x539066=messagescompressor_1['default']['decode'](_0x2eb2d7,sessionsconnectresponse_1['default']);}catch(_0x592674){_0x539066=new sessionsconnectresponse_1['default'](this['_id'],[]);}this['_connectToChannel'](this['_wsGateway'],_0x539066['channel'],this['_sessionType']);const _0x13f87b=await async function(_0x434096,_0x306778){const _0x2a32b8=_0x306778['map'](_0x1d711b=>_0x1d711b['userId']),_0x316747=_0x2a32b8['length']?await user_1['default']['getMany'](_0x434096,_0x2a32b8):[];return _0x306778['map'](_0x1e0de4=>{const _0x4a3099={'id':_0x1e0de4['id'],'role':_0x1e0de4['role'],'permissions':_0x1e0de4['permissions']};return _0x4a3099['user']=_0x1e0de4['userId']&&_0x316747['find'](_0x763934=>_0x763934['id']===_0x1e0de4['userId'])||new user_1['default'](),_0x4a3099;});}(this['_wsGateway'],_0x539066['sockets']);for(const _0x5e9ce9 of _0x13f87b)super['add'](_0x5e9ce9);this['_connected']=!0x0,this['fire']('connected'),this['listenTo'](this['_wsGateway'],'change:state',(_0x59e4ca,_0x7b9779,_0x21d6d1)=>this['_onWsGatewayStateChange'](_0x21d6d1),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),await this['_runQueue']();}['disconnect'](_0x499f8b=!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']&&_0x499f8b&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['fire']('disconnected'),_0x499f8b&&this['stopListening']();}}['add'](_0x13b03b,_0x11a872){throw new TypeError('The\x20collection\x20is\x20read-only.');}['remove'](_0x4e3db5){throw new TypeError('The\x20collection\x20is\x20read-only.');}['_connectToChannel'](_0x5a5fc4,_0x26bb11,_0xe8646e){this['_channel']=_0x5a5fc4['_getChannel'](_0xe8646e,_0x26bb11),this['_channel']&&(this['_addHandler'](this['_channel'],socketconnectmessage_1['default']['TYPE'],async _0x3dcbac=>{const _0xb47681=messagescompressor_1['default']['decode'](_0x3dcbac,socketconnectmessage_1['default']);if(-0x1===this['getIndex'](_0xb47681['id'])){const _0x100d2c={'id':_0xb47681['id'],'role':_0xb47681['role'],'permissions':_0xb47681['permissions']};_0xb47681['userId']&&(_0x100d2c['user']=await user_1['default']['get'](_0x5a5fc4,_0xb47681['userId'])),super['add'](_0x100d2c);}}),this['_addHandler'](this['_channel'],socketdisconnectmessage_1['default']['TYPE'],_0xb2c9a0=>{const _0x3be10b=messagescompressor_1['default']['decode'](_0xb2c9a0,socketdisconnectmessage_1['default']);-0x1!==this['getIndex'](_0x3be10b['id'])&&super['remove'](_0x3be10b['id']);}));}async['_onWsGatewayStateChange'](_0x4f32e0){_0x4f32e0===websocketgateway_1['default']['STATE_DISCONNECTED']&&this['disconnect'](!0x1),_0x4f32e0===websocketgateway_1['default']['STATE_CONNECTED']&&await this['connect'](this['_wsGateway']);}async['_runQueue'](){if(this['_isRunning']||!this['_connected'])return;let _0x4eb7dd;for(this['_isRunning']=!0x0;_0x4eb7dd=this['_eventsQueue']['shift']();){const _0x3743b1=this['_handlers']['get'](_0x4eb7dd['eventName']);_0x3743b1&&await _0x3743b1(_0x4eb7dd['data']);}this['_isRunning']=!0x1;}['_addHandler'](_0x5b4407,_0x4550e9,_0x2f2011){const _0x3bbad9=_0x5b4407['getEventName'](_0x4550e9,!0x0);this['listenTo'](_0x5b4407,_0x3bbad9,async(_0x240ab4,_0xdce7b5)=>{const _0x26ca04=_0x240ab4['name'];this['_eventsQueue']['push']({'eventName':_0x26ca04,'data':_0xdce7b5}),await this['_runQueue']();}),this['_handlers']['set'](_0x3bbad9,_0x2f2011);}}exports['default']=SessionCollection;
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x4b0a50){return _0x4b0a50&&_0x4b0a50['__esModule']?_0x4b0a50:{'default':_0x4b0a50};};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(_0x54299d,_0x519430){super({'idProperty':'id'}),this['_id']=_0x54299d,this['_sessionType']=_0x519430,this['_handlers']=new Map(),this['_eventsQueue']=[],this['_isRunning']=!0x1;}async['connect'](_0x841565){this['_wsGateway']=_0x841565,this['stopListening'](_0x841565,'change:state');const _0x52e018=new sessionsconnectmessage_1['default'](this['_id'],this['_sessionType']);let _0x3705ff;try{const _0x1e614d=await this['_wsGateway']['_sendRequest'](sessions_1['_SERVICE'],sessionsconnectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x52e018));_0x3705ff=messagescompressor_1['default']['decode'](_0x1e614d,sessionsconnectresponse_1['default']);}catch(_0x25868a){_0x3705ff=new sessionsconnectresponse_1['default'](this['_id'],[]);}this['_connectToChannel'](this['_wsGateway'],_0x3705ff['channel'],this['_sessionType']);const _0x91e6c9=await async function(_0x3c49f1,_0x2369b7){const _0x34c58f=_0x2369b7['map'](_0x214d7a=>_0x214d7a['userId']),_0x2cdb78=_0x34c58f['length']?await user_1['default']['getMany'](_0x3c49f1,_0x34c58f):[];return _0x2369b7['map'](_0x109660=>{const _0x40ae0a={'id':_0x109660['id'],'role':_0x109660['role'],'permissions':_0x109660['permissions']};return _0x40ae0a['user']=_0x109660['userId']&&_0x2cdb78['find'](_0xf31479=>_0xf31479['id']===_0x109660['userId'])||new user_1['default'](),_0x40ae0a;});}(this['_wsGateway'],_0x3705ff['sockets']);for(const _0x1ecd64 of _0x91e6c9)super['add'](_0x1ecd64);this['_connected']=!0x0,this['fire']('connected'),this['listenTo'](this['_wsGateway'],'change:state',(_0x55a9e2,_0x5e4274,_0x3c5cb9)=>this['_onWsGatewayStateChange'](_0x3c5cb9),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),await this['_runQueue']();}['disconnect'](_0x1e2b9b=!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']&&_0x1e2b9b&&(this['stopListening'](this['_wsGateway']),this['_wsGateway']=void 0x0),this['fire']('disconnected'),_0x1e2b9b&&this['stopListening']();}}['add'](_0x762106,_0x5e853b){throw new TypeError('The\x20collection\x20is\x20read-only.');}['remove'](_0x516827){throw new TypeError('The\x20collection\x20is\x20read-only.');}['_connectToChannel'](_0x2200ea,_0x3a1cf5,_0x448af8){this['_channel']=_0x2200ea['_getChannel'](_0x448af8,_0x3a1cf5),this['_channel']&&(this['_addHandler'](this['_channel'],socketconnectmessage_1['default']['TYPE'],async _0x18682e=>{const _0x5c729f=messagescompressor_1['default']['decode'](_0x18682e,socketconnectmessage_1['default']);if(-0x1===this['getIndex'](_0x5c729f['id'])){const _0x2d78e1={'id':_0x5c729f['id'],'role':_0x5c729f['role'],'permissions':_0x5c729f['permissions']};_0x5c729f['userId']&&(_0x2d78e1['user']=await user_1['default']['get'](_0x2200ea,_0x5c729f['userId'])),super['add'](_0x2d78e1);}}),this['_addHandler'](this['_channel'],socketdisconnectmessage_1['default']['TYPE'],_0x2207ab=>{const _0x23dbb7=messagescompressor_1['default']['decode'](_0x2207ab,socketdisconnectmessage_1['default']);-0x1!==this['getIndex'](_0x23dbb7['id'])&&super['remove'](_0x23dbb7['id']);}));}async['_onWsGatewayStateChange'](_0x5aadbf){_0x5aadbf===websocketgateway_1['default']['STATE_DISCONNECTED']&&this['disconnect'](!0x1),_0x5aadbf===websocketgateway_1['default']['STATE_CONNECTED']&&await this['connect'](this['_wsGateway']);}async['_runQueue'](){if(this['_isRunning']||!this['_connected'])return;let _0x51036d;for(this['_isRunning']=!0x0;_0x51036d=this['_eventsQueue']['shift']();){const _0x449746=this['_handlers']['get'](_0x51036d['eventName']);_0x449746&&await _0x449746(_0x51036d['data']);}this['_isRunning']=!0x1;}['_addHandler'](_0x3bf6a6,_0x1ebb29,_0x5c3bd3){const _0x4aaafe=_0x3bf6a6['getEventName'](_0x1ebb29,!0x0);this['listenTo'](_0x3bf6a6,_0x4aaafe,async(_0x3fa8c6,_0x27ab06)=>{const _0x2ee375=_0x3fa8c6['name'];this['_eventsQueue']['push']({'eventName':_0x2ee375,'data':_0x27ab06}),await this['_runQueue']();}),this['_handlers']['set'](_0x4aaafe,_0x5c3bd3);}}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(_0x840f1e){return _0x840f1e&&_0x840f1e['__esModule']?_0x840f1e:{'default':_0x840f1e};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0x6c9860,_0x7d6504,_0x5f6f4){const _0x2a835d=new sessioncollection_1['default'](_0x7d6504,_0x5f6f4);return await _0x2a835d['connect'](_0x6c9860),_0x2a835d;}};
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x4b3029){return _0x4b3029&&_0x4b3029['__esModule']?_0x4b3029:{'default':_0x4b3029};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const sessioncollection_1=__importDefault(require('./sessioncollection'));exports['_SERVICE']=0x3,exports['default']=class{static async['getConnectedSessions'](_0x54b3e5,_0x32c8d3,_0x3b7547){const _0x5ec4af=new sessioncollection_1['default'](_0x32c8d3,_0x3b7547);return await _0x5ec4af['connect'](_0x54b3e5),_0x5ec4af;}};
@@ -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(_0x2d7faa){return _0x2d7faa&&_0x2d7faa['__esModule']?_0x2d7faa:{'default':_0x2d7faa};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x3f2a83){var _0x55d421;return Object['assign'](Object['assign']({},_0x3f2a83),{'data':_0x3f2a83['data']?JSON['stringify'](_0x3f2a83['data']):_0x3f2a83['data'],'attributes':_0x3f2a83['attributes']?JSON['stringify'](_0x3f2a83['attributes']):_0x3f2a83['attributes'],'createdAt':null===(_0x55d421=_0x3f2a83['createdAt'])||void 0x0===_0x55d421?void 0x0:_0x55d421['toISOString']()});}static['fromJSON'](_0x1f87a2){return Object['assign'](Object['assign']({},_0x1f87a2),{'data':_0x1f87a2['data']?JSON['parse'](_0x1f87a2['data']):_0x1f87a2['data'],'attributes':_0x1f87a2['attributes']?JSON['parse'](_0x1f87a2['attributes']):_0x1f87a2['attributes'],'createdAt':_0x1f87a2['createdAt']?new Date(_0x1f87a2['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(_0x1921ad){return _0x1921ad&&_0x1921ad['__esModule']?_0x1921ad:{'default':_0x1921ad};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const descriptor_1=__importDefault(require('./../../descriptor'));class SuggestionDescriptor extends descriptor_1['default']{static['toJSON'](_0x4e9c39){var _0x1f5942;return Object['assign'](Object['assign']({},_0x4e9c39),{'data':_0x4e9c39['data']?JSON['stringify'](_0x4e9c39['data']):_0x4e9c39['data'],'attributes':_0x4e9c39['attributes']?JSON['stringify'](_0x4e9c39['attributes']):_0x4e9c39['attributes'],'createdAt':null===(_0x1f5942=_0x4e9c39['createdAt'])||void 0x0===_0x1f5942?void 0x0:_0x1f5942['toISOString']()});}static['fromJSON'](_0x484b34){return Object['assign'](Object['assign']({},_0x484b34),{'data':_0x484b34['data']?JSON['parse'](_0x484b34['data']):_0x484b34['data'],'attributes':_0x484b34['attributes']?JSON['parse'](_0x484b34['attributes']):_0x484b34['attributes'],'createdAt':_0x484b34['createdAt']?new Date(_0x484b34['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(_0x27aac9){return _0x27aac9&&_0x27aac9['__esModule']?_0x27aac9:{'default':_0x27aac9};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x1eda8a,_0x2701d8,_0x456879,_0x2408a0={},_0x5a2dc4=null,_0x2f4e01=null){super(),this['id']=_0x1eda8a,this['documentId']=_0x2701d8,this['type']=_0x456879,this['data']=_0x2408a0,this['originalSuggestionId']=_0x5a2dc4,this['attributes']=_0x2f4e01;}['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'](_0x2555ef){var _0x2961ac;return new AddSuggestionMessage(_0x2555ef['id'],_0x2555ef['documentId'],_0x2555ef['type'],JSON['parse'](_0x2555ef['data']),null!==(_0x2961ac=_0x2555ef['originalSuggestionId'])&&void 0x0!==_0x2961ac?_0x2961ac:null,_0x2555ef['attributes']?JSON['parse'](_0x2555ef['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(_0x273522){return _0x273522&&_0x273522['__esModule']?_0x273522:{'default':_0x273522};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionMessage extends message_1['default']{constructor(_0x249d19,_0x2a9860,_0x8061cc,_0xea7f6e={},_0x399bde=null,_0x2e16bc=null){super(),this['id']=_0x249d19,this['documentId']=_0x2a9860,this['type']=_0x8061cc,this['data']=_0xea7f6e,this['originalSuggestionId']=_0x399bde,this['attributes']=_0x2e16bc;}['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'](_0xf46a62){var _0x16a87c;return new AddSuggestionMessage(_0xf46a62['id'],_0xf46a62['documentId'],_0xf46a62['type'],JSON['parse'](_0xf46a62['data']),null!==(_0x16a87c=_0xf46a62['originalSuggestionId'])&&void 0x0!==_0x16a87c?_0x16a87c:null,_0xf46a62['attributes']?JSON['parse'](_0xf46a62['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(_0x263752){return _0x263752&&_0x263752['__esModule']?_0x263752:{'default':_0x263752};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x238a2b){super(),this['documentId']=_0x238a2b;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x57ba25){return new ConnectMessage(_0x57ba25['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(_0x47d3f){return _0x47d3f&&_0x47d3f['__esModule']?_0x47d3f:{'default':_0x47d3f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class ConnectMessage extends message_1['default']{constructor(_0x59ae15){super(),this['documentId']=_0x59ae15;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x431ccf){return new ConnectMessage(_0x431ccf['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(_0x2afcc){return _0x2afcc&&_0x2afcc['__esModule']?_0x2afcc:{'default':_0x2afcc};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x34888f){super(),this['documentId']=_0x34888f;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x1f7f92){return new GetAllSuggestionsMessage(_0x1f7f92['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(_0x570851){return _0x570851&&_0x570851['__esModule']?_0x570851:{'default':_0x570851};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetAllSuggestionsMessage extends message_1['default']{constructor(_0x46e822){super(),this['documentId']=_0x46e822;}['toJSON'](){return{'documentId':this['documentId']};}static['fromJSON'](_0x4361ba){return new GetAllSuggestionsMessage(_0x4361ba['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(_0x2fbd8a){return _0x2fbd8a&&_0x2fbd8a['__esModule']?_0x2fbd8a:{'default':_0x2fbd8a};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x44ec46,_0x267e10){super(),this['id']=_0x44ec46,this['documentId']=_0x267e10;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x5bd001){return new GetSuggestionMessage(_0x5bd001['id'],_0x5bd001['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(_0x1250db){return _0x1250db&&_0x1250db['__esModule']?_0x1250db:{'default':_0x1250db};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionMessage extends message_1['default']{constructor(_0x49c6de,_0x4b775f){super(),this['id']=_0x49c6de,this['documentId']=_0x4b775f;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId']};}static['fromJSON'](_0x25e220){return new GetSuggestionMessage(_0x25e220['id'],_0x25e220['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(_0x1bb980){return _0x1bb980&&_0x1bb980['__esModule']?_0x1bb980:{'default':_0x1bb980};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x444943,_0x115edb,_0x188654,_0xbead4c,_0x3f399d,_0x125ca6=null){super(),this['id']=_0x444943,this['documentId']=_0x115edb,this['hasComments']=_0x188654,this['isHasCommentsModified']=_0xbead4c,this['state']=_0x3f399d,this['attributes']=_0x125ca6;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x326bcb){return new UpdateSuggestionMessage(_0x326bcb['id'],_0x326bcb['documentId'],_0x326bcb['hasComments'],_0x326bcb['isHasCommentsModified'],_0x326bcb['state'],_0x326bcb['attributes']?JSON['parse'](_0x326bcb['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(_0x31ec7f){return _0x31ec7f&&_0x31ec7f['__esModule']?_0x31ec7f:{'default':_0x31ec7f};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class UpdateSuggestionMessage extends message_1['default']{constructor(_0x51057d,_0x350860,_0x4d2cdf,_0x3d04ff,_0x5e3c31,_0x354edb=null){super(),this['id']=_0x51057d,this['documentId']=_0x350860,this['hasComments']=_0x4d2cdf,this['isHasCommentsModified']=_0x3d04ff,this['state']=_0x5e3c31,this['attributes']=_0x354edb;}['toJSON'](){return{'id':this['id'],'documentId':this['documentId'],'hasComments':this['hasComments'],'isHasCommentsModified':this['isHasCommentsModified'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x1545fa){return new UpdateSuggestionMessage(_0x1545fa['id'],_0x1545fa['documentId'],_0x1545fa['hasComments'],_0x1545fa['isHasCommentsModified'],_0x1545fa['state'],_0x1545fa['attributes']?JSON['parse'](_0x1545fa['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(_0x5cf8fc){return _0x5cf8fc&&_0x5cf8fc['__esModule']?_0x5cf8fc:{'default':_0x5cf8fc};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x501c7d,_0x48f685,_0x599f62,_0x28f986,_0x40fc1e,_0x41d659,_0x3761ee={},_0x441472=null){super(),this['id']=_0x501c7d,this['authorId']=_0x48f685,this['type']=_0x599f62,this['hasComments']=_0x40fc1e,this['state']=_0x41d659,this['data']=_0x3761ee,this['attributes']=_0x441472,this['createdAt']=_0x28f986?new Date(_0x28f986):void 0x0;}['toJSON'](){var _0x2d6a2b;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x2d6a2b=this['createdAt'])||void 0x0===_0x2d6a2b?void 0x0:_0x2d6a2b['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x572d84){return new AddSuggestionResponse(_0x572d84['id'],_0x572d84['authorId'],_0x572d84['type'],_0x572d84['createdAt'],_0x572d84['hasComments'],_0x572d84['state'],JSON['parse'](_0x572d84['data']),_0x572d84['attributes']?JSON['parse'](_0x572d84['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(_0x81d0b2){return _0x81d0b2&&_0x81d0b2['__esModule']?_0x81d0b2:{'default':_0x81d0b2};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class AddSuggestionResponse extends message_1['default']{constructor(_0x3e3def,_0x211692,_0x90d599,_0x6ef69b,_0x24d72f,_0x3b9e1f,_0x1e5913={},_0x407da9=null){super(),this['id']=_0x3e3def,this['authorId']=_0x211692,this['type']=_0x90d599,this['hasComments']=_0x24d72f,this['state']=_0x3b9e1f,this['data']=_0x1e5913,this['attributes']=_0x407da9,this['createdAt']=_0x6ef69b?new Date(_0x6ef69b):void 0x0;}['toJSON'](){var _0x267cba;return{'id':this['id'],'authorId':this['authorId'],'type':this['type'],'createdAt':null===(_0x267cba=this['createdAt'])||void 0x0===_0x267cba?void 0x0:_0x267cba['toISOString'](),'data':JSON['stringify'](this['data']),'hasComments':this['hasComments'],'state':this['state'],'attributes':JSON['stringify'](this['attributes'])};}static['fromJSON'](_0x3280e8){return new AddSuggestionResponse(_0x3280e8['id'],_0x3280e8['authorId'],_0x3280e8['type'],_0x3280e8['createdAt'],_0x3280e8['hasComments'],_0x3280e8['state'],JSON['parse'](_0x3280e8['data']),_0x3280e8['attributes']?JSON['parse'](_0x3280e8['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(_0x2331f3){return _0x2331f3&&_0x2331f3['__esModule']?_0x2331f3:{'default':_0x2331f3};};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(_0x551fe6,_0x5916e3,_0x339a1f){super(),this['channel']=_0x551fe6,this['_suggestions']=_0x5916e3,this['_suggestionsV2']=_0x339a1f,this['suggestions']=(null==_0x339a1f?void 0x0:_0x339a1f['length'])?_0x339a1f:_0x5916e3;}['toJSON'](){var _0x2cb18f,_0x3e47a3;return{'channel':this['channel'],'suggestions':null===(_0x2cb18f=this['_suggestions'])||void 0x0===_0x2cb18f?void 0x0:_0x2cb18f['map'](_0x2bd6ef=>JSON['stringify'](_0x2bd6ef)),'suggestionsV2':null===(_0x3e47a3=this['_suggestionsV2'])||void 0x0===_0x3e47a3?void 0x0:_0x3e47a3['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x1605d8){var _0x309987,_0x11e651;return new ConnectResponse(_0x1605d8['channel'],null===(_0x309987=_0x1605d8['suggestions'])||void 0x0===_0x309987?void 0x0:_0x309987['map'](_0x48e172=>JSON['parse'](_0x48e172)),null===(_0x11e651=_0x1605d8['suggestionsV2'])||void 0x0===_0x11e651?void 0x0:_0x11e651['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(_0x154317){return _0x154317&&_0x154317['__esModule']?_0x154317:{'default':_0x154317};};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(_0x13556f,_0x1b6e89,_0x1b92af){super(),this['channel']=_0x13556f,this['_suggestions']=_0x1b6e89,this['_suggestionsV2']=_0x1b92af,this['suggestions']=(null==_0x1b92af?void 0x0:_0x1b92af['length'])?_0x1b92af:_0x1b6e89;}['toJSON'](){var _0x2a4a62,_0x108705;return{'channel':this['channel'],'suggestions':null===(_0x2a4a62=this['_suggestions'])||void 0x0===_0x2a4a62?void 0x0:_0x2a4a62['map'](_0x37e8da=>JSON['stringify'](_0x37e8da)),'suggestionsV2':null===(_0x108705=this['_suggestionsV2'])||void 0x0===_0x108705?void 0x0:_0x108705['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x68aaf){var _0x5236ff,_0x32883c;return new ConnectResponse(_0x68aaf['channel'],null===(_0x5236ff=_0x68aaf['suggestions'])||void 0x0===_0x5236ff?void 0x0:_0x5236ff['map'](_0xa51e08=>JSON['parse'](_0xa51e08)),null===(_0x32883c=_0x68aaf['suggestionsV2'])||void 0x0===_0x32883c?void 0x0:_0x32883c['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(_0x29f03a){return _0x29f03a&&_0x29f03a['__esModule']?_0x29f03a:{'default':_0x29f03a};};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(_0x245c67,_0x2287f1){super(),this['_suggestions']=_0x245c67,this['_suggestionsV2']=_0x2287f1,this['suggestions']=(null==_0x2287f1?void 0x0:_0x2287f1['length'])?_0x2287f1:_0x245c67;}['toJSON'](){var _0x5119f9,_0x3ca713;return{'suggestions':null===(_0x5119f9=this['_suggestions'])||void 0x0===_0x5119f9?void 0x0:_0x5119f9['map'](_0xc745cb=>JSON['stringify'](_0xc745cb)),'suggestionsV2':null===(_0x3ca713=this['_suggestionsV2'])||void 0x0===_0x3ca713?void 0x0:_0x3ca713['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x124028){var _0x559c82,_0x5f1088;return new GetAllSuggestionResponse(null===(_0x559c82=_0x124028['suggestions'])||void 0x0===_0x559c82?void 0x0:_0x559c82['map'](_suggestionFromString),null===(_0x5f1088=_0x124028['suggestionsV2'])||void 0x0===_0x5f1088?void 0x0:_0x5f1088['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x1e35ec){const _0x3fa147=JSON['parse'](_0x1e35ec);return _0x3fa147['createdAt']=_0x3fa147['createdAt']?new Date(_0x3fa147['createdAt']):void 0x0,_0x3fa147;}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(_0x32fb79){return _0x32fb79&&_0x32fb79['__esModule']?_0x32fb79:{'default':_0x32fb79};};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(_0x4c811d,_0x1a0cb7){super(),this['_suggestions']=_0x4c811d,this['_suggestionsV2']=_0x1a0cb7,this['suggestions']=(null==_0x1a0cb7?void 0x0:_0x1a0cb7['length'])?_0x1a0cb7:_0x4c811d;}['toJSON'](){var _0x120797,_0x41c599;return{'suggestions':null===(_0x120797=this['_suggestions'])||void 0x0===_0x120797?void 0x0:_0x120797['map'](_0x4b9bf7=>JSON['stringify'](_0x4b9bf7)),'suggestionsV2':null===(_0x41c599=this['_suggestionsV2'])||void 0x0===_0x41c599?void 0x0:_0x41c599['map'](suggestiondescriptor_1['default']['toJSON'])};}static['fromJSON'](_0x3c6657){var _0x3aebe1,_0x4f56a4;return new GetAllSuggestionResponse(null===(_0x3aebe1=_0x3c6657['suggestions'])||void 0x0===_0x3aebe1?void 0x0:_0x3aebe1['map'](_suggestionFromString),null===(_0x4f56a4=_0x3c6657['suggestionsV2'])||void 0x0===_0x4f56a4?void 0x0:_0x4f56a4['map'](suggestiondescriptor_1['default']['fromJSON']));}}function _suggestionFromString(_0x5189db){const _0x2fef95=JSON['parse'](_0x5189db);return _0x2fef95['createdAt']=_0x2fef95['createdAt']?new Date(_0x2fef95['createdAt']):void 0x0,_0x2fef95;}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(_0x404c44){return _0x404c44&&_0x404c44['__esModule']?_0x404c44:{'default':_0x404c44};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x316dac,_0x5e7a53,_0x3c445b,_0x2a16e2,_0x3abfc3,_0x562a17,_0x46ac99={},_0x357bc4=null){super(),this['id']=_0x316dac,this['authorId']=_0x5e7a53,this['type']=_0x3c445b,this['hasComments']=_0x3abfc3,this['state']=_0x562a17,this['data']=_0x46ac99,this['attributes']=_0x357bc4,this['createdAt']=new Date(_0x2a16e2);}['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'](_0x2e1044){return new GetSuggestionResponse(_0x2e1044['id'],_0x2e1044['authorId'],_0x2e1044['type'],_0x2e1044['createdAt'],_0x2e1044['hasComments'],_0x2e1044['state'],JSON['parse'](_0x2e1044['data']),_0x2e1044['attributes']?JSON['parse'](_0x2e1044['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(_0x465530){return _0x465530&&_0x465530['__esModule']?_0x465530:{'default':_0x465530};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetSuggestionResponse extends message_1['default']{constructor(_0x46f531,_0x4cedc3,_0x247e6c,_0x19293d,_0x285b4a,_0x799d10,_0x3d064d={},_0x441c4a=null){super(),this['id']=_0x46f531,this['authorId']=_0x4cedc3,this['type']=_0x247e6c,this['hasComments']=_0x285b4a,this['state']=_0x799d10,this['data']=_0x3d064d,this['attributes']=_0x441c4a,this['createdAt']=new Date(_0x19293d);}['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'](_0x47a40c){return new GetSuggestionResponse(_0x47a40c['id'],_0x47a40c['authorId'],_0x47a40c['type'],_0x47a40c['createdAt'],_0x47a40c['hasComments'],_0x47a40c['state'],JSON['parse'](_0x47a40c['data']),_0x47a40c['attributes']?JSON['parse'](_0x47a40c['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(_0x1e7da5){return _0x1e7da5&&_0x1e7da5['__esModule']?_0x1e7da5:{'default':_0x1e7da5};},__importStar=this&&this['__importStar']||function(_0x566c54){if(_0x566c54&&_0x566c54['__esModule'])return _0x566c54;var _0x5a9787={};if(null!=_0x566c54)for(var _0x488ae6 in _0x566c54)Object['hasOwnProperty']['call'](_0x566c54,_0x488ae6)&&(_0x5a9787[_0x488ae6]=_0x566c54[_0x488ae6]);return _0x5a9787['default']=_0x566c54,_0x5a9787;};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(_0x365c7f){this['_documentId']=_0x365c7f,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x5ab087){if(this['_isConnected'])return;if(_0x5ab087['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x5ab087);const _0x460123=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x5ab087,this['stopListening'](_0x5ab087,'change:state');const _0x3cc128=await _0x5ab087['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x460123)),_0x4cca46=messagescompressor_1['default']['decode'](_0x3cc128,connectresponse_1['default']);return this['listenTo'](_0x5ab087,'change:state',(_0x30ba98,_0x282c6b,_0x4314b0)=>this['_onWsGatewayStateChange'](_0x4314b0),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x5ab087,_0x4cca46['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x4cca46['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'](_0x2b734a,_0x2f3509,_0x1dd805,_0x5543dc=null,_0x2ce2fb){const _0x4ed05d=new addsuggestionmessage_1['default'](_0x2b734a,this['_documentId'],_0x2f3509,_0x1dd805,_0x5543dc,_0x2ce2fb),_0xc66cdf=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0x4ed05d);return messagescompressor_1['default']['decode'](_0xc66cdf,addsuggestionresponse_1['default']);}async['get'](_0x4a5461,_0x556ccd=0x1){const _0xb6b62b=new getsuggestionmessage_1['default'](_0x4a5461,this['_documentId']);try{const _0x313448=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0xb6b62b);return messagescompressor_1['default']['decode'](_0x313448,getsuggestionresponse_1['default']);}catch(_0x3519dc){if(_0x3519dc instanceof ckeditorcloudserviceserror_1['default']&&'404'===_0x3519dc['code']&&_0x556ccd<0x5)return await(_0x40dfad=0x64*_0x556ccd,new Promise(_0x5242f3=>{setTimeout(_0x5242f3,_0x40dfad);})),this['get'](_0x4a5461,_0x556ccd+0x1);if(_0x3519dc instanceof ckeditorcloudserviceserror_1['default'])throw _0x3519dc;throw new ckeditorcloudserviceserror_1['default'](_0x3519dc['message'],this['_wsGateway']);}var _0x40dfad;}async['getAll'](){const _0x64b70d=new getallsuggestionsmessage_1['default'](this['_documentId']),_0x36ebc2=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x64b70d),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0x36ebc2,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x5f26cf,_0x497925={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x497925,_0x2606d5=void 0x0!==hasComments,_0x47b7bf=new updatesuggestionmessage_1['default'](_0x5f26cf,this['_documentId'],hasComments,_0x2606d5,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x47b7bf);}['_connectToChannel'](_0x2f31e6,_0x152d80){this['_channel']=_0x2f31e6['_getChannel'](TrackChangesService['_SERVICE'],_0x152d80),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x55b07b,_0x2d6e77)=>{const _0x17049f=messagescompressor_1['default']['decode'](_0x2d6e77,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x17049f);});}['_onWsGatewayStateChange'](_0x80e82c){_0x80e82c===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x164e8e,_0x762521){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x164e8e,messagescompressor_1['default']['encode'](_0x762521));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],mix_1['default'](TrackChangesService,emittermixin_1['default']),exports['default']=TrackChangesService;
23
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x49b08d){return _0x49b08d&&_0x49b08d['__esModule']?_0x49b08d:{'default':_0x49b08d};},__importStar=this&&this['__importStar']||function(_0x4561a7){if(_0x4561a7&&_0x4561a7['__esModule'])return _0x4561a7;var _0x31d771={};if(null!=_0x4561a7)for(var _0x867e9d in _0x4561a7)Object['hasOwnProperty']['call'](_0x4561a7,_0x867e9d)&&(_0x31d771[_0x867e9d]=_0x4561a7[_0x867e9d]);return _0x31d771['default']=_0x4561a7,_0x31d771;};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(_0x5b5f7f){this['_documentId']=_0x5b5f7f,this['_isConnected']=!0x1;}get['isConnected'](){return this['_isConnected'];}async['connect'](_0x32636c){if(this['_isConnected'])return;if(_0x32636c['state']!==websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['CONNECTED'])throw new ckeditorcloudserviceserror_1['default']('WebSocket\x20Gateway\x20is\x20not\x20connected.',_0x32636c);const _0x99aaf3=new connectmessage_1['default'](this['_documentId']);this['_wsGateway']=_0x32636c,this['stopListening'](_0x32636c,'change:state');const _0x2ba428=await _0x32636c['_sendRequest'](exports['_SERVICE'],connectmessage_1['default']['TYPE'],messagescompressor_1['default']['encode'](_0x99aaf3)),_0x175b4f=messagescompressor_1['default']['decode'](_0x2ba428,connectresponse_1['default']);return this['listenTo'](_0x32636c,'change:state',(_0x3877c0,_0x1cb944,_0x241639)=>this['_onWsGatewayStateChange'](_0x241639),{'priority':websocketgateway_1['default']['_CHANGE_STATE_EVENT_PRIORITY']}),this['_connectToChannel'](_0x32636c,_0x175b4f['channel']),this['_isConnected']=!0x0,this['fire']('connected'),_0x175b4f['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'](_0x51206c,_0x1e72d4,_0xa4f117,_0x2552d2=null,_0x3499ed){const _0x14d087=new addsuggestionmessage_1['default'](_0x51206c,this['_documentId'],_0x1e72d4,_0xa4f117,_0x2552d2,_0x3499ed),_0x1ac811=await this['_sendRequest'](addsuggestionmessage_1['default']['TYPE'],_0x14d087);return messagescompressor_1['default']['decode'](_0x1ac811,addsuggestionresponse_1['default']);}async['get'](_0x6f47cc,_0x380e76=0x1){const _0x360555=new getsuggestionmessage_1['default'](_0x6f47cc,this['_documentId']);try{const _0x3ae651=await this['_sendRequest'](getsuggestionmessage_1['default']['TYPE'],_0x360555);return messagescompressor_1['default']['decode'](_0x3ae651,getsuggestionresponse_1['default']);}catch(_0x4abb1c){if(_0x4abb1c instanceof ckeditorcloudserviceserror_1['default']&&'404'===_0x4abb1c['code']&&_0x380e76<0x5)return await(_0x3cc955=0x64*_0x380e76,new Promise(_0x4c2298=>{setTimeout(_0x4c2298,_0x3cc955);})),this['get'](_0x6f47cc,_0x380e76+0x1);if(_0x4abb1c instanceof ckeditorcloudserviceserror_1['default'])throw _0x4abb1c;throw new ckeditorcloudserviceserror_1['default'](_0x4abb1c['message'],this['_wsGateway']);}var _0x3cc955;}async['getAll'](){const _0x36e56d=new getallsuggestionsmessage_1['default'](this['_documentId']),_0xcc4151=await this['_sendRequest'](getallsuggestionsmessage_1['default']['TYPE'],_0x36e56d),{suggestions:suggestions}=messagescompressor_1['default']['decode'](_0xcc4151,getallsuggestionsresponse_1['default']);return suggestions;}async['update'](_0x14205a,_0x39bb5f={}){const {hasComments:hasComments,state:state,attributes:attributes}=_0x39bb5f,_0x44263a=void 0x0!==hasComments,_0x33024c=new updatesuggestionmessage_1['default'](_0x14205a,this['_documentId'],hasComments,_0x44263a,state,attributes);await this['_sendRequest'](updatesuggestionmessage_1['default']['TYPE'],_0x33024c);}['_connectToChannel'](_0x3ea2e7,_0x41b63f){this['_channel']=_0x3ea2e7['_getChannel'](TrackChangesService['_SERVICE'],_0x41b63f),this['_channel']&&this['listenTo'](this['_channel'],this['_channel']['getEventName'](updatesuggestionmessage_1['default']['TYPE']),(_0x3fbde4,_0xa3a4d7)=>{const _0x56a3b6=messagescompressor_1['default']['decode'](_0xa3a4d7,updatesuggestionmessage_1['default']);this['fire']('suggestionUpdated',_0x56a3b6);});}['_onWsGatewayStateChange'](_0x50ce8a){_0x50ce8a===websocketgateway_1['WEB_SOCKET_GATEWAY_STATES']['DISCONNECTED']&&this['disconnect']();}['_sendRequest'](_0x5ba84c,_0x184f3f){if(!this['_wsGateway']||!this['_isConnected'])throw new ServiceNotConnectedError_1['default']('Track\x20Changes',this);return this['_wsGateway']['_sendRequest'](exports['_SERVICE'],_0x5ba84c,messagescompressor_1['default']['encode'](_0x184f3f));}}TrackChangesService['_SERVICE']=exports['_SERVICE'],mix_1['default'](TrackChangesService,emittermixin_1['default']),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(_0x179e58){return _0x179e58&&_0x179e58['__esModule']?_0x179e58:{'default':_0x179e58};};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(_0x46065b){return _0x46065b&&_0x46065b['__esModule']?_0x46065b:{'default':_0x46065b};};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(_0x3aeb51){return _0x3aeb51&&_0x3aeb51['__esModule']?_0x3aeb51:{'default':_0x3aeb51};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x5b4fa6){super(),this['ids']=_0x5b4fa6;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x432d59){return new GetManyUsersMessage(_0x432d59['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(_0x539f6d){return _0x539f6d&&_0x539f6d['__esModule']?_0x539f6d:{'default':_0x539f6d};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetManyUsersMessage extends message_1['default']{constructor(_0x1bb0b1){super(),this['ids']=_0x1bb0b1;}['toJSON'](){return{'ids':this['ids']};}static['fromJSON'](_0x45542a){return new GetManyUsersMessage(_0x45542a['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(_0x43a696){return _0x43a696&&_0x43a696['__esModule']?_0x43a696:{'default':_0x43a696};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetUserMessage extends message_1['default']{constructor(_0x46d9be){super(),this['id']=_0x46d9be;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x227d0e){return new GetUserMessage(_0x227d0e['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(_0x35d4a5){return _0x35d4a5&&_0x35d4a5['__esModule']?_0x35d4a5:{'default':_0x35d4a5};};Object['defineProperty'](exports,'__esModule',{'value':!0x0});const message_1=__importDefault(require('./../../message'));class GetUserMessage extends message_1['default']{constructor(_0x251dd1){super(),this['id']=_0x251dd1;}['toJSON'](){return{'id':this['id']};}static['fromJSON'](_0x39b8c6){return new GetUserMessage(_0x39b8c6['id']);}}exports['default']=GetUserMessage,GetUserMessage['TYPE']='21',GetUserMessage['READABLE_TYPE_NAME']='getUser',GetUserMessage['DESCRIPTOR_NAME']='GetUserMessage',GetUserMessage['DESCRIPTOR']={'fields':{'id':{'type':'string','id':0x1}}};