quickblox-react-ui-kit 0.3.0 → 0.3.1-beta.2

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 (115) hide show
  1. package/dist/CommonTypes/CommonTypes.d.ts +142 -0
  2. package/dist/CommonTypes/FunctionResult.d.ts +0 -54
  3. package/dist/Data/DefaultConfigurations.d.ts +2 -2
  4. package/dist/Data/Stubs.d.ts +6 -5
  5. package/dist/Data/dto/dialog/LocalDialogDTO.d.ts +1 -1
  6. package/dist/Data/dto/dialog/RemoteDialogDTO.d.ts +2 -2
  7. package/dist/Data/dto/user/LocalUserDTO.d.ts +1 -1
  8. package/dist/Data/dto/user/RemoteUserDTO.d.ts +1 -1
  9. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +1 -0
  10. package/dist/Data/source/remote/RemoteDataSource.d.ts +1 -1
  11. package/dist/Domain/entity/LastMessageEntity.d.ts +1 -1
  12. package/dist/Domain/entity/UserEntity.d.ts +1 -1
  13. package/dist/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.d.ts +3 -1
  14. package/dist/Presentation/ui-components/TextField/TextField.d.ts +2 -2
  15. package/dist/QBconfig.d.ts +2 -76
  16. package/dist/index-ui.js +767 -787
  17. package/dist/index-ui.js.map +1 -1
  18. package/dist/qb-api-calls/index.d.ts +14 -12
  19. package/dist/utils/formatFileSize.d.ts +1 -0
  20. package/dist/utils/parse.d.ts +1 -0
  21. package/global.d.ts +158 -2835
  22. package/package.json +3 -1
  23. package/src/App.tsx +3 -2
  24. package/src/CommonTypes/CommonTypes.ts +229 -0
  25. package/src/CommonTypes/FunctionResult.ts +0 -59
  26. package/src/Data/Creator.ts +1 -0
  27. package/src/Data/DefaultConfigurations.ts +6 -2
  28. package/src/Data/Stubs.ts +47 -47
  29. package/src/Data/dto/dialog/LocalDialogDTO.ts +2 -2
  30. package/src/Data/dto/dialog/RemoteDialogDTO.ts +4 -4
  31. package/src/Data/dto/user/LocalUserDTO.ts +2 -2
  32. package/src/Data/dto/user/RemoteUserDTO.ts +2 -2
  33. package/src/Data/mapper/DialogLocalDTOMapper.ts +4 -10
  34. package/src/Data/mapper/DialogRemoteDTOMapper.ts +11 -22
  35. package/src/Data/mapper/UserLocalDTOMapper.ts +2 -2
  36. package/src/Data/mapper/UserRemoteDTOMapper.ts +2 -2
  37. package/src/Data/repository/ConnectionRepository.ts +1 -0
  38. package/src/Data/repository/UsersRepository.ts +1 -1
  39. package/src/Data/source/local/ChatLocalStorageDataSource.ts +14 -14
  40. package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +70 -52
  41. package/src/Data/source/remote/Mapper/FileDTOMapper.ts +4 -0
  42. package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +1 -0
  43. package/src/Data/source/remote/Mapper/UserDTOMapper.ts +1 -0
  44. package/src/Data/source/remote/RemoteDataSource.ts +76 -12
  45. package/src/Domain/entity/LastMessageEntity.ts +1 -1
  46. package/src/Domain/entity/UserEntity.ts +1 -1
  47. package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +2 -2
  48. package/src/Presentation/Views/Dialog/useDialogViewModel.ts +44 -150
  49. package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +2 -1
  50. package/src/Presentation/Views/DialogList/DialogList.tsx +65 -2
  51. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +3 -0
  52. package/src/Presentation/Views/EditDialog/EditDialog.tsx +4 -3
  53. package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +9 -1
  54. package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +11 -1
  55. package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +1 -0
  56. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +9 -41
  57. package/src/Presentation/layouts/TestStage/LoginView/Login.tsx +7 -11
  58. package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +30 -2
  59. package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +1 -0
  60. package/src/Presentation/ui-components/TextField/TextField.tsx +58 -48
  61. package/src/QBconfig.ts +13 -11
  62. package/src/qb-api-calls/index.ts +44 -14
  63. package/src/utils/formatFileSize.ts +8 -0
  64. package/src/utils/parse.ts +2 -0
  65. package/storybook-static/703.2cbec951.iframe.bundle.js +33 -0
  66. package/storybook-static/703.2cbec951.iframe.bundle.js.map +1 -0
  67. package/storybook-static/{758.53b4954a.iframe.bundle.js → 938.56e9d83c.iframe.bundle.js} +1 -14
  68. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js +14 -0
  69. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js.map +1 -0
  70. package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js +14 -0
  71. package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js.map +1 -0
  72. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js +14 -0
  73. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js.map +1 -0
  74. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js +14 -0
  75. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js.map +1 -0
  76. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js +14 -0
  77. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js.map +1 -0
  78. package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js +14 -0
  79. package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js.map +1 -0
  80. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js +14 -0
  81. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js.map +1 -0
  82. package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js +14 -0
  83. package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js.map +1 -0
  84. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.bf8a24d1.iframe.bundle.js +1 -0
  85. package/storybook-static/{Presentation-ui-components-Placeholder-Placeholder-stories.871f508c.iframe.bundle.js → Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js} +14 -1
  86. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js.map +1 -0
  87. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js +14 -0
  88. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js.map +1 -0
  89. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js +14 -0
  90. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js.map +1 -0
  91. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js +14 -0
  92. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js.map +1 -0
  93. package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.55e63162.iframe.bundle.js → Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js} +14 -1
  94. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js.map +1 -0
  95. package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.04d3eefe.iframe.bundle.js → Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js} +14 -1
  96. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js.map +1 -0
  97. package/storybook-static/iframe.html +2 -2
  98. package/storybook-static/{main.597d432b.iframe.bundle.js → main.2f6d7582.iframe.bundle.js} +1 -1
  99. package/storybook-static/project.json +1 -1
  100. package/storybook-static/runtime~main.af13ca55.iframe.bundle.js +1 -0
  101. package/webpack.config.js +2 -1
  102. package/storybook-static/758.53b4954a.iframe.bundle.js.map +0 -1
  103. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.cf806856.iframe.bundle.js +0 -1
  104. package/storybook-static/Presentation-ui-components-Button-Button-stories.4fac7996.iframe.bundle.js +0 -1
  105. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6665bbfb.iframe.bundle.js +0 -1
  106. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cf340397.iframe.bundle.js +0 -1
  107. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.b32a1e17.iframe.bundle.js +0 -1
  108. package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js +0 -1
  109. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js +0 -1
  110. package/storybook-static/Presentation-ui-components-Message-Message-stories.343dfae0.iframe.bundle.js +0 -1
  111. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.c2ead6a5.iframe.bundle.js +0 -1
  112. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.527e000e.iframe.bundle.js +0 -1
  113. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.2ff75703.iframe.bundle.js +0 -1
  114. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.4a2eef3e.iframe.bundle.js +0 -1
  115. package/storybook-static/runtime~main.7ee2126e.iframe.bundle.js +0 -1
package/dist/index-ui.js CHANGED
@@ -1,13 +1,13 @@
1
1
  (function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("react"), require("react-dom"));
3
+ module.exports = factory(require("react"), require("quickblox/quickblox"), require("react-dom"));
4
4
  else if(typeof define === 'function' && define.amd)
5
- define(["react", "react-dom"], factory);
5
+ define(["react", "quickblox/quickblox", "react-dom"], factory);
6
6
  else {
7
- var a = typeof exports === 'object' ? factory(require("react"), require("react-dom")) : factory(root["react"], root["react-dom"]);
7
+ var a = typeof exports === 'object' ? factory(require("react"), require("quickblox/quickblox"), require("react-dom")) : factory(root["react"], root["quickblox/quickblox"], root["react-dom"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(self, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) => {
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_quickblox_quickblox__, __WEBPACK_EXTERNAL_MODULE_react_dom__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -10122,7 +10122,9 @@ __webpack_require__.r(__webpack_exports__);
10122
10122
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10123
10123
  /* harmony export */ "Creator": () => (/* binding */ Creator)
10124
10124
  /* harmony export */ });
10125
- /* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Domain/entity/FileTypes */ "./src/Domain/entity/FileTypes.ts");
10125
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
10126
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
10127
+ /* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Domain/entity/FileTypes */ "./src/Domain/entity/FileTypes.ts");
10126
10128
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10127
10129
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10128
10130
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10160,6 +10162,7 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
10160
10162
  }
10161
10163
  };
10162
10164
 
10165
+
10163
10166
  var Creator = /** @class */ (function () {
10164
10167
  function Creator() {
10165
10168
  }
@@ -10218,7 +10221,7 @@ var Creator = /** @class */ (function () {
10218
10221
  return __awaiter(this, void 0, void 0, function () {
10219
10222
  return __generator(this, function (_b) {
10220
10223
  return [2 /*return*/, new Promise(function (resolve, reject) {
10221
- QB.content.getInfo(fileId, function (error, result) {
10224
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.getInfo(fileId, function (error, result) {
10222
10225
  if (error) {
10223
10226
  reject(error);
10224
10227
  }
@@ -10255,7 +10258,7 @@ var Creator = /** @class */ (function () {
10255
10258
  url: '',
10256
10259
  name: '',
10257
10260
  size: 0,
10258
- type: _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.image,
10261
+ type: _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_1__.FileType.image,
10259
10262
  };
10260
10263
  };
10261
10264
  var _a;
@@ -10269,7 +10272,7 @@ var Creator = /** @class */ (function () {
10269
10272
  return [4 /*yield*/, Creator.getInfoPromise(fileId)];
10270
10273
  case 1:
10271
10274
  file_uid = _c.sent();
10272
- imageSrc = QB.content.privateUrl(file_uid);
10275
+ imageSrc = quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(file_uid);
10273
10276
  return [4 /*yield*/, Creator.createBlobFromUrl(imageSrc)];
10274
10277
  case 2:
10275
10278
  _b = _c.sent(), imgSrc = _b.imgSrc, blobFile = _b.blobFile;
@@ -10929,21 +10932,21 @@ var Stubs = /** @class */ (function () {
10929
10932
  switch (dialogType) {
10930
10933
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"]:
10931
10934
  dialogEntity = new _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PrivateDialogEntity({ todo: '' }, '', '_', {
10932
- dateSent: '',
10935
+ dateSent: 0,
10933
10936
  text: '',
10934
10937
  userId: 0,
10935
10938
  }, '', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"], 0, '', 0);
10936
10939
  break;
10937
10940
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"]:
10938
10941
  dialogEntity = new _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_1__.PublicDialogEntity({ todo: '' }, '', {
10939
- dateSent: '',
10942
+ dateSent: 0,
10940
10943
  text: '',
10941
10944
  userId: 0,
10942
10945
  }, '', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"], 0, '', '', '');
10943
10946
  break;
10944
10947
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group:
10945
10948
  dialogEntity = new _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_3__.GroupDialogEntity({ todo: '' }, '', {
10946
- dateSent: '',
10949
+ dateSent: 0,
10947
10950
  text: '',
10948
10951
  userId: 0,
10949
10952
  }, '', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group, 0, '', [], '', '');
@@ -10953,7 +10956,7 @@ var Stubs = /** @class */ (function () {
10953
10956
  customData: { todo: '' },
10954
10957
  id: '',
10955
10958
  name: '_',
10956
- lastMessage: { dateSent: '', text: '', userId: 0 },
10959
+ lastMessage: { dateSent: 0, text: '', userId: 0 },
10957
10960
  ownerId: '',
10958
10961
  type: -1,
10959
10962
  unreadMessageCount: 0,
@@ -10972,21 +10975,21 @@ var Stubs = /** @class */ (function () {
10972
10975
  switch (dialogType) {
10973
10976
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"]:
10974
10977
  dialogEntity = new _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PrivateDialogEntity({ todo: '' }, '111', '_111', {
10975
- dateSent: '01.02.2023',
10978
+ dateSent: 0,
10976
10979
  text: 'text test',
10977
10980
  userId: 777,
10978
10981
  }, '999', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"], 555, '02.02.2023', 333);
10979
10982
  break;
10980
10983
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"]:
10981
10984
  dialogEntity = new _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_1__.PublicDialogEntity({ todo: '' }, '111', {
10982
- dateSent: '01.02.2023',
10985
+ dateSent: 0,
10983
10986
  text: 'text test',
10984
10987
  userId: 777,
10985
10988
  }, '999', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"], 555, '02.02.2023', 'test public dialog', 'no photo public dialog');
10986
10989
  break;
10987
10990
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group:
10988
10991
  dialogEntity = new _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_3__.GroupDialogEntity({ todo: '' }, '111', {
10989
- dateSent: '01.02.2023',
10992
+ dateSent: 0,
10990
10993
  text: 'text test',
10991
10994
  userId: 777,
10992
10995
  }, '999', _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group, 555, '02.02.2023', [], 'test group dialog', 'no photo group dialog');
@@ -10997,7 +11000,7 @@ var Stubs = /** @class */ (function () {
10997
11000
  id: '111',
10998
11001
  name: '_111',
10999
11002
  lastMessage: {
11000
- dateSent: '01.02.2023',
11003
+ dateSent: 0,
11001
11004
  text: 'text test',
11002
11005
  userId: 777,
11003
11006
  },
@@ -11015,9 +11018,9 @@ var Stubs = /** @class */ (function () {
11015
11018
  switch (dialogType) {
11016
11019
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"]:
11017
11020
  dto.id = '111';
11018
- dto.lastMessageDateSent = '01.02.2023';
11021
+ dto.lastMessageDateSent = 0;
11019
11022
  dto.lastMessageText = 'text test';
11020
- dto.lastMessageUserId = '777';
11023
+ dto.lastMessageUserId = 777;
11021
11024
  dto.ownerId = '999';
11022
11025
  dto.type = dialogType;
11023
11026
  dto.unreadMessageCount = 555;
@@ -11026,9 +11029,9 @@ var Stubs = /** @class */ (function () {
11026
11029
  break;
11027
11030
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"]:
11028
11031
  dto.id = '111';
11029
- dto.lastMessageDateSent = '01.02.2023';
11032
+ dto.lastMessageDateSent = 0;
11030
11033
  dto.lastMessageText = 'text test';
11031
- dto.lastMessageUserId = '777';
11034
+ dto.lastMessageUserId = 777;
11032
11035
  dto.ownerId = '999';
11033
11036
  dto.type = dialogType;
11034
11037
  dto.unreadMessageCount = 555;
@@ -11038,9 +11041,9 @@ var Stubs = /** @class */ (function () {
11038
11041
  break;
11039
11042
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group:
11040
11043
  dto.id = '111';
11041
- dto.lastMessageDateSent = '01.02.2023';
11044
+ dto.lastMessageDateSent = 0;
11042
11045
  dto.lastMessageText = 'text test';
11043
- dto.lastMessageUserId = '777';
11046
+ dto.lastMessageUserId = 777;
11044
11047
  dto.ownerId = '999';
11045
11048
  dto.type = dialogType;
11046
11049
  dto.unreadMessageCount = 555;
@@ -11074,8 +11077,8 @@ var Stubs = /** @class */ (function () {
11074
11077
  participantId: '',
11075
11078
  participantsIds: [],
11076
11079
  lastMessageText: '',
11077
- lastMessageDateSent: '',
11078
- lastMessageUserId: '',
11080
+ lastMessageDateSent: 0,
11081
+ lastMessageUserId: 0,
11079
11082
  lastMessageId: '',
11080
11083
  unreadMessageCount: 0,
11081
11084
  updatedAt: '',
@@ -11089,8 +11092,8 @@ var Stubs = /** @class */ (function () {
11089
11092
  participantId: '',
11090
11093
  participantsIds: [],
11091
11094
  lastMessageText: '',
11092
- lastMessageDateSent: '',
11093
- lastMessageUserId: '',
11095
+ lastMessageDateSent: 0,
11096
+ lastMessageUserId: 0,
11094
11097
  lastMessageId: '',
11095
11098
  unreadMessageCount: 0,
11096
11099
  updatedAt: '',
@@ -11104,8 +11107,8 @@ var Stubs = /** @class */ (function () {
11104
11107
  participantId: '',
11105
11108
  participantsIds: [],
11106
11109
  lastMessageText: '',
11107
- lastMessageDateSent: '',
11108
- lastMessageUserId: '',
11110
+ lastMessageDateSent: 0,
11111
+ lastMessageUserId: 0,
11109
11112
  lastMessageId: '',
11110
11113
  unreadMessageCount: 0,
11111
11114
  updatedAt: '',
@@ -11119,8 +11122,8 @@ var Stubs = /** @class */ (function () {
11119
11122
  participantId: '',
11120
11123
  participantsIds: [],
11121
11124
  lastMessageText: '',
11122
- lastMessageDateSent: '',
11123
- lastMessageUserId: '',
11125
+ lastMessageDateSent: 0,
11126
+ lastMessageUserId: 0,
11124
11127
  lastMessageId: '',
11125
11128
  unreadMessageCount: 0,
11126
11129
  updatedAt: '',
@@ -11134,8 +11137,8 @@ var Stubs = /** @class */ (function () {
11134
11137
  participantId: '',
11135
11138
  participantsIds: [],
11136
11139
  lastMessageText: '',
11137
- lastMessageDateSent: '',
11138
- lastMessageUserId: '',
11140
+ lastMessageDateSent: 0,
11141
+ lastMessageUserId: 0,
11139
11142
  lastMessageId: '',
11140
11143
  unreadMessageCount: 0,
11141
11144
  updatedAt: '',
@@ -11149,8 +11152,8 @@ var Stubs = /** @class */ (function () {
11149
11152
  participantId: '',
11150
11153
  participantsIds: [],
11151
11154
  lastMessageText: '',
11152
- lastMessageDateSent: '',
11153
- lastMessageUserId: '',
11155
+ lastMessageDateSent: 0,
11156
+ lastMessageUserId: 0,
11154
11157
  lastMessageId: '',
11155
11158
  unreadMessageCount: 0,
11156
11159
  updatedAt: '',
@@ -11164,8 +11167,8 @@ var Stubs = /** @class */ (function () {
11164
11167
  participantId: '',
11165
11168
  participantsIds: [],
11166
11169
  lastMessageText: '',
11167
- lastMessageDateSent: '',
11168
- lastMessageUserId: '',
11170
+ lastMessageDateSent: 0,
11171
+ lastMessageUserId: 0,
11169
11172
  lastMessageId: '',
11170
11173
  unreadMessageCount: 0,
11171
11174
  updatedAt: '',
@@ -11178,7 +11181,7 @@ var Stubs = /** @class */ (function () {
11178
11181
  _id: '111',
11179
11182
  created_at: '01.03.2023',
11180
11183
  last_message: 'test message',
11181
- last_message_date_sent: '02.03.2023',
11184
+ last_message_date_sent: 0,
11182
11185
  last_message_id: '100',
11183
11186
  last_message_user_id: 112,
11184
11187
  name: '',
@@ -11198,7 +11201,7 @@ var Stubs = /** @class */ (function () {
11198
11201
  _id: '111',
11199
11202
  created_at: '01.03.2023',
11200
11203
  last_message: 'test message',
11201
- last_message_date_sent: '02.03.2023',
11204
+ last_message_date_sent: 0,
11202
11205
  last_message_id: '100',
11203
11206
  last_message_user_id: 112,
11204
11207
  name: '',
@@ -11218,7 +11221,7 @@ var Stubs = /** @class */ (function () {
11218
11221
  _id: '111',
11219
11222
  created_at: '01.03.2023',
11220
11223
  last_message: 'test message',
11221
- last_message_date_sent: '02.03.2023',
11224
+ last_message_date_sent: 0,
11222
11225
  last_message_id: '100',
11223
11226
  last_message_user_id: 112,
11224
11227
  name: '',
@@ -11265,7 +11268,7 @@ var Stubs = /** @class */ (function () {
11265
11268
  id: '012345',
11266
11269
  name: 'error dialog',
11267
11270
  lastMessage: {
11268
- dateSent: '31.03.2023',
11271
+ dateSent: 0,
11269
11272
  text: 'text test',
11270
11273
  userId: 12345,
11271
11274
  },
@@ -11310,19 +11313,19 @@ var Stubs = /** @class */ (function () {
11310
11313
  };
11311
11314
  Stubs.createDialogsForTest = function () {
11312
11315
  var dialogs = new Array();
11313
- var privateDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"], '101', 'Stub1 Private Dialog', '31.03.2023', 'Test text message for private dialog', 11, '11', 1, '31.03.20223', 12);
11316
+ var privateDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"], '101', 'Stub1 Private Dialog', 0, 'Test text message for private dialog', 11, '11', 1, '31.03.20223', 12);
11314
11317
  dialogs.push(privateDialog);
11315
- var publicDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"], '102', 'Stub2 Public Dialog', '31.03.2023', 'Test text message for public dialog', 12, '12', 1, '31.03.20223', 12, 'no photo', [11, 12, 13]);
11318
+ var publicDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"], '102', 'Stub2 Public Dialog', 0, 'Test text message for public dialog', 12, '12', 1, '31.03.20223', 12, 'no photo', [11, 12, 13]);
11316
11319
  dialogs.push(publicDialog);
11317
- var groupDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group, '103', 'Stub 3 Group Dialog', '31.03.2023', 'Test text message for group dialog', 13, '13', 1, '31.03.20223', 13, 'no photo', [11, 12, 13]);
11320
+ var groupDialog = Stubs.createDialogEntityWithParams(_Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group, '103', 'Stub 3 Group Dialog', 0, 'Test text message for group dialog', 13, '13', 1, '31.03.20223', 13, 'no photo', [11, 12, 13]);
11318
11321
  dialogs.push(groupDialog);
11319
11322
  return dialogs;
11320
11323
  };
11321
11324
  Stubs.createUsersForTest = function () {
11322
11325
  var users = new Array();
11323
- var user11 = Stubs.createUserEntityWithParams(11, 'fl_user11', 'fl_user11@q.ua', 'login_user11', '31.03.2023', '31.03.2023', 0);
11324
- var user12 = Stubs.createUserEntityWithParams(12, 'fl_user12', 'fl_user12@q.ua', 'login_user12', '31.03.2023', '31.03.2023', 0);
11325
- var user13 = Stubs.createUserEntityWithParams(13, 'fl_user13', 'fl_user13@q.ua', 'login_user13', '31.03.2023', '31.03.2023', 0);
11326
+ var user11 = Stubs.createUserEntityWithParams(11, 'fl_user11', 'fl_user11@q.ua', 'login_user11', '31.03.2023', '31.03.2023', '');
11327
+ var user12 = Stubs.createUserEntityWithParams(12, 'fl_user12', 'fl_user12@q.ua', 'login_user12', '31.03.2023', '31.03.2023', '');
11328
+ var user13 = Stubs.createUserEntityWithParams(13, 'fl_user13', 'fl_user13@q.ua', 'login_user13', '31.03.2023', '31.03.2023', '');
11326
11329
  users.push(user11);
11327
11330
  users.push(user12);
11328
11331
  users.push(user13);
@@ -11441,7 +11444,7 @@ var LocalDialogDTO = /** @class */ (function () {
11441
11444
  this.participantsIds = [];
11442
11445
  this.updatedAt = '';
11443
11446
  this.lastMessageText = '';
11444
- this.lastMessageDateSent = '';
11447
+ this.lastMessageDateSent = 0;
11445
11448
  this.lastMessageUserId = '';
11446
11449
  this.unreadMessageCount = 0;
11447
11450
  this.name = '';
@@ -11511,8 +11514,8 @@ var RemoteDialogDTO = /** @class */ (function () {
11511
11514
  this.participantsIds = [];
11512
11515
  this.updatedAt = '';
11513
11516
  this.lastMessageText = '';
11514
- this.lastMessageUserId = '';
11515
- this.lastMessageDateSent = '';
11517
+ this.lastMessageUserId = 0;
11518
+ this.lastMessageDateSent = 0;
11516
11519
  this.lastMessageId = '';
11517
11520
  this.unreadMessageCount = 0;
11518
11521
  this.name = '';
@@ -11779,7 +11782,7 @@ var LocalUserDTO = /** @class */ (function () {
11779
11782
  this.login = '';
11780
11783
  this.created_at = '';
11781
11784
  this.updated_at = '';
11782
- this.last_request_at = 0;
11785
+ this.last_request_at = '';
11783
11786
  this.custom_data = '';
11784
11787
  this.user_tags = '';
11785
11788
  this.blob_id = '';
@@ -11811,7 +11814,7 @@ var RemoteUserDTO = /** @class */ (function () {
11811
11814
  this.login = '';
11812
11815
  this.created_at = '';
11813
11816
  this.updated_at = '';
11814
- this.last_request_at = 0;
11817
+ this.last_request_at = '';
11815
11818
  this.custom_data = '';
11816
11819
  this.user_tags = '';
11817
11820
  this.blob_id = 0;
@@ -11913,27 +11916,21 @@ var DialogLocalDTOMapper = /** @class */ (function () {
11913
11916
  switch (dialog.type) {
11914
11917
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["private"]:
11915
11918
  entity = new _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PrivateDialogEntity({ todo: '' }, dialog.id, dialog.name, {
11916
- dateSent: dialog.lastMessageDateSent
11917
- ? dialog.lastMessageDateSent
11918
- : '',
11919
+ dateSent: dialog.lastMessageDateSent,
11919
11920
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
11920
11921
  userId: parseInt(dialog.lastMessageUserId, 10),
11921
11922
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, parseInt(dialog.participantId, 10));
11922
11923
  break;
11923
11924
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"]:
11924
11925
  entity = new _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PublicDialogEntity({ todo: '' }, dialog.id, {
11925
- dateSent: dialog.lastMessageDateSent
11926
- ? dialog.lastMessageDateSent
11927
- : '',
11926
+ dateSent: dialog.lastMessageDateSent,
11928
11927
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
11929
11928
  userId: parseInt(dialog.lastMessageUserId, 10),
11930
11929
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, dialog.name, dialog.photo);
11931
11930
  break;
11932
11931
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType.group:
11933
11932
  entity = new _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_4__.GroupDialogEntity({ todo: '' }, dialog.id, {
11934
- dateSent: dialog.lastMessageDateSent
11935
- ? dialog.lastMessageDateSent
11936
- : '',
11933
+ dateSent: dialog.lastMessageDateSent,
11937
11934
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
11938
11935
  userId: parseInt(dialog.lastMessageUserId, 10),
11939
11936
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, dialog.participantsIds, dialog.name, dialog.photo);
@@ -12276,7 +12273,7 @@ var DialogLocalDTOMapper = /** @class */ (function () {
12276
12273
  DialogLocalDTOMapper.createDefaultDialogEntity = function (owner_id) {
12277
12274
  return {
12278
12275
  customData: { todo: '' },
12279
- lastMessage: { dateSent: '', text: '', userId: 0 },
12276
+ lastMessage: { dateSent: 0, text: '', userId: 0 },
12280
12277
  ownerId: owner_id,
12281
12278
  type: _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"],
12282
12279
  unreadMessageCount: 0,
@@ -12303,12 +12300,15 @@ __webpack_require__.r(__webpack_exports__);
12303
12300
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12304
12301
  /* harmony export */ "DialogRemoteDTOMapper": () => (/* binding */ DialogRemoteDTOMapper)
12305
12302
  /* harmony export */ });
12306
- /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
12307
- /* harmony import */ var _dto_dialog_RemoteDialogDTO__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dto/dialog/RemoteDialogDTO */ "./src/Data/dto/dialog/RemoteDialogDTO.ts");
12308
- /* harmony import */ var _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/entity/PublicDialogEntity */ "./src/Domain/entity/PublicDialogEntity.ts");
12309
- /* harmony import */ var _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/entity/PrivateDialogEntity */ "./src/Domain/entity/PrivateDialogEntity.ts");
12310
- /* harmony import */ var _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Domain/entity/GroupDialogEntity */ "./src/Domain/entity/GroupDialogEntity.ts");
12311
- /* harmony import */ var _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../source/exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
12303
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
12304
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
12305
+ /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
12306
+ /* harmony import */ var _dto_dialog_RemoteDialogDTO__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dto/dialog/RemoteDialogDTO */ "./src/Data/dto/dialog/RemoteDialogDTO.ts");
12307
+ /* harmony import */ var _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/entity/PublicDialogEntity */ "./src/Domain/entity/PublicDialogEntity.ts");
12308
+ /* harmony import */ var _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Domain/entity/PrivateDialogEntity */ "./src/Domain/entity/PrivateDialogEntity.ts");
12309
+ /* harmony import */ var _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Domain/entity/GroupDialogEntity */ "./src/Domain/entity/GroupDialogEntity.ts");
12310
+ /* harmony import */ var _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../source/exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
12311
+
12312
12312
 
12313
12313
 
12314
12314
 
@@ -12320,7 +12320,7 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12320
12320
  }
12321
12321
  // eslint-disable-next-line class-methods-use-this
12322
12322
  DialogRemoteDTOMapper.prototype.fromEntity = function (entity) {
12323
- var dialog = new _dto_dialog_RemoteDialogDTO__WEBPACK_IMPORTED_MODULE_1__.RemoteDialogDTO();
12323
+ var dialog = new _dto_dialog_RemoteDialogDTO__WEBPACK_IMPORTED_MODULE_2__.RemoteDialogDTO();
12324
12324
  var dialogEntity = this.defineType(entity);
12325
12325
  DialogRemoteDTOMapper.validateEntity(dialogEntity);
12326
12326
  dialog.id = dialogEntity.id;
@@ -12339,7 +12339,7 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12339
12339
  }
12340
12340
  dialog.updatedAt = dialogEntity.updatedAt;
12341
12341
  dialog.lastMessageText = dialogEntity.lastMessage.text;
12342
- dialog.lastMessageUserId = dialogEntity.lastMessage.userId.toString();
12342
+ dialog.lastMessageUserId = dialogEntity.lastMessage.userId;
12343
12343
  dialog.lastMessageDateSent = dialogEntity.lastMessage.dateSent;
12344
12344
  dialog.unreadMessageCount = dialogEntity.unreadMessageCount;
12345
12345
  dialog.name = DialogRemoteDTOMapper.getDialogName(dialogEntity);
@@ -12353,48 +12353,42 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12353
12353
  var entity = DialogRemoteDTOMapper.createDefaultDialogEntity(dialog.ownerId);
12354
12354
  function formatPhotoUrl() {
12355
12355
  if (dialog.photo && dialog.photo !== 'null') {
12356
- return dialog.photo && QB.content.privateUrl(dialog.photo);
12356
+ return dialog.photo && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(dialog.photo);
12357
12357
  }
12358
12358
  return '';
12359
12359
  }
12360
12360
  switch (dialog.type) {
12361
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"]:
12362
- entity = new _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PrivateDialogEntity({ todo: '' }, dialog.id, dialog.name, {
12363
- dateSent: dialog.lastMessageDateSent
12364
- ? dialog.lastMessageDateSent
12365
- : '',
12361
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["private"]:
12362
+ entity = new _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_4__.PrivateDialogEntity({ todo: '' }, dialog.id, dialog.name, {
12363
+ dateSent: dialog.lastMessageDateSent,
12366
12364
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
12367
- userId: parseInt(dialog.lastMessageUserId, 10),
12365
+ userId: dialog.lastMessageUserId,
12368
12366
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, parseInt(dialog.participantId, 10));
12369
12367
  break;
12370
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"]:
12371
- entity = new _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PublicDialogEntity({ todo: '' }, dialog.id, {
12372
- dateSent: dialog.lastMessageDateSent
12373
- ? dialog.lastMessageDateSent
12374
- : '',
12368
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"]:
12369
+ entity = new _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PublicDialogEntity({ todo: '' }, dialog.id, {
12370
+ dateSent: dialog.lastMessageDateSent,
12375
12371
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
12376
- userId: parseInt(dialog.lastMessageUserId, 10),
12372
+ userId: dialog.lastMessageUserId,
12377
12373
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, dialog.name, formatPhotoUrl());
12378
12374
  break;
12379
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group:
12380
- entity = new _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_4__.GroupDialogEntity({ todo: '' }, dialog.id, {
12381
- dateSent: dialog.lastMessageDateSent
12382
- ? dialog.lastMessageDateSent
12383
- : '',
12375
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType.group:
12376
+ entity = new _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_5__.GroupDialogEntity({ todo: '' }, dialog.id, {
12377
+ dateSent: dialog.lastMessageDateSent,
12384
12378
  text: dialog.lastMessageText ? dialog.lastMessageText : '',
12385
- userId: parseInt(dialog.lastMessageUserId, 10),
12379
+ userId: dialog.lastMessageUserId,
12386
12380
  }, dialog.ownerId, dialog.type, dialog.unreadMessageCount, dialog.updatedAt, dialog.participantsIds, dialog.name, formatPhotoUrl());
12387
12381
  break;
12388
12382
  default:
12389
- return Promise.reject(new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE, 'undefinded type dialog in DTO'));
12383
+ return Promise.reject(new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE, 'undefinded type dialog in DTO'));
12390
12384
  }
12391
12385
  return Promise.resolve(entity);
12392
12386
  };
12393
12387
  DialogRemoteDTOMapper.getPhoto = function (entity) {
12394
12388
  var dialogEntity = entity;
12395
- if (dialogEntity && dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"])
12389
+ if (dialogEntity && dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"])
12396
12390
  return dialogEntity.photo;
12397
- if (dialogEntity && dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group)
12391
+ if (dialogEntity && dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType.group)
12398
12392
  return dialogEntity.photo;
12399
12393
  return '';
12400
12394
  };
@@ -12402,22 +12396,22 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12402
12396
  return dialogEntity.name;
12403
12397
  };
12404
12398
  DialogRemoteDTOMapper.getParticipantId = function (dialogEntity) {
12405
- if (dialogEntity instanceof _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PrivateDialogEntity)
12399
+ if (dialogEntity instanceof _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_4__.PrivateDialogEntity)
12406
12400
  return dialogEntity.participantId.toString();
12407
12401
  return '';
12408
12402
  };
12409
12403
  DialogRemoteDTOMapper.getParticipantsIds = function (dialogEntity) {
12410
- return _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PublicDialogEntity.getParticipants(dialogEntity);
12404
+ return _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PublicDialogEntity.getParticipants(dialogEntity);
12411
12405
  };
12412
12406
  DialogRemoteDTOMapper.getNewParticipantsIds = function (dialogEntity) {
12413
- return _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PublicDialogEntity.getNewParticipants(dialogEntity);
12407
+ return _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PublicDialogEntity.getNewParticipants(dialogEntity);
12414
12408
  };
12415
12409
  DialogRemoteDTOMapper.createDefaultDialogEntity = function (owner_id) {
12416
12410
  return {
12417
12411
  customData: { todo: '' },
12418
- lastMessage: { dateSent: '', text: '', userId: 0 },
12412
+ lastMessage: { dateSent: 0, text: '', userId: 0 },
12419
12413
  ownerId: owner_id,
12420
- type: _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"],
12414
+ type: _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"],
12421
12415
  unreadMessageCount: 0,
12422
12416
  updatedAt: '',
12423
12417
  id: '',
@@ -12425,13 +12419,13 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12425
12419
  };
12426
12420
  };
12427
12421
  DialogRemoteDTOMapper.validateEntity = function (dialogEntity) {
12428
- if (dialogEntity instanceof _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PrivateDialogEntity) {
12422
+ if (dialogEntity instanceof _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_4__.PrivateDialogEntity) {
12429
12423
  return DialogRemoteDTOMapper.validateIsPrivateDialogCorrect(dialogEntity);
12430
12424
  }
12431
- if (dialogEntity instanceof _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PublicDialogEntity) {
12425
+ if (dialogEntity instanceof _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PublicDialogEntity) {
12432
12426
  return DialogRemoteDTOMapper.validateIsPublicDialogCorrect(dialogEntity);
12433
12427
  }
12434
- if (dialogEntity instanceof _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_4__.GroupDialogEntity) {
12428
+ if (dialogEntity instanceof _Domain_entity_GroupDialogEntity__WEBPACK_IMPORTED_MODULE_5__.GroupDialogEntity) {
12435
12429
  return DialogRemoteDTOMapper.validateIsGroupDialogCorrect(dialogEntity);
12436
12430
  }
12437
12431
  return Promise.resolve();
@@ -12477,23 +12471,23 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12477
12471
  },
12478
12472
  };
12479
12473
  if (!privateDialogEntityValidator.id(dialogEntity))
12480
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12474
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12481
12475
  if (!privateDialogEntityValidator.name(dialogEntity))
12482
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12476
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12483
12477
  if (!privateDialogEntityValidator.customData(dialogEntity))
12484
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12478
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12485
12479
  if (!privateDialogEntityValidator.lastMessage(dialogEntity))
12486
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12480
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12487
12481
  if (!privateDialogEntityValidator.ownerId(dialogEntity))
12488
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12482
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12489
12483
  if (!privateDialogEntityValidator.participantId(dialogEntity))
12490
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantId} does not exist or empty');
12484
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantId} does not exist or empty');
12491
12485
  if (!privateDialogEntityValidator.type(dialogEntity))
12492
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12486
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12493
12487
  if (!privateDialogEntityValidator.unreadMessageCount(dialogEntity))
12494
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12488
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12495
12489
  if (!privateDialogEntityValidator.updatedAt(dialogEntity))
12496
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12490
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12497
12491
  };
12498
12492
  DialogRemoteDTOMapper.validateIsPublicDialogCorrect = function (dialogEntity) {
12499
12493
  var publicDialogEntityValidator = {
@@ -12536,23 +12530,23 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12536
12530
  },
12537
12531
  };
12538
12532
  if (!publicDialogEntityValidator.id(dialogEntity))
12539
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12533
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12540
12534
  if (!publicDialogEntityValidator.customData(dialogEntity))
12541
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12535
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12542
12536
  if (!publicDialogEntityValidator.lastMessage(dialogEntity))
12543
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12537
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12544
12538
  if (!publicDialogEntityValidator.ownerId(dialogEntity))
12545
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12539
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12546
12540
  if (!publicDialogEntityValidator.type(dialogEntity))
12547
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12541
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12548
12542
  if (!publicDialogEntityValidator.unreadMessageCount(dialogEntity))
12549
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12543
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12550
12544
  if (!publicDialogEntityValidator.updatedAt(dialogEntity))
12551
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12545
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12552
12546
  if (!publicDialogEntityValidator.name(dialogEntity))
12553
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12547
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12554
12548
  if (!publicDialogEntityValidator.photo(dialogEntity))
12555
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty');
12549
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty');
12556
12550
  };
12557
12551
  DialogRemoteDTOMapper.validateIsGroupDialogCorrect = function (dialogEntity) {
12558
12552
  var groupDialogEntityValidator = {
@@ -12599,51 +12593,45 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12599
12593
  },
12600
12594
  };
12601
12595
  if (!groupDialogEntityValidator.id(dialogEntity))
12602
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12596
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
12603
12597
  if (!groupDialogEntityValidator.customData(dialogEntity))
12604
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12598
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {customData} does not exist or empty');
12605
12599
  if (!groupDialogEntityValidator.lastMessage(dialogEntity))
12606
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12600
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessage} does not exist or empty');
12607
12601
  if (!groupDialogEntityValidator.ownerId(dialogEntity))
12608
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12602
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty');
12609
12603
  if (!groupDialogEntityValidator.type(dialogEntity))
12610
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12604
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty');
12611
12605
  if (!groupDialogEntityValidator.unreadMessageCount(dialogEntity))
12612
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12606
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty');
12613
12607
  if (!groupDialogEntityValidator.updatedAt(dialogEntity))
12614
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12608
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty');
12615
12609
  if (!groupDialogEntityValidator.name(dialogEntity))
12616
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12610
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty');
12617
12611
  if (!groupDialogEntityValidator.photo(dialogEntity))
12618
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty');
12612
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty');
12619
12613
  if (!groupDialogEntityValidator.participantIds(dialogEntity))
12620
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantIds} does not exist or empty');
12614
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantIds} does not exist or empty');
12621
12615
  };
12622
12616
  // eslint-disable-next-line class-methods-use-this
12623
12617
  DialogRemoteDTOMapper.prototype.defineType = function (entity) {
12624
12618
  var dialogEntity = entity;
12625
12619
  var dialogType = entity.type;
12626
12620
  switch (dialogType) {
12627
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["private"]:
12628
- dialogEntity =
12629
- entity instanceof _Domain_entity_PrivateDialogEntity__WEBPACK_IMPORTED_MODULE_3__.PrivateDialogEntity
12630
- ? entity
12631
- : null;
12621
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["private"]:
12622
+ dialogEntity = entity;
12632
12623
  break;
12633
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType["public"]:
12634
- dialogEntity =
12635
- entity instanceof _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_2__.PublicDialogEntity
12636
- ? entity
12637
- : null;
12624
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"]:
12625
+ dialogEntity = entity;
12638
12626
  break;
12639
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_0__.DialogType.group:
12627
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType.group:
12640
12628
  dialogEntity = entity;
12641
12629
  break;
12642
12630
  default:
12643
12631
  dialogEntity = null;
12644
12632
  }
12645
12633
  if (!dialogEntity)
12646
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE, 'wrong entity type');
12634
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE, 'wrong entity type');
12647
12635
  return dialogEntity;
12648
12636
  };
12649
12637
  DialogRemoteDTOMapper.validateRemoteDTO = function (data) {
@@ -12702,27 +12690,27 @@ var DialogRemoteDTOMapper = /** @class */ (function () {
12702
12690
  },
12703
12691
  };
12704
12692
  if (!dtoValidator.id(data))
12705
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty in DTO');
12693
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty in DTO');
12706
12694
  if (!dtoValidator.lastMessageDateSent(data))
12707
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessageDateSent} does not exist or empty in DTO');
12695
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessageDateSent} does not exist or empty in DTO');
12708
12696
  if (!dtoValidator.lastMessageText(data))
12709
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessageText} does not exist or empty in DTO');
12697
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {lastMessageText} does not exist or empty in DTO');
12710
12698
  if (!dtoValidator.name(data))
12711
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty in DTO');
12699
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty in DTO');
12712
12700
  if (!dtoValidator.ownerId(data))
12713
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty in DTO');
12701
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {ownerId} does not exist or empty in DTO');
12714
12702
  if (!dtoValidator.participantId(data))
12715
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantId} does not exist or empty in DTO');
12703
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantId} does not exist or empty in DTO');
12716
12704
  if (!dtoValidator.participantsIds(data))
12717
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantsIds} does not exist or empty in DTO');
12705
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {participantsIds} does not exist or empty in DTO');
12718
12706
  if (!dtoValidator.photo(data))
12719
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty in DTO');
12707
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {photo} does not exist or empty in DTO');
12720
12708
  if (!dtoValidator.type(data))
12721
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty in DTO');
12709
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty in DTO');
12722
12710
  if (!dtoValidator.unreadMessageCount(data))
12723
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty in DTO');
12711
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {unreadMessageCount} does not exist or empty in DTO');
12724
12712
  if (!dtoValidator.updatedAt(data))
12725
- throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_5__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty in DTO');
12713
+ throw new _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.MapperDTOException(_source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _source_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_6__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updatedAt} does not exist or empty in DTO');
12726
12714
  };
12727
12715
  return DialogRemoteDTOMapper;
12728
12716
  }());
@@ -13706,7 +13694,7 @@ var UserLocalDTOMapper = /** @class */ (function () {
13706
13694
  var last_request_at = v.last_request_at;
13707
13695
  return (last_request_at !== undefined &&
13708
13696
  last_request_at !== null &&
13709
- last_request_at > 0);
13697
+ last_request_at.length > 0);
13710
13698
  },
13711
13699
  login: function (v) {
13712
13700
  var login = v.login;
@@ -13823,7 +13811,7 @@ var UserLocalDTOMapper = /** @class */ (function () {
13823
13811
  email: '',
13824
13812
  full_name: '',
13825
13813
  id: 0,
13826
- last_request_at: 0,
13814
+ last_request_at: '',
13827
13815
  login: '',
13828
13816
  updated_at: '',
13829
13817
  user_tags: '',
@@ -13984,7 +13972,7 @@ var UserRemoteDTOMapper = /** @class */ (function () {
13984
13972
  var last_request_at = v.last_request_at;
13985
13973
  return (last_request_at !== undefined &&
13986
13974
  last_request_at !== null &&
13987
- last_request_at > 0);
13975
+ last_request_at.length > 0);
13988
13976
  },
13989
13977
  login: function (v) {
13990
13978
  var login = v.login;
@@ -14101,7 +14089,7 @@ var UserRemoteDTOMapper = /** @class */ (function () {
14101
14089
  email: '',
14102
14090
  full_name: '',
14103
14091
  id: 0,
14104
- last_request_at: 0,
14092
+ last_request_at: '',
14105
14093
  login: '',
14106
14094
  updated_at: '',
14107
14095
  user_tags: '',
@@ -14127,8 +14115,10 @@ __webpack_require__.r(__webpack_exports__);
14127
14115
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14128
14116
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14129
14117
  /* harmony export */ });
14130
- /* harmony import */ var _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/use_cases/base/Subscribable/SubscriptionPerformer */ "./src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts");
14131
- /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/parse */ "./src/utils/parse.ts");
14118
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
14119
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
14120
+ /* harmony import */ var _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/use_cases/base/Subscribable/SubscriptionPerformer */ "./src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts");
14121
+ /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/parse */ "./src/utils/parse.ts");
14132
14122
  var __extends = (undefined && undefined.__extends) || (function () {
14133
14123
  var extendStatics = function (d, b) {
14134
14124
  extendStatics = Object.setPrototypeOf ||
@@ -14182,6 +14172,7 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
14182
14172
  };
14183
14173
 
14184
14174
 
14175
+
14185
14176
  var ConnectionRepository = /** @class */ (function (_super) {
14186
14177
  __extends(ConnectionRepository, _super);
14187
14178
  function ConnectionRepository() {
@@ -14193,7 +14184,7 @@ var ConnectionRepository = /** @class */ (function (_super) {
14193
14184
  }
14194
14185
  Object.defineProperty(ConnectionRepository.prototype, "needInit", {
14195
14186
  get: function () {
14196
- var chatConnection = QB && QB.chat && QB.chat.isConnected;
14187
+ var chatConnection = (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default()) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.isConnected);
14197
14188
  if (chatConnection)
14198
14189
  return false;
14199
14190
  return this._needInit;
@@ -14205,7 +14196,7 @@ var ConnectionRepository = /** @class */ (function (_super) {
14205
14196
  configurable: true
14206
14197
  });
14207
14198
  ConnectionRepository.prototype.isChatConnected = function () {
14208
- var chatConnection = QB && QB.chat && QB.chat.isConnected;
14199
+ var chatConnection = (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default()) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.isConnected);
14209
14200
  if (chatConnection)
14210
14201
  return true;
14211
14202
  return this.chatConnectedStatus;
@@ -14282,9 +14273,9 @@ var ConnectionRepository = /** @class */ (function (_super) {
14282
14273
  pingChat = function () {
14283
14274
  return new Promise(function (resolve, reject) {
14284
14275
  try {
14285
- QB.chat.ping(function (error) {
14276
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.ping(function (error) {
14286
14277
  if (error) {
14287
- console.log('ping failed: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
14278
+ console.log('ping failed: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_2__.stringifyError)(error));
14288
14279
  resolve('failed');
14289
14280
  }
14290
14281
  else {
@@ -14293,7 +14284,7 @@ var ConnectionRepository = /** @class */ (function (_super) {
14293
14284
  });
14294
14285
  }
14295
14286
  catch (e) {
14296
- console.log('EXCEPTION PING in ChatServerPing: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(e));
14287
+ console.log('EXCEPTION PING in ChatServerPing: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_2__.stringifyError)(e));
14297
14288
  reject();
14298
14289
  }
14299
14290
  });
@@ -14317,7 +14308,7 @@ var ConnectionRepository = /** @class */ (function (_super) {
14317
14308
  ConnectionRepository.PING_ALIVE_INTERVAL = 60000;
14318
14309
  ConnectionRepository.PING_TIMEOUT = 5000;
14319
14310
  return ConnectionRepository;
14320
- }(_Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_0__.SubscriptionPerformer));
14311
+ }(_Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_1__.SubscriptionPerformer));
14321
14312
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionRepository);
14322
14313
 
14323
14314
 
@@ -15722,48 +15713,49 @@ var UsersRepository = /** @class */ (function () {
15722
15713
  };
15723
15714
  // eslint-disable-next-line class-methods-use-this
15724
15715
  UsersRepository.prototype.getUsersFromRemote = function (usersIds) {
15716
+ var _a;
15725
15717
  return __awaiter(this, void 0, void 0, function () {
15726
15718
  var arrayUserDTO, i, dto, users, _i, arrayUserDTO_2, item, entity, e_4;
15727
- return __generator(this, function (_a) {
15728
- switch (_a.label) {
15719
+ return __generator(this, function (_b) {
15720
+ switch (_b.label) {
15729
15721
  case 0:
15730
15722
  arrayUserDTO = new Array();
15731
- _a.label = 1;
15723
+ _b.label = 1;
15732
15724
  case 1:
15733
- _a.trys.push([1, 10, , 11]);
15725
+ _b.trys.push([1, 10, , 11]);
15734
15726
  i = 0;
15735
- _a.label = 2;
15727
+ _b.label = 2;
15736
15728
  case 2:
15737
15729
  if (!(i < usersIds.length)) return [3 /*break*/, 5];
15738
15730
  dto = new _dto_user_RemoteUserDTO__WEBPACK_IMPORTED_MODULE_3__.RemoteUserDTO();
15739
- dto.id = usersIds[i].toString();
15731
+ dto.id = ((_a = usersIds[i]) === null || _a === void 0 ? void 0 : _a.toString()) || '-1';
15740
15732
  return [4 /*yield*/, this.remoteDataSource.getUser(dto)];
15741
15733
  case 3:
15742
15734
  // eslint-disable-next-line no-await-in-loop
15743
- dto = _a.sent();
15735
+ dto = _b.sent();
15744
15736
  arrayUserDTO.push(dto);
15745
- _a.label = 4;
15737
+ _b.label = 4;
15746
15738
  case 4:
15747
15739
  i += 1;
15748
15740
  return [3 /*break*/, 2];
15749
15741
  case 5:
15750
15742
  users = new Array();
15751
15743
  _i = 0, arrayUserDTO_2 = arrayUserDTO;
15752
- _a.label = 6;
15744
+ _b.label = 6;
15753
15745
  case 6:
15754
15746
  if (!(_i < arrayUserDTO_2.length)) return [3 /*break*/, 9];
15755
15747
  item = arrayUserDTO_2[_i];
15756
15748
  return [4 /*yield*/, this.userRemoteDTOMapper.toEntity(item)];
15757
15749
  case 7:
15758
- entity = _a.sent();
15750
+ entity = _b.sent();
15759
15751
  users.push(entity);
15760
- _a.label = 8;
15752
+ _b.label = 8;
15761
15753
  case 8:
15762
15754
  _i++;
15763
15755
  return [3 /*break*/, 6];
15764
15756
  case 9: return [2 /*return*/, Promise.resolve(users)];
15765
15757
  case 10:
15766
- e_4 = _a.sent();
15758
+ e_4 = _b.sent();
15767
15759
  return [2 /*return*/, Promise.reject(e_4)];
15768
15760
  case 11: return [2 /*return*/];
15769
15761
  }
@@ -16579,7 +16571,7 @@ var DialogDTOMapper = /** @class */ (function () {
16579
16571
  last_message: DialogDTOMapper.formatLastMessageText(dialogDTO.lastMessageText),
16580
16572
  last_message_date_sent: dialogDTO.lastMessageDateSent,
16581
16573
  last_message_id: null,
16582
- last_message_user_id: parseInt(dialogDTO.lastMessageUserId, 10),
16574
+ last_message_user_id: dialogDTO.lastMessageUserId,
16583
16575
  name: dialogDTO.name,
16584
16576
  occupants_ids: dialogDTO.participantsIds,
16585
16577
  new_occupants_ids: dialogDTO.newParticipantsIds
@@ -16603,11 +16595,13 @@ var DialogDTOMapper = /** @class */ (function () {
16603
16595
  dto.id = qbDialog._id;
16604
16596
  dto.lastMessageId = qbDialog.last_message_id || '';
16605
16597
  dto.lastMessageText = qbDialog.last_message;
16606
- dto.lastMessageDateSent = qbDialog.last_message_date_sent;
16598
+ dto.lastMessageDateSent = qbDialog.last_message_date_sent || 0;
16607
16599
  dto.lastMessageUserId =
16608
16600
  qbDialog.last_message_user_id === null
16609
- ? ''
16610
- : qbDialog.last_message_user_id.toString();
16601
+ ? 0
16602
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16603
+ qbDialog.last_message_user_id;
16604
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16611
16605
  dto.ownerId = qbDialog.user_id.toString();
16612
16606
  dto.type = qbDialog.type;
16613
16607
  dto.unreadMessageCount =
@@ -16615,6 +16609,7 @@ var DialogDTOMapper = /** @class */ (function () {
16615
16609
  ? 0
16616
16610
  : qbDialog.unread_messages_count;
16617
16611
  dto.updatedAt = qbDialog.updated_at;
16612
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16618
16613
  dto.participantId = qbDialog.user_id.toString();
16619
16614
  dto.name = qbDialog.name;
16620
16615
  dto.photo = qbDialog.photo === null ? '' : qbDialog.photo;
@@ -16626,14 +16621,17 @@ var DialogDTOMapper = /** @class */ (function () {
16626
16621
  var interlocutorId = dto.participantsIds.find(function (p) { return p !== _this.currentUserId; }); // ;
16627
16622
  dto.participantId = interlocutorId
16628
16623
  ? interlocutorId.toString()
16629
- : qbDialog.user_id.toString();
16624
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16625
+ qbDialog.user_id.toString();
16630
16626
  dto.id = qbDialog._id;
16631
16627
  dto.lastMessageText = qbDialog.last_message;
16632
- dto.lastMessageDateSent = qbDialog.last_message_date_sent;
16628
+ dto.lastMessageDateSent = qbDialog.last_message_date_sent || 0;
16633
16629
  dto.lastMessageUserId =
16634
16630
  qbDialog.last_message_user_id === null
16635
- ? ''
16636
- : qbDialog.last_message_user_id.toString();
16631
+ ? 0
16632
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16633
+ qbDialog.last_message_user_id;
16634
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16637
16635
  dto.ownerId = qbDialog.user_id.toString();
16638
16636
  dto.type = qbDialog.type;
16639
16637
  dto.unreadMessageCount =
@@ -16645,11 +16643,13 @@ var DialogDTOMapper = /** @class */ (function () {
16645
16643
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["public"]:
16646
16644
  dto.id = qbDialog._id;
16647
16645
  dto.lastMessageText = qbDialog.last_message;
16648
- dto.lastMessageDateSent = qbDialog.last_message_date_sent;
16646
+ dto.lastMessageDateSent = qbDialog.last_message_date_sent || 0;
16649
16647
  dto.lastMessageUserId =
16650
16648
  qbDialog.last_message_user_id === null
16651
- ? ''
16652
- : qbDialog.last_message_user_id.toString();
16649
+ ? 0
16650
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16651
+ qbDialog.last_message_user_id;
16652
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16653
16653
  dto.ownerId = qbDialog.user_id.toString();
16654
16654
  dto.type = qbDialog.type;
16655
16655
  dto.unreadMessageCount =
@@ -16657,6 +16657,7 @@ var DialogDTOMapper = /** @class */ (function () {
16657
16657
  ? 0
16658
16658
  : qbDialog.unread_messages_count;
16659
16659
  dto.updatedAt = qbDialog.updated_at;
16660
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16660
16661
  dto.participantId = qbDialog.user_id.toString();
16661
16662
  dto.name = qbDialog.name;
16662
16663
  dto.photo = qbDialog.photo === null ? '' : qbDialog.photo;
@@ -16664,11 +16665,13 @@ var DialogDTOMapper = /** @class */ (function () {
16664
16665
  case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType.group:
16665
16666
  dto.id = qbDialog._id;
16666
16667
  dto.lastMessageText = qbDialog.last_message;
16667
- dto.lastMessageDateSent = qbDialog.last_message_date_sent;
16668
+ dto.lastMessageDateSent = qbDialog.last_message_date_sent || 0;
16668
16669
  dto.lastMessageUserId =
16669
16670
  qbDialog.last_message_user_id === null
16670
- ? ''
16671
- : qbDialog.last_message_user_id.toString();
16671
+ ? 0
16672
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16673
+ qbDialog.last_message_user_id;
16674
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
16672
16675
  dto.ownerId = qbDialog.user_id.toString();
16673
16676
  dto.type = qbDialog.type;
16674
16677
  dto.unreadMessageCount =
@@ -16868,8 +16871,11 @@ __webpack_require__.r(__webpack_exports__);
16868
16871
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16869
16872
  /* harmony export */ "FileDTOMapper": () => (/* binding */ FileDTOMapper)
16870
16873
  /* harmony export */ });
16871
- /* harmony import */ var _dto_file_RemoteFileDTO__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../dto/file/RemoteFileDTO */ "./src/Data/dto/file/RemoteFileDTO.ts");
16872
- /* harmony import */ var _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
16874
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
16875
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
16876
+ /* harmony import */ var _dto_file_RemoteFileDTO__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../dto/file/RemoteFileDTO */ "./src/Data/dto/file/RemoteFileDTO.ts");
16877
+ /* harmony import */ var _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
16878
+
16873
16879
 
16874
16880
 
16875
16881
  var FileDTOMapper = /** @class */ (function () {
@@ -16894,12 +16900,12 @@ var FileDTOMapper = /** @class */ (function () {
16894
16900
  var _a, _b;
16895
16901
  var qbFile = qbEntity;
16896
16902
  FileDTOMapper.validateQBFileDialog(qbFile);
16897
- var dto = new _dto_file_RemoteFileDTO__WEBPACK_IMPORTED_MODULE_0__.RemoteFileDTO();
16903
+ var dto = new _dto_file_RemoteFileDTO__WEBPACK_IMPORTED_MODULE_1__.RemoteFileDTO();
16898
16904
  dto.id = ((_a = qbFile.id) === null || _a === void 0 ? void 0 : _a.toString()) || '';
16899
16905
  dto.type = qbFile.content_type || '';
16900
16906
  dto.uid = ((_b = qbFile.uid) === null || _b === void 0 ? void 0 : _b.toString()) || '';
16901
16907
  dto.url =
16902
- qbFile.uid.toString() && QB.content.privateUrl(qbFile.uid.toString());
16908
+ qbFile.uid.toString() && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(qbFile.uid.toString());
16903
16909
  dto.name = qbFile.name || '';
16904
16910
  dto.size = qbFile.size || 0;
16905
16911
  return Promise.resolve(dto);
@@ -16937,19 +16943,19 @@ var FileDTOMapper = /** @class */ (function () {
16937
16943
  },
16938
16944
  };
16939
16945
  if (!fileDTOValidator.id(fileDTO))
16940
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exists or empty in DTO');
16946
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exists or empty in DTO');
16941
16947
  if (!fileDTOValidator.name(fileDTO))
16942
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty in DTO');
16948
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exist or empty in DTO');
16943
16949
  if (!fileDTOValidator.data(fileDTO))
16944
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {data} does not exists or empty in DTO');
16950
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {data} does not exists or empty in DTO');
16945
16951
  if (!fileDTOValidator.url(fileDTO))
16946
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {url} does not exist or empty in DTO');
16952
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {url} does not exist or empty in DTO');
16947
16953
  if (!fileDTOValidator.size(fileDTO))
16948
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty in DTO');
16954
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty in DTO');
16949
16955
  if (!fileDTOValidator.uid(fileDTO))
16950
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {uid} does not exist or empty in DTO');
16956
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {uid} does not exist or empty in DTO');
16951
16957
  if (!fileDTOValidator.type(fileDTO))
16952
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty in DTO');
16958
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {type} does not exist or empty in DTO');
16953
16959
  return Promise.resolve();
16954
16960
  };
16955
16961
  FileDTOMapper.validateQBFileDialog = function (qbFile) {
@@ -16998,23 +17004,23 @@ var FileDTOMapper = /** @class */ (function () {
16998
17004
  },
16999
17005
  };
17000
17006
  if (!qbFileValidator.account_id(qbFile))
17001
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {account_id} does not exists or empty');
17007
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {account_id} does not exists or empty');
17002
17008
  if (!qbFileValidator.app_id(qbFile))
17003
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {app_id} does not exists or empty');
17009
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {app_id} does not exists or empty');
17004
17010
  if (!qbFileValidator.content_type(qbFile))
17005
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {content_type} does not exists or empty');
17011
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {content_type} does not exists or empty');
17006
17012
  if (!qbFileValidator.created_at(qbFile))
17007
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exists or empty');
17013
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exists or empty');
17008
17014
  if (!qbFileValidator.id(qbFile))
17009
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exists or empty');
17015
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exists or empty');
17010
17016
  if (!qbFileValidator.name(qbFile))
17011
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exists or empty');
17017
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {name} does not exists or empty');
17012
17018
  if (!qbFileValidator.size(qbFile))
17013
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17019
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17014
17020
  if (!qbFileValidator.uid(qbFile))
17015
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17021
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17016
17022
  if (!qbFileValidator.updated_at(qbFile))
17017
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17023
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {size} does not exists or empty');
17018
17024
  };
17019
17025
  return FileDTOMapper;
17020
17026
  }());
@@ -17034,8 +17040,11 @@ __webpack_require__.r(__webpack_exports__);
17034
17040
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17035
17041
  /* harmony export */ "MessageDTOMapper": () => (/* binding */ MessageDTOMapper)
17036
17042
  /* harmony export */ });
17037
- /* harmony import */ var _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../dto/message/RemoteMessageDTO */ "./src/Data/dto/message/RemoteMessageDTO.ts");
17038
- /* harmony import */ var _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
17043
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
17044
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
17045
+ /* harmony import */ var _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../dto/message/RemoteMessageDTO */ "./src/Data/dto/message/RemoteMessageDTO.ts");
17046
+ /* harmony import */ var _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../exception/MapperDTOException */ "./src/Data/source/exception/MapperDTOException.ts");
17047
+
17039
17048
 
17040
17049
 
17041
17050
  var MessageDTOMapper = /** @class */ (function () {
@@ -17071,14 +17080,14 @@ var MessageDTOMapper = /** @class */ (function () {
17071
17080
  size: item.size,
17072
17081
  type: item.type,
17073
17082
  uid: item.uid,
17074
- url: item.uid && QB.content.privateUrl(item.uid),
17083
+ url: item.uid && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(item.uid),
17075
17084
  file: {
17076
17085
  id: item.id,
17077
17086
  name: item.name,
17078
17087
  size: item.size,
17079
17088
  type: item.type,
17080
17089
  uid: item.uid || '',
17081
- url: item.uid && QB.content.privateUrl(item.uid),
17090
+ url: item.uid && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(item.uid),
17082
17091
  },
17083
17092
  };
17084
17093
  var messageParts = MessageDTOMapper.getMessageParts(qbMessage);
@@ -17091,11 +17100,11 @@ var MessageDTOMapper = /** @class */ (function () {
17091
17100
  newItem.name = messageParts[1];
17092
17101
  // eslint-disable-next-line prefer-destructuring
17093
17102
  newItem.type = messageParts[3];
17094
- newItem.url = newItem.uid && QB.content.privateUrl(newItem.uid);
17103
+ newItem.url = newItem.uid && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(newItem.uid);
17095
17104
  if (newItem.file) {
17096
17105
  newItem.file.uid = newItem.uid;
17097
17106
  newItem.file.name = newItem.name;
17098
- newItem.file.url = newItem.uid && QB.content.privateUrl(newItem.uid);
17107
+ newItem.file.url = newItem.uid && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.privateUrl(newItem.uid);
17099
17108
  newItem.file.type = newItem.type;
17100
17109
  }
17101
17110
  }
@@ -17138,7 +17147,7 @@ var MessageDTOMapper = /** @class */ (function () {
17138
17147
  // eslint-disable-next-line class-methods-use-this
17139
17148
  MessageDTOMapper.prototype.QBChatMessageToRemoteMessageDTO = function (qbMessage, offValidate) {
17140
17149
  if (offValidate === void 0) { offValidate = false; }
17141
- var dto = new _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_0__.RemoteMessageDTO();
17150
+ var dto = new _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_1__.RemoteMessageDTO();
17142
17151
  if (!offValidate) {
17143
17152
  // original version
17144
17153
  MessageDTOMapper.validateQBMessage(qbMessage);
@@ -17325,27 +17334,27 @@ var MessageDTOMapper = /** @class */ (function () {
17325
17334
  },
17326
17335
  };
17327
17336
  if (!messageDTOValidator.created_at(messageDTO))
17328
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exist or empty');
17337
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exist or empty');
17329
17338
  if (!messageDTOValidator.date_sent(messageDTO))
17330
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {date_sent} does not exist or empty');
17339
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {date_sent} does not exist or empty');
17331
17340
  if (!messageDTOValidator.delivered_ids(messageDTO))
17332
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {delivered_ids} does not exist or empty');
17341
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {delivered_ids} does not exist or empty');
17333
17342
  if (!messageDTOValidator.dialogId(messageDTO))
17334
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {dialogId} does not exist or empty');
17343
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {dialogId} does not exist or empty');
17335
17344
  if (!messageDTOValidator.id(messageDTO))
17336
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
17345
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {id} does not exist or empty');
17337
17346
  if (!messageDTOValidator.message(messageDTO))
17338
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {message} does not exist or empty');
17347
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {message} does not exist or empty');
17339
17348
  if (!messageDTOValidator.read(messageDTO))
17340
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read} does not exist or empty');
17349
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read} does not exist or empty');
17341
17350
  if (!messageDTOValidator.read_ids(messageDTO))
17342
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read_ids} does not exist or empty');
17351
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read_ids} does not exist or empty');
17343
17352
  if (!messageDTOValidator.recipient_id(messageDTO))
17344
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {recipient_id} does not exist or empty');
17353
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {recipient_id} does not exist or empty');
17345
17354
  if (!messageDTOValidator.sender_id(messageDTO))
17346
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {sender_id} does not exist or empty');
17355
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {sender_id} does not exist or empty');
17347
17356
  if (!messageDTOValidator.updated_at(messageDTO))
17348
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updated_at} does not exist or empty');
17357
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updated_at} does not exist or empty');
17349
17358
  };
17350
17359
  MessageDTOMapper.validateQBMessage = function (qbMessage) {
17351
17360
  var qbMessageValidator = {
@@ -17405,23 +17414,23 @@ var MessageDTOMapper = /** @class */ (function () {
17405
17414
  },
17406
17415
  };
17407
17416
  if (!qbMessageValidator._id(qbMessage))
17408
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {_id} does not exist or empty');
17417
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {_id} does not exist or empty');
17409
17418
  if (!qbMessageValidator.chat_dialog_id(qbMessage))
17410
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {chat_dialog_id} does not exist or empty');
17419
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {chat_dialog_id} does not exist or empty');
17411
17420
  if (!qbMessageValidator.created_at(qbMessage))
17412
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exist or empty');
17421
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {created_at} does not exist or empty');
17413
17422
  if (!qbMessageValidator.date_sent(qbMessage))
17414
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {date_sent} does not exist or empty');
17423
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {date_sent} does not exist or empty');
17415
17424
  if (!qbMessageValidator.message(qbMessage))
17416
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {message} does not exist or empty');
17425
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {message} does not exist or empty');
17417
17426
  if (!qbMessageValidator.read(qbMessage))
17418
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read} does not exist or empty');
17427
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {read} does not exist or empty');
17419
17428
  if (!qbMessageValidator.recipient_id(qbMessage))
17420
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {recipient_id} does not exist or empty');
17429
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {recipient_id} does not exist or empty');
17421
17430
  if (!qbMessageValidator.sender_id(qbMessage))
17422
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {sender_id} does not exist or empty');
17431
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {sender_id} does not exist or empty');
17423
17432
  if (!qbMessageValidator.updated_at(qbMessage))
17424
- throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updated_at} does not exist or empty');
17433
+ throw new _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.MapperDTOException(_exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE, _exception_MapperDTOException__WEBPACK_IMPORTED_MODULE_2__.INCORRECT_DATA_MAPPER_DTO_EXCEPTION_CODE, 'field {updated_at} does not exist or empty');
17425
17434
  };
17426
17435
  //
17427
17436
  MessageDTOMapper.FORWARD_MESSAGE_PREFIX = '[Forwarded_Message]';
@@ -17659,25 +17668,27 @@ __webpack_require__.r(__webpack_exports__);
17659
17668
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17660
17669
  /* harmony export */ "RemoteDataSource": () => (/* binding */ RemoteDataSource)
17661
17670
  /* harmony export */ });
17662
- /* harmony import */ var _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../exception/RemoteDataSourceException */ "./src/Data/source/exception/RemoteDataSourceException.ts");
17663
- /* harmony import */ var _dto_dialog_RemoteDialogsDTO__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dto/dialog/RemoteDialogsDTO */ "./src/Data/dto/dialog/RemoteDialogsDTO.ts");
17664
- /* harmony import */ var _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dto/message/RemoteMessageDTO */ "./src/Data/dto/message/RemoteMessageDTO.ts");
17665
- /* harmony import */ var _dto_user_RemoteUsersDTO__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dto/user/RemoteUsersDTO */ "./src/Data/dto/user/RemoteUsersDTO.ts");
17666
- /* harmony import */ var _dto_message_RemoteMessagesDTO__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dto/message/RemoteMessagesDTO */ "./src/Data/dto/message/RemoteMessagesDTO.ts");
17667
- /* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Domain/repository/Pagination */ "./src/Domain/repository/Pagination.ts");
17668
- /* harmony import */ var _Mapper_DialogDTOMapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Mapper/DialogDTOMapper */ "./src/Data/source/remote/Mapper/DialogDTOMapper.ts");
17669
- /* harmony import */ var _Stubs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Stubs */ "./src/Data/Stubs.ts");
17670
- /* harmony import */ var _qb_api_calls__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../qb-api-calls */ "./src/qb-api-calls/index.ts");
17671
- /* harmony import */ var _Mapper_UserDTOMapper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Mapper/UserDTOMapper */ "./src/Data/source/remote/Mapper/UserDTOMapper.ts");
17672
- /* harmony import */ var _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Mapper/MessageDTOMapper */ "./src/Data/source/remote/Mapper/MessageDTOMapper.ts");
17673
- /* harmony import */ var _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../mapper/DialogRemoteDTOMapper */ "./src/Data/mapper/DialogRemoteDTOMapper.ts");
17674
- /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/parse */ "./src/utils/parse.ts");
17675
- /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
17676
- /* harmony import */ var _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../Domain/entity/NotificationTypes */ "./src/Domain/entity/NotificationTypes.ts");
17677
- /* harmony import */ var _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../Domain/entity/EventMessageType */ "./src/Domain/entity/EventMessageType.ts");
17678
- /* harmony import */ var _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer */ "./src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts");
17679
- /* harmony import */ var _Mapper_FileDTOMapper__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Mapper/FileDTOMapper */ "./src/Data/source/remote/Mapper/FileDTOMapper.ts");
17680
- /* harmony import */ var _QBconfig__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../QBconfig */ "./src/QBconfig.ts");
17671
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
17672
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
17673
+ /* harmony import */ var _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../exception/RemoteDataSourceException */ "./src/Data/source/exception/RemoteDataSourceException.ts");
17674
+ /* harmony import */ var _dto_dialog_RemoteDialogsDTO__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dto/dialog/RemoteDialogsDTO */ "./src/Data/dto/dialog/RemoteDialogsDTO.ts");
17675
+ /* harmony import */ var _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dto/message/RemoteMessageDTO */ "./src/Data/dto/message/RemoteMessageDTO.ts");
17676
+ /* harmony import */ var _dto_user_RemoteUsersDTO__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dto/user/RemoteUsersDTO */ "./src/Data/dto/user/RemoteUsersDTO.ts");
17677
+ /* harmony import */ var _dto_message_RemoteMessagesDTO__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dto/message/RemoteMessagesDTO */ "./src/Data/dto/message/RemoteMessagesDTO.ts");
17678
+ /* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Domain/repository/Pagination */ "./src/Domain/repository/Pagination.ts");
17679
+ /* harmony import */ var _Mapper_DialogDTOMapper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Mapper/DialogDTOMapper */ "./src/Data/source/remote/Mapper/DialogDTOMapper.ts");
17680
+ /* harmony import */ var _Stubs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Stubs */ "./src/Data/Stubs.ts");
17681
+ /* harmony import */ var _qb_api_calls__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../qb-api-calls */ "./src/qb-api-calls/index.ts");
17682
+ /* harmony import */ var _Mapper_UserDTOMapper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Mapper/UserDTOMapper */ "./src/Data/source/remote/Mapper/UserDTOMapper.ts");
17683
+ /* harmony import */ var _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Mapper/MessageDTOMapper */ "./src/Data/source/remote/Mapper/MessageDTOMapper.ts");
17684
+ /* harmony import */ var _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../mapper/DialogRemoteDTOMapper */ "./src/Data/mapper/DialogRemoteDTOMapper.ts");
17685
+ /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../utils/parse */ "./src/utils/parse.ts");
17686
+ /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
17687
+ /* harmony import */ var _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../Domain/entity/NotificationTypes */ "./src/Domain/entity/NotificationTypes.ts");
17688
+ /* harmony import */ var _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../Domain/entity/EventMessageType */ "./src/Domain/entity/EventMessageType.ts");
17689
+ /* harmony import */ var _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer */ "./src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts");
17690
+ /* harmony import */ var _Mapper_FileDTOMapper__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Mapper/FileDTOMapper */ "./src/Data/source/remote/Mapper/FileDTOMapper.ts");
17691
+ /* harmony import */ var _QBconfig__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../QBconfig */ "./src/QBconfig.ts");
17681
17692
  var __assign = (undefined && undefined.__assign) || function () {
17682
17693
  __assign = Object.assign || function(t) {
17683
17694
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -17744,32 +17755,33 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
17744
17755
 
17745
17756
 
17746
17757
 
17758
+
17747
17759
  var RemoteDataSource = /** @class */ (function () {
17748
17760
  //
17749
17761
  function RemoteDataSource() {
17750
17762
  this.subscriptionOnSystemMessages = {};
17751
- this.subscriptionOnChatMessages = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17752
- this.subscriptionOnMessageStatus = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17753
- this.subscriptionOnSessionExpiredListener = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17763
+ this.subscriptionOnChatMessages = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17764
+ this.subscriptionOnMessageStatus = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17765
+ this.subscriptionOnSessionExpiredListener = new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17754
17766
  console.log('CONSTRUCTOR RemoteDataSourceMock');
17755
- this.userDTOMapper = new _Mapper_UserDTOMapper__WEBPACK_IMPORTED_MODULE_9__.UserDTOMapper();
17756
- this.messageDTOMapper = new _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_10__.MessageDTOMapper();
17757
- this.fileDTOMapper = new _Mapper_FileDTOMapper__WEBPACK_IMPORTED_MODULE_17__.FileDTOMapper();
17767
+ this.userDTOMapper = new _Mapper_UserDTOMapper__WEBPACK_IMPORTED_MODULE_10__.UserDTOMapper();
17768
+ this.messageDTOMapper = new _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_11__.MessageDTOMapper();
17769
+ this.fileDTOMapper = new _Mapper_FileDTOMapper__WEBPACK_IMPORTED_MODULE_18__.FileDTOMapper();
17758
17770
  this._needInit = true;
17759
17771
  this._authProcessed = false;
17760
- this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.REMOVE_USER] =
17761
- new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17762
- this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.UPDATE_DIALOG] =
17763
- new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17764
- this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.DELETE_LEAVE_DIALOG] =
17765
- new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17766
- this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.NEW_DIALOG] =
17767
- new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_16__.SubscriptionPerformer();
17772
+ this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.REMOVE_USER] =
17773
+ new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17774
+ this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.UPDATE_DIALOG] =
17775
+ new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17776
+ this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.DELETE_LEAVE_DIALOG] =
17777
+ new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17778
+ this.subscriptionOnSystemMessages[_Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.NEW_DIALOG] =
17779
+ new _Domain_use_cases_base_Subscribable_SubscriptionPerformer__WEBPACK_IMPORTED_MODULE_17__.SubscriptionPerformer();
17768
17780
  }
17769
17781
  Object.defineProperty(RemoteDataSource.prototype, "authProcessed", {
17770
17782
  get: function () {
17771
17783
  var auth = this._authProcessed;
17772
- var chatConnection = QB && QB.chat && QB.chat.isConnected;
17784
+ var chatConnection = (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default()) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.isConnected);
17773
17785
  if (chatConnection)
17774
17786
  return true;
17775
17787
  return auth || chatConnection;
@@ -17783,7 +17795,7 @@ var RemoteDataSource = /** @class */ (function () {
17783
17795
  Object.defineProperty(RemoteDataSource.prototype, "needInit", {
17784
17796
  get: function () {
17785
17797
  var needed = this._needInit;
17786
- var chatConnection = QB && QB.chat && QB.chat.isConnected;
17798
+ var chatConnection = (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default()) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat) && (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.isConnected);
17787
17799
  if (chatConnection)
17788
17800
  return false;
17789
17801
  return needed;
@@ -17812,11 +17824,42 @@ var RemoteDataSource = /** @class */ (function () {
17812
17824
  RemoteDataSource.prototype.getCurrentDialogDTOMapper = function () {
17813
17825
  var _a;
17814
17826
  var currentUserId = ((_a = this._authInformation) === null || _a === void 0 ? void 0 : _a.userId) || -1;
17815
- var dialogDTOMapper = new _Mapper_DialogDTOMapper__WEBPACK_IMPORTED_MODULE_6__.DialogDTOMapper(currentUserId);
17827
+ var dialogDTOMapper = new _Mapper_DialogDTOMapper__WEBPACK_IMPORTED_MODULE_7__.DialogDTOMapper(currentUserId);
17816
17828
  return dialogDTOMapper;
17817
17829
  };
17818
17830
  RemoteDataSource.prototype.updateCurrentDialog = function (dto) {
17819
- this.currentDialog = dto;
17831
+ var _a;
17832
+ return __awaiter(this, void 0, void 0, function () {
17833
+ var dialogsDTOtoEntityMapper, dialogEntity, userId, dialogId, messageId, resultMessage;
17834
+ return __generator(this, function (_b) {
17835
+ switch (_b.label) {
17836
+ case 0:
17837
+ this.currentDialog = dto;
17838
+ dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_12__.DialogRemoteDTOMapper();
17839
+ return [4 /*yield*/, dialogsDTOtoEntityMapper.toEntity(this.currentDialog)];
17840
+ case 1:
17841
+ dialogEntity = _b.sent();
17842
+ userId = ((_a = this._authInformation) === null || _a === void 0 ? void 0 : _a.userId) || -1;
17843
+ dialogId = this.currentDialog.id;
17844
+ messageId = this.currentDialog.lastMessageId;
17845
+ resultMessage = {
17846
+ eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage,
17847
+ dialogInfo: dialogEntity,
17848
+ messageInfo: undefined,
17849
+ messageStatus: {
17850
+ isTyping: false,
17851
+ userId: userId,
17852
+ dialogId: dialogId,
17853
+ messageId: messageId,
17854
+ deliveryStatus: 'delivered',
17855
+ },
17856
+ notificationTypes: undefined,
17857
+ };
17858
+ this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
17859
+ return [2 /*return*/];
17860
+ }
17861
+ });
17862
+ });
17820
17863
  };
17821
17864
  RemoteDataSource.prototype.setUpMockStorage = function () {
17822
17865
  return __awaiter(this, void 0, void 0, function () {
@@ -17824,8 +17867,8 @@ var RemoteDataSource = /** @class */ (function () {
17824
17867
  return __generator(this, function (_a) {
17825
17868
  switch (_a.label) {
17826
17869
  case 0:
17827
- dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_11__.DialogRemoteDTOMapper();
17828
- dialogsEntities = _Stubs__WEBPACK_IMPORTED_MODULE_7__.Stubs.createDialogsForTest();
17870
+ dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_12__.DialogRemoteDTOMapper();
17871
+ dialogsEntities = _Stubs__WEBPACK_IMPORTED_MODULE_8__.Stubs.createDialogsForTest();
17829
17872
  _loop_1 = function (item) {
17830
17873
  var dialogDTO;
17831
17874
  return __generator(this, function (_b) {
@@ -17874,7 +17917,7 @@ var RemoteDataSource = /** @class */ (function () {
17874
17917
  var session;
17875
17918
  return __generator(this, function (_a) {
17876
17919
  switch (_a.label) {
17877
- case 0: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBCreateSession)(loginData)];
17920
+ case 0: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBCreateSession)(loginData)];
17878
17921
  case 1:
17879
17922
  session = _a.sent();
17880
17923
  return [2 /*return*/, session];
@@ -17892,14 +17935,14 @@ var RemoteDataSource = /** @class */ (function () {
17892
17935
  }
17893
17936
  else {
17894
17937
  console.log('2. start init actions');
17895
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBInit)({
17938
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBInit)({
17896
17939
  appIdOrToken: sdkParams.appIdOrToken,
17897
17940
  authKeyOrAppId: sdkParams.authKeyOrAppId,
17898
17941
  authSecret: sdkParams.authSecret,
17899
17942
  accountKey: sdkParams.accountKey,
17900
17943
  config: sdkParams.config,
17901
17944
  });
17902
- var QuickBloxVersion = "CALL initData: Init SDK was success: version ".concat(QB.version, " build ").concat(QB.buildNumber);
17945
+ var QuickBloxVersion = "CALL initData: Init SDK was success: version ".concat((quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().version), " build ").concat((quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().buildNumber));
17903
17946
  console.log(QuickBloxVersion);
17904
17947
  return true;
17905
17948
  }
@@ -17913,14 +17956,14 @@ var RemoteDataSource = /** @class */ (function () {
17913
17956
  console.log('2. call initSDK in RemoteDataSourceMock');
17914
17957
  if (!this.needInit) return [3 /*break*/, 2];
17915
17958
  console.log('2. start init actions');
17916
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBInit)({
17959
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBInit)({
17917
17960
  appIdOrToken: sdkParams.appIdOrToken,
17918
17961
  authKeyOrAppId: sdkParams.authKeyOrAppId,
17919
17962
  authSecret: sdkParams.authSecret,
17920
17963
  accountKey: sdkParams.accountKey,
17921
17964
  config: sdkParams.config,
17922
17965
  });
17923
- QuickBloxVersion = "CALL initData: Init SDK was success: version ".concat(QB.version, " build ").concat(QB.buildNumber);
17966
+ QuickBloxVersion = "CALL initData: Init SDK was success: version ".concat((quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().version), " build ").concat((quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().buildNumber));
17924
17967
  console.log(QuickBloxVersion);
17925
17968
  //
17926
17969
  this._needInit = false;
@@ -17939,8 +17982,8 @@ var RemoteDataSource = /** @class */ (function () {
17939
17982
  switch (_a.label) {
17940
17983
  case 0:
17941
17984
  if (!this.authProcessed) return [3 /*break*/, 2];
17942
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatDisconnect)();
17943
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBLogout)()];
17985
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatDisconnect)();
17986
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBLogout)()];
17944
17987
  case 1:
17945
17988
  _a.sent();
17946
17989
  this.authProcessed = false;
@@ -17960,61 +18003,61 @@ var RemoteDataSource = /** @class */ (function () {
17960
18003
  });
17961
18004
  };
17962
18005
  RemoteDataSource.prototype.subscribeOnSystemMessaging = function (notificationType, callback) {
17963
- var SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.NEW_DIALOG;
18006
+ var SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.NEW_DIALOG;
17964
18007
  switch (notificationType) {
17965
- case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.REMOVE_USER:
17966
- SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.REMOVE_USER;
18008
+ case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.REMOVE_USER:
18009
+ SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.REMOVE_USER;
17967
18010
  break;
17968
- case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.DELETE_LEAVE_DIALOG:
17969
- SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.DELETE_LEAVE_DIALOG;
18011
+ case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.DELETE_LEAVE_DIALOG:
18012
+ SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.DELETE_LEAVE_DIALOG;
17970
18013
  break;
17971
- case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.UPDATE_DIALOG:
17972
- SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.UPDATE_DIALOG;
18014
+ case _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.UPDATE_DIALOG:
18015
+ SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.UPDATE_DIALOG;
17973
18016
  break;
17974
18017
  default:
17975
- SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.NEW_DIALOG;
18018
+ SystemMessageType = _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.NEW_DIALOG;
17976
18019
  break;
17977
18020
  }
17978
- this.subscriptionOnSystemMessages[SystemMessageType].subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].SystemMessage);
18021
+ this.subscriptionOnSystemMessages[SystemMessageType].subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].SystemMessage);
17979
18022
  };
17980
18023
  RemoteDataSource.prototype.subscribeOnMessaging = function (callback) {
17981
- this.subscriptionOnChatMessages.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].RegularMessage);
18024
+ this.subscriptionOnChatMessages.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].RegularMessage);
17982
18025
  };
17983
18026
  RemoteDataSource.prototype.subscribeOnSessionExpiredListener = function (callback) {
17984
18027
  var _this = this;
17985
18028
  console.log('subscribe On Session Expired Event');
17986
- this.subscriptionOnSessionExpiredListener.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18029
+ this.subscriptionOnSessionExpiredListener.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
17987
18030
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
17988
- var sessionTimeOut = _QBconfig__WEBPACK_IMPORTED_MODULE_18__.QBConfig.appConfig.sessionTimeOut || 122;
18031
+ var sessionTimeOut = _QBconfig__WEBPACK_IMPORTED_MODULE_19__.QBConfig.appConfig.sessionTimeOut || 122;
17989
18032
  setTimeout(function () {
17990
18033
  console.log('NEED LOGOUT');
17991
18034
  if (_this.authProcessed) {
17992
- _this.subscriptionOnSessionExpiredListener.informSubscribers(true, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18035
+ _this.subscriptionOnSessionExpiredListener.informSubscribers(true, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
17993
18036
  }
17994
18037
  }, sessionTimeOut * 60 * 1000);
17995
18038
  };
17996
18039
  RemoteDataSource.prototype.subscribeOnUpdateMessageStatus = function (callback) {
17997
- this.subscriptionOnMessageStatus.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18040
+ this.subscriptionOnMessageStatus.subscribe(callback, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
17998
18041
  };
17999
18042
  RemoteDataSource.prototype.initEventsHandlers = function () {
18000
18043
  var _this = this;
18001
18044
  console.log('CALL--initEventsHandlers--CALL');
18002
- QB.chat.onSystemMessageListener = function (message) {
18003
- var _a;
18045
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onSystemMessageListener) = function (message) {
18046
+ var _a, _b;
18004
18047
  console.log("EVENT: receive system message: ".concat(JSON.stringify(message)));
18005
- var resultMessage = new _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_2__.RemoteMessageDTO();
18048
+ var resultMessage = new _dto_message_RemoteMessageDTO__WEBPACK_IMPORTED_MODULE_3__.RemoteMessageDTO();
18006
18049
  resultMessage.sender_id = message.userId;
18007
18050
  resultMessage.message = message.body || 'system message';
18008
18051
  resultMessage.notification_type =
18009
- message.extension.notification_type || _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_14__.NotificationTypes.UPDATE_DIALOG;
18010
- resultMessage.dialogId = ((_a = message === null || message === void 0 ? void 0 : message.extension) === null || _a === void 0 ? void 0 : _a.dialog_id) || '';
18011
- _this.subscriptionOnSystemMessages[resultMessage.notification_type].informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].SystemMessage);
18052
+ ((_a = message.extension) === null || _a === void 0 ? void 0 : _a.notification_type) || _Domain_entity_NotificationTypes__WEBPACK_IMPORTED_MODULE_15__.NotificationTypes.UPDATE_DIALOG;
18053
+ resultMessage.dialogId = ((_b = message === null || message === void 0 ? void 0 : message.extension) === null || _b === void 0 ? void 0 : _b.dialog_id) || '';
18054
+ _this.subscriptionOnSystemMessages[resultMessage.notification_type].informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].SystemMessage);
18012
18055
  };
18013
- QB.chat.onMessageListener = function (userId, message) {
18014
- console.log("EVENT: receive message for userid: ".concat(userId, ", message: ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(message)));
18056
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageListener) = function (userId, message) {
18057
+ console.log("EVENT: receive message for userid: ".concat(userId, ", message: ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(message)));
18015
18058
  var dialogId = message.dialog_id || message.extension.dialog_id || '-1';
18016
18059
  //
18017
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.qbChatGetMessagesExtended)(dialogId, {
18060
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.qbChatGetMessagesExtended)(dialogId, {
18018
18061
  _id: message.id,
18019
18062
  mark_as_read: 0,
18020
18063
  })
@@ -18030,10 +18073,10 @@ var RemoteDataSource = /** @class */ (function () {
18030
18073
  case 1:
18031
18074
  dtoMessage = _b.sent();
18032
18075
  dtoMessage.dialogId = dialogId;
18033
- this.subscriptionOnChatMessages.informSubscribers(dtoMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].RegularMessage);
18076
+ this.subscriptionOnChatMessages.informSubscribers(dtoMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].RegularMessage);
18034
18077
  //
18035
18078
  if (((_a = this.currentDialog) === null || _a === void 0 ? void 0 : _a.id) === dialogId) {
18036
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatMarkMessageRead)({
18079
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatMarkMessageRead)({
18037
18080
  messageId: message.id,
18038
18081
  dialogId: dialogId,
18039
18082
  userId: dtoMessage.sender_id,
@@ -18047,7 +18090,7 @@ var RemoteDataSource = /** @class */ (function () {
18047
18090
  })
18048
18091
  .catch();
18049
18092
  //
18050
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBGetDialogById)(dialogId)
18093
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBGetDialogById)(dialogId)
18051
18094
  .then(function (result) { return __awaiter(_this, void 0, void 0, function () {
18052
18095
  var dialogs, current, dialogDTO, dialogsDTOtoEntityMapper, dialogEntity, resultEvent;
18053
18096
  return __generator(this, function (_a) {
@@ -18058,12 +18101,12 @@ var RemoteDataSource = /** @class */ (function () {
18058
18101
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(current)];
18059
18102
  case 1:
18060
18103
  dialogDTO = _a.sent();
18061
- dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_11__.DialogRemoteDTOMapper();
18104
+ dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_12__.DialogRemoteDTOMapper();
18062
18105
  return [4 /*yield*/, dialogsDTOtoEntityMapper.toEntity(dialogDTO)];
18063
18106
  case 2:
18064
18107
  dialogEntity = _a.sent();
18065
18108
  resultEvent = {
18066
- eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage,
18109
+ eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage,
18067
18110
  dialogInfo: dialogEntity,
18068
18111
  messageInfo: undefined,
18069
18112
  messageStatus: {
@@ -18075,7 +18118,7 @@ var RemoteDataSource = /** @class */ (function () {
18075
18118
  },
18076
18119
  notificationTypes: undefined,
18077
18120
  };
18078
- this.subscriptionOnMessageStatus.informSubscribers(resultEvent, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18121
+ this.subscriptionOnMessageStatus.informSubscribers(resultEvent, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
18079
18122
  return [2 /*return*/, resultEvent];
18080
18123
  }
18081
18124
  });
@@ -18083,28 +18126,26 @@ var RemoteDataSource = /** @class */ (function () {
18083
18126
  .catch();
18084
18127
  //
18085
18128
  };
18086
- QB.chat.onDeliveredStatusListener = function (messageId, dialogId, userId) {
18129
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onDeliveredStatusListener) = function (messageId, dialogId, userId) {
18087
18130
  console.log("EVENT: receive delivered message id: ".concat(messageId, ", dialogid: ").concat(dialogId, " userid: ").concat(userId));
18088
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBGetDialogById)(dialogId)
18131
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBGetDialogById)(dialogId)
18089
18132
  .then(function (result) { return __awaiter(_this, void 0, void 0, function () {
18090
- var currentUserId, dialogs, current, dialogDTO, dialogsDTOtoEntityMapper, dialogEntity, resultMessage;
18133
+ var dialogs, current, dialogDTO, dialogsDTOtoEntityMapper, dialogEntity, resultMessage;
18091
18134
  var _this = this;
18092
- var _a;
18093
- return __generator(this, function (_b) {
18094
- switch (_b.label) {
18135
+ return __generator(this, function (_a) {
18136
+ switch (_a.label) {
18095
18137
  case 0:
18096
- currentUserId = (_a = this._authInformation) === null || _a === void 0 ? void 0 : _a.userId;
18097
18138
  dialogs = result === null || result === void 0 ? void 0 : result.items.filter(function (v) { return v._id === dialogId; });
18098
18139
  current = dialogs && dialogs.length > 0 ? dialogs[0] : undefined;
18099
18140
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(current)];
18100
18141
  case 1:
18101
- dialogDTO = _b.sent();
18102
- dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_11__.DialogRemoteDTOMapper();
18142
+ dialogDTO = _a.sent();
18143
+ dialogsDTOtoEntityMapper = new _mapper_DialogRemoteDTOMapper__WEBPACK_IMPORTED_MODULE_12__.DialogRemoteDTOMapper();
18103
18144
  return [4 /*yield*/, dialogsDTOtoEntityMapper.toEntity(dialogDTO)];
18104
18145
  case 2:
18105
- dialogEntity = _b.sent();
18146
+ dialogEntity = _a.sent();
18106
18147
  resultMessage = {
18107
- eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage,
18148
+ eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage,
18108
18149
  dialogInfo: dialogEntity,
18109
18150
  messageInfo: undefined,
18110
18151
  messageStatus: {
@@ -18116,12 +18157,12 @@ var RemoteDataSource = /** @class */ (function () {
18116
18157
  },
18117
18158
  notificationTypes: undefined,
18118
18159
  };
18119
- this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18160
+ this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
18120
18161
  //
18121
18162
  //
18122
18163
  // eslint-disable-next-line promise/always-return
18123
- if (current && current.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType["private"]) {
18124
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.qbChatGetMessagesExtended)(dialogId, {
18164
+ if (current && current.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType["private"]) {
18165
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.qbChatGetMessagesExtended)(dialogId, {
18125
18166
  _id: messageId,
18126
18167
  mark_as_read: 0,
18127
18168
  })
@@ -18137,10 +18178,10 @@ var RemoteDataSource = /** @class */ (function () {
18137
18178
  case 1:
18138
18179
  dtoMessage = _b.sent();
18139
18180
  dtoMessage.dialogId = dialogId;
18140
- this.subscriptionOnChatMessages.informSubscribers(dtoMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].RegularMessage);
18181
+ this.subscriptionOnChatMessages.informSubscribers(dtoMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].RegularMessage);
18141
18182
  //
18142
18183
  if (((_a = this.currentDialog) === null || _a === void 0 ? void 0 : _a.id) === dialogId) {
18143
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatMarkMessageRead)({
18184
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatMarkMessageRead)({
18144
18185
  messageId: messageId,
18145
18186
  dialogId: dialogId,
18146
18187
  userId: dtoMessage.sender_id,
@@ -18161,13 +18202,13 @@ var RemoteDataSource = /** @class */ (function () {
18161
18202
  }); })
18162
18203
  .catch();
18163
18204
  };
18164
- QB.chat.onMessageTypingListener = function (isTyping, userId, dialogId) {
18205
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageTypingListener) = function (isTyping, userId, dialogId) {
18165
18206
  var _a;
18166
18207
  console.log("EVENT: receive typing: ".concat(isTyping ? 'true' : 'false', ", dialog id: ").concat(dialogId, " userid: ").concat(userId));
18167
18208
  if (_this.authProcessed && ((_a = _this.authInformation) === null || _a === void 0 ? void 0 : _a.userId) === userId)
18168
18209
  return;
18169
18210
  var resultMessage = {
18170
- eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage,
18211
+ eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage,
18171
18212
  messageInfo: undefined,
18172
18213
  dialogInfo: undefined,
18173
18214
  messageStatus: {
@@ -18179,35 +18220,35 @@ var RemoteDataSource = /** @class */ (function () {
18179
18220
  },
18180
18221
  notificationTypes: undefined,
18181
18222
  };
18182
- _this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18223
+ _this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
18183
18224
  };
18184
- QB.chat.onSessionExpiredListener = function (error) {
18225
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onSessionExpiredListener) = function (error) {
18185
18226
  console.log('call onSessionExpiredListener');
18186
18227
  console.timeLog('onSessionExpiredListener');
18187
18228
  var result = true;
18188
18229
  if (error) {
18189
- console.log('EVENT:onSessionExpiredListener - error: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(error));
18230
+ console.log('EVENT:onSessionExpiredListener - error: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(error));
18190
18231
  result = false;
18191
18232
  }
18192
18233
  else {
18193
18234
  console.log('EVENT: Hello from SessionExpiredListener. session is expired.');
18194
18235
  result = true;
18195
18236
  }
18196
- _this.subscriptionOnSessionExpiredListener.informSubscribers(result, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18237
+ _this.subscriptionOnSessionExpiredListener.informSubscribers(result, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
18197
18238
  };
18198
- QB.chat.onDisconnectedListener = function () {
18239
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onDisconnectedListener) = function () {
18199
18240
  console.log('EVENT: disconnect');
18200
18241
  };
18201
- QB.chat.onReconnectListener = function () {
18242
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onReconnectListener) = function () {
18202
18243
  console.log('EVENT: reconnect');
18203
18244
  };
18204
- QB.chat.onMessageErrorListener = function (messageId, error) {
18205
- console.log("EVENT: receive error messageid: ".concat(messageId, ", error: ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(error)));
18245
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageErrorListener) = function (messageId, error) {
18246
+ console.log("EVENT: receive error messageid: ".concat(messageId, ", error: ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(error)));
18206
18247
  };
18207
- QB.chat.onReadStatusListener = function (messageId, dialogId, userId) {
18248
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onReadStatusListener) = function (messageId, dialogId, userId) {
18208
18249
  console.log("EVENT: receive read message id: ".concat(messageId, ", dialogid: ").concat(dialogId, " userid: ").concat(userId));
18209
18250
  var resultMessage = {
18210
- eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage,
18251
+ eventMessageType: _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage,
18211
18252
  messageInfo: undefined,
18212
18253
  dialogInfo: undefined,
18213
18254
  messageStatus: {
@@ -18219,21 +18260,21 @@ var RemoteDataSource = /** @class */ (function () {
18219
18260
  },
18220
18261
  notificationTypes: undefined,
18221
18262
  };
18222
- _this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_15__["default"].LocalMessage);
18263
+ _this.subscriptionOnMessageStatus.informSubscribers(resultMessage, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_16__["default"].LocalMessage);
18223
18264
  };
18224
18265
  //
18225
18266
  };
18226
18267
  // eslint-disable-next-line class-methods-use-this
18227
18268
  RemoteDataSource.prototype.releaseEventsHandlers = function () {
18228
- QB.chat.onSessionExpiredListener = undefined;
18229
- QB.chat.onReconnectListener = undefined;
18230
- QB.chat.onDisconnectedListener = undefined;
18231
- QB.chat.onSystemMessageListener = undefined;
18232
- QB.chat.onMessageListener = undefined;
18233
- QB.chat.onMessageErrorListener = undefined;
18234
- QB.chat.onDeliveredStatusListener = undefined;
18235
- QB.chat.onReadStatusListener = undefined;
18236
- QB.chat.onMessageTypingListener = undefined;
18269
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onSessionExpiredListener) = undefined;
18270
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onReconnectListener) = undefined;
18271
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onDisconnectedListener) = undefined;
18272
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onSystemMessageListener) = undefined;
18273
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageListener) = undefined;
18274
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageErrorListener) = undefined;
18275
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onDeliveredStatusListener) = undefined;
18276
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onReadStatusListener) = undefined;
18277
+ (quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.onMessageTypingListener) = undefined;
18237
18278
  };
18238
18279
  RemoteDataSource.prototype.loginWithUser = function (authParams) {
18239
18280
  return __awaiter(this, void 0, void 0, function () {
@@ -18255,7 +18296,7 @@ var RemoteDataSource = /** @class */ (function () {
18255
18296
  return [4 /*yield*/, this.createUserSession(userRequiredParams).catch(function (e) {
18256
18297
  _this._needInit = true;
18257
18298
  _this.authProcessed = false;
18258
- console.log("EXCEPTION IN CREATE USER SESSION (".concat(userRequiredParams.login, ") : ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(e)));
18299
+ console.log("EXCEPTION IN CREATE USER SESSION (".concat(userRequiredParams.login, ") : ").concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(e)));
18259
18300
  })];
18260
18301
  case 1:
18261
18302
  sessionResult = _a.sent();
@@ -18287,7 +18328,7 @@ var RemoteDataSource = /** @class */ (function () {
18287
18328
  password: authInformation.password,
18288
18329
  };
18289
18330
  console.log(paramsConnect);
18290
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatConnect)(paramsConnect)];
18331
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatConnect)(paramsConnect)];
18291
18332
  case 2:
18292
18333
  connectResult = _a.sent();
18293
18334
  if (connectResult) {
@@ -18309,12 +18350,13 @@ var RemoteDataSource = /** @class */ (function () {
18309
18350
  });
18310
18351
  };
18311
18352
  RemoteDataSource.prototype.getDialogs = function (pagination) {
18353
+ var _a;
18312
18354
  return __awaiter(this, void 0, void 0, function () {
18313
- var currentPagination, pageNumber, perPage, params, dialogsDTO, qbDialogs, _i, _a, item, qbEntity, newDTO;
18314
- return __generator(this, function (_b) {
18315
- switch (_b.label) {
18355
+ var currentPagination, pageNumber, perPage, params, dialogsDTO, qbDialogs, _i, _b, item, qbEntity, newDTO, currentUserId, statusMessageParams;
18356
+ return __generator(this, function (_c) {
18357
+ switch (_c.label) {
18316
18358
  case 0:
18317
- currentPagination = pagination || new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__.Pagination();
18359
+ currentPagination = pagination || new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__.Pagination();
18318
18360
  console.log('call getDialogs in RemoteDataSourceMock param pagination: ', JSON.stringify(pagination));
18319
18361
  console.log('call getDialogs in RemoteDataSourceMock with result pagination: ', JSON.stringify(currentPagination));
18320
18362
  pageNumber = currentPagination.getCurrentPage() || 1;
@@ -18337,43 +18379,50 @@ var RemoteDataSource = /** @class */ (function () {
18337
18379
  // filter['type[in]'] = [3, 2].join(',');
18338
18380
  console.log('call getDialogs in RemoteDataSourceMock with params: ', JSON.stringify(params));
18339
18381
  dialogsDTO = [];
18340
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBGetDialogs)(params)];
18382
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBGetDialogs)(params)];
18341
18383
  case 1:
18342
- qbDialogs = _b.sent();
18384
+ qbDialogs = _c.sent();
18343
18385
  if (!qbDialogs) return [3 /*break*/, 7];
18344
18386
  console.log("request completed. have: total_entries ".concat(qbDialogs.total_entries, ", limit: ").concat(qbDialogs.limit, ", skip: ").concat(qbDialogs.skip, " items: ").concat(JSON.stringify(qbDialogs.items)));
18345
- currentPagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__.Pagination(0, perPage);
18387
+ currentPagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__.Pagination(0, perPage);
18346
18388
  currentPagination.totalPages = qbDialogs.total_entries / perPage;
18347
18389
  currentPagination.setCurrentPage(pageNumber);
18348
- _i = 0, _a = qbDialogs.items;
18349
- _b.label = 2;
18390
+ _i = 0, _b = qbDialogs.items;
18391
+ _c.label = 2;
18350
18392
  case 2:
18351
- if (!(_i < _a.length)) return [3 /*break*/, 7];
18352
- item = _a[_i];
18393
+ if (!(_i < _b.length)) return [3 /*break*/, 7];
18394
+ item = _b[_i];
18353
18395
  qbEntity = item;
18354
18396
  // eslint-disable-next-line no-await-in-loop
18355
18397
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(qbEntity)];
18356
18398
  case 3:
18357
18399
  newDTO =
18358
18400
  // eslint-disable-next-line no-await-in-loop
18359
- _b.sent();
18360
- if (!(newDTO.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType.group)) return [3 /*break*/, 5];
18401
+ _c.sent();
18402
+ if (!(newDTO.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType.group)) return [3 /*break*/, 5];
18361
18403
  // eslint-disable-next-line no-await-in-loop
18362
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBJoinGroupDialog)(newDTO.id).catch(function () {
18363
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18404
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBJoinGroupDialog)(newDTO.id).catch(function () {
18405
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18364
18406
  })];
18365
18407
  case 4:
18366
18408
  // eslint-disable-next-line no-await-in-loop
18367
- _b.sent();
18368
- _b.label = 5;
18409
+ _c.sent();
18410
+ _c.label = 5;
18369
18411
  case 5:
18370
- //
18412
+ currentUserId = ((_a = this._authInformation) === null || _a === void 0 ? void 0 : _a.userId) || 0;
18413
+ statusMessageParams = {
18414
+ userId: newDTO.lastMessageUserId || currentUserId,
18415
+ dialogId: newDTO.id,
18416
+ messageId: newDTO.lastMessageId,
18417
+ };
18418
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
18419
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatMarkMessageDelivered)(statusMessageParams);
18371
18420
  dialogsDTO.push(newDTO);
18372
- _b.label = 6;
18421
+ _c.label = 6;
18373
18422
  case 6:
18374
18423
  _i++;
18375
18424
  return [3 /*break*/, 2];
18376
- case 7: return [2 /*return*/, Promise.resolve(new _dto_dialog_RemoteDialogsDTO__WEBPACK_IMPORTED_MODULE_1__.RemoteDialogsDTO(dialogsDTO, currentPagination))];
18425
+ case 7: return [2 /*return*/, Promise.resolve(new _dto_dialog_RemoteDialogsDTO__WEBPACK_IMPORTED_MODULE_2__.RemoteDialogsDTO(dialogsDTO, currentPagination))];
18377
18426
  }
18378
18427
  });
18379
18428
  });
@@ -18389,23 +18438,23 @@ var RemoteDataSource = /** @class */ (function () {
18389
18438
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().fromDTO(dto)];
18390
18439
  case 1:
18391
18440
  qbEntity = _a.sent();
18392
- if (!(qbEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType["private"])) return [3 /*break*/, 3];
18441
+ if (!(qbEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType["private"])) return [3 /*break*/, 3];
18393
18442
  participantId = qbEntity.occupants_ids[0];
18394
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBCreatePrivateDialog)(participantId, qbEntity.name)];
18443
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBCreatePrivateDialog)(participantId, qbEntity.name)];
18395
18444
  case 2:
18396
18445
  qbDialog = _a.sent();
18397
18446
  return [3 /*break*/, 5];
18398
18447
  case 3:
18399
- if (!(qbEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType.group)) return [3 /*break*/, 5];
18448
+ if (!(qbEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType.group)) return [3 /*break*/, 5];
18400
18449
  participants = qbEntity.occupants_ids;
18401
18450
  data = { photo: qbEntity.photo };
18402
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBCreateGroupDialog)(participants, qbEntity.name, data)];
18451
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBCreateGroupDialog)(participants, qbEntity.name, data)];
18403
18452
  case 4:
18404
18453
  qbDialog = _a.sent();
18405
18454
  _a.label = 5;
18406
18455
  case 5:
18407
18456
  if (qbDialog === null || qbDialog === undefined) {
18408
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18457
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18409
18458
  }
18410
18459
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(qbDialog)];
18411
18460
  case 6:
@@ -18434,11 +18483,11 @@ var RemoteDataSource = /** @class */ (function () {
18434
18483
  if (qbEntity.new_occupants_ids && qbEntity.new_occupants_ids.length > 0) {
18435
18484
  data = __assign(__assign({}, data), { push_all: { occupants_ids: qbEntity.new_occupants_ids } });
18436
18485
  }
18437
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBUpdateDialog)(qbEntity._id, data)];
18486
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBUpdateDialog)(qbEntity._id, data)];
18438
18487
  case 2:
18439
18488
  qbDialogs = _a.sent();
18440
18489
  if (qbDialogs === null || qbDialogs === undefined) {
18441
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18490
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18442
18491
  }
18443
18492
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(qbDialogs)];
18444
18493
  case 3:
@@ -18457,11 +18506,11 @@ var RemoteDataSource = /** @class */ (function () {
18457
18506
  case 0: return [4 /*yield*/, this.getCurrentDialogDTOMapper().fromDTO(dto)];
18458
18507
  case 1:
18459
18508
  qbEntity = _a.sent();
18460
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBGetDialogById)(qbEntity._id)];
18509
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBGetDialogById)(qbEntity._id)];
18461
18510
  case 2:
18462
18511
  qbDialog = _a.sent();
18463
18512
  if (qbDialog === null || qbDialog === undefined) {
18464
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18513
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18465
18514
  }
18466
18515
  qbEntityFromDB = qbDialog.items[0];
18467
18516
  return [4 /*yield*/, this.getCurrentDialogDTOMapper().toTDO(qbEntityFromDB)];
@@ -18481,8 +18530,8 @@ var RemoteDataSource = /** @class */ (function () {
18481
18530
  case 0: return [4 /*yield*/, this.getCurrentDialogDTOMapper().fromDTO(dto)];
18482
18531
  case 1:
18483
18532
  qbEntity = _a.sent();
18484
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBDeleteDialog)([qbEntity._id]).catch(function () {
18485
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18533
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBDeleteDialog)([qbEntity._id]).catch(function () {
18534
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18486
18535
  })];
18487
18536
  case 2:
18488
18537
  _a.sent();
@@ -18509,11 +18558,11 @@ var RemoteDataSource = /** @class */ (function () {
18509
18558
  pull_all: { occupants_ids: usersIds },
18510
18559
  };
18511
18560
  }
18512
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBUpdateDialog)(qbEntity._id, data)];
18561
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBUpdateDialog)(qbEntity._id, data)];
18513
18562
  case 2:
18514
18563
  qbDialogs = _a.sent();
18515
18564
  if (qbDialogs === null || qbDialogs === undefined) {
18516
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18565
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18517
18566
  }
18518
18567
  return [2 /*return*/, Promise.resolve()];
18519
18568
  }
@@ -18526,11 +18575,11 @@ var RemoteDataSource = /** @class */ (function () {
18526
18575
  var currentItem, dtoUser, e_1;
18527
18576
  return __generator(this, function (_a) {
18528
18577
  switch (_a.label) {
18529
- case 0: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBUsersGetById)(parseInt(dto.id, 10))];
18578
+ case 0: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBUsersGetById)(parseInt(dto.id, 10))];
18530
18579
  case 1:
18531
18580
  currentItem = _a.sent();
18532
18581
  if (currentItem === null || currentItem === undefined) {
18533
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18582
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18534
18583
  }
18535
18584
  _a.label = 2;
18536
18585
  case 2:
@@ -18550,7 +18599,7 @@ var RemoteDataSource = /** @class */ (function () {
18550
18599
  if (dtoUser !== null || dtoUser !== undefined) {
18551
18600
  return [2 /*return*/, Promise.resolve(dtoUser)];
18552
18601
  }
18553
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE, "not found user with id: ".concat(dto.id, " (").concat(dto.full_name, ")")))];
18602
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE, "not found user with id: ".concat(dto.id, " (").concat(dto.full_name, ")")))];
18554
18603
  }
18555
18604
  });
18556
18605
  });
@@ -18576,7 +18625,7 @@ var RemoteDataSource = /** @class */ (function () {
18576
18625
  case 3:
18577
18626
  _i++;
18578
18627
  return [3 /*break*/, 1];
18579
- case 4: return [2 /*return*/, Promise.resolve(new _dto_user_RemoteUsersDTO__WEBPACK_IMPORTED_MODULE_3__.RemoteUsersDTO(usersDTO, new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__.Pagination()))];
18628
+ case 4: return [2 /*return*/, Promise.resolve(new _dto_user_RemoteUsersDTO__WEBPACK_IMPORTED_MODULE_4__.RemoteUsersDTO(usersDTO, new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__.Pagination()))];
18580
18629
  }
18581
18630
  });
18582
18631
  });
@@ -18599,7 +18648,7 @@ var RemoteDataSource = /** @class */ (function () {
18599
18648
  startPageNumber: pagination.getCurrentPage(),
18600
18649
  };
18601
18650
  pageNumber = pageTemplate.startPageNumber;
18602
- resultPagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__.Pagination(pageNumber, pageTemplate.startPageNumber);
18651
+ resultPagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__.Pagination(pageNumber, pageTemplate.startPageNumber);
18603
18652
  params = {
18604
18653
  per_page: pageTemplate.pageSize,
18605
18654
  page: pageNumber,
@@ -18612,13 +18661,13 @@ var RemoteDataSource = /** @class */ (function () {
18612
18661
  };
18613
18662
  }
18614
18663
  console.log('params: ', JSON.stringify(params));
18615
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBUsersGet)(params).catch(function (err) {
18616
- console.log('catch call QBUsersGet : ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(err));
18664
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBUsersGet)(params).catch(function (err) {
18665
+ console.log('catch call QBUsersGet : ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(err));
18617
18666
  })];
18618
18667
  case 1:
18619
18668
  response = _b.sent();
18620
18669
  if (response === undefined || response === null) {
18621
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE, "params: ".concat(JSON.stringify(params)));
18670
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE, "params: ".concat(JSON.stringify(params)));
18622
18671
  }
18623
18672
  console.log('response: total_entries: ', response.total_entries);
18624
18673
  console.log('response: per_page: ', response.per_page);
@@ -18673,11 +18722,11 @@ var RemoteDataSource = /** @class */ (function () {
18673
18722
  switch (_b.label) {
18674
18723
  case 0:
18675
18724
  messagesDTO = new Array();
18676
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.qbChatGetMessagesExtended)(dialogId)];
18725
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.qbChatGetMessagesExtended)(dialogId)];
18677
18726
  case 1:
18678
18727
  qbMessages = _b.sent();
18679
18728
  if (qbMessages === null || qbMessages === undefined) {
18680
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18729
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18681
18730
  }
18682
18731
  console.log("GET MESSAGES ".concat(qbMessages.items.length, " FROM SERVER: ").concat(JSON.stringify(qbMessages), " "));
18683
18732
  currentUserId = (_a = this._authInformation) === null || _a === void 0 ? void 0 : _a.userId;
@@ -18693,7 +18742,7 @@ var RemoteDataSource = /** @class */ (function () {
18693
18742
  dtoMessage.read_ids &&
18694
18743
  dtoMessage.read_ids.length > 0 &&
18695
18744
  dtoMessage.read_ids.includes(currentUserId) === false) {
18696
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatMarkMessageRead)({
18745
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatMarkMessageRead)({
18697
18746
  messageId: dtoMessage.id,
18698
18747
  dialogId: dtoMessage.dialogId,
18699
18748
  userId: dtoMessage.sender_id,
@@ -18706,7 +18755,7 @@ var RemoteDataSource = /** @class */ (function () {
18706
18755
  }); }))];
18707
18756
  case 2:
18708
18757
  _b.sent();
18709
- return [2 /*return*/, Promise.resolve(new _dto_message_RemoteMessagesDTO__WEBPACK_IMPORTED_MODULE_4__.RemoteMessagesDTO(messagesDTO, new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_5__.Pagination()))];
18758
+ return [2 /*return*/, Promise.resolve(new _dto_message_RemoteMessagesDTO__WEBPACK_IMPORTED_MODULE_5__.RemoteMessagesDTO(messagesDTO, new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_6__.Pagination()))];
18710
18759
  }
18711
18760
  });
18712
18761
  });
@@ -18720,15 +18769,15 @@ var RemoteDataSource = /** @class */ (function () {
18720
18769
  case 0: return [4 /*yield*/, this.getCurrentDialogDTOMapper().fromDTO(dialogDTO)];
18721
18770
  case 1:
18722
18771
  qbEntity = _a.sent();
18723
- if (!(dialogDTO.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType.group)) return [3 /*break*/, 3];
18724
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBJoinGroupDialog)(dialogDTO.id).catch(function () {
18725
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18772
+ if (!(dialogDTO.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType.group)) return [3 /*break*/, 3];
18773
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBJoinGroupDialog)(dialogDTO.id).catch(function () {
18774
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18726
18775
  })];
18727
18776
  case 2:
18728
18777
  _a.sent();
18729
18778
  _a.label = 3;
18730
18779
  case 3:
18731
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBSendIsTypingStatus)(qbEntity, senderId);
18780
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBSendIsTypingStatus)(qbEntity, senderId);
18732
18781
  return [2 /*return*/, Promise.resolve()];
18733
18782
  }
18734
18783
  });
@@ -18743,7 +18792,7 @@ var RemoteDataSource = /** @class */ (function () {
18743
18792
  case 0: return [4 /*yield*/, this.getCurrentDialogDTOMapper().fromDTO(dialogDTO)];
18744
18793
  case 1:
18745
18794
  qbEntity = _a.sent();
18746
- (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBSendIsStopTypingStatus)(qbEntity, senderId);
18795
+ (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBSendIsStopTypingStatus)(qbEntity, senderId);
18747
18796
  return [2 /*return*/, Promise.resolve()];
18748
18797
  }
18749
18798
  });
@@ -18760,7 +18809,7 @@ var RemoteDataSource = /** @class */ (function () {
18760
18809
  console.log('call sendMessage');
18761
18810
  messageText = dto.message;
18762
18811
  qbEntity = {
18763
- type: dto.dialog_type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType["private"] ? 'chat' : 'groupchat',
18812
+ type: dto.dialog_type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType["private"] ? 'chat' : 'groupchat',
18764
18813
  body: messageText || '',
18765
18814
  notification_type: dto.notification_type,
18766
18815
  dialog_id: dto.dialogId,
@@ -18771,7 +18820,7 @@ var RemoteDataSource = /** @class */ (function () {
18771
18820
  sender_id: dto.sender_id || dto.recipient_id,
18772
18821
  qb_message_action: dto.qb_message_action,
18773
18822
  origin_sender_name: dto.origin_sender_name,
18774
- qb_original_messages: _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_10__.MessageDTOMapper.translateOriginalDataToJSON(_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_10__.MessageDTOMapper.convertToQBChatNewMessage(dto.qb_original_messages || []) || []),
18823
+ qb_original_messages: _Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_11__.MessageDTOMapper.translateOriginalDataToJSON(_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_11__.MessageDTOMapper.convertToQBChatNewMessage(dto.qb_original_messages || []) || []),
18775
18824
  },
18776
18825
  markable: 1,
18777
18826
  // markable: 0, // mark_as_read ??
@@ -18790,24 +18839,24 @@ var RemoteDataSource = /** @class */ (function () {
18790
18839
  (_a = qbEntity.extension.attachments) === null || _a === void 0 ? void 0 : _a.push(chatMessageAttachment);
18791
18840
  });
18792
18841
  }
18793
- if (!(dto.dialog_type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_13__.DialogType["private"])) return [3 /*break*/, 2];
18794
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatSendMessage)(dto.recipient_id, qbEntity)];
18842
+ if (!(dto.dialog_type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_14__.DialogType["private"])) return [3 /*break*/, 2];
18843
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatSendMessage)(dto.recipient_id, qbEntity)];
18795
18844
  case 1:
18796
18845
  qbMessageId = _b.sent();
18797
18846
  return [3 /*break*/, 5];
18798
- case 2: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBJoinGroupDialog)(dto.dialogId).catch(function () {
18799
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18847
+ case 2: return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBJoinGroupDialog)(dto.dialogId).catch(function () {
18848
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE);
18800
18849
  })];
18801
18850
  case 3:
18802
18851
  _b.sent();
18803
- dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dto.dialogId);
18804
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatSendMessage)(dialogJid, qbEntity)];
18852
+ dialogJid = quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRoomJidFromDialogId(dto.dialogId);
18853
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatSendMessage)(dialogJid, qbEntity)];
18805
18854
  case 4:
18806
18855
  qbMessageId = _b.sent();
18807
18856
  _b.label = 5;
18808
18857
  case 5:
18809
18858
  if (qbMessageId === null || qbMessageId === undefined) {
18810
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18859
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18811
18860
  }
18812
18861
  console.log('regular message was sent');
18813
18862
  // eslint-disable-next-line no-param-reassign
@@ -18820,29 +18869,25 @@ var RemoteDataSource = /** @class */ (function () {
18820
18869
  // eslint-disable-next-line class-methods-use-this
18821
18870
  // eslint-disable-next-line class-methods-use-this
18822
18871
  RemoteDataSource.prototype.sendSystemMessage = function (dto) {
18823
- var _a;
18824
18872
  return __awaiter(this, void 0, void 0, function () {
18825
18873
  var qbMessages, systemMessage;
18826
- return __generator(this, function (_b) {
18827
- switch (_b.label) {
18874
+ return __generator(this, function (_a) {
18875
+ switch (_a.label) {
18828
18876
  case 0:
18829
18877
  if (!(dto.notification_type && dto.notification_type.length > 0)) return [3 /*break*/, 2];
18830
18878
  systemMessage = {
18831
- body: null,
18832
- id: '',
18833
- userId: ((_a = this.authInformation) === null || _a === void 0 ? void 0 : _a.userId) || 0,
18834
18879
  extension: {
18835
18880
  notification_type: dto.notification_type,
18836
18881
  dialog_id: dto.dialogId,
18837
18882
  },
18838
18883
  };
18839
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBChatSendSystemMessage)(dto.recipient_id, systemMessage)];
18884
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBChatSendSystemMessage)(dto.recipient_id, systemMessage)];
18840
18885
  case 1:
18841
- qbMessages = _b.sent();
18842
- _b.label = 2;
18886
+ qbMessages = _a.sent();
18887
+ _a.label = 2;
18843
18888
  case 2:
18844
18889
  if (qbMessages === null || qbMessages === undefined) {
18845
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18890
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18846
18891
  }
18847
18892
  console.log('system message was sent');
18848
18893
  return [2 /*return*/, Promise.resolve(true)];
@@ -18865,7 +18910,7 @@ var RemoteDataSource = /** @class */ (function () {
18865
18910
  result = storageValue !== null && storageValue !== void 0 ? storageValue : '';
18866
18911
  qbMessages = result === '' ? {} : JSON.parse(result);
18867
18912
  if (qbMessages === null || qbMessages === undefined) {
18868
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18913
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18869
18914
  }
18870
18915
  qbMessages[qbEntity._id] = qbEntity;
18871
18916
  // TODO: How get updated QBChatDialog and return to DTO
@@ -18891,7 +18936,7 @@ var RemoteDataSource = /** @class */ (function () {
18891
18936
  result = storageValue !== null && storageValue !== void 0 ? storageValue : '';
18892
18937
  qbMessages = result === '' ? {} : JSON.parse(result);
18893
18938
  if (qbMessages === null || qbMessages === undefined) {
18894
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18939
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18895
18940
  }
18896
18941
  filteredqbMessages = {};
18897
18942
  Object.keys(qbMessages).forEach(function (key) {
@@ -18916,14 +18961,14 @@ var RemoteDataSource = /** @class */ (function () {
18916
18961
  return [4 /*yield*/, this.fileDTOMapper.fromDTO(dto)];
18917
18962
  case 1:
18918
18963
  qbParam = _a.sent();
18919
- return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_8__.QBCreateAndUploadContent)(qbParam).catch(function (err) {
18920
- console.log('Error: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(err));
18921
- throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE, "exception: ".concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_12__.stringifyError)(err)));
18964
+ return [4 /*yield*/, (0,_qb_api_calls__WEBPACK_IMPORTED_MODULE_9__.QBCreateAndUploadContent)(qbParam).catch(function (err) {
18965
+ console.log('Error: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(err));
18966
+ throw new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE, "exception: ".concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_13__.stringifyError)(err)));
18922
18967
  })];
18923
18968
  case 2:
18924
18969
  result = _a.sent();
18925
18970
  if (result === null || result === undefined) {
18926
- return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_0__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18971
+ return [2 /*return*/, Promise.reject(new _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.RemoteDataSourceException(_exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE, _exception_RemoteDataSourceException__WEBPACK_IMPORTED_MODULE_1__.INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE))];
18927
18972
  }
18928
18973
  qbContentObject = result;
18929
18974
  return [4 /*yield*/, this.fileDTOMapper.toTDO(qbContentObject)];
@@ -23687,7 +23732,7 @@ function MessageItem(_a) {
23687
23732
  }
23688
23733
  function renderAdditionalPart(currentMessageType, item) {
23689
23734
  var _a;
23690
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "message-item-additional-part__actions" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MessageContextMenu_MessageContextMenu__WEBPACK_IMPORTED_MODULE_7__["default"], { message: message, onReply: onReply, onForward: onForward, enableReplying: enableReplying, enableForwarding: enableForwarding, disableActions: disableAction }), currentMessageType === 'incoming' && ((_a = state[item.id]) === null || _a === void 0 ? void 0 : _a.loading) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Loader_Loader__WEBPACK_IMPORTED_MODULE_9__["default"], { size: "sm", className: "message-item-additional-part__loader" })), currentMessageType === 'incoming' &&
23735
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "message-item-additional-part__actions" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MessageContextMenu_MessageContextMenu__WEBPACK_IMPORTED_MODULE_7__["default"], { message: message, onReply: function () { return onReply(item); }, onForward: function () { return onForward(item); }, enableReplying: enableReplying, enableForwarding: enableForwarding, disableActions: disableAction }), currentMessageType === 'incoming' && ((_a = state[item.id]) === null || _a === void 0 ? void 0 : _a.loading) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Loader_Loader__WEBPACK_IMPORTED_MODULE_9__["default"], { size: "sm", className: "message-item-additional-part__loader" })), currentMessageType === 'incoming' &&
23691
23736
  !(item.attachments && item.attachments.length > 0) &&
23692
23737
  AIAssistWidget && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AIComponents_AIAssist_AIAssist__WEBPACK_IMPORTED_MODULE_6__["default"], { disableAction: disableAction, AIAssistWidget: AIAssistWidget, loading: state[item.id] && state[item.id].loading
23693
23738
  ? state[item.id].loading
@@ -23790,6 +23835,7 @@ __webpack_require__.r(__webpack_exports__);
23790
23835
  /* harmony import */ var _Data_Creator__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../Data/Creator */ "./src/Data/Creator.ts");
23791
23836
  /* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../Data/DefaultConfigurations */ "./src/Data/DefaultConfigurations.ts");
23792
23837
  /* harmony import */ var _Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../Data/source/remote/Mapper/MessageDTOMapper */ "./src/Data/source/remote/Mapper/MessageDTOMapper.ts");
23838
+ /* harmony import */ var _Domain_use_cases_UpdateCurrentDialogInDataSourceUseCase__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase */ "./src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts");
23793
23839
  var __assign = (undefined && undefined.__assign) || function () {
23794
23840
  __assign = Object.assign || function(t) {
23795
23841
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -23868,6 +23914,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
23868
23914
 
23869
23915
 
23870
23916
 
23917
+
23871
23918
 
23872
23919
 
23873
23920
  function useDialogViewModel(dialogType, dialogEntity) {
@@ -23883,6 +23930,7 @@ function useDialogViewModel(dialogType, dialogEntity) {
23883
23930
  var _f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(dialogEntity), dialog = _f[0], setDialog = _f[1];
23884
23931
  // const [dialogsParticipants, setDialogsParticipants] = useState<number[]>([]);
23885
23932
  var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_2__["default"])();
23933
+ var remoteDataSourceMock = currentContext.storage.REMOTE_DATA_SOURCE;
23886
23934
  var QBConfig = currentContext.InitParams.qbConfig ||
23887
23935
  _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_22__.DefaultConfigurations.getDefaultQBConfig();
23888
23936
  var regexUserName = QBConfig.appConfig.regexUserName;
@@ -24034,11 +24082,10 @@ function useDialogViewModel(dialogType, dialogEntity) {
24034
24082
  var newState = __spreadArray([], prevState, true);
24035
24083
  if (newState.find(function (it) { return it.id === dialogInfo.messageStatus.messageId; })) {
24036
24084
  newState = newState.map(function (elem) {
24037
- var v = __assign(__assign({}, elem), { read_ids: __spreadArray(__spreadArray([], elem.read_ids, true), [
24038
- dialogInfo.messageStatus.userId,
24039
- ], false), delivered_ids: __spreadArray(__spreadArray([], elem.delivered_ids, true), [
24040
- dialogInfo.messageStatus.userId,
24041
- ], false) });
24085
+ var _a, _b;
24086
+ var v = __assign(__assign({}, elem), { read_ids: ((_a = dialogInfo.messageStatus) === null || _a === void 0 ? void 0 : _a.deliveryStatus) === 'read'
24087
+ ? __spreadArray(__spreadArray([], elem.read_ids, true), [dialogInfo.messageStatus.userId], false) : __spreadArray([], elem.read_ids, true), delivered_ids: ((_b = dialogInfo.messageStatus) === null || _b === void 0 ? void 0 : _b.deliveryStatus) === 'delivered'
24088
+ ? __spreadArray(__spreadArray([], elem.delivered_ids, true), [dialogInfo.messageStatus.userId], false) : __spreadArray([], elem.delivered_ids, true) });
24042
24089
  return v;
24043
24090
  });
24044
24091
  }
@@ -24137,6 +24184,14 @@ function useDialogViewModel(dialogType, dialogEntity) {
24137
24184
  }
24138
24185
  });
24139
24186
  }); };
24187
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function
24188
+ function informDataSources(item) {
24189
+ var updateCurrentDialogInDataSourceUseCase = new _Domain_use_cases_UpdateCurrentDialogInDataSourceUseCase__WEBPACK_IMPORTED_MODULE_24__.UpdateCurrentDialogInDataSourceUseCase(new _Data_repository_DialogsRepository__WEBPACK_IMPORTED_MODULE_17__["default"](currentContext.storage.LOCAL_DATA_SOURCE, remoteDataSourceMock), item);
24190
+ updateCurrentDialogInDataSourceUseCase.execute().catch(function (e) {
24191
+ console.log('useDialogViewModel Error updateCurrentDialogInDataSourceUseCase: ', (0,_utils_parse__WEBPACK_IMPORTED_MODULE_10__.stringifyError)(e));
24192
+ throw new Error((0,_utils_parse__WEBPACK_IMPORTED_MODULE_10__.stringifyError)(e));
24193
+ });
24194
+ }
24140
24195
  var sendMessage = function (messageToSend) {
24141
24196
  var sendTextMessageUseCase = new _Domain_use_cases_SendTextMessageUseCase__WEBPACK_IMPORTED_MODULE_11__.SendTextMessageUseCase(new _Data_repository_MessagesRepository__WEBPACK_IMPORTED_MODULE_6__["default"](LOCAL_DATA_SOURCE, REMOTE_DATA_SOURCE), messageToSend);
24142
24197
  // eslint-disable-next-line promise/catch-or-return
@@ -24157,6 +24212,17 @@ function useDialogViewModel(dialogType, dialogEntity) {
24157
24212
  var newState = __spreadArray(__spreadArray([], prevState, true), [messageEntity], false);
24158
24213
  return newState;
24159
24214
  });
24215
+ if ((dialog === null || dialog === void 0 ? void 0 : dialog.type) === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_1__.DialogType["private"]) {
24216
+ var updDialog = __assign({}, dialog);
24217
+ updDialog.lastMessage.dateSent = messageEntity.date_sent;
24218
+ updDialog.lastMessage.text = messageEntity.message;
24219
+ updDialog.lastMessage.userId = messageEntity.sender_id;
24220
+ updDialog.unreadMessageCount = 0;
24221
+ setDialog(updDialog);
24222
+ //
24223
+ informDataSources(updDialog);
24224
+ //
24225
+ }
24160
24226
  });
24161
24227
  //
24162
24228
  })
@@ -24247,72 +24313,6 @@ function useDialogViewModel(dialogType, dialogEntity) {
24247
24313
  }
24248
24314
  });
24249
24315
  }); };
24250
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
24251
- // const sendAttachmentMessage = async (newMessage: File): Promise<boolean> => {
24252
- // console.log('call sendTextMessage');
24253
- // setLoading(true);
24254
- // const currentUserId = REMOTE_DATA_SOURCE.authInformation?.userId || 0;
24255
- //
24256
- // try {
24257
- // await uploadFile(newMessage)
24258
- // // eslint-disable-next-line promise/always-return
24259
- // .then((fileMessage: FileEntity) => {
24260
- // console.log(JSON.stringify(fileMessage));
24261
- //
24262
- // const recipientId =
24263
- // dialog.type === DialogType.private
24264
- // ? (dialog as PrivateDialogEntity).participantId
24265
- // : currentUserId;
24266
- //
24267
- // // eslint-disable-next-line promise/always-return
24268
- // const messageBody = fileMessage.name || '[attachment]';
24269
- // //
24270
- // const messageEntityParams: MessageEntityParams = {
24271
- // dialogId: dialog.id,
24272
- // message: messageBody,
24273
- // sender_id: currentUserId,
24274
- // recipient_id: recipientId,
24275
- // dialog_type: DialogType.group,
24276
- // };
24277
- // const messageToSend: MessageEntity =
24278
- // Creator.createMessageEntity(messageEntityParams);
24279
- // //
24280
- //
24281
- // messageToSend.dialogType = dialog.type;
24282
- // const attachments: ChatMessageAttachmentEntity[] = [
24283
- // {
24284
- // id: fileMessage.id as string,
24285
- // uid: fileMessage.uid,
24286
- // type: fileMessage.type!,
24287
- // file: fileMessage,
24288
- // name: fileMessage.name,
24289
- // size: fileMessage.size,
24290
- // url: fileMessage.url,
24291
- // },
24292
- // ];
24293
- //
24294
- // messageToSend.attachments = attachments;
24295
- //
24296
- // messageToSend.message = `MediaContentEntity|${messageBody}|${
24297
- // fileMessage.uid
24298
- // }|${fileMessage.type!.toString()}`;
24299
- // sendMessage(messageToSend);
24300
- // //
24301
- // })
24302
- // .catch((reason) => {
24303
- // setLoading(false);
24304
- // const errorMessage = stringifyError(reason);
24305
- //
24306
- // console.log('EXCEPTION in sendAttachmentMessage', errorMessage);
24307
- //
24308
- // throw new Error(errorMessage);
24309
- // });
24310
- // } catch (e) {
24311
- // return false;
24312
- // }
24313
- //
24314
- // return true;
24315
- // };
24316
24316
  var forwardMessage = function (targetDialogs, messagesToForward, relatedMessage) { return __awaiter(_this, void 0, void 0, function () {
24317
24317
  var userName, forwardMessagesUseCase;
24318
24318
  var _a;
@@ -24483,80 +24483,6 @@ function useDialogViewModel(dialogType, dialogEntity) {
24483
24483
  }
24484
24484
  });
24485
24485
  }); };
24486
- // const sendReplyMessages = async (
24487
- // replyData: ReplyMessagesParams,
24488
- // // eslint-disable-next-line @typescript-eslint/require-await
24489
- // ): Promise<boolean> => {
24490
- // setLoading(true);
24491
- // const currentUserId = REMOTE_DATA_SOURCE.authInformation?.userId || 0;
24492
- // const messageEntityParams: MessageEntityParams = {
24493
- // dialogId: dialog.id,
24494
- // message: replyData.relatedTextMessage || '',
24495
- // sender_id: currentUserId,
24496
- // recipient_id:
24497
- // // eslint-disable-next-line promise/always-return
24498
- // dialog.type === DialogType.private
24499
- // ? (dialog as PrivateDialogEntity).participantId
24500
- // : currentUserId,
24501
- // dialog_type: DialogType.group,
24502
- // };
24503
- // const relatedMessage: MessageEntity =
24504
- // Creator.createMessageEntity(messageEntityParams);
24505
- //
24506
- // relatedMessage.dialogType = dialog.type;
24507
- //
24508
- // let resultOperation = true;
24509
- //
24510
- // if (replyData.relatedFileMessage) {
24511
- // try {
24512
- // await uploadFile(replyData.relatedFileMessage)
24513
- // .then(async (fileMessage: FileEntity) => {
24514
- // const attachments: ChatMessageAttachmentEntity[] = [
24515
- // {
24516
- // id: fileMessage.id as string,
24517
- // uid: fileMessage.uid,
24518
- // type: fileMessage.type!,
24519
- // file: fileMessage,
24520
- // name: fileMessage.name,
24521
- // size: fileMessage.size,
24522
- // url: fileMessage.url,
24523
- // },
24524
- // ];
24525
- //
24526
- // relatedMessage.attachments = attachments;
24527
- //
24528
- // await replyMessage(replyData.messagesToReply, relatedMessage);
24529
- // resultOperation = true;
24530
- //
24531
- // return resultOperation;
24532
- // //
24533
- // })
24534
- // .catch((reason) => {
24535
- // setLoading(false);
24536
- // const errorMessage = stringifyError(reason);
24537
- //
24538
- // console.log('EXCEPTION in sendAttachmentMessage', errorMessage);
24539
- // resultOperation = false;
24540
- // throw new Error(errorMessage);
24541
- // });
24542
- // } catch (e) {
24543
- // resultOperation = false;
24544
- //
24545
- // return resultOperation;
24546
- // }
24547
- // } else {
24548
- // await replyMessage(replyData.messagesToReply, relatedMessage).catch(
24549
- // () => {
24550
- // resultOperation = false;
24551
- //
24552
- // return resultOperation;
24553
- // },
24554
- // );
24555
- // }
24556
- //
24557
- // return resultOperation;
24558
- // };
24559
- //
24560
24486
  return {
24561
24487
  get entity() {
24562
24488
  return dialog;
@@ -24717,6 +24643,7 @@ var DialogInfo = function (_a) {
24717
24643
  if (!result) {
24718
24644
  (0,react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast)('Dialog have not been left');
24719
24645
  }
24646
+ leaveModal.toggleModal();
24720
24647
  })
24721
24648
  .catch(function (e) {
24722
24649
  console.log(e);
@@ -24890,7 +24817,7 @@ var DialogInfo = function (_a) {
24890
24817
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ style: __assign({}, rootStyles), className: "dialog-information-container" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_5__["default"], { children: [useUpContent && upHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Header_Header__WEBPACK_IMPORTED_MODULE_19__["default"], __assign({ title: "Dialog information", className: "header-dialog-info" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.CloseSvg, { onClick: onCloseDialogInformationHandler, className: "header-dialog-info-icon" }) })), useSubContent && subHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-information-profile" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-avatar" }, { children: renderIconForTypeDialog((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-dialog-name" }, { children: ((_c = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) === null || _c === void 0 ? void 0 : _c.name) || (dialog === null || dialog === void 0 ? void 0 : dialog.name) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-edit" }, { children: dialog.type !== _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_8__.DialogType["private"] &&
24891
24818
  dialog.ownerId === currentUserId ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('dialog-information-profile-edit-button', {
24892
24819
  'dialog-information-profile-edit-button--disable': disableAction,
24893
- }) }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "text", onClick: editModal.toggleModal, disabled: disableAction }, { children: "Edit" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ title: "Edit dialog", onClose: editModal.toggleModal, open: editModal.isOpen }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__["default"], { disableActions: disableAction, nameDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.name) || dialog.name, typeDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.type) || dialog.type, ulrIcon: getUrlAvatar((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, clickUpdatedHandler: getDialogUpdatedInfoHandler, clickCancelHandler: editModal.toggleModal }) }))] }))) : null }))] })), dialog.type !== _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_8__.DialogType["private"] ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, __assign({ icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.GroupChatSvg, {}), title: "Members", rightSection: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Badge, { mute: true, count: users.length, limit: 100 }), className: "dialog-info-members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_5__["default"], { children: [users && users.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-info-action-wrapper-settings no-padding" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UsersList_UsersList__WEBPACK_IMPORTED_MODULE_7__["default"], { maxHeight: 75, usersFirstPageToView: users, allUsers: users, usersInDialogCount: users.length }) }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-info-action-wrapper-settings" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ disableActions: disableAction, title: "Edit dialog", open: inviteMembersModal.isOpen, onClose: inviteMembersModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InviteMembers_InviteMembers__WEBPACK_IMPORTED_MODULE_20__["default"], { participants: _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_12__.PublicDialogEntity.getParticipants((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), applyInviteUsersHandler: applyInviteUsersHandler, cancelInviteMembersHandler: inviteMembersModal.toggleModal, typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, typeDialog: dialog.type, idOwnerDialog: dialog.ownerId }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: inviteMembersModal.toggleModal, variant: "outlined", disabled: dialog.ownerId !== currentUserId || disableAction }, { children: "Invite members" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: function () { return onShowAllMemberClick(true); }, variant: "outlined", disabled: dialog.ownerId !== currentUserId }, { children: "See all members" }))] }))] }) }))) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, { icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.LeaveSvg, {}), title: "Leave dialog", onClick: !disableAction ? leaveModal.toggleModal : undefined, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('dialog-info-leave', {
24820
+ }) }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "text", onClick: editModal.toggleModal, disabled: disableAction }, { children: "Edit" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ title: "Edit dialog", onClose: editModal.toggleModal, open: editModal.isOpen }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__["default"], { disableActions: disableAction, nameDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.name) || dialog.name, typeDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.type) || dialog.type, ulrIcon: getUrlAvatar((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, clickUpdatedHandler: getDialogUpdatedInfoHandler, clickCancelHandler: editModal.toggleModal }) }))] }))) : null }))] })), dialog.type !== _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_8__.DialogType["private"] ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, __assign({ icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.GroupChatSvg, {}), title: "Members", rightSection: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Badge, { mute: true, count: users.length, limit: 100 }), className: "dialog-info-members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_5__["default"], { children: [users && users.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-info-action-wrapper-settings no-padding" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UsersList_UsersList__WEBPACK_IMPORTED_MODULE_7__["default"], { maxHeight: 75, usersFirstPageToView: users, allUsers: users, usersInDialogCount: users.length }) }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-info-action-wrapper-settings" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ disableActions: disableAction, title: "Edit dialog", open: inviteMembersModal.isOpen, onClose: inviteMembersModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InviteMembers_InviteMembers__WEBPACK_IMPORTED_MODULE_20__["default"], { participants: _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_12__.PublicDialogEntity.getParticipants((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), applyInviteUsersHandler: applyInviteUsersHandler, cancelInviteMembersHandler: inviteMembersModal.toggleModal, typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, typeDialog: dialog.type, idOwnerDialog: dialog.ownerId }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: inviteMembersModal.toggleModal, variant: "outlined", disabled: dialog.ownerId !== currentUserId || disableAction }, { children: "Invite members" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: function () { return onShowAllMemberClick(true); }, variant: "outlined", disabled: disableAction }, { children: "See all members" }))] }))] }) }))) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, { icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.LeaveSvg, {}), title: "Leave dialog", onClick: !disableAction ? leaveModal.toggleModal : undefined, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('dialog-info-leave', {
24894
24821
  'dialog-info-leave--disable': disableAction,
24895
24822
  }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ open: leaveModal.isOpen, title: "Leave dialog?", onClose: leaveModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-leave-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "outlined", onClick: leaveModal.toggleModal }, { children: "Cancel" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "danger", onClick: leaveDialogHandler }, { children: "Leave" }))] })) }))] }) })));
24896
24823
  };
@@ -25322,6 +25249,7 @@ var DialogList = function (_a) {
25322
25249
  var _h = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), showSearchDialogs = _h[0], setShowSearchDialogs = _h[1];
25323
25250
  var _j = react__WEBPACK_IMPORTED_MODULE_1___default().useState(''), nameDialogForSearch = _j[0], setNameDialogForSearch = _j[1];
25324
25251
  var isMobile = (0,_components_containers_SectionList_hooks__WEBPACK_IMPORTED_MODULE_8__.useMobileLayout)()[0];
25252
+ var _k = react__WEBPACK_IMPORTED_MODULE_1___default().useState('auto'), pointerEventsValue = _k[0], setPointerEventsValue = _k[1];
25325
25253
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
25326
25254
  dialogs.slice(0);
25327
25255
  dialogListViewModel === null || dialogListViewModel === void 0 ? void 0 : dialogListViewModel.dialogs.forEach(function (entity) {
@@ -25346,6 +25274,26 @@ var DialogList = function (_a) {
25346
25274
  });
25347
25275
  setDialogsToView(dialogs);
25348
25276
  }, [dialogListViewModel === null || dialogListViewModel === void 0 ? void 0 : dialogListViewModel.dialogs, selectedDialog]);
25277
+ var timeout;
25278
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
25279
+ return function () {
25280
+ if (timeout) {
25281
+ clearTimeout(timeout);
25282
+ }
25283
+ };
25284
+ }, []);
25285
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
25286
+ // let timeout: NodeJS.Timeout | number | undefined;
25287
+ if (dialogListViewModel && dialogListViewModel.loading) {
25288
+ setPointerEventsValue('none');
25289
+ timeout = setTimeout(function () {
25290
+ setPointerEventsValue('auto');
25291
+ }, 12000); // блокировать нажатие на 12 секунд
25292
+ }
25293
+ else {
25294
+ setPointerEventsValue('auto');
25295
+ }
25296
+ }, [dialogListViewModel.loading]);
25349
25297
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
25350
25298
  var fetchMoreData = function () {
25351
25299
  var _a;
@@ -25383,7 +25331,7 @@ var DialogList = function (_a) {
25383
25331
  var dateInt = 0;
25384
25332
  var formattedValue = '';
25385
25333
  if (item.entity.lastMessage.dateSent) {
25386
- dateInt = parseInt(item.entity.lastMessage.dateSent, 10);
25334
+ dateInt = item.entity.lastMessage.dateSent;
25387
25335
  if (Number.isNaN(dateInt)) {
25388
25336
  return formattedValue;
25389
25337
  }
@@ -25404,6 +25352,42 @@ var DialogList = function (_a) {
25404
25352
  }
25405
25353
  return AvatarComponent;
25406
25354
  };
25355
+ /*
25356
+ import React, {useState, useEffect} from 'react';
25357
+
25358
+ // предполагая, что dialogListViewModel определен в родительском компоненте и передан в этот компонент как проп
25359
+ const YourComponent = ({ dialogListViewModel }) => {
25360
+ const [pointerEventsValue, setPointerEvents] = useState('auto');
25361
+
25362
+ // поведение на 12 секунд
25363
+ useEffect(() => {
25364
+ let timeout;
25365
+ if (dialogListViewModel && dialogListViewModel.loading) {
25366
+ setPointerEvents('none');
25367
+ timeout = setTimeout(() => {
25368
+ setPointerEvents('auto');
25369
+ }, 12000); // блокировать нажатие на 12 секунд
25370
+ }
25371
+
25372
+ // поведение на отмену эффекта
25373
+ return () => {
25374
+ if (timeout) {
25375
+ clearTimeout(timeout);
25376
+ }
25377
+ }
25378
+ }, [dialogListViewModel]);
25379
+
25380
+ return (
25381
+ <div
25382
+ style={{
25383
+ pointerEventsValue: pointerEventsValue
25384
+ }}
25385
+ >
25386
+ ...
25387
+ </div>
25388
+ );
25389
+ }
25390
+ */
25407
25391
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ onClick: function () {
25408
25392
  setDialogsToView(function (prevState) {
25409
25393
  // const newState = [...prevState];
@@ -25419,7 +25403,10 @@ var DialogList = function (_a) {
25419
25403
  return newState;
25420
25404
  });
25421
25405
  }, style: {
25422
- pointerEvents: !(dialogListViewModel === null || dialogListViewModel === void 0 ? void 0 : dialogListViewModel.loading) ? 'auto' : 'none',
25406
+ // pointerEvents: !dialogListViewModel?.loading ? 'auto' : 'none',
25407
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25408
+ // @ts-ignore
25409
+ pointerEvents: pointerEventsValue || 'auto',
25423
25410
  } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewDialog_PreviewDialog__WEBPACK_IMPORTED_MODULE_6__["default"], { typeDialog: ((_a = item === null || item === void 0 ? void 0 : item.entity) === null || _a === void 0 ? void 0 : _a.type) || _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group, dialogViewModel: item, theme: {
25424
25411
  themeName: (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themeName) === 'dark' ? 'dark' : 'light',
25425
25412
  selected: item.isSelected,
@@ -25874,6 +25861,9 @@ function useDialogListViewModel(currentContext, initPagination) {
25874
25861
  })];
25875
25862
  case 1:
25876
25863
  leaveResult = _b.sent();
25864
+ if (leaveResult) {
25865
+ setNewDialog(undefined);
25866
+ }
25877
25867
  return [3 /*break*/, 4];
25878
25868
  case 2:
25879
25869
  usersForDeleteFromDialog = new Array();
@@ -26014,7 +26004,8 @@ __webpack_require__.r(__webpack_exports__);
26014
26004
  /* harmony import */ var _components_UI_svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/UI/svgs/Icons/Contents/PublicChannel */ "./src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx");
26015
26005
  /* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ "./src/Presentation/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts");
26016
26006
  /* harmony import */ var _ui_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui-components */ "./src/Presentation/ui-components/index.ts");
26017
- /* harmony import */ var _EditDialog_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./EditDialog.scss */ "./src/Presentation/Views/EditDialog/EditDialog.scss");
26007
+ /* harmony import */ var _utils_formatFileSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/formatFileSize */ "./src/utils/formatFileSize.ts");
26008
+ /* harmony import */ var _EditDialog_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./EditDialog.scss */ "./src/Presentation/Views/EditDialog/EditDialog.scss");
26018
26009
  var __assign = (undefined && undefined.__assign) || function () {
26019
26010
  __assign = Object.assign || function(t) {
26020
26011
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -26039,6 +26030,7 @@ var __assign = (undefined && undefined.__assign) || function () {
26039
26030
 
26040
26031
 
26041
26032
 
26033
+
26042
26034
  var TypeOpenDialog = {
26043
26035
  edit: 'edit',
26044
26036
  create: 'create',
@@ -26050,7 +26042,7 @@ var EditDialog = function (_a) {
26050
26042
  var maxUploadFileSize = currentContext.InitParams.maxFileSize;
26051
26043
  var minLengthNameDialog = 3;
26052
26044
  var maxLengthNameDialog = 60;
26053
- var errorMessageUploadMaxSize = "file size must be less than ".concat(maxUploadFileSize / 1024 / 1024, " Mb");
26045
+ var errorMessageUploadMaxSize = "The file should not exceed this size: ".concat((0,_utils_formatFileSize__WEBPACK_IMPORTED_MODULE_12__.formatFileSize)(maxUploadFileSize));
26054
26046
  var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(nameDialog), dialogName = _f[0], setDialogName = _f[1];
26055
26047
  var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null), fileUploadAvatar = _g[0], setFileUploadAvatar = _g[1];
26056
26048
  var _h = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(ulrIcon || ''), urlAvatar = _h[0], setUrlAvatar = _h[1];
@@ -26552,11 +26544,13 @@ var InviteMembers = function (_a) {
26552
26544
  setCountSelected(getUsersForIncludeInDialog().length);
26553
26545
  };
26554
26546
  var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), userNameForFilter = _d[0], setUserNameForFilter = _d[1];
26547
+ var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
26555
26548
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
26556
26549
  if (userNameForFilter.length > 2) {
26557
26550
  var newFilter = userNameForFilter;
26558
26551
  userViewModel.updateFilter(newFilter);
26559
26552
  }
26553
+ setTimeout(function () { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 500);
26560
26554
  if (userNameForFilter.length === 0) {
26561
26555
  userViewModel.updateFilter('');
26562
26556
  }
@@ -26565,11 +26559,12 @@ var InviteMembers = function (_a) {
26565
26559
  if (userNameForFilter.length > 2) {
26566
26560
  userViewModel.getUsers(new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination(0, userPerPage));
26567
26561
  }
26562
+ setTimeout(function () { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 500);
26568
26563
  if (userNameForFilter.length === 0) {
26569
26564
  userViewModel.getUsers(new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination(0, userPerPage));
26570
26565
  }
26571
26566
  }, [userViewModel.filter]);
26572
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__["default"], __assign({ gapBetweenItem: "8px" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "container-invite-members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "container-invite-members--add-members-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "container-invite-members--add-members-container--wrapper" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_TextField_TextField__WEBPACK_IMPORTED_MODULE_15__["default"], { className: "filtered-text-field", disabled: userViewModel.loading, placeholder: "Search", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_14__.SearchSvg, { className: "filtered-text-field__icon" }), value: userNameForFilter, onChange: function (value) {
26567
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__["default"], __assign({ gapBetweenItem: "8px" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "container-invite-members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "container-invite-members--add-members-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "container-invite-members--add-members-container--wrapper" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_TextField_TextField__WEBPACK_IMPORTED_MODULE_15__["default"], { ref: inputRef, className: "filtered-text-field", disabled: userViewModel.loading, placeholder: "Search", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_14__.SearchSvg, { className: "filtered-text-field__icon" }), value: userNameForFilter, onChange: function (value) {
26573
26568
  setUserNameForFilter(value);
26574
26569
  } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "container-invite-members--add-members-container--wrapper__inf" }, { children: [countSelectedItems, " selected"] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "container-invite-members--add-members-container--wrapper__members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__["default"], { children: [(userViewModel === null || userViewModel === void 0 ? void 0 : userViewModel.loading) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "container-invite-members--add-members-container--loader" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ style: {
26575
26570
  height: '44px',
@@ -26813,7 +26808,7 @@ function useInviteMembersViewModel() {
26813
26808
  };
26814
26809
  return {
26815
26810
  get entity() {
26816
- return _Data_Stubs__WEBPACK_IMPORTED_MODULE_5__.Stubs.createUserEntityWithParams(0, '', '', '', '', '', 0, '', '');
26811
+ return _Data_Stubs__WEBPACK_IMPORTED_MODULE_5__.Stubs.createUserEntityWithParams(0, '', '', '', '', '', '', '', '');
26817
26812
  },
26818
26813
  // id: Date.now(),
26819
26814
  // name: '',
@@ -26846,17 +26841,19 @@ __webpack_require__.r(__webpack_exports__);
26846
26841
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
26847
26842
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
26848
26843
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
26849
- /* harmony import */ var _PreviewDialog_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PreviewDialog.scss */ "./src/Presentation/Views/PreviewDialog/PreviewDialog.scss");
26850
- /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
26851
- /* harmony import */ var _Data_Creator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Data/Creator */ "./src/Data/Creator.ts");
26852
- /* harmony import */ var _Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Data/source/remote/Mapper/MessageDTOMapper */ "./src/Data/source/remote/Mapper/MessageDTOMapper.ts");
26853
- /* harmony import */ var _DialogInfo_UsersList_useUsersListViewModel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../DialogInfo/UsersList/useUsersListViewModel */ "./src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts");
26854
- /* harmony import */ var _ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui-components/PreviewFileMessage/PreviewFileMessage */ "./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx");
26855
- /* harmony import */ var _ui_components_Badge_Badge__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui-components/Badge/Badge */ "./src/Presentation/ui-components/Badge/Badge.tsx");
26856
- /* harmony import */ var _ui_components_DialogItemPreview_DialogItemPreview__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui-components/DialogItemPreview/DialogItemPreview */ "./src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx");
26857
- /* harmony import */ var _ui_components_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui-components/Dropdown/Dropdown */ "./src/Presentation/ui-components/Dropdown/Dropdown.tsx");
26858
- /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../icons */ "./src/Presentation/icons/index.ts");
26859
- /* harmony import */ var _ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui-components/Avatar/Avatar */ "./src/Presentation/ui-components/Avatar/Avatar.tsx");
26844
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
26845
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_2__);
26846
+ /* harmony import */ var _PreviewDialog_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewDialog.scss */ "./src/Presentation/Views/PreviewDialog/PreviewDialog.scss");
26847
+ /* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ "./src/Domain/entity/DialogTypes.ts");
26848
+ /* harmony import */ var _Data_Creator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Data/Creator */ "./src/Data/Creator.ts");
26849
+ /* harmony import */ var _Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Data/source/remote/Mapper/MessageDTOMapper */ "./src/Data/source/remote/Mapper/MessageDTOMapper.ts");
26850
+ /* harmony import */ var _DialogInfo_UsersList_useUsersListViewModel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../DialogInfo/UsersList/useUsersListViewModel */ "./src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts");
26851
+ /* harmony import */ var _ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui-components/PreviewFileMessage/PreviewFileMessage */ "./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx");
26852
+ /* harmony import */ var _ui_components_Badge_Badge__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui-components/Badge/Badge */ "./src/Presentation/ui-components/Badge/Badge.tsx");
26853
+ /* harmony import */ var _ui_components_DialogItemPreview_DialogItemPreview__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui-components/DialogItemPreview/DialogItemPreview */ "./src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx");
26854
+ /* harmony import */ var _ui_components_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui-components/Dropdown/Dropdown */ "./src/Presentation/ui-components/Dropdown/Dropdown.tsx");
26855
+ /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../icons */ "./src/Presentation/icons/index.ts");
26856
+ /* harmony import */ var _ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui-components/Avatar/Avatar */ "./src/Presentation/ui-components/Avatar/Avatar.tsx");
26860
26857
  var __assign = (undefined && undefined.__assign) || function () {
26861
26858
  __assign = Object.assign || function(t) {
26862
26859
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -26918,6 +26915,7 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
26918
26915
 
26919
26916
 
26920
26917
 
26918
+
26921
26919
  // eslint-disable-next-line react/function-component-definition
26922
26920
  var PreviewDialog = function (_a) {
26923
26921
  var typeDialog = _a.typeDialog, dialogViewModel = _a.dialogViewModel, dialogAvatar = _a.dialogAvatar, title = _a.title, previewMessage = _a.previewMessage, unreadMessageCount = _a.unreadMessageCount, message_date_time_sent = _a.message_date_time_sent, _b = _a.theme, theme = _b === void 0 ? undefined : _b, onLeaveDialog = _a.onLeaveDialog, _c = _a.disableActions, disableActions = _c === void 0 ? false : _c,
@@ -26991,22 +26989,22 @@ var PreviewDialog = function (_a) {
26991
26989
  }
26992
26990
  var avatar;
26993
26991
  switch (typeDialog) {
26994
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_3__.DialogType["public"]:
26995
- avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.PublicChannelSvg, {}) });
26992
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType["public"]:
26993
+ avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_13__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_12__.PublicChannelSvg, {}) });
26996
26994
  break;
26997
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_3__.DialogType.group:
26998
- avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.GroupChatSvg, {}) });
26995
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group:
26996
+ avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_13__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_12__.GroupChatSvg, {}) });
26999
26997
  break;
27000
- case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_3__.DialogType["private"]:
27001
- avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.UserSvg, {}), src: dialogAvatarUrl });
26998
+ case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType["private"]:
26999
+ avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_13__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_12__.UserSvg, {}), src: dialogAvatarUrl });
27002
27000
  break;
27003
27001
  default:
27004
- avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.GroupChatSvg, {}) });
27002
+ avatar = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_13__["default"], { size: "lg", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_12__.GroupChatSvg, {}) });
27005
27003
  break;
27006
27004
  }
27007
27005
  avatar = dialogAvatar || avatar;
27008
27006
  var getMessageParts = function (message) {
27009
- return _Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_5__.MessageDTOMapper.getMessageParts(message);
27007
+ return _Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_6__.MessageDTOMapper.getMessageParts(message);
27010
27008
  };
27011
27009
  var _f = react__WEBPACK_IMPORTED_MODULE_1___default().useState(''), fileUrl = _f[0], setFileUrl = _f[1];
27012
27010
  var _g = react__WEBPACK_IMPORTED_MODULE_1___default().useState([]), messageContentParts = _g[0], setMessageContentParts = _g[1];
@@ -27022,8 +27020,8 @@ var PreviewDialog = function (_a) {
27022
27020
  messageParts.length > 0 &&
27023
27021
  messageParts[3].includes('image'))) return [3 /*break*/, 2];
27024
27022
  fileUid = messageParts[2];
27025
- tmpFileUrl = fileUid && QB.content.privateUrl(fileUid);
27026
- return [4 /*yield*/, _Data_Creator__WEBPACK_IMPORTED_MODULE_4__.Creator.createBlobFromUrl(tmpFileUrl)];
27023
+ tmpFileUrl = fileUid && quickblox_quickblox__WEBPACK_IMPORTED_MODULE_2___default().content.privateUrl(fileUid);
27024
+ return [4 /*yield*/, _Data_Creator__WEBPACK_IMPORTED_MODULE_5__.Creator.createBlobFromUrl(tmpFileUrl)];
27027
27025
  case 1:
27028
27026
  blobFile = (_a.sent()).blobFile;
27029
27027
  tmpFileUrl = blobFile ? URL.createObjectURL(blobFile) : tmpFileUrl || '';
@@ -27034,7 +27032,7 @@ var PreviewDialog = function (_a) {
27034
27032
  });
27035
27033
  });
27036
27034
  }
27037
- var userViewModel = (0,_DialogInfo_UsersList_useUsersListViewModel__WEBPACK_IMPORTED_MODULE_6__["default"])(dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item.entity);
27035
+ var userViewModel = (0,_DialogInfo_UsersList_useUsersListViewModel__WEBPACK_IMPORTED_MODULE_7__["default"])(dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item.entity);
27038
27036
  var getUserAvatarByUid = function () { return __awaiter(void 0, void 0, void 0, function () {
27039
27037
  var result, participants, senderUser;
27040
27038
  return __generator(this, function (_a) {
@@ -27042,7 +27040,7 @@ var PreviewDialog = function (_a) {
27042
27040
  case 0:
27043
27041
  result = '';
27044
27042
  participants = (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) &&
27045
- (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.type) === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_3__.DialogType["private"]
27043
+ (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.type) === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType["private"]
27046
27044
  ? [
27047
27045
  (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity)
27048
27046
  .participantId,
@@ -27096,28 +27094,28 @@ var PreviewDialog = function (_a) {
27096
27094
  if (messageContentParts && messageContentParts.length > 0) {
27097
27095
  var fileName = messageContentParts[1], type = messageContentParts[3];
27098
27096
  if (type.includes('audio')) {
27099
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_7__["default"], { type: "audio", name: trimFileName(fileName) }));
27097
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_8__["default"], { type: "audio", name: trimFileName(fileName) }));
27100
27098
  }
27101
27099
  if (type.includes('video')) {
27102
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_7__["default"], { type: "video", name: trimFileName(fileName) }));
27100
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_8__["default"], { type: "video", name: trimFileName(fileName) }));
27103
27101
  }
27104
27102
  if (type.includes('image')) {
27105
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_7__["default"], { name: trimFileName(fileName), src: fileUrl }));
27103
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_8__["default"], { name: trimFileName(fileName), src: fileUrl }));
27106
27104
  }
27107
27105
  if (fileName.length > 0 && fileName.includes('.')) {
27108
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_7__["default"], { name: trimFileName(fileName) });
27106
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_PreviewFileMessage_PreviewFileMessage__WEBPACK_IMPORTED_MODULE_8__["default"], { name: trimFileName(fileName) });
27109
27107
  }
27110
27108
  return message;
27111
27109
  }
27112
- if (message.includes(_Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_5__.MessageDTOMapper.FORWARD_MESSAGE_PREFIX)) {
27110
+ if (message.includes(_Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_6__.MessageDTOMapper.FORWARD_MESSAGE_PREFIX)) {
27113
27111
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { children: "Forwarded message" });
27114
27112
  }
27115
- if (message.includes(_Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_5__.MessageDTOMapper.REPLY_MESSAGE_PREFIX)) {
27113
+ if (message.includes(_Data_source_remote_Mapper_MessageDTOMapper__WEBPACK_IMPORTED_MODULE_6__.MessageDTOMapper.REPLY_MESSAGE_PREFIX)) {
27116
27114
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { children: "Replied Message" });
27117
27115
  }
27118
27116
  return message;
27119
27117
  };
27120
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogItemPreview_DialogItemPreview__WEBPACK_IMPORTED_MODULE_9__["default"], { className: "dialog-item-preview-border", active: theme === null || theme === void 0 ? void 0 : theme.selected, avatar: avatar, title: title || '', date: message_date_time_sent || '', lastMessage: getPreviewMessage(previewMessage || ''), badge: unreadMessageCount && unreadMessageCount > 0 ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Badge_Badge__WEBPACK_IMPORTED_MODULE_8__["default"], { count: unreadMessageCount, mute: false, limit: 9 })) : undefined, contextMenu: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_10__["default"], __assign({ options: [
27118
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogItemPreview_DialogItemPreview__WEBPACK_IMPORTED_MODULE_10__["default"], { className: "dialog-item-preview-border", active: theme === null || theme === void 0 ? void 0 : theme.selected, avatar: avatar, title: title || '', date: message_date_time_sent || '', lastMessage: getPreviewMessage(previewMessage || ''), badge: unreadMessageCount && unreadMessageCount > 0 ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Badge_Badge__WEBPACK_IMPORTED_MODULE_9__["default"], { count: unreadMessageCount, mute: false, limit: 9 })) : undefined, contextMenu: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], __assign({ options: [
27121
27119
  {
27122
27120
  value: 'Leave',
27123
27121
  label: 'Leave',
@@ -27127,7 +27125,7 @@ var PreviewDialog = function (_a) {
27127
27125
  if (value === 'Leave') {
27128
27126
  onLeaveDialog(dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity);
27129
27127
  }
27130
- }, placement: "left" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.MoreSvg, {}) })), onClick: function () {
27128
+ }, placement: "left" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_12__.MoreSvg, {}) })), onClick: function () {
27131
27129
  if (dialogViewModel && dialogViewModel.itemClickActionHandler) {
27132
27130
  dialogViewModel.itemClickActionHandler(dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item);
27133
27131
  }
@@ -29495,6 +29493,9 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
29495
29493
  if (tmpFileUrl && tmpFileUrl.length > 0) {
29496
29494
  setDialogAvatarUrl(tmpFileUrl);
29497
29495
  }
29496
+ else {
29497
+ setDialogAvatarUrl('');
29498
+ }
29498
29499
  return [2 /*return*/];
29499
29500
  }
29500
29501
  });
@@ -29788,51 +29789,13 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
29788
29789
  });
29789
29790
  }
29790
29791
  };
29791
- // // eslint-disable-next-line react/prop-types,@typescript-eslint/no-unused-vars
29792
- // const defaultGetSenderName: GetUserNameFct = async (props: {
29793
- // userId?: number;
29794
- // sender?: UserEntity;
29795
- // }): Promise<string | undefined> => {
29796
- // let result = 'undefined user';
29797
- //
29798
- // // eslint-disable-next-line react/prop-types
29799
- // if (!props.sender) {
29800
- // // eslint-disable-next-line react/prop-types
29801
- // if (props.userId && props.userId > 0) {
29802
- // // eslint-disable-next-line react/prop-types,@typescript-eslint/no-unsafe-call
29803
- // const senderUser = await userViewModel.getUserById(props.userId);
29804
- //
29805
- // if (!senderUser) {
29806
- // return result;
29807
- // }
29808
- // result =
29809
- // senderUser.full_name ||
29810
- // senderUser.login ||
29811
- // senderUser.email ||
29812
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-call
29813
- // senderUser.id.toString();
29814
- // } else return result;
29815
- // } else {
29816
- // result =
29817
- // // eslint-disable-next-line react/prop-types
29818
- // props.sender.full_name ||
29819
- // // eslint-disable-next-line react/prop-types
29820
- // props.sender.login ||
29821
- // // eslint-disable-next-line react/prop-types
29822
- // props.sender.email ||
29823
- // // eslint-disable-next-line react/prop-types
29824
- // props.sender.id.toString();
29825
- // }
29826
- //
29827
- // return result;
29828
- // };
29829
29792
  var createDialogHandler = function () {
29830
29793
  if (isOnline) {
29831
29794
  newModal.toggleModal();
29832
29795
  }
29833
29796
  };
29834
29797
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
29835
- var codeVersion = '0.3.0';
29798
+ var codeVersion = '0.3.1';
29836
29799
  console.log("React UIKit CODE VERSION IS ".concat(codeVersion));
29837
29800
  if (isAuthProcessed()) {
29838
29801
  var pagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_11__.Pagination();
@@ -29915,8 +29878,8 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
29915
29878
  }
29916
29879
  }, [isOnline]);
29917
29880
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
29918
- getDialogPhotoFileForPreview();
29919
29881
  if (dialogsViewModel.entity) {
29882
+ getDialogPhotoFileForPreview().catch();
29920
29883
  userViewModel.entity = dialogsViewModel.entity;
29921
29884
  }
29922
29885
  return function () {
@@ -30121,8 +30084,12 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
30121
30084
  setForwardMessage(m);
30122
30085
  forwardMessageModal.toggleModal();
30123
30086
  }
30124
- }, listRef: listRef, AIAssistWidget: defaultAIAssistWidget, AITranslateWidget: defaultAITranslateWidget, languagesForAITranslate: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_15__.DefaultConfigurations.getAdditionalLanguagesForAITranslate(currentContext.InitParams.qbConfig.configAIApi
30125
- .AITranslateWidgetConfig), defaultTranslationLanguage: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_15__.DefaultConfigurations.getDefaultLanguageForAITranslate(currentContext.InitParams.qbConfig.configAIApi
30087
+ }, listRef: listRef, AIAssistWidget: defaultAIAssistWidget, AITranslateWidget: defaultAITranslateWidget, languagesForAITranslate: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_15__.DefaultConfigurations.getAdditionalLanguagesForAITranslate(
30088
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
30089
+ currentContext.InitParams.qbConfig.configAIApi
30090
+ .AITranslateWidgetConfig), defaultTranslationLanguage: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_15__.DefaultConfigurations.getDefaultLanguageForAITranslate(
30091
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
30092
+ currentContext.InitParams.qbConfig.configAIApi
30126
30093
  .AITranslateWidgetConfig), onError: function (messageError) {
30127
30094
  (0,react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast)(messageError);
30128
30095
  }, messagesToView: messagesViewModel.messages, maxTokens: maxTokensForAIRephrase })); });
@@ -30162,8 +30129,9 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
30162
30129
  // upHeaderContent={<CompanyLogo />}
30163
30130
  dialog: selectedDialog, dialogViewModel: dialogsViewModel, onCloseDialogInformationHandler: informationCloseHandler }))) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogWindow_DialogWindow__WEBPACK_IMPORTED_MODULE_33__["default"], __assign({ open: isOpen, title: "Leave dialog?", onClose: handleDialogOnClick }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-leave-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Button_Button__WEBPACK_IMPORTED_MODULE_32__["default"], __assign({ variant: "outlined", onClick: handleDialogOnClick }, { children: "Cancel" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Button_Button__WEBPACK_IMPORTED_MODULE_32__["default"], __assign({ variant: "danger", onClick: handleLeaveDialog }, { children: "Leave" }))] })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogWindow_DialogWindow__WEBPACK_IMPORTED_MODULE_33__["default"], __assign({ title: "New dialog", onClose: newModal.toggleModal, open: newModal.isOpen, className: isMobile
30164
30131
  ? 'dialog-list-new-dialog-mobile-container'
30165
- : 'dialog-list-new-dialog-desktop-container' }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_Flow_CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_39__["default"], { dialogsViewModel: dialogsViewModel, onCancel: newModal.toggleModal, onFinished: function () {
30132
+ : 'dialog-list-new-dialog-desktop-container' }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_Flow_CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_39__["default"], { dialogsViewModel: dialogsViewModel, onCancel: newModal.toggleModal, onFinished: function (newDialog) {
30166
30133
  newModal.toggleModal();
30134
+ setSelectedDialog(newDialog);
30167
30135
  }, isOnline: isOnline }) })), selectedDialog && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogWindow_DialogWindow__WEBPACK_IMPORTED_MODULE_33__["default"], __assign({ title: "Forward", open: forwardMessageModal.isOpen, onClose: forwardMessageModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_Dialog_ForwardMessageFlow_ForwardMessageFlow__WEBPACK_IMPORTED_MODULE_23__["default"], { messages: [forwardMessage], currentDialog: selectedDialog, currentUserName: userName || '', dialogs: dialogsViewModel.dialogs, onSendData: handleSendData, disableActions: !isOnline }) })))] })) }));
30168
30136
  };
30169
30137
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuickBloxUIKitDesktopLayout);
@@ -30186,13 +30154,15 @@ __webpack_require__.r(__webpack_exports__);
30186
30154
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
30187
30155
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
30188
30156
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
30189
- /* harmony import */ var _Data_source_local_LocalDataSource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Data/source/local/LocalDataSource */ "./src/Data/source/local/LocalDataSource.ts");
30190
- /* harmony import */ var _Data_source_remote_RemoteDataSource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Data/source/remote/RemoteDataSource */ "./src/Data/source/remote/RemoteDataSource.ts");
30191
- /* harmony import */ var _Data_repository_DialogsRepository__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Data/repository/DialogsRepository */ "./src/Data/repository/DialogsRepository.ts");
30192
- /* harmony import */ var _Domain_use_cases_SyncDialogsUseCase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Domain/use_cases/SyncDialogsUseCase */ "./src/Domain/use_cases/SyncDialogsUseCase.ts");
30193
- /* harmony import */ var _Data_repository_ConnectionRepository__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Data/repository/ConnectionRepository */ "./src/Data/repository/ConnectionRepository.ts");
30194
- /* harmony import */ var _Data_repository_EventMessagesRepository__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../Data/repository/EventMessagesRepository */ "./src/Data/repository/EventMessagesRepository.ts");
30195
- /* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../Data/DefaultConfigurations */ "./src/Data/DefaultConfigurations.ts");
30157
+ /* harmony import */ var react_toastify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-toastify */ "./node_modules/react-toastify/dist/react-toastify.esm.mjs");
30158
+ /* harmony import */ var react_toastify_dist_ReactToastify_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-toastify/dist/ReactToastify.css */ "./node_modules/react-toastify/dist/ReactToastify.css");
30159
+ /* harmony import */ var _Data_source_local_LocalDataSource__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Data/source/local/LocalDataSource */ "./src/Data/source/local/LocalDataSource.ts");
30160
+ /* harmony import */ var _Data_source_remote_RemoteDataSource__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Data/source/remote/RemoteDataSource */ "./src/Data/source/remote/RemoteDataSource.ts");
30161
+ /* harmony import */ var _Data_repository_DialogsRepository__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Data/repository/DialogsRepository */ "./src/Data/repository/DialogsRepository.ts");
30162
+ /* harmony import */ var _Domain_use_cases_SyncDialogsUseCase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../Domain/use_cases/SyncDialogsUseCase */ "./src/Domain/use_cases/SyncDialogsUseCase.ts");
30163
+ /* harmony import */ var _Data_repository_ConnectionRepository__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../Data/repository/ConnectionRepository */ "./src/Data/repository/ConnectionRepository.ts");
30164
+ /* harmony import */ var _Data_repository_EventMessagesRepository__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../Data/repository/EventMessagesRepository */ "./src/Data/repository/EventMessagesRepository.ts");
30165
+ /* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../Data/DefaultConfigurations */ "./src/Data/DefaultConfigurations.ts");
30196
30166
  var __assign = (undefined && undefined.__assign) || function () {
30197
30167
  __assign = Object.assign || function(t) {
30198
30168
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -30250,16 +30220,18 @@ var _this = undefined;
30250
30220
 
30251
30221
 
30252
30222
 
30223
+
30224
+
30253
30225
  var initialValues = {
30254
- LOCAL_DATA_SOURCE: new _Data_source_local_LocalDataSource__WEBPACK_IMPORTED_MODULE_2__.LocalDataSource(),
30255
- REMOTE_DATA_SOURCE: new _Data_source_remote_RemoteDataSource__WEBPACK_IMPORTED_MODULE_3__.RemoteDataSource(),
30256
- CONNECTION_REPOSITORY: new _Data_repository_ConnectionRepository__WEBPACK_IMPORTED_MODULE_6__["default"](),
30226
+ LOCAL_DATA_SOURCE: new _Data_source_local_LocalDataSource__WEBPACK_IMPORTED_MODULE_4__.LocalDataSource(),
30227
+ REMOTE_DATA_SOURCE: new _Data_source_remote_RemoteDataSource__WEBPACK_IMPORTED_MODULE_5__.RemoteDataSource(),
30228
+ CONNECTION_REPOSITORY: new _Data_repository_ConnectionRepository__WEBPACK_IMPORTED_MODULE_8__["default"](),
30257
30229
  };
30258
30230
  var initialEvent = {
30259
- EVENT_MESSAGE_REPOSITORY: new _Data_repository_EventMessagesRepository__WEBPACK_IMPORTED_MODULE_7__["default"](initialValues.REMOTE_DATA_SOURCE, initialValues.LOCAL_DATA_SOURCE, initialValues.CONNECTION_REPOSITORY),
30231
+ EVENT_MESSAGE_REPOSITORY: new _Data_repository_EventMessagesRepository__WEBPACK_IMPORTED_MODULE_9__["default"](initialValues.REMOTE_DATA_SOURCE, initialValues.LOCAL_DATA_SOURCE, initialValues.CONNECTION_REPOSITORY),
30260
30232
  };
30261
30233
  var initialSync = {
30262
- SYNC_DIALOGS_USE_CASE: new _Domain_use_cases_SyncDialogsUseCase__WEBPACK_IMPORTED_MODULE_5__.SyncDialogsUseCase(new _Data_repository_DialogsRepository__WEBPACK_IMPORTED_MODULE_4__["default"](initialValues.LOCAL_DATA_SOURCE, initialValues.REMOTE_DATA_SOURCE), initialValues.CONNECTION_REPOSITORY, initialEvent.EVENT_MESSAGE_REPOSITORY),
30234
+ SYNC_DIALOGS_USE_CASE: new _Domain_use_cases_SyncDialogsUseCase__WEBPACK_IMPORTED_MODULE_7__.SyncDialogsUseCase(new _Data_repository_DialogsRepository__WEBPACK_IMPORTED_MODULE_6__["default"](initialValues.LOCAL_DATA_SOURCE, initialValues.REMOTE_DATA_SOURCE), initialValues.CONNECTION_REPOSITORY, initialEvent.EVENT_MESSAGE_REPOSITORY),
30263
30235
  };
30264
30236
  var initDataContext = {
30265
30237
  // authProcessed: false,
@@ -30279,9 +30251,9 @@ var initDataContext = {
30279
30251
  // ),
30280
30252
  },
30281
30253
  InitParams: {
30282
- accountData: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_8__.DefaultConfigurations.getDefaultQBConfig().credentials,
30283
- maxFileSize: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_8__.DefaultConfigurations.getDefaultQBConfig().appConfig.maxFileSize,
30284
- qbConfig: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_8__.DefaultConfigurations.getDefaultQBConfig(),
30254
+ accountData: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_10__.DefaultConfigurations.getDefaultQBConfig().credentials,
30255
+ maxFileSize: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_10__.DefaultConfigurations.getDefaultQBConfig().appConfig.maxFileSize,
30256
+ qbConfig: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_10__.DefaultConfigurations.getDefaultQBConfig(),
30285
30257
  },
30286
30258
  updateQBInitParams: function (InitParams) {
30287
30259
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
@@ -30472,6 +30444,14 @@ function QuickBloxUIKitProvider(_a) {
30472
30444
  // console.log('updateAuthProcessedStatus, set ', status);
30473
30445
  // setAuthProcessed(status);
30474
30446
  // };
30447
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
30448
+ if (!accountData.accountKey || !accountData.appId || !accountData.authKey) {
30449
+ (0,react_toastify__WEBPACK_IMPORTED_MODULE_2__.toast)('Please input AppId, AuthKey, AuthSecret, AccountKey to sign in/up');
30450
+ }
30451
+ }, []);
30452
+ if (!accountData.accountKey || !accountData.appId || !accountData.authKey) {
30453
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_toastify__WEBPACK_IMPORTED_MODULE_2__.ToastContainer, { position: "top-center", autoClose: 5000, bodyClassName: "toast__body", toastClassName: "toast", pauseOnHover: false, closeButton: false, hideProgressBar: true }), children] }));
30454
+ }
30475
30455
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Provider, __assign({ value: {
30476
30456
  InitParams: InitParams,
30477
30457
  updateQBInitParams: updateQBInitParams,
@@ -32276,7 +32256,7 @@ function SettingsItem(_a) {
32276
32256
  "use strict";
32277
32257
  __webpack_require__.r(__webpack_exports__);
32278
32258
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32279
- /* harmony export */ "default": () => (/* binding */ TextField)
32259
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
32280
32260
  /* harmony export */ });
32281
32261
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
32282
32262
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
@@ -32314,13 +32294,14 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
32314
32294
 
32315
32295
 
32316
32296
 
32317
- function TextField(_a) {
32297
+ var TextField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
32318
32298
  var label = _a.label, icon = _a.icon, _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, className = _a.className, id = _a.id, value = _a.value, onChange = _a.onChange, inputProps = __rest(_a, ["label", "icon", "loading", "disabled", "className", "id", "value", "onChange"]);
32319
32299
  var defaultId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
32320
32300
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('text-field', {
32321
32301
  'text-field--disabled': disabled,
32322
- }, className) }, { children: [label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", __assign({ htmlFor: id || defaultId, className: "text-field__label" }, { children: label }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "text-field__wrapper" }, { children: [icon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", __assign({ className: "text-field__icon" }, { children: icon })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", __assign({}, inputProps, { disabled: loading || disabled, className: "text-field__input", id: id || defaultId, value: value, onChange: function (e) { return onChange(e.currentTarget.value); } })), !loading && value && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.RemoveSvg, { className: "text-field__reset", onClick: function () { return onChange(''); } })), loading && !disabled && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Loader_Loader__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "sm", className: "text-field__loader" }))] }))] })));
32323
- }
32302
+ }, className) }, { children: [label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", __assign({ htmlFor: id || defaultId, className: "text-field__label" }, { children: label }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "text-field__wrapper" }, { children: [icon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", __assign({ className: "text-field__icon" }, { children: icon })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", __assign({}, inputProps, { ref: ref, disabled: loading || disabled, className: "text-field__input", id: id || defaultId, value: value, onChange: function (e) { return onChange(e.currentTarget.value); } })), !loading && value && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.RemoveSvg, { className: "text-field__reset", onClick: function () { return onChange(''); } })), loading && !disabled && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Loader_Loader__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "sm", className: "text-field__loader" }))] }))] })));
32303
+ });
32304
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TextField);
32324
32305
 
32325
32306
 
32326
32307
  /***/ }),
@@ -32492,42 +32473,6 @@ __webpack_require__.r(__webpack_exports__);
32492
32473
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32493
32474
  /* harmony export */ "QBConfig": () => (/* binding */ QBConfig)
32494
32475
  /* harmony export */ });
32495
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
32496
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32497
- return new (P || (P = Promise))(function (resolve, reject) {
32498
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32499
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32500
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
32501
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32502
- });
32503
- };
32504
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
32505
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32506
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
32507
- function verb(n) { return function (v) { return step([n, v]); }; }
32508
- function step(op) {
32509
- if (f) throw new TypeError("Generator is already executing.");
32510
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
32511
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32512
- if (y = 0, t) op = [op[0] & 2, t.value];
32513
- switch (op[0]) {
32514
- case 0: case 1: t = op; break;
32515
- case 4: _.label++; return { value: op[1], done: false };
32516
- case 5: _.label++; y = op[1]; op = [0]; continue;
32517
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
32518
- default:
32519
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
32520
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
32521
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
32522
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
32523
- if (t[2]) _.ops.pop();
32524
- _.trys.pop(); continue;
32525
- }
32526
- op = body.call(thisArg, _);
32527
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
32528
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
32529
- }
32530
- };
32531
32476
  var QBConfig = {
32532
32477
  credentials: {
32533
32478
  appId: -1,
@@ -32642,7 +32587,7 @@ var QBConfig = {
32642
32587
  },
32643
32588
  },
32644
32589
  appConfig: {
32645
- maxFileSize: 10 * 1024 * 1024,
32590
+ maxFileSize: 10485760,
32646
32591
  sessionTimeOut: 122,
32647
32592
  chatProtocol: {
32648
32593
  active: 2,
@@ -32655,19 +32600,15 @@ var QBConfig = {
32655
32600
  api: 'api.quickblox.com',
32656
32601
  chat: 'chat.quickblox.com',
32657
32602
  },
32658
- on: {
32659
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
32660
- sessionExpired: function (handleResponse, retry) {
32661
- return __awaiter(this, void 0, void 0, function () {
32662
- return __generator(this, function (_a) {
32663
- console.log(
32664
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
32665
- "QBconfig sessionExpired handle: ".concat(handleResponse, " ").concat(retry));
32666
- return [2 /*return*/];
32667
- });
32668
- });
32669
- },
32670
- },
32603
+ // on: {
32604
+ // // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
32605
+ // async sessionExpired(handleResponse: any, retry: any) {
32606
+ // console.log(
32607
+ // // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
32608
+ // `QBconfig sessionExpired handle: ${handleResponse} ${retry}`,
32609
+ // );
32610
+ // },
32611
+ // },
32671
32612
  streamManagement: {
32672
32613
  enable: true,
32673
32614
  },
@@ -32714,6 +32655,7 @@ __webpack_require__.r(__webpack_exports__);
32714
32655
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32715
32656
  /* harmony export */ "QBChatConnect": () => (/* binding */ QBChatConnect),
32716
32657
  /* harmony export */ "QBChatDisconnect": () => (/* binding */ QBChatDisconnect),
32658
+ /* harmony export */ "QBChatMarkMessageDelivered": () => (/* binding */ QBChatMarkMessageDelivered),
32717
32659
  /* harmony export */ "QBChatMarkMessageRead": () => (/* binding */ QBChatMarkMessageRead),
32718
32660
  /* harmony export */ "QBChatSendMessage": () => (/* binding */ QBChatSendMessage),
32719
32661
  /* harmony export */ "QBChatSendSystemMessage": () => (/* binding */ QBChatSendSystemMessage),
@@ -32750,7 +32692,9 @@ __webpack_require__.r(__webpack_exports__);
32750
32692
  /* harmony export */ "qbChatGetMessagesExtended": () => (/* binding */ qbChatGetMessagesExtended),
32751
32693
  /* harmony export */ "registrationAccount": () => (/* binding */ registrationAccount)
32752
32694
  /* harmony export */ });
32753
- /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/parse */ "./src/utils/parse.ts");
32695
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! quickblox/quickblox */ "quickblox/quickblox");
32696
+ /* harmony import */ var quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0__);
32697
+ /* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/parse */ "./src/utils/parse.ts");
32754
32698
  var __assign = (undefined && undefined.__assign) || function () {
32755
32699
  __assign = Object.assign || function(t) {
32756
32700
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -32763,15 +32707,17 @@ var __assign = (undefined && undefined.__assign) || function () {
32763
32707
  return __assign.apply(this, arguments);
32764
32708
  };
32765
32709
 
32710
+
32766
32711
  function QBInit(params) {
32767
- QB.init(params.appIdOrToken, params.authKeyOrAppId, params.authSecret, params.accountKey, params.config);
32712
+ var _a;
32713
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().init(params.appIdOrToken, params.authKeyOrAppId, params.authSecret, params.accountKey, (_a = params.config) === null || _a === void 0 ? void 0 : _a.appConfig);
32768
32714
  }
32769
32715
  function QBCreateSession(params) {
32770
32716
  return new Promise(function (resolve, reject) {
32771
32717
  if (!params) {
32772
- QB.createSession(function (sessionError, session) {
32718
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().createSession(function (sessionError, session) {
32773
32719
  if (sessionError) {
32774
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(sessionError));
32720
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(sessionError));
32775
32721
  }
32776
32722
  else {
32777
32723
  resolve(session);
@@ -32779,9 +32725,9 @@ function QBCreateSession(params) {
32779
32725
  });
32780
32726
  }
32781
32727
  else
32782
- QB.createSession(params, function (sessionError, session) {
32728
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().createSession(params, function (sessionError, session) {
32783
32729
  if (sessionError) {
32784
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(sessionError));
32730
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(sessionError));
32785
32731
  }
32786
32732
  else {
32787
32733
  resolve(session);
@@ -32791,9 +32737,9 @@ function QBCreateSession(params) {
32791
32737
  }
32792
32738
  function QBGetSession() {
32793
32739
  return new Promise(function (resolve, reject) {
32794
- QB.getSession(function (getSessionError, response) {
32740
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().getSession(function (getSessionError, response) {
32795
32741
  if (getSessionError || !(response === null || response === void 0 ? void 0 : response.session)) {
32796
- reject(getSessionError ? (0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(getSessionError) : 'No session');
32742
+ reject(getSessionError ? (0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(getSessionError) : 'No session');
32797
32743
  }
32798
32744
  else {
32799
32745
  resolve(response.session);
@@ -32803,9 +32749,9 @@ function QBGetSession() {
32803
32749
  }
32804
32750
  function loginToQuickBlox(params) {
32805
32751
  return new Promise(function (resolve, reject) {
32806
- QB.login(params, function (loginError, user) {
32752
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().login(params, function (loginError, user) {
32807
32753
  if (loginError) {
32808
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(loginError));
32754
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(loginError));
32809
32755
  }
32810
32756
  else {
32811
32757
  resolve(user);
@@ -32824,14 +32770,14 @@ function QBLogin(params) {
32824
32770
  }
32825
32771
  function QBLogout() {
32826
32772
  return new Promise(function (resolve) {
32827
- QB.destroySession(resolve);
32773
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().destroySession(resolve);
32828
32774
  });
32829
32775
  }
32830
32776
  function QBChatConnect(params) {
32831
32777
  return new Promise(function (resolve, reject) {
32832
- QB.chat.connect(params, function (error, success) {
32778
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.connect(params, function (error, success) {
32833
32779
  if (error) {
32834
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32780
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32835
32781
  }
32836
32782
  else {
32837
32783
  resolve(success);
@@ -32840,13 +32786,13 @@ function QBChatConnect(params) {
32840
32786
  });
32841
32787
  }
32842
32788
  function QBChatDisconnect() {
32843
- QB.chat.disconnect();
32789
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.disconnect();
32844
32790
  }
32845
32791
  function registrationAccount(params) {
32846
32792
  return new Promise(function (resolve, reject) {
32847
- QB.users.create(params, function (error, createdUser) {
32793
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.create(params, function (error, createdUser) {
32848
32794
  if (error) {
32849
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32795
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32850
32796
  }
32851
32797
  else {
32852
32798
  resolve(createdUser);
@@ -32865,9 +32811,9 @@ function QBUserCreate(params) {
32865
32811
  }
32866
32812
  function QBUserUpdate(userId, user) {
32867
32813
  return new Promise(function (resolve, reject) {
32868
- QB.users.update(userId, user, function (error, updatedUser) {
32814
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.update(userId, user, function (error, updatedUser) {
32869
32815
  if (error) {
32870
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32816
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32871
32817
  }
32872
32818
  else {
32873
32819
  resolve(updatedUser);
@@ -32878,7 +32824,7 @@ function QBUserUpdate(userId, user) {
32878
32824
  function QBUserGet(params) {
32879
32825
  if (typeof params === 'number') {
32880
32826
  return new Promise(function (resolve, reject) {
32881
- QB.users.get(params, function (error, result) {
32827
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.get(params, function (error, result) {
32882
32828
  if (error) {
32883
32829
  reject(error);
32884
32830
  }
@@ -32889,7 +32835,7 @@ function QBUserGet(params) {
32889
32835
  });
32890
32836
  }
32891
32837
  return new Promise(function (resolve, reject) {
32892
- QB.users.get(params, function (error, result) {
32838
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.get(params, function (error, result) {
32893
32839
  if (error) {
32894
32840
  reject(error);
32895
32841
  }
@@ -32902,7 +32848,7 @@ function QBUserGet(params) {
32902
32848
  //
32903
32849
  function QBUsersGet(params) {
32904
32850
  return new Promise(function (resolve, reject) {
32905
- QB.users.get(params, function (error, result) {
32851
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.get(params, function (error, result) {
32906
32852
  if (error) {
32907
32853
  reject(error);
32908
32854
  }
@@ -32914,7 +32860,7 @@ function QBUsersGet(params) {
32914
32860
  }
32915
32861
  function QBUsersGetById(params) {
32916
32862
  return new Promise(function (resolve, reject) {
32917
- QB.users.get(params, function (error, result) {
32863
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.get(params, function (error, result) {
32918
32864
  if (error) {
32919
32865
  reject(error);
32920
32866
  }
@@ -32927,9 +32873,9 @@ function QBUsersGetById(params) {
32927
32873
  //
32928
32874
  function QBUserList(params) {
32929
32875
  return new Promise(function (resolve, reject) {
32930
- QB.users.listUsers(params, function (error, response) {
32876
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().users.listUsers(params, function (error, response) {
32931
32877
  if (error) {
32932
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32878
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32933
32879
  }
32934
32880
  else {
32935
32881
  resolve(response);
@@ -32939,9 +32885,9 @@ function QBUserList(params) {
32939
32885
  }
32940
32886
  function QBDataGet(className, filters) {
32941
32887
  return new Promise(function (resolve, reject) {
32942
- QB.data.list(className, filters, function (error, result) {
32888
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().data.list(className, filters, function (error, result) {
32943
32889
  if (error) {
32944
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32890
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32945
32891
  }
32946
32892
  else {
32947
32893
  resolve(result);
@@ -32951,9 +32897,9 @@ function QBDataGet(className, filters) {
32951
32897
  }
32952
32898
  function QBDataCreate(className, data) {
32953
32899
  return new Promise(function (resolve, reject) {
32954
- QB.data.create(className, data, function (error, customObject) {
32900
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().data.create(className, data, function (error, customObject) {
32955
32901
  if (error) {
32956
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32902
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32957
32903
  }
32958
32904
  else {
32959
32905
  resolve(customObject);
@@ -32963,9 +32909,9 @@ function QBDataCreate(className, data) {
32963
32909
  }
32964
32910
  function QBDataDelete(className, ids) {
32965
32911
  return new Promise(function (resolve, reject) {
32966
- QB.data.delete(className, ids, function (error, customObject) {
32912
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().data["delete"](className, ids, function (error, customObject) {
32967
32913
  if (error) {
32968
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32914
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32969
32915
  }
32970
32916
  else {
32971
32917
  resolve(customObject);
@@ -32975,9 +32921,9 @@ function QBDataDelete(className, ids) {
32975
32921
  }
32976
32922
  function QBDataUpdate(className, _id, data) {
32977
32923
  return new Promise(function (resolve, reject) {
32978
- QB.data.update(className, __assign({ _id: _id }, data), function (error, item) {
32924
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().data.update(className, __assign({ _id: _id }, data), function (error, item) {
32979
32925
  if (error) {
32980
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32926
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32981
32927
  }
32982
32928
  else {
32983
32929
  resolve(item);
@@ -32988,9 +32934,9 @@ function QBDataUpdate(className, _id, data) {
32988
32934
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32989
32935
  function QBGetDialogs(filters) {
32990
32936
  return new Promise(function (resolve, reject) {
32991
- QB.chat.dialog.list(filters, function (error, result) {
32937
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog.list(filters, function (error, result) {
32992
32938
  if (error) {
32993
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32939
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
32994
32940
  }
32995
32941
  else {
32996
32942
  resolve(result);
@@ -33000,9 +32946,9 @@ function QBGetDialogs(filters) {
33000
32946
  }
33001
32947
  function QBGetDialogById(id) {
33002
32948
  return new Promise(function (resolve, reject) {
33003
- QB.chat.dialog.list({ _id: id }, function (error, result) {
32949
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog.list({ _id: id }, function (error, result) {
33004
32950
  if (error) {
33005
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32951
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33006
32952
  }
33007
32953
  else {
33008
32954
  resolve(result);
@@ -33013,9 +32959,9 @@ function QBGetDialogById(id) {
33013
32959
  function QBCreatePrivateDialog(userId, dialogName, data) {
33014
32960
  console.log("call QBCreatePrivateDialog with userid: ".concat(userId, " dialog name: ").concat(dialogName || '-'));
33015
32961
  return new Promise(function (resolve, reject) {
33016
- QB.chat.dialog.create({ name: dialogName || '-', occupants_ids: [userId], type: 3, data: data }, function (error, chat) {
32962
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog.create({ name: dialogName || '-', occupants_ids: [userId], type: 3, data: data }, function (error, chat) {
33017
32963
  if (error) {
33018
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
32964
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33019
32965
  }
33020
32966
  else {
33021
32967
  resolve(chat);
@@ -33042,7 +32988,7 @@ function QBCreateGroupDialog(userIds, dialogName, data) {
33042
32988
  };
33043
32989
  }
33044
32990
  return new Promise(function (resolve, reject) {
33045
- QB.chat.dialog.create(
32991
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog.create(
33046
32992
  // {
33047
32993
  // name: dialogName || '-',
33048
32994
  // occupants_ids: [userIds],
@@ -33051,7 +32997,7 @@ function QBCreateGroupDialog(userIds, dialogName, data) {
33051
32997
  // },
33052
32998
  params, function (error, chat) {
33053
32999
  if (error) {
33054
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33000
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33055
33001
  }
33056
33002
  else {
33057
33003
  resolve(chat);
@@ -33061,9 +33007,9 @@ function QBCreateGroupDialog(userIds, dialogName, data) {
33061
33007
  }
33062
33008
  function QBUpdateDialog(dialogId, data) {
33063
33009
  return new Promise(function (resolve, reject) {
33064
- QB.chat.dialog.update(dialogId, data, function (error, chat) {
33010
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog.update(dialogId, data, function (error, chat) {
33065
33011
  if (error) {
33066
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33012
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33067
33013
  }
33068
33014
  else {
33069
33015
  resolve(chat);
@@ -33073,10 +33019,10 @@ function QBUpdateDialog(dialogId, data) {
33073
33019
  }
33074
33020
  function QBJoinGroupDialog(dialogId) {
33075
33021
  return new Promise(function (resolve, reject) {
33076
- var dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dialogId);
33077
- QB.chat.muc.join(dialogJid, function (error, res) {
33022
+ var dialogJid = quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRoomJidFromDialogId(dialogId);
33023
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.muc.join(dialogJid, function (error, res) {
33078
33024
  if (error) {
33079
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33025
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33080
33026
  }
33081
33027
  else {
33082
33028
  resolve(res);
@@ -33086,9 +33032,9 @@ function QBJoinGroupDialog(dialogId) {
33086
33032
  }
33087
33033
  function QBDeleteDialog(dialogIds) {
33088
33034
  return new Promise(function (resolve, reject) {
33089
- QB.chat.dialog.delete(dialogIds, function (error) {
33035
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.dialog["delete"](dialogIds, function (error) {
33090
33036
  if (error) {
33091
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33037
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33092
33038
  }
33093
33039
  else {
33094
33040
  resolve();
@@ -33098,10 +33044,10 @@ function QBDeleteDialog(dialogIds) {
33098
33044
  }
33099
33045
  function QBLeaveDialog(dialogId) {
33100
33046
  return new Promise(function (resolve, reject) {
33101
- var dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dialogId);
33102
- QB.chat.muc.leave(dialogJid, function (error, res) {
33047
+ var dialogJid = quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRoomJidFromDialogId(dialogId);
33048
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.muc.leave(dialogJid, function (error, res) {
33103
33049
  if (error) {
33104
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33050
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33105
33051
  }
33106
33052
  else {
33107
33053
  resolve(res);
@@ -33111,9 +33057,9 @@ function QBLeaveDialog(dialogId) {
33111
33057
  }
33112
33058
  function QBGetInfoFile(fileId) {
33113
33059
  return new Promise(function (resolve, reject) {
33114
- QB.content.getInfo(fileId, function (error, response) {
33060
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.getInfo(fileId, function (error, response) {
33115
33061
  if (error) {
33116
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33062
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33117
33063
  }
33118
33064
  else {
33119
33065
  resolve(response);
@@ -33123,9 +33069,9 @@ function QBGetInfoFile(fileId) {
33123
33069
  }
33124
33070
  function QBDeleteContent(contentId) {
33125
33071
  return new Promise(function (resolve, reject) {
33126
- QB.content.delete(contentId, function (error, response) {
33072
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content["delete"](contentId, function (error, response) {
33127
33073
  if (error) {
33128
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33074
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33129
33075
  }
33130
33076
  else {
33131
33077
  resolve(response);
@@ -33135,9 +33081,9 @@ function QBDeleteContent(contentId) {
33135
33081
  }
33136
33082
  function QBCreateAndUploadContent(paramContent) {
33137
33083
  return new Promise(function (resolve, reject) {
33138
- QB.content.createAndUpload(paramContent, function (error, response) {
33084
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().content.createAndUpload(paramContent, function (error, response) {
33139
33085
  if (error) {
33140
- reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_0__.stringifyError)(error));
33086
+ reject((0,_utils_parse__WEBPACK_IMPORTED_MODULE_1__.stringifyError)(error));
33141
33087
  }
33142
33088
  else {
33143
33089
  resolve(response);
@@ -33175,7 +33121,7 @@ function QBCreateAndUploadContent(paramContent) {
33175
33121
  function qbChatGetMessagesExtended(dialogId, params) {
33176
33122
  if (params === void 0) { params = {}; }
33177
33123
  return new Promise(function (resolve, reject) {
33178
- QB.chat.message.list(__assign({ chat_dialog_id: dialogId, sort_desc: 'date_sent' }, params), function (error, messages) {
33124
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.message.list(__assign({ chat_dialog_id: dialogId, sort_desc: 'date_sent' }, params), function (error, messages) {
33179
33125
  if (error) {
33180
33126
  reject(error);
33181
33127
  }
@@ -33189,11 +33135,11 @@ function qbChatGetMessagesExtended(dialogId, params) {
33189
33135
  function QBSendIsTypingStatus(dialog, senderId) {
33190
33136
  var isPrivate = 3;
33191
33137
  var jidOrUserid = dialog.type === isPrivate
33192
- ? QB.chat.helpers.getRecipientId(dialog.occupants_ids, senderId)
33193
- : QB.chat.helpers.getRoomJidFromDialogId(dialog._id);
33138
+ ? quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRecipientId(dialog.occupants_ids, senderId)
33139
+ : quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRoomJidFromDialogId(dialog._id);
33194
33140
  // const dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dialogId);
33195
33141
  try {
33196
- QB.chat.sendIsTypingStatus(jidOrUserid);
33142
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.sendIsTypingStatus(jidOrUserid);
33197
33143
  }
33198
33144
  catch (e) {
33199
33145
  console.log(JSON.stringify(e));
@@ -33202,11 +33148,11 @@ function QBSendIsTypingStatus(dialog, senderId) {
33202
33148
  function QBSendIsStopTypingStatus(dialog, senderId) {
33203
33149
  var isPrivate = 3;
33204
33150
  var jidOrUserid = dialog.type === isPrivate
33205
- ? QB.chat.helpers.getRecipientId(dialog.occupants_ids, senderId)
33206
- : QB.chat.helpers.getRoomJidFromDialogId(dialog._id);
33151
+ ? quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRecipientId(dialog.occupants_ids, senderId)
33152
+ : quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.helpers.getRoomJidFromDialogId(dialog._id);
33207
33153
  // const dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dialogId);
33208
33154
  try {
33209
- QB.chat.sendIsStopTypingStatus(jidOrUserid);
33155
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.sendIsStopTypingStatus(jidOrUserid);
33210
33156
  }
33211
33157
  catch (e) {
33212
33158
  console.log(JSON.stringify(e));
@@ -33216,16 +33162,19 @@ function QBSendIsStopTypingStatus(dialog, senderId) {
33216
33162
  function QBChatSendMessage(to, // artan 22.06.23
33217
33163
  message) {
33218
33164
  return new Promise(function (resolve) {
33219
- resolve(QB.chat.send(to, message));
33165
+ resolve(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.send(to, message));
33220
33166
  });
33221
33167
  }
33222
33168
  function QBChatSendSystemMessage(to, message) {
33223
33169
  return new Promise(function (resolve) {
33224
- resolve(QB.chat.sendSystemMessage(to, message));
33170
+ resolve(quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.sendSystemMessage(to, message));
33225
33171
  });
33226
33172
  }
33227
33173
  function QBChatMarkMessageRead(params) {
33228
- QB.chat.sendReadStatus(params);
33174
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.sendReadStatus(params);
33175
+ }
33176
+ function QBChatMarkMessageDelivered(params) {
33177
+ quickblox_quickblox__WEBPACK_IMPORTED_MODULE_0___default().chat.sendDeliveredStatus(params);
33229
33178
  }
33230
33179
  function QBWebRTCSessionGetUserMedia(session, params) {
33231
33180
  return new Promise(function (resolve, reject) {
@@ -33336,6 +33285,26 @@ var formatShortTime4 = function (dateTimeToFormat) {
33336
33285
  */
33337
33286
 
33338
33287
 
33288
+ /***/ }),
33289
+
33290
+ /***/ "./src/utils/formatFileSize.ts":
33291
+ /*!*************************************!*\
33292
+ !*** ./src/utils/formatFileSize.ts ***!
33293
+ \*************************************/
33294
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33295
+
33296
+ "use strict";
33297
+ __webpack_require__.r(__webpack_exports__);
33298
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33299
+ /* harmony export */ "formatFileSize": () => (/* binding */ formatFileSize)
33300
+ /* harmony export */ });
33301
+ var formatFileSize = function (size) {
33302
+ var units = ['B', 'kB', 'MB', 'GB', 'TB'];
33303
+ var currentUnitIndex = Math.floor(Math.log(size) / Math.log(1024));
33304
+ return "".concat(Math.round(size / Math.pow(1024, currentUnitIndex)), " ").concat(units[currentUnitIndex]);
33305
+ };
33306
+
33307
+
33339
33308
  /***/ }),
33340
33309
 
33341
33310
  /***/ "./src/utils/parse.ts":
@@ -33509,6 +33478,17 @@ var AIUtils = /** @class */ (function () {
33509
33478
 
33510
33479
 
33511
33480
 
33481
+ /***/ }),
33482
+
33483
+ /***/ "quickblox/quickblox":
33484
+ /*!**************************************!*\
33485
+ !*** external "quickblox/quickblox" ***!
33486
+ \**************************************/
33487
+ /***/ ((module) => {
33488
+
33489
+ "use strict";
33490
+ module.exports = __WEBPACK_EXTERNAL_MODULE_quickblox_quickblox__;
33491
+
33512
33492
  /***/ }),
33513
33493
 
33514
33494
  /***/ "react":