quickblox-react-ui-kit 0.4.1 → 0.4.2-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.
- package/dist/Presentation/ui-components/TextField/TextField.d.ts +1 -1
- package/dist/index-ui.d.ts +2 -1
- package/dist/index-ui.js +21 -0
- package/dist/index-ui.js.map +1 -1
- package/package.json +2 -2
- package/.storybook/main.ts +0 -26
- package/.storybook/preview.ts +0 -16
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -47
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/quickblox.js +0 -54609
- package/public/robots.txt +0 -3
- package/src/App.scss +0 -3
- package/src/App.tsx +0 -232
- package/src/CommonTypes/BaseViewModel.ts +0 -95
- package/src/CommonTypes/CommonTypes.ts +0 -260
- package/src/CommonTypes/FunctionResult.ts +0 -7
- package/src/Data/Creator.ts +0 -105
- package/src/Data/DefaultConfigurations.ts +0 -277
- package/src/Data/Stubs.ts +0 -1241
- package/src/Data/dto/dialog/LocalDialogDTO.ts +0 -42
- package/src/Data/dto/dialog/LocalDialogsDTO.ts +0 -21
- package/src/Data/dto/dialog/RemoteDialogDTO.ts +0 -58
- package/src/Data/dto/dialog/RemoteDialogsDTO.ts +0 -21
- package/src/Data/dto/file/LocalFileDTO.ts +0 -26
- package/src/Data/dto/file/RemoteFileDTO.ts +0 -26
- package/src/Data/dto/message/LocalMessageDTO.ts +0 -49
- package/src/Data/dto/message/LocalMessagesDTO.ts +0 -21
- package/src/Data/dto/message/RemoteMessageDTO.ts +0 -57
- package/src/Data/dto/message/RemoteMessagesDTO.ts +0 -21
- package/src/Data/dto/user/LocalUserDTO.ts +0 -37
- package/src/Data/dto/user/LocalUsersDTO.ts +0 -21
- package/src/Data/dto/user/RemoteUserDTO.ts +0 -37
- package/src/Data/dto/user/RemoteUsersDTO.ts +0 -21
- package/src/Data/mapper/DialogLocalDTOMapper.ts +0 -736
- package/src/Data/mapper/DialogRemoteDTOMapper.ts +0 -736
- package/src/Data/mapper/FileLocalDTOMapper.ts +0 -216
- package/src/Data/mapper/FileRemoteDTOMapper.ts +0 -230
- package/src/Data/mapper/IMapper.ts +0 -4
- package/src/Data/mapper/MessageLocalDTOMapper.ts +0 -426
- package/src/Data/mapper/MessageRemoteDTOMapper.ts +0 -465
- package/src/Data/mapper/UserLocalDTOMapper.ts +0 -387
- package/src/Data/mapper/UserRemoteDTOMapper.ts +0 -398
- package/src/Data/repository/ConnectionRepository.ts +0 -135
- package/src/Data/repository/DialogsRepository.ts +0 -374
- package/src/Data/repository/EventMessagesRepository.ts +0 -325
- package/src/Data/repository/FileRepository.ts +0 -107
- package/src/Data/repository/MessagesRepository.ts +0 -291
- package/src/Data/repository/UsersRepository.ts +0 -297
- package/src/Data/source/AISource.ts +0 -133
- package/src/Data/source/exception/LocalDataSourceException.ts +0 -17
- package/src/Data/source/exception/MapperDTOException.ts +0 -22
- package/src/Data/source/exception/RemoteDataSourceException.ts +0 -28
- package/src/Data/source/exception/RepositoryException.ts +0 -27
- package/src/Data/source/local/ChatLocalStorageDataSource.ts +0 -260
- package/src/Data/source/local/ILocalDataSource.ts +0 -41
- package/src/Data/source/local/ILocalFileDataSource.ts +0 -11
- package/src/Data/source/local/LocalDataSource.ts +0 -353
- package/src/Data/source/local/LocalFileDataSource.ts +0 -20
- package/src/Data/source/remote/IRemoteDataSource.ts +0 -127
- package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +0 -443
- package/src/Data/source/remote/Mapper/FileDTOMapper.ts +0 -274
- package/src/Data/source/remote/Mapper/IDTOMapper.ts +0 -4
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +0 -608
- package/src/Data/source/remote/Mapper/UserDTOMapper.ts +0 -344
- package/src/Data/source/remote/RemoteDataSource.ts +0 -1503
- package/src/Domain/entity/Chat.ts +0 -4
- package/src/Domain/entity/ChatMessageAttachmentEntity.ts +0 -15
- package/src/Domain/entity/CustomDataEntity.ts +0 -3
- package/src/Domain/entity/DialogEntity.ts +0 -15
- package/src/Domain/entity/DialogEventInfo.ts +0 -19
- package/src/Domain/entity/DialogTypes.ts +0 -7
- package/src/Domain/entity/EventMessageType.ts +0 -7
- package/src/Domain/entity/FileEntity.ts +0 -11
- package/src/Domain/entity/FileTypes.ts +0 -9
- package/src/Domain/entity/GroupDialogEntity.ts +0 -54
- package/src/Domain/entity/LastMessageEntity.ts +0 -5
- package/src/Domain/entity/MessageEntity.ts +0 -25
- package/src/Domain/entity/NotificationTypes.ts +0 -9
- package/src/Domain/entity/PrivateDialogEntity.ts +0 -46
- package/src/Domain/entity/PublicDialogEntity.ts +0 -80
- package/src/Domain/entity/UserEntity.ts +0 -13
- package/src/Domain/exception/domain/DomainExecption.ts +0 -5
- package/src/Domain/repository/IDialogsRepository.ts +0 -42
- package/src/Domain/repository/IFileRepository.ts +0 -9
- package/src/Domain/repository/IMessagesRepository.ts +0 -28
- package/src/Domain/repository/IUsersRepository.ts +0 -13
- package/src/Domain/repository/Pagination.ts +0 -48
- package/src/Domain/use_cases/CreateDialogUseCase.ts +0 -79
- package/src/Domain/use_cases/ForwardMessagesUseCase.ts +0 -73
- package/src/Domain/use_cases/GetAllDialogsUseCase.ts +0 -20
- package/src/Domain/use_cases/GetAllDialogsUseCaseWithMock.ts +0 -40
- package/src/Domain/use_cases/GetAllMessagesForDialog.ts +0 -61
- package/src/Domain/use_cases/GetAllUsersUseCase.ts +0 -34
- package/src/Domain/use_cases/GetDialogByIdUseCase.ts +0 -32
- package/src/Domain/use_cases/GetUsersByIdsUseCase.ts +0 -22
- package/src/Domain/use_cases/LeaveDialogUseCase.ts +0 -116
- package/src/Domain/use_cases/RemoveUsersFromTheDialogUseCase.ts +0 -118
- package/src/Domain/use_cases/ReplyMessagesUseCase.ts +0 -35
- package/src/Domain/use_cases/SendTextMessageUseCase.ts +0 -27
- package/src/Domain/use_cases/SubscribeToDialogEventsUseCase.ts +0 -160
- package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCase.ts +0 -68
- package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCaseWithMock.ts +0 -45
- package/src/Domain/use_cases/SyncDialogsUseCase.ts +0 -177
- package/src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts +0 -31
- package/src/Domain/use_cases/UpdateDialogUseCase.ts +0 -77
- package/src/Domain/use_cases/UploadFileUseCase.ts +0 -24
- package/src/Domain/use_cases/UserTypingMessageUseCase.ts +0 -50
- package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +0 -69
- package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +0 -57
- package/src/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.ts +0 -50
- package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +0 -89
- package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +0 -62
- package/src/Domain/use_cases/ai/AITranslateUseCase.ts +0 -76
- package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +0 -63
- package/src/Domain/use_cases/ai/AITranslateWithSDKUseCase.ts +0 -107
- package/src/Domain/use_cases/base/BaseUseCase.ts +0 -77
- package/src/Domain/use_cases/base/IUseCase.ts +0 -5
- package/src/Domain/use_cases/base/Subscribable/ISubscribable.ts +0 -6
- package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +0 -144
- package/src/Presentation/.gitkeep +0 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.scss +0 -39
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.tsx +0 -71
- package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.scss +0 -32
- package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.tsx +0 -28
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.scss +0 -77
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.tsx +0 -126
- package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.scss +0 -47
- package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.tsx +0 -78
- package/src/Presentation/Views/Dialog/AIWidgets/AIMessageWidget.ts +0 -40
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.scss +0 -25
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.tsx +0 -186
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.scss +0 -55
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +0 -122
- package/src/Presentation/Views/Dialog/AIWidgets/ErrorMessageIcon.tsx +0 -98
- package/src/Presentation/Views/Dialog/AIWidgets/SliderMenu.tsx +0 -172
- package/src/Presentation/Views/Dialog/AIWidgets/Tone.ts +0 -21
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +0 -72
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +0 -72
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithSDK.tsx +0 -74
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +0 -96
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +0 -94
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidget.tsx +0 -78
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +0 -78
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithSDK.tsx +0 -70
- package/src/Presentation/Views/Dialog/AIWidgets/useDefaultVoiceInputWidget.tsx +0 -88
- package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.scss +0 -58
- package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.tsx +0 -93
- package/src/Presentation/Views/Dialog/Dialog.scss +0 -368
- package/src/Presentation/Views/Dialog/Dialog.tsx +0 -100
- package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.scss +0 -29
- package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.tsx +0 -34
- package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.scss +0 -114
- package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.tsx +0 -51
- package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.scss +0 -53
- package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.tsx +0 -58
- package/src/Presentation/Views/Dialog/DialogViewModel.ts +0 -26
- package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.scss +0 -84
- package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.tsx +0 -105
- package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.scss +0 -50
- package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.tsx +0 -43
- package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.scss +0 -26
- package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.tsx +0 -23
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.scss +0 -74
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.tsx +0 -96
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +0 -50
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +0 -97
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.scss +0 -98
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.tsx +0 -65
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.scss +0 -159
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.tsx +0 -122
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.scss +0 -100
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.tsx +0 -90
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.scss +0 -95
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.tsx +0 -47
- package/src/Presentation/Views/Dialog/InputMessage/InputMessage.scss +0 -92
- package/src/Presentation/Views/Dialog/InputMessage/InputMessage.tsx +0 -145
- package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.scss +0 -97
- package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx +0 -114
- package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.scss +0 -250
- package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.tsx +0 -290
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.scss +0 -22
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx +0 -32
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.scss +0 -241
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.tsx +0 -316
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.scss +0 -4
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.tsx +0 -67
- package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.scss +0 -250
- package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.tsx +0 -298
- package/src/Presentation/Views/Dialog/Message/Message.tsx +0 -378
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.scss +0 -31
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +0 -155
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.scss +0 -76
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.tsx +0 -50
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.scss +0 -14
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.tsx +0 -50
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/MessageAttachment.tsx +0 -92
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.scss +0 -18
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.tsx +0 -58
- package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.scss +0 -10
- package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.tsx +0 -61
- package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.scss +0 -160
- package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.tsx +0 -133
- package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.scss +0 -122
- package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.tsx +0 -104
- package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.scss +0 -155
- package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.tsx +0 -103
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.scss +0 -19
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.tsx +0 -78
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.scss +0 -21
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +0 -378
- package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.scss +0 -23
- package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.tsx +0 -17
- package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.scss +0 -21
- package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.tsx +0 -17
- package/src/Presentation/Views/Dialog/VoiceMessage/VoiceMessage.tsx +0 -21
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +0 -765
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +0 -237
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +0 -495
- package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.scss +0 -42
- package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.tsx +0 -26
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +0 -85
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +0 -74
- package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.scss +0 -66
- package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.tsx +0 -71
- package/src/Presentation/Views/DialogInfo/UsersList/UsersList.scss +0 -0
- package/src/Presentation/Views/DialogInfo/UsersList/UsersList.tsx +0 -71
- package/src/Presentation/Views/DialogInfo/UsersList/UsersListViewModel.ts +0 -15
- package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +0 -125
- package/src/Presentation/Views/DialogList/DialogList.scss +0 -150
- package/src/Presentation/Views/DialogList/DialogList.tsx +0 -407
- package/src/Presentation/Views/DialogList/DialogListViewModel.ts +0 -25
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +0 -579
- package/src/Presentation/Views/DialogListHeader/DialogListHeader.scss +0 -68
- package/src/Presentation/Views/DialogListHeader/DialogListHeader.tsx +0 -90
- package/src/Presentation/Views/EditDialog/EditDialog.scss +0 -175
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +0 -273
- package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.scss +0 -32
- package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.tsx +0 -59
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.scss +0 -93
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.tsx +0 -69
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +0 -191
- package/src/Presentation/Views/Flow/LeaveDialogFlow/LeaveDialogFlow.tsx +0 -37
- package/src/Presentation/Views/InviteMembers/InviteMembers.scss +0 -202
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +0 -316
- package/src/Presentation/Views/InviteMembers/InviteMembersViewModel.ts +0 -18
- package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.scss +0 -90
- package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.tsx +0 -122
- package/src/Presentation/Views/InviteMembers/InviteUsersResultViewModel.ts +0 -12
- package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.scss +0 -38
- package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.tsx +0 -22
- package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +0 -146
- package/src/Presentation/Views/Navigation/More.svg +0 -7
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.scss +0 -211
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +0 -332
- package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.scss +0 -9
- package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.tsx +0 -59
- package/src/Presentation/Views/PreviewDialog/PreviewDialogViewModel.ts +0 -42
- package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.scss +0 -11
- package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.tsx +0 -48
- package/src/Presentation/assets/fonts/.gitkeep +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.woff2 +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.woff2 +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.woff2 +0 -0
- package/src/Presentation/assets/img/Artem_Koltunov_Selfi.png +0 -0
- package/src/Presentation/assets/img/bee-img.png +0 -0
- package/src/Presentation/assets/img/web-doc.png +0 -0
- package/src/Presentation/components/Button.js +0 -5
- package/src/Presentation/components/Navbar.tsx +0 -45
- package/src/Presentation/components/TextInput.js +0 -10
- package/src/Presentation/components/UI/Buttons/ActiveButton/ActiveButton.tsx +0 -40
- package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.scss +0 -0
- package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.tsx +0 -30
- package/src/Presentation/components/UI/Buttons/MainButton/MainButton.css +0 -103
- package/src/Presentation/components/UI/Buttons/MainButton/MainButton.tsx +0 -62
- package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.scss +0 -61
- package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.tsx +0 -48
- package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.scss +0 -74
- package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx +0 -52
- package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.scss +0 -21
- package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx +0 -44
- package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.scss +0 -3
- package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx +0 -45
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/Send.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx +0 -39
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +0 -5
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +0 -50
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmileyIcon/index.tsx +0 -20
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx +0 -7
- package/src/Presentation/components/UI/svgs/Icons/Actions/Add/Add.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Add/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/Add contact.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/Archive.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/AssistAnswer.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx +0 -93
- package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/Copy.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/Delete.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Download/Download.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Download/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/Edit.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/EditDots.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/Emoji.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/Forward filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/Hungup.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/Income call.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Like/Like.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Like/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/New chat.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/Outcome call.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/Phone.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/Phone filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/Remove.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/Remove2.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/Reply filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Send/Send.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx +0 -38
- package/src/Presentation/components/UI/svgs/Icons/Actions/Share/Share.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Share/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/Summarize.svg +0 -6
- package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/index.tsx +0 -58
- package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/Swap camera.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/Tone.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx +0 -34
- package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/Unarchive.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/Video.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/Voice.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/Broadcast.svg +0 -7
- package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/index.tsx +0 -38
- package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/Chat.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/Chat filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/Conference.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/Contact.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/Contact filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/Group chat.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/Notifications.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/Private chat.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/Public channel.svg +0 -7
- package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx +0 -67
- package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/Stream.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/Stream filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Contents/User/User.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/IconsCommonTypes.ts +0 -6
- package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/Attachment.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/Audio file.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/Broken file.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/Camera/Camera.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/Camera/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/GIF file.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/Image.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/File.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/Image filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/Link.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/Location/Location.svg +0 -4
- package/src/Presentation/components/UI/svgs/Icons/Media/Location/index.tsx +0 -26
- package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/Text document.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Media/Translate/Translate.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/Video file.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/Admin.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/Banned.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/Freeze.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/Moderations.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/Muted.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/Arrow left.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/Arrow right.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/Back.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/index.tsx +0 -34
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/Close.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/Down.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/Leave.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Navigation/More/More.svg +0 -7
- package/src/Presentation/components/UI/svgs/Icons/Navigation/More/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/Next.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/Plus.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/Refresh.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/index.tsx +0 -36
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/Search.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/Settings.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/Settings filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/Error/Error.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Error/index.tsx +0 -36
- package/src/Presentation/components/UI/svgs/Icons/Status/Help/Help.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Help/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/Information/Information.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Information/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/InformationFill/index.tsx +0 -40
- package/src/Presentation/components/UI/svgs/Icons/Status/Loader/Loader.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Loader/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/Mention/Mention.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Mention/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/Sent/Sent.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/Sent/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/Viewed_Delivered.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/index.tsx +0 -38
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/Camera off.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/Camera on.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/Check off.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/Check on.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/index.tsx +0 -24
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/Favourite.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/Favourite filled.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/Full screen.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/inex.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/Hide.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/Play.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/Louder.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/Mic off.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/Mic on.svg +0 -4
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/index.tsx +0 -26
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/Minimize.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/Notify off.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/Notify on.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/index.tsx +0 -35
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/Pause.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/Quite.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/Record.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/Screenshare.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/Show.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/Speaker.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/Speaker off.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/Stop record.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/index.tsx +0 -22
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/Stop share.svg +0 -3
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/index.tsx +0 -22
- package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.scss +0 -16
- package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx +0 -27
- package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.scss +0 -45
- package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx +0 -88
- package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.scss +0 -45
- package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx +0 -90
- package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.scss +0 -46
- package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.tsx +0 -90
- package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.scss +0 -45
- package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx +0 -102
- package/src/Presentation/components/containers/SectionList/hooks/createUseComponent.ts +0 -20
- package/src/Presentation/components/containers/SectionList/hooks/index.ts +0 -4
- package/src/Presentation/components/containers/SectionList/hooks/useMobileLayout.ts +0 -27
- package/src/Presentation/components/containers/SectionList/hooks/usePrevious.ts +0 -11
- package/src/Presentation/components/containers/SectionList/hooks/useVisibility.ts +0 -17
- package/src/Presentation/components/containers/SectionList/index.tsx +0 -52
- package/src/Presentation/components/containers/SectionList/styles.css +0 -50
- package/src/Presentation/components/containers/SectionList/useComponent.ts +0 -136
- package/src/Presentation/icons/actions/add-contact.svg +0 -3
- package/src/Presentation/icons/actions/add.svg +0 -3
- package/src/Presentation/icons/actions/archive.svg +0 -3
- package/src/Presentation/icons/actions/copy.svg +0 -3
- package/src/Presentation/icons/actions/delete.svg +0 -3
- package/src/Presentation/icons/actions/download.svg +0 -3
- package/src/Presentation/icons/actions/edit.svg +0 -3
- package/src/Presentation/icons/actions/emoji.svg +0 -3
- package/src/Presentation/icons/actions/forward-filled.svg +0 -3
- package/src/Presentation/icons/actions/hungup.svg +0 -3
- package/src/Presentation/icons/actions/income-call.svg +0 -3
- package/src/Presentation/icons/actions/index.ts +0 -26
- package/src/Presentation/icons/actions/like.svg +0 -3
- package/src/Presentation/icons/actions/new-chat.svg +0 -3
- package/src/Presentation/icons/actions/outcome-call.svg +0 -3
- package/src/Presentation/icons/actions/phone-filled.svg +0 -3
- package/src/Presentation/icons/actions/phone.svg +0 -3
- package/src/Presentation/icons/actions/remove-2.svg +0 -3
- package/src/Presentation/icons/actions/remove.svg +0 -3
- package/src/Presentation/icons/actions/rephrase.svg +0 -6
- package/src/Presentation/icons/actions/reply-filled.svg +0 -3
- package/src/Presentation/icons/actions/robot.svg +0 -5
- package/src/Presentation/icons/actions/send.svg +0 -3
- package/src/Presentation/icons/actions/share.svg +0 -3
- package/src/Presentation/icons/actions/swap-camera.svg +0 -3
- package/src/Presentation/icons/actions/translate.svg +0 -3
- package/src/Presentation/icons/actions/unarchive.svg +0 -3
- package/src/Presentation/icons/actions/video.svg +0 -3
- package/src/Presentation/icons/actions/voice.svg +0 -3
- package/src/Presentation/icons/contents/broadcast.svg +0 -7
- package/src/Presentation/icons/contents/chat-filled.svg +0 -3
- package/src/Presentation/icons/contents/chat.svg +0 -3
- package/src/Presentation/icons/contents/conference.svg +0 -3
- package/src/Presentation/icons/contents/contact-filled.svg +0 -3
- package/src/Presentation/icons/contents/contact.svg +0 -3
- package/src/Presentation/icons/contents/group-chat.svg +0 -3
- package/src/Presentation/icons/contents/index.ts +0 -13
- package/src/Presentation/icons/contents/notifications.svg +0 -3
- package/src/Presentation/icons/contents/private-chat.svg +0 -3
- package/src/Presentation/icons/contents/public-channel.svg +0 -7
- package/src/Presentation/icons/contents/stream-filled.svg +0 -3
- package/src/Presentation/icons/contents/stream.svg +0 -3
- package/src/Presentation/icons/contents/user.svg +0 -3
- package/src/Presentation/icons/index.ts +0 -7
- package/src/Presentation/icons/media/attachment.svg +0 -3
- package/src/Presentation/icons/media/audio-file.svg +0 -3
- package/src/Presentation/icons/media/broken-file.svg +0 -3
- package/src/Presentation/icons/media/camera.svg +0 -3
- package/src/Presentation/icons/media/file.svg +0 -3
- package/src/Presentation/icons/media/gif-file.svg +0 -3
- package/src/Presentation/icons/media/image-filled.svg +0 -3
- package/src/Presentation/icons/media/image.svg +0 -3
- package/src/Presentation/icons/media/index.ts +0 -12
- package/src/Presentation/icons/media/link.svg +0 -3
- package/src/Presentation/icons/media/location.svg +0 -4
- package/src/Presentation/icons/media/text-document.svg +0 -3
- package/src/Presentation/icons/media/video-file.svg +0 -3
- package/src/Presentation/icons/moderation/admin.svg +0 -3
- package/src/Presentation/icons/moderation/banned.svg +0 -3
- package/src/Presentation/icons/moderation/freeze.svg +0 -3
- package/src/Presentation/icons/moderation/index.ts +0 -5
- package/src/Presentation/icons/moderation/moderations.svg +0 -3
- package/src/Presentation/icons/moderation/muted.svg +0 -3
- package/src/Presentation/icons/navigation/arrow-left.svg +0 -3
- package/src/Presentation/icons/navigation/arrow-right.svg +0 -3
- package/src/Presentation/icons/navigation/back.svg +0 -3
- package/src/Presentation/icons/navigation/close.svg +0 -3
- package/src/Presentation/icons/navigation/down.svg +0 -3
- package/src/Presentation/icons/navigation/index.ts +0 -12
- package/src/Presentation/icons/navigation/leave.svg +0 -3
- package/src/Presentation/icons/navigation/more.svg +0 -3
- package/src/Presentation/icons/navigation/next.svg +0 -3
- package/src/Presentation/icons/navigation/plus.svg +0 -3
- package/src/Presentation/icons/navigation/refresh.svg +0 -3
- package/src/Presentation/icons/navigation/search.svg +0 -3
- package/src/Presentation/icons/navigation/settings-filled.svg +0 -3
- package/src/Presentation/icons/navigation/settings.svg +0 -3
- package/src/Presentation/icons/status/error.svg +0 -3
- package/src/Presentation/icons/status/help.svg +0 -3
- package/src/Presentation/icons/status/index.ts +0 -7
- package/src/Presentation/icons/status/information.svg +0 -3
- package/src/Presentation/icons/status/loader.svg +0 -3
- package/src/Presentation/icons/status/mention.svg +0 -3
- package/src/Presentation/icons/status/sent.svg +0 -3
- package/src/Presentation/icons/status/viewed-delivered.svg +0 -3
- package/src/Presentation/icons/toggle/camera-off.svg +0 -3
- package/src/Presentation/icons/toggle/camera-on.svg +0 -3
- package/src/Presentation/icons/toggle/check-off.svg +0 -3
- package/src/Presentation/icons/toggle/check-on.svg +0 -3
- package/src/Presentation/icons/toggle/favorite.svg +0 -3
- package/src/Presentation/icons/toggle/favourite.svg +0 -3
- package/src/Presentation/icons/toggle/full-screen.svg +0 -3
- package/src/Presentation/icons/toggle/hide.svg +0 -3
- package/src/Presentation/icons/toggle/index.ts +0 -23
- package/src/Presentation/icons/toggle/louder.svg +0 -3
- package/src/Presentation/icons/toggle/mic-off.svg +0 -3
- package/src/Presentation/icons/toggle/mic-on.svg +0 -4
- package/src/Presentation/icons/toggle/minimize.svg +0 -3
- package/src/Presentation/icons/toggle/notify-off.svg +0 -3
- package/src/Presentation/icons/toggle/notify-on.svg +0 -3
- package/src/Presentation/icons/toggle/pause.svg +0 -3
- package/src/Presentation/icons/toggle/play.svg +0 -3
- package/src/Presentation/icons/toggle/quite.svg +0 -3
- package/src/Presentation/icons/toggle/record.svg +0 -3
- package/src/Presentation/icons/toggle/screenshare.svg +0 -3
- package/src/Presentation/icons/toggle/show.svg +0 -3
- package/src/Presentation/icons/toggle/speaker off.svg +0 -3
- package/src/Presentation/icons/toggle/speaker-off.svg +0 -3
- package/src/Presentation/icons/toggle/speaker.svg +0 -3
- package/src/Presentation/icons/toggle/stop-record.svg +0 -3
- package/src/Presentation/icons/toggle/stop-share.svg +0 -3
- package/src/Presentation/layouts/Desktop/DesktopLayout.scss +0 -62
- package/src/Presentation/layouts/Desktop/DesktopLayout.tsx +0 -89
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +0 -1354
- package/src/Presentation/layouts/LayoutCommonTypes.ts +0 -7
- package/src/Presentation/layouts/TestStage/CompanyLogo/CompanyLogo.tsx +0 -27
- package/src/Presentation/layouts/TestStage/LoginView/Login.scss +0 -72
- package/src/Presentation/layouts/TestStage/LoginView/Login.tsx +0 -91
- package/src/Presentation/providers/ProviderProps.ts +0 -5
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +0 -375
- package/src/Presentation/providers/QuickBloxUIKitProvider/useEventMessagesRepository.ts +0 -10
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.ts +0 -54
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +0 -83
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQbUIKitDataContext.ts +0 -11
- package/src/Presentation/themes/DarkTheme.ts +0 -58
- package/src/Presentation/themes/DefaultThemes/CustomTheme.ts +0 -58
- package/src/Presentation/themes/DefaultThemes/DefaultTheme.ts +0 -58
- package/src/Presentation/themes/LightTheme.ts +0 -58
- package/src/Presentation/themes/ThemeScheme.ts +0 -83
- package/src/Presentation/themes/UiKitTheme.ts +0 -37
- package/src/Presentation/themes/styles/_fonts.scss +0 -32
- package/src/Presentation/themes/styles/_mixins.scss +0 -6
- package/src/Presentation/themes/styles/_theme_colors_scheme.scss +0 -56
- package/src/Presentation/themes/styles/_theme_colors_scheme_green.scss +0 -57
- package/src/Presentation/themes/styles/_theme_colors_scheme_pink.scss +0 -72
- package/src/Presentation/themes/styles/_theme_dark.scss +0 -37
- package/src/Presentation/themes/styles/_theme_light.scss +0 -38
- package/src/Presentation/themes/styles/_variables.scss +0 -54
- package/src/Presentation/ui-components/Avatar/Avatar.scss +0 -58
- package/src/Presentation/ui-components/Avatar/Avatar.tsx +0 -30
- package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +0 -78
- package/src/Presentation/ui-components/Badge/Badge.scss +0 -23
- package/src/Presentation/ui-components/Badge/Badge.stories.ts +0 -64
- package/src/Presentation/ui-components/Badge/Badge.tsx +0 -23
- package/src/Presentation/ui-components/Button/Button.scss +0 -133
- package/src/Presentation/ui-components/Button/Button.stories.ts +0 -93
- package/src/Presentation/ui-components/Button/Button.tsx +0 -49
- package/src/Presentation/ui-components/CheckBox/CheckBox.scss +0 -10
- package/src/Presentation/ui-components/CheckBox/CheckBox.tsx +0 -23
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.scss +0 -29
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +0 -39
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.tsx +0 -16
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.scss +0 -71
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +0 -194
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +0 -73
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +0 -56
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +0 -107
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.tsx +0 -44
- package/src/Presentation/ui-components/Dropdown/Dropdown.scss +0 -82
- package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +0 -150
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +0 -92
- package/src/Presentation/ui-components/Dropdown/DropdownOption.tsx +0 -38
- package/src/Presentation/ui-components/Header/Header.scss +0 -72
- package/src/Presentation/ui-components/Header/Header.stories.tsx +0 -117
- package/src/Presentation/ui-components/Header/Header.tsx +0 -51
- package/src/Presentation/ui-components/Loader/Loader.scss +0 -27
- package/src/Presentation/ui-components/Loader/Loader.stories.ts +0 -42
- package/src/Presentation/ui-components/Loader/Loader.tsx +0 -15
- package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +0 -71
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +0 -84
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +0 -162
- package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.scss +0 -29
- package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx +0 -16
- package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.scss +0 -16
- package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx +0 -25
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.scss +0 -40
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx +0 -22
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +0 -27
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +0 -34
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.scss +0 -58
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx +0 -43
- package/src/Presentation/ui-components/Message/Message.scss +0 -136
- package/src/Presentation/ui-components/Message/Message.stories.tsx +0 -328
- package/src/Presentation/ui-components/Message/Message.tsx +0 -85
- package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.scss +0 -90
- package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.tsx +0 -46
- package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.scss +0 -51
- package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.tsx +0 -32
- package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +0 -38
- package/src/Presentation/ui-components/MessageInput/MessageInput.scss +0 -137
- package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +0 -145
- package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +0 -161
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.scss +0 -16
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +0 -27
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.scss +0 -140
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.tsx +0 -101
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.scss +0 -35
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +0 -79
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.scss +0 -30
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +0 -160
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.tsx +0 -34
- package/src/Presentation/ui-components/Placeholder/Placeholder.scss +0 -51
- package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +0 -91
- package/src/Presentation/ui-components/Placeholder/Placeholder.tsx +0 -38
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +0 -30
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +0 -77
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx +0 -38
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.scss +0 -69
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +0 -184
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.tsx +0 -56
- package/src/Presentation/ui-components/TextField/TextField.scss +0 -91
- package/src/Presentation/ui-components/TextField/TextField.stories.ts +0 -108
- package/src/Presentation/ui-components/TextField/TextField.tsx +0 -88
- package/src/Presentation/ui-components/Toast/Toast.scss +0 -22
- package/src/Presentation/ui-components/Toast/Toast.stories.tsx +0 -50
- package/src/Presentation/ui-components/Toast/ToastProvider.tsx +0 -29
- package/src/Presentation/ui-components/UserListItem/UserListItem.scss +0 -33
- package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +0 -130
- package/src/Presentation/ui-components/UserListItem/UserListItem.tsx +0 -43
- package/src/Presentation/ui-components/index.ts +0 -19
- package/src/QBconfig.ts +0 -151
- package/src/hooks/useModal.ts +0 -13
- package/src/index-ui.ts +0 -87
- package/src/index.scss +0 -28
- package/src/index.tsx +0 -25
- package/src/logo.svg +0 -1
- package/src/package_artan_react_ui.json +0 -91
- package/src/package_original.json +0 -115
- package/src/qb-api-calls/index.ts +0 -670
- package/src/react-app-env.d.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/utils/DateTimeFormatter.ts +0 -90
- package/src/utils/formatFileSize.ts +0 -8
- package/src/utils/parse.ts +0 -76
- package/src/utils/utils.ts +0 -102
- package/storybook-static/426.be971fb5.iframe.bundle.js +0 -157
- package/storybook-static/426.be971fb5.iframe.bundle.js.map +0 -1
- package/storybook-static/433.dffc897e.iframe.bundle.js +0 -1
- package/storybook-static/603.4cf0423b.iframe.bundle.js +0 -1
- package/storybook-static/607.b04b9f0b.iframe.bundle.js +0 -1
- package/storybook-static/703.f12f2e71.iframe.bundle.js +0 -33
- package/storybook-static/703.f12f2e71.iframe.bundle.js.map +0 -1
- package/storybook-static/729.734b4ae4.iframe.bundle.js +0 -1
- package/storybook-static/768.e44c05aa.iframe.bundle.js +0 -351
- package/storybook-static/768.e44c05aa.iframe.bundle.js.map +0 -1
- package/storybook-static/797.b3873e04.iframe.bundle.js +0 -1
- package/storybook-static/926.f5308089.iframe.bundle.js +0 -508
- package/storybook-static/926.f5308089.iframe.bundle.js.map +0 -1
- package/storybook-static/938.56e9d83c.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js +0 -10
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.0d1800d9.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js +0 -10
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.1b8758fc.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.1b8758fc.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js.map +0 -1
- package/storybook-static/docs-Introduction-mdx.9dc275f1.iframe.bundle.js +0 -10
- package/storybook-static/docs-Introduction-mdx.9dc275f1.iframe.bundle.js.map +0 -1
- package/storybook-static/docs-Styling-mdx.72149f36.iframe.bundle.js +0 -10
- package/storybook-static/docs-Styling-mdx.72149f36.iframe.bundle.js.map +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/favicon.svg +0 -7
- package/storybook-static/iframe.html +0 -355
- package/storybook-static/index.html +0 -127
- package/storybook-static/index.json +0 -1
- package/storybook-static/logo192.png +0 -0
- package/storybook-static/logo512.png +0 -0
- package/storybook-static/main.2f6d7582.iframe.bundle.js +0 -1
- package/storybook-static/manifest.json +0 -25
- package/storybook-static/project.json +0 -1
- package/storybook-static/quickblox.js +0 -54609
- package/storybook-static/robots.txt +0 -3
- package/storybook-static/runtime~main.72d6302b.iframe.bundle.js +0 -1
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -63
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -18
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-7/manager-bundle.js +0 -12
- package/storybook-static/sb-addons/interactions-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/viewport-8/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/viewport-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +0 -31
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js +0 -1
- package/storybook-static/sb-manager/chunk-2IXBUOFS.js +0 -7
- package/storybook-static/sb-manager/chunk-INSKDKQB.js +0 -348
- package/storybook-static/sb-manager/chunk-NGTUFCUO.js +0 -9
- package/storybook-static/sb-manager/chunk-NMB3SATH.js +0 -406
- package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +0 -1
- package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +0 -156
- package/storybook-static/sb-manager/globals-module-info.js +0 -1
- package/storybook-static/sb-manager/globals.js +0 -1
- package/storybook-static/sb-manager/index.js +0 -1
- package/storybook-static/sb-manager/runtime.js +0 -1
- package/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js +0 -1
- package/storybook-static/sb-preview/globals.js +0 -1
- package/storybook-static/sb-preview/runtime.js +0 -112
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.7b228eb0.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.7b228eb0.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css +0 -4
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css +0 -7
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.4f813450.chunk.css +0 -6
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.4f813450.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.e37f549d.chunk.css +0 -5
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.e37f549d.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.fb1001e7.chunk.css +0 -4
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.fb1001e7.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.4c915c89.chunk.css +0 -14
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.4c915c89.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.7eb916fc.chunk.css +0 -7
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.7eb916fc.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.b67b748b.chunk.css +0 -5
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.b67b748b.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css +0 -4
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css +0 -754
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.655aa6c1.chunk.css +0 -7
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.655aa6c1.chunk.css.map +0 -1
- package/storybook-static/static/css/main.a921485c.css +0 -5
- package/storybook-static/static/css/main.a921485c.css.map +0 -1
- package/storybook-static/static/media/add-contact.e7e7b8b15edebe99cae9c46963126e7c.svg +0 -3
- package/storybook-static/static/media/add.5cbe1f2c489b81396863f7128e3d26e7.svg +0 -3
- package/storybook-static/static/media/admin.476c2854d7ad23f2afdedac2d9bd6815.svg +0 -3
- package/storybook-static/static/media/archive.d0a72898f3c47a4194d18f560a54e109.svg +0 -3
- package/storybook-static/static/media/arrow-left.5005351d4fa6a7c074dd9780fb49dcc8.svg +0 -3
- package/storybook-static/static/media/arrow-right.1be3b599e21158807fdf72f4976179a2.svg +0 -3
- package/storybook-static/static/media/attachment.a58b8549f46ae5bbe93be779cd9f2037.svg +0 -3
- package/storybook-static/static/media/audio-file.40179c472f715fc74d4da607da96aa5e.svg +0 -3
- package/storybook-static/static/media/back.b541e72fe05542e145575c8851558998.svg +0 -3
- package/storybook-static/static/media/banned.c7c74bfa1c833263f3ab42d0529132d1.svg +0 -3
- package/storybook-static/static/media/broadcast.55273926379e5f486ccfdfab1a310b2d.svg +0 -7
- package/storybook-static/static/media/broken-file.bc084278a0d284b7901b47f24001caa6.svg +0 -3
- package/storybook-static/static/media/camera-off.8e01960815ce7620a1039d0fc5f758b2.svg +0 -3
- package/storybook-static/static/media/camera-on.ddd56e36fa505d618ab772e23c8381e6.svg +0 -3
- package/storybook-static/static/media/camera.a5a215695fba60146e649094188f37e2.svg +0 -3
- package/storybook-static/static/media/chat-filled.aaf0b778d198e7b8f632a68299a8fd13.svg +0 -3
- package/storybook-static/static/media/chat.59cd437f21fe7043682dd04cbe6377be.svg +0 -3
- package/storybook-static/static/media/check-off.0c0256f00eeb75770ffc2fbd2b59eab0.svg +0 -3
- package/storybook-static/static/media/check-on.80442753ef6922df1913453f50099315.svg +0 -3
- package/storybook-static/static/media/close.c145af996de81b25f3930bf36d88b161.svg +0 -3
- package/storybook-static/static/media/conference.ffbdf37c0510c796138f18e6c1205204.svg +0 -3
- package/storybook-static/static/media/contact-filled.f04f56ba3f98ade5d7ced7814d8a5fa8.svg +0 -3
- package/storybook-static/static/media/contact.40a8b8104c3a448b81108ffede850963.svg +0 -3
- package/storybook-static/static/media/copy.100bd0fff933cbde8ad4bc2ac281c845.svg +0 -3
- package/storybook-static/static/media/delete.287c9b4b3b0e58cb081c6e388e68b409.svg +0 -3
- package/storybook-static/static/media/down.7a43a3d78885f40616ce111c86c108a4.svg +0 -3
- package/storybook-static/static/media/download.43c26d404dd023e42aaacc52151f7a59.svg +0 -3
- package/storybook-static/static/media/edit.8d813af82ecab84303ee3c97bd7bc562.svg +0 -3
- package/storybook-static/static/media/emoji.9a202cbb16735f3c83ba8772f0218aa4.svg +0 -3
- package/storybook-static/static/media/error.ec60e2052661b82f27b7ce270ae133a7.svg +0 -3
- package/storybook-static/static/media/favorite.194d78057be6cd7968c85e7b5822f82a.svg +0 -3
- package/storybook-static/static/media/file.e537292693b3c89c023fd383c70bd221.svg +0 -3
- package/storybook-static/static/media/forward-filled.43120a68057427c89c88b28d9b20dd90.svg +0 -3
- package/storybook-static/static/media/freeze.35619771e645b649c38e0427d9b39a25.svg +0 -3
- package/storybook-static/static/media/full-screen.6b01c93e069421c69bda2bbde5d01336.svg +0 -3
- package/storybook-static/static/media/gif-file.2c46a5df6c8397f5b9088e66aee3fd44.svg +0 -3
- package/storybook-static/static/media/group-chat.19d5305cab6017d494ac35ecb285a9fe.svg +0 -3
- package/storybook-static/static/media/help.786f48518c96c8e7098296d68245c339.svg +0 -3
- package/storybook-static/static/media/hide.2785264246d70868717984a5ad44d4c9.svg +0 -3
- package/storybook-static/static/media/hungup.e5d2289a9e8cd755bd1ee36b738305a2.svg +0 -3
- package/storybook-static/static/media/image-filled.8afb62b142d786e90102f1cac73a9c13.svg +0 -3
- package/storybook-static/static/media/image.64092dadd5215c8d3ba99ccac753d743.svg +0 -3
- package/storybook-static/static/media/income-call.60ca2d367a00d582f4b6f4a5f2047e27.svg +0 -3
- package/storybook-static/static/media/information.8217e163c334852f143e7199c97fab1d.svg +0 -3
- package/storybook-static/static/media/leave.ae5422a12edec1b61484ff2932819c77.svg +0 -3
- package/storybook-static/static/media/like.45662989373aa524cd580fb42432e0bc.svg +0 -3
- package/storybook-static/static/media/link.74f567c3ee4366d79fb81d73eb8c0919.svg +0 -3
- package/storybook-static/static/media/loader.2eb72391c5267453edb4106528c075ad.svg +0 -3
- package/storybook-static/static/media/location.cab52453404524c345ec7efdd86fa66b.svg +0 -4
- package/storybook-static/static/media/louder.133519141541a9cd2f0e898534b39732.svg +0 -3
- package/storybook-static/static/media/mention.6c4885bb0ea5ca85c8962f6f51ac1cb4.svg +0 -3
- package/storybook-static/static/media/mic-off.43e60427600bcf7fd78fb840ff50d804.svg +0 -3
- package/storybook-static/static/media/mic-on.5a52100de3770550b3a57a76827843c2.svg +0 -4
- package/storybook-static/static/media/minimize.a849dd3a36ece08b992a773d135a0c3f.svg +0 -3
- package/storybook-static/static/media/moderations.07c8d1fe96b0b8bb5911f6cc37f764c6.svg +0 -3
- package/storybook-static/static/media/more.4ed9ad54ae110d9760b6e9698d821960.svg +0 -3
- package/storybook-static/static/media/muted.cb37ac3c577c87c800466aa7aee65af2.svg +0 -3
- package/storybook-static/static/media/new-chat.124e0351bd0e19ff4c5fdbabbe5c6027.svg +0 -3
- package/storybook-static/static/media/next.97a0eeea1f8daa2d31c8452f29908bf1.svg +0 -3
- package/storybook-static/static/media/notifications.ab8e847ae04e2bec9209dbdd1054b0f2.svg +0 -3
- package/storybook-static/static/media/notify-off.4a669a3a8cbd38b3309dbc4c909f6089.svg +0 -3
- package/storybook-static/static/media/notify-on.ea9ffc856ad6cdbe87184af558c78eec.svg +0 -3
- package/storybook-static/static/media/outcome-call.9f5fec07823796ad78963a06cdcf629e.svg +0 -3
- package/storybook-static/static/media/pause.27eb8c32999f10d05d6a200165d798a9.svg +0 -3
- package/storybook-static/static/media/phone-filled.e969511d74935af26ef366f575929f68.svg +0 -3
- package/storybook-static/static/media/phone.6355580a064a488b6317372d71f84c00.svg +0 -3
- package/storybook-static/static/media/play.00bfe0e9c94dc6dfb230262e45b2f860.svg +0 -3
- package/storybook-static/static/media/plus.d3953cb1cf830bcfc41c8cc6133b13b1.svg +0 -3
- package/storybook-static/static/media/private-chat.c68f36baf025b9d20ad1f801a2396e7a.svg +0 -3
- package/storybook-static/static/media/public-channel.7a6ada7f30c44fb4a99021df0eb0e996.svg +0 -7
- package/storybook-static/static/media/quite.9f45e2152fe6c499a776cb387ee4859f.svg +0 -3
- package/storybook-static/static/media/record.e49ee7da793b2ce446a4e7128970c0cc.svg +0 -3
- package/storybook-static/static/media/refresh.6e955728d9ec086f34e9adaaaafacf3e.svg +0 -3
- package/storybook-static/static/media/remove-2.8a7700757f02c941f03c37c7e495bf63.svg +0 -3
- package/storybook-static/static/media/remove.831e69b70db1b3eb72a49444b8aa1e16.svg +0 -3
- package/storybook-static/static/media/rephrase.551171aa8903b31746a58a95528b1f68.svg +0 -6
- package/storybook-static/static/media/reply-filled.17ed65506e902f17bb22e87ffac93314.svg +0 -3
- package/storybook-static/static/media/screenshare.c2f94264a7640ea1bbb2a22f7d570038.svg +0 -3
- package/storybook-static/static/media/search.25663e60d71e01c64fdfc83df7460ab0.svg +0 -3
- package/storybook-static/static/media/send.d298db52aafdb846a46c9d180ad45946.svg +0 -3
- package/storybook-static/static/media/sent.f427753e5502fd7783a08e5f0e0d2f35.svg +0 -3
- package/storybook-static/static/media/settings-filled.bd9b60ff4e9eae911e4e2bc69e8e79ca.svg +0 -3
- package/storybook-static/static/media/share.7ce8283aa267fb065c568d65b482e211.svg +0 -3
- package/storybook-static/static/media/show.de1782527c4a7fa14101dffbfba8aea6.svg +0 -3
- package/storybook-static/static/media/speaker-off.fe84597c4b68f4f761e12f789dc58718.svg +0 -3
- package/storybook-static/static/media/speaker.e7ff48a73ca43188703b36dfecd932b5.svg +0 -3
- package/storybook-static/static/media/stop-record.a2e9d50a0930c24af43d7f357093be81.svg +0 -3
- package/storybook-static/static/media/stop-share.d1be236e01dd924ba711e1e17f41054c.svg +0 -3
- package/storybook-static/static/media/stream-filled.c40bae61fea25455602a61db5e77fa71.svg +0 -3
- package/storybook-static/static/media/stream.700f4f8ce0cee0ae1ef56132867427fe.svg +0 -3
- package/storybook-static/static/media/swap-camera.bc3a4652106f5c57d14b4dcbffff08a5.svg +0 -3
- package/storybook-static/static/media/text-document.cad7e87368501b96de2a939d08852dcd.svg +0 -3
- package/storybook-static/static/media/unarchive.1b1a7438cd8eb6fee80e6ac89baa195b.svg +0 -3
- package/storybook-static/static/media/user.911c7ae778615185b285ce0ae4068486.svg +0 -3
- package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +0 -3
- package/storybook-static/static/media/video.bbcc2109285c18eea02ede86920de0dd.svg +0 -3
- package/storybook-static/static/media/viewed-delivered.f43360dc87235a6cf574ff53f73dd777.svg +0 -3
- package/storybook-static/static/media/voice.b937c8a1f744050bec2cd389ad2a1f3a.svg +0 -3
- package/storybook-static/stories.json +0 -1
|
@@ -1,1503 +0,0 @@
|
|
|
1
|
-
import QB, {
|
|
2
|
-
ChatMessageAttachment,
|
|
3
|
-
GetMessagesResult,
|
|
4
|
-
GetUserParams,
|
|
5
|
-
ListUserResponse,
|
|
6
|
-
QBBlobCreate,
|
|
7
|
-
QBBlobCreateUploadParams,
|
|
8
|
-
QBChatDialog,
|
|
9
|
-
QBChatMessage,
|
|
10
|
-
QBChatXMPPMessage,
|
|
11
|
-
QBGetDialogResult,
|
|
12
|
-
QBLoginParams,
|
|
13
|
-
QBSession,
|
|
14
|
-
QBSystemMessage,
|
|
15
|
-
QBUser,
|
|
16
|
-
QBMessageStatusParams,
|
|
17
|
-
AIChatHistory,
|
|
18
|
-
AIAnswerResponse,
|
|
19
|
-
} from 'quickblox/quickblox';
|
|
20
|
-
import { RemoteDialogDTO } from '../../dto/dialog/RemoteDialogDTO';
|
|
21
|
-
import {
|
|
22
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
23
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
24
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
25
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
26
|
-
RemoteDataSourceException,
|
|
27
|
-
} from '../exception/RemoteDataSourceException';
|
|
28
|
-
import { RemoteDialogsDTO } from '../../dto/dialog/RemoteDialogsDTO';
|
|
29
|
-
import { RemoteMessageDTO } from '../../dto/message/RemoteMessageDTO';
|
|
30
|
-
import { RemoteUserDTO } from '../../dto/user/RemoteUserDTO';
|
|
31
|
-
import { RemoteUsersDTO } from '../../dto/user/RemoteUsersDTO';
|
|
32
|
-
import { RemoteMessagesDTO } from '../../dto/message/RemoteMessagesDTO';
|
|
33
|
-
import { RemoteFileDTO } from '../../dto/file/RemoteFileDTO';
|
|
34
|
-
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
35
|
-
import { DialogDTOMapper } from './Mapper/DialogDTOMapper';
|
|
36
|
-
import { IDTOMapper } from './Mapper/IDTOMapper';
|
|
37
|
-
import { Stubs } from '../../Stubs';
|
|
38
|
-
import {
|
|
39
|
-
QBAnswerAssist,
|
|
40
|
-
QBChatConnect,
|
|
41
|
-
QBChatDisconnect,
|
|
42
|
-
qbChatGetMessagesExtended,
|
|
43
|
-
QBChatMarkMessageDelivered,
|
|
44
|
-
QBChatMarkMessageRead,
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46
|
-
// QBChatMarkMessageRead,
|
|
47
|
-
QBChatSendMessage,
|
|
48
|
-
QBChatSendSystemMessage,
|
|
49
|
-
QBCreateAndUploadContent,
|
|
50
|
-
QBCreateGroupDialog,
|
|
51
|
-
QBCreatePrivateDialog,
|
|
52
|
-
QBCreateSession,
|
|
53
|
-
QBDeleteDialog,
|
|
54
|
-
QBGetDialogById,
|
|
55
|
-
QBGetDialogs,
|
|
56
|
-
QBInit,
|
|
57
|
-
QBInitParams,
|
|
58
|
-
QBJoinGroupDialog,
|
|
59
|
-
QBLogout,
|
|
60
|
-
QBSendIsStopTypingStatus,
|
|
61
|
-
QBSendIsTypingStatus,
|
|
62
|
-
QBTranslate,
|
|
63
|
-
QBUpdateDialog,
|
|
64
|
-
QBUsersGet,
|
|
65
|
-
QBUsersGetById,
|
|
66
|
-
} from '../../../qb-api-calls';
|
|
67
|
-
import { UserDTOMapper } from './Mapper/UserDTOMapper';
|
|
68
|
-
import { MessageDTOMapper } from './Mapper/MessageDTOMapper';
|
|
69
|
-
import { IMapper } from '../../mapper/IMapper';
|
|
70
|
-
import { DialogRemoteDTOMapper } from '../../mapper/DialogRemoteDTOMapper';
|
|
71
|
-
import { DialogEntity } from '../../../Domain/entity/DialogEntity';
|
|
72
|
-
import RepositoryException from '../exception/RepositoryException';
|
|
73
|
-
import { MapperDTOException } from '../exception/MapperDTOException';
|
|
74
|
-
import { stringifyError } from '../../../utils/parse';
|
|
75
|
-
import { DialogType } from '../../../Domain/entity/DialogTypes';
|
|
76
|
-
import { NotificationTypes } from '../../../Domain/entity/NotificationTypes';
|
|
77
|
-
import EventMessageType from '../../../Domain/entity/EventMessageType';
|
|
78
|
-
import { SubscriptionPerformer } from '../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer';
|
|
79
|
-
import { CallBackFunction } from '../../../Domain/use_cases/base/IUseCase';
|
|
80
|
-
import { FileDTOMapper } from './Mapper/FileDTOMapper';
|
|
81
|
-
import { DialogEventInfo } from '../../../Domain/entity/DialogEventInfo';
|
|
82
|
-
import { IRemoteDataSource } from './IRemoteDataSource';
|
|
83
|
-
import { QBConfig } from '../../../QBconfig';
|
|
84
|
-
import {
|
|
85
|
-
QBUIKitChatDialog,
|
|
86
|
-
QBUIKitChatNewMessage,
|
|
87
|
-
QBUIKitSystemMessage,
|
|
88
|
-
} from '../../../CommonTypes/CommonTypes';
|
|
89
|
-
|
|
90
|
-
export type PaginatedDTOResult = {
|
|
91
|
-
PaginationResult: Pagination;
|
|
92
|
-
ResultData: RemoteUserDTO[];
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type LoginData = {
|
|
96
|
-
login: string;
|
|
97
|
-
password: string;
|
|
98
|
-
};
|
|
99
|
-
export type AuthorizationData = {
|
|
100
|
-
sessionToken: string;
|
|
101
|
-
userId: number;
|
|
102
|
-
password: string;
|
|
103
|
-
userName: string;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export class RemoteDataSource implements IRemoteDataSource {
|
|
107
|
-
private userDTOMapper: IDTOMapper;
|
|
108
|
-
|
|
109
|
-
private messageDTOMapper: IDTOMapper;
|
|
110
|
-
|
|
111
|
-
private fileDTOMapper: IDTOMapper;
|
|
112
|
-
|
|
113
|
-
private _needInit: boolean;
|
|
114
|
-
|
|
115
|
-
private _authProcessed: boolean;
|
|
116
|
-
|
|
117
|
-
get authProcessed(): boolean {
|
|
118
|
-
const auth = this._authProcessed;
|
|
119
|
-
const chatConnection = QB && QB.chat && QB.chat.isConnected;
|
|
120
|
-
|
|
121
|
-
if (chatConnection) return true;
|
|
122
|
-
|
|
123
|
-
return auth || chatConnection;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
set authProcessed(value: boolean) {
|
|
127
|
-
this._authProcessed = value;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
get needInit(): boolean {
|
|
131
|
-
const needed = this._needInit;
|
|
132
|
-
const chatConnection = QB && QB.chat && QB.chat.isConnected;
|
|
133
|
-
|
|
134
|
-
if (chatConnection) return false;
|
|
135
|
-
|
|
136
|
-
return needed;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
public setAuthProcessedSuccessed() {
|
|
140
|
-
this.authProcessed = true;
|
|
141
|
-
this.setInitSDKSuccessed();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
public setInitSDKSuccessed() {
|
|
145
|
-
this._needInit = false;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
private _authInformation: AuthorizationData | undefined;
|
|
149
|
-
|
|
150
|
-
get authInformation(): AuthorizationData | undefined {
|
|
151
|
-
return this._authInformation;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
set authInformation(value: AuthorizationData | undefined) {
|
|
155
|
-
this._authInformation = value;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
private currentDialog: RemoteDialogDTO | undefined;
|
|
159
|
-
|
|
160
|
-
//
|
|
161
|
-
getCurrentDialogDTOMapper(): IDTOMapper {
|
|
162
|
-
const currentUserId: number = this._authInformation?.userId || -1;
|
|
163
|
-
const dialogDTOMapper: IDTOMapper = new DialogDTOMapper(currentUserId);
|
|
164
|
-
|
|
165
|
-
return dialogDTOMapper;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
//
|
|
169
|
-
constructor() {
|
|
170
|
-
console.log('CONSTRUCTOR RemoteDataSourceMock');
|
|
171
|
-
this.userDTOMapper = new UserDTOMapper();
|
|
172
|
-
this.messageDTOMapper = new MessageDTOMapper();
|
|
173
|
-
this.fileDTOMapper = new FileDTOMapper();
|
|
174
|
-
this._needInit = true;
|
|
175
|
-
this._authProcessed = false;
|
|
176
|
-
this.subscriptionOnSystemMessages[NotificationTypes.REMOVE_USER] =
|
|
177
|
-
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
178
|
-
this.subscriptionOnSystemMessages[NotificationTypes.UPDATE_DIALOG] =
|
|
179
|
-
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
180
|
-
this.subscriptionOnSystemMessages[NotificationTypes.DELETE_LEAVE_DIALOG] =
|
|
181
|
-
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
182
|
-
this.subscriptionOnSystemMessages[NotificationTypes.NEW_DIALOG] =
|
|
183
|
-
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// eslint-disable-next-line class-methods-use-this
|
|
187
|
-
createAnswer(
|
|
188
|
-
text: string,
|
|
189
|
-
messages: AIChatHistory,
|
|
190
|
-
smartChatAssistantId: string,
|
|
191
|
-
): Promise<AIAnswerResponse> {
|
|
192
|
-
return QBAnswerAssist(smartChatAssistantId, text, messages);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// eslint-disable-next-line class-methods-use-this
|
|
196
|
-
translate(
|
|
197
|
-
text: string,
|
|
198
|
-
languageCode: string,
|
|
199
|
-
smartChatAssistantId: string,
|
|
200
|
-
): Promise<AIAnswerResponse> {
|
|
201
|
-
return QBTranslate(smartChatAssistantId, text, languageCode);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
async updateCurrentDialog(dto: RemoteDialogDTO): Promise<void> {
|
|
205
|
-
this.currentDialog = dto;
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
|
|
209
|
-
|
|
210
|
-
const dialogEntity: DialogEntity = await dialogsDTOtoEntityMapper.toEntity(
|
|
211
|
-
this.currentDialog,
|
|
212
|
-
);
|
|
213
|
-
const userId = this._authInformation?.userId || -1;
|
|
214
|
-
const dialogId = this.currentDialog.id;
|
|
215
|
-
const messageId = this.currentDialog.lastMessageId;
|
|
216
|
-
//
|
|
217
|
-
//
|
|
218
|
-
const resultMessage: DialogEventInfo = {
|
|
219
|
-
eventMessageType: EventMessageType.LocalMessage,
|
|
220
|
-
dialogInfo: dialogEntity,
|
|
221
|
-
messageInfo: undefined,
|
|
222
|
-
messageStatus: {
|
|
223
|
-
isTyping: false,
|
|
224
|
-
userId,
|
|
225
|
-
dialogId,
|
|
226
|
-
messageId,
|
|
227
|
-
deliveryStatus: 'delivered',
|
|
228
|
-
},
|
|
229
|
-
notificationTypes: undefined,
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
this.subscriptionOnMessageStatus.informSubscribers(
|
|
233
|
-
resultMessage,
|
|
234
|
-
EventMessageType.LocalMessage,
|
|
235
|
-
);
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
public async setUpMockStorage(): Promise<void> {
|
|
241
|
-
const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
|
|
242
|
-
const dialogsEntities = Stubs.createDialogsForTest();
|
|
243
|
-
|
|
244
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
245
|
-
for (const item of dialogsEntities) {
|
|
246
|
-
const dialogDTO: RemoteDialogDTO =
|
|
247
|
-
// eslint-disable-next-line no-await-in-loop
|
|
248
|
-
await dialogsDTOtoEntityMapper.fromEntity<
|
|
249
|
-
DialogEntity,
|
|
250
|
-
RemoteDialogDTO
|
|
251
|
-
>(item);
|
|
252
|
-
|
|
253
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars,promise/catch-or-return,promise/always-return
|
|
254
|
-
this.createDialog(dialogDTO)
|
|
255
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars,promise/always-return
|
|
256
|
-
.then((_) => {
|
|
257
|
-
console.log(`added mock item ${JSON.stringify(dialogDTO)}`);
|
|
258
|
-
})
|
|
259
|
-
.catch((e) => {
|
|
260
|
-
console.log('EXCEPTION:', (e as RepositoryException).message);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// eslint-disable-next-line class-methods-use-this
|
|
266
|
-
private async createUserSession(loginData: QBLoginParams) {
|
|
267
|
-
const session: QBSession = await QBCreateSession(loginData);
|
|
268
|
-
|
|
269
|
-
return session;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// eslint-disable-next-line class-methods-use-this
|
|
273
|
-
public static initSDK(sdkParams: QBInitParams): boolean {
|
|
274
|
-
console.log('2. call initSDK in RemoteDataSourceMock');
|
|
275
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
276
|
-
// @ts-ignore
|
|
277
|
-
if (!window.QB) {
|
|
278
|
-
throw new Error('HAVE NO SDK');
|
|
279
|
-
} else {
|
|
280
|
-
console.log('2. start init actions');
|
|
281
|
-
QBInit({
|
|
282
|
-
appIdOrToken: sdkParams.appIdOrToken,
|
|
283
|
-
authKeyOrAppId: sdkParams.authKeyOrAppId,
|
|
284
|
-
authSecret: sdkParams.authSecret,
|
|
285
|
-
accountKey: sdkParams.accountKey,
|
|
286
|
-
config: sdkParams.config,
|
|
287
|
-
});
|
|
288
|
-
const QuickBloxVersion = `CALL initData: Init SDK was success: version ${QB.version} build ${QB.buildNumber}`;
|
|
289
|
-
|
|
290
|
-
console.log(QuickBloxVersion);
|
|
291
|
-
|
|
292
|
-
return true;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
public async initSDKWithUser(
|
|
297
|
-
sdkParams: QBInitParams,
|
|
298
|
-
authData: LoginData,
|
|
299
|
-
): Promise<void> {
|
|
300
|
-
console.log('2. call initSDK in RemoteDataSourceMock');
|
|
301
|
-
if (this.needInit) {
|
|
302
|
-
console.log('2. start init actions');
|
|
303
|
-
QBInit({
|
|
304
|
-
appIdOrToken: sdkParams.appIdOrToken,
|
|
305
|
-
authKeyOrAppId: sdkParams.authKeyOrAppId,
|
|
306
|
-
authSecret: sdkParams.authSecret,
|
|
307
|
-
accountKey: sdkParams.accountKey,
|
|
308
|
-
config: sdkParams.config,
|
|
309
|
-
});
|
|
310
|
-
const QuickBloxVersion = `CALL initData: Init SDK was success: version ${QB.version} build ${QB.buildNumber}`;
|
|
311
|
-
|
|
312
|
-
console.log(QuickBloxVersion);
|
|
313
|
-
//
|
|
314
|
-
this._needInit = false;
|
|
315
|
-
await this.loginWithUser(authData);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
public async disconnectAndLogoutUser() {
|
|
320
|
-
if (this.authProcessed) {
|
|
321
|
-
QBChatDisconnect();
|
|
322
|
-
await QBLogout();
|
|
323
|
-
this.authProcessed = false;
|
|
324
|
-
this.releaseSubscriptions();
|
|
325
|
-
this.releaseEventsHandlers();
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
releaseSubscriptions(): void {
|
|
330
|
-
Object.entries(this.subscriptionOnSystemMessages).map((x) => {
|
|
331
|
-
const eventName = x[0];
|
|
332
|
-
|
|
333
|
-
return this.subscriptionOnSystemMessages[eventName].release();
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
subscribeOnSystemMessaging(
|
|
338
|
-
notificationType: NotificationTypes,
|
|
339
|
-
callback: CallBackFunction<RemoteMessageDTO>,
|
|
340
|
-
): void {
|
|
341
|
-
let SystemMessageType: string = NotificationTypes.NEW_DIALOG;
|
|
342
|
-
|
|
343
|
-
switch (notificationType) {
|
|
344
|
-
case NotificationTypes.REMOVE_USER:
|
|
345
|
-
SystemMessageType = NotificationTypes.REMOVE_USER;
|
|
346
|
-
break;
|
|
347
|
-
case NotificationTypes.DELETE_LEAVE_DIALOG:
|
|
348
|
-
SystemMessageType = NotificationTypes.DELETE_LEAVE_DIALOG;
|
|
349
|
-
break;
|
|
350
|
-
case NotificationTypes.UPDATE_DIALOG:
|
|
351
|
-
SystemMessageType = NotificationTypes.UPDATE_DIALOG;
|
|
352
|
-
break;
|
|
353
|
-
default:
|
|
354
|
-
SystemMessageType = NotificationTypes.NEW_DIALOG;
|
|
355
|
-
break;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
this.subscriptionOnSystemMessages[SystemMessageType].subscribe(
|
|
359
|
-
callback,
|
|
360
|
-
EventMessageType.SystemMessage,
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
protected subscriptionOnSystemMessages: Dictionary<
|
|
365
|
-
SubscriptionPerformer<RemoteMessageDTO>
|
|
366
|
-
> = {};
|
|
367
|
-
|
|
368
|
-
subscribeOnMessaging(callback: CallBackFunction<RemoteMessageDTO>): void {
|
|
369
|
-
this.subscriptionOnChatMessages.subscribe(
|
|
370
|
-
callback,
|
|
371
|
-
EventMessageType.RegularMessage,
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
protected subscriptionOnChatMessages: SubscriptionPerformer<RemoteMessageDTO> =
|
|
376
|
-
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
377
|
-
|
|
378
|
-
protected subscriptionOnMessageStatus: SubscriptionPerformer<DialogEventInfo> =
|
|
379
|
-
new SubscriptionPerformer<DialogEventInfo>();
|
|
380
|
-
|
|
381
|
-
protected subscriptionOnSessionExpiredListener: SubscriptionPerformer<boolean> =
|
|
382
|
-
new SubscriptionPerformer<boolean>();
|
|
383
|
-
|
|
384
|
-
subscribeOnSessionExpiredListener(callback: CallBackFunction<boolean>): void {
|
|
385
|
-
console.log('subscribe On Session Expired Event');
|
|
386
|
-
this.subscriptionOnSessionExpiredListener.subscribe(
|
|
387
|
-
callback,
|
|
388
|
-
EventMessageType.LocalMessage,
|
|
389
|
-
);
|
|
390
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
391
|
-
const sessionTimeOut = QBConfig.appConfig.sessionTimeOut || 122;
|
|
392
|
-
|
|
393
|
-
setTimeout(() => {
|
|
394
|
-
console.log('NEED LOGOUT');
|
|
395
|
-
if (this.authProcessed) {
|
|
396
|
-
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
397
|
-
true,
|
|
398
|
-
EventMessageType.LocalMessage,
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
}, sessionTimeOut * 60 * 1000);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
subscribeOnUpdateMessageStatus(
|
|
405
|
-
callback: CallBackFunction<DialogEventInfo>,
|
|
406
|
-
): void {
|
|
407
|
-
this.subscriptionOnMessageStatus.subscribe(
|
|
408
|
-
callback,
|
|
409
|
-
EventMessageType.LocalMessage,
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
public initEventsHandlers() {
|
|
414
|
-
console.log('CALL--initEventsHandlers--CALL');
|
|
415
|
-
QB.chat.onSystemMessageListener = (message: QBUIKitSystemMessage) => {
|
|
416
|
-
console.log(`EVENT: receive system message: ${JSON.stringify(message)}`);
|
|
417
|
-
const resultMessage = new RemoteMessageDTO();
|
|
418
|
-
|
|
419
|
-
resultMessage.sender_id = message.userId;
|
|
420
|
-
resultMessage.message = message.body || 'system message';
|
|
421
|
-
resultMessage.notification_type =
|
|
422
|
-
message.extension?.notification_type || NotificationTypes.UPDATE_DIALOG;
|
|
423
|
-
resultMessage.dialogId = message?.extension?.dialog_id || '';
|
|
424
|
-
|
|
425
|
-
this.subscriptionOnSystemMessages[
|
|
426
|
-
resultMessage.notification_type!
|
|
427
|
-
].informSubscribers(resultMessage, EventMessageType.SystemMessage);
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
QB.chat.onMessageListener = (
|
|
431
|
-
userId: number,
|
|
432
|
-
message: QBChatXMPPMessage,
|
|
433
|
-
) => {
|
|
434
|
-
console.log(
|
|
435
|
-
`EVENT: receive message for userid: ${userId}, message: ${stringifyError(
|
|
436
|
-
message,
|
|
437
|
-
)}`,
|
|
438
|
-
);
|
|
439
|
-
const dialogId: QBChatDialog['_id'] =
|
|
440
|
-
message.dialog_id || message.extension.dialog_id || '-1';
|
|
441
|
-
|
|
442
|
-
//
|
|
443
|
-
qbChatGetMessagesExtended(dialogId, {
|
|
444
|
-
_id: message.id,
|
|
445
|
-
mark_as_read: 0,
|
|
446
|
-
})
|
|
447
|
-
// eslint-disable-next-line promise/always-return
|
|
448
|
-
.then((qbMessages: GetMessagesResult) => {
|
|
449
|
-
///
|
|
450
|
-
qbMessages.items.map(async (currentItem) => {
|
|
451
|
-
const dtoMessage: RemoteMessageDTO =
|
|
452
|
-
await this.messageDTOMapper.toTDO<
|
|
453
|
-
QBChatMessage,
|
|
454
|
-
RemoteMessageDTO
|
|
455
|
-
>(currentItem);
|
|
456
|
-
|
|
457
|
-
dtoMessage.dialogId = dialogId;
|
|
458
|
-
this.subscriptionOnChatMessages.informSubscribers(
|
|
459
|
-
dtoMessage,
|
|
460
|
-
EventMessageType.RegularMessage,
|
|
461
|
-
);
|
|
462
|
-
//
|
|
463
|
-
if (this.currentDialog?.id === dialogId) {
|
|
464
|
-
QBChatMarkMessageRead({
|
|
465
|
-
messageId: message.id,
|
|
466
|
-
dialogId,
|
|
467
|
-
userId: dtoMessage.sender_id,
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
///
|
|
472
|
-
return dtoMessage;
|
|
473
|
-
});
|
|
474
|
-
})
|
|
475
|
-
.catch();
|
|
476
|
-
//
|
|
477
|
-
QBGetDialogById(dialogId)
|
|
478
|
-
.then(async (result) => {
|
|
479
|
-
//
|
|
480
|
-
const dialogs: QBChatDialog[] | undefined = result?.items.filter(
|
|
481
|
-
(v) => v._id === dialogId,
|
|
482
|
-
);
|
|
483
|
-
const current =
|
|
484
|
-
dialogs && dialogs.length > 0 ? dialogs[0] : undefined;
|
|
485
|
-
//
|
|
486
|
-
const dialogDTO: RemoteDialogDTO =
|
|
487
|
-
await this.getCurrentDialogDTOMapper().toTDO(current);
|
|
488
|
-
const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
|
|
489
|
-
|
|
490
|
-
const dialogEntity: DialogEntity =
|
|
491
|
-
await dialogsDTOtoEntityMapper.toEntity(dialogDTO);
|
|
492
|
-
//
|
|
493
|
-
//
|
|
494
|
-
const resultEvent: DialogEventInfo = {
|
|
495
|
-
eventMessageType: EventMessageType.LocalMessage,
|
|
496
|
-
dialogInfo: dialogEntity,
|
|
497
|
-
messageInfo: undefined,
|
|
498
|
-
messageStatus: {
|
|
499
|
-
isTyping: false,
|
|
500
|
-
userId,
|
|
501
|
-
dialogId,
|
|
502
|
-
messageId: message.id,
|
|
503
|
-
deliveryStatus: 'read',
|
|
504
|
-
},
|
|
505
|
-
notificationTypes: undefined,
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
this.subscriptionOnMessageStatus.informSubscribers(
|
|
509
|
-
resultEvent,
|
|
510
|
-
EventMessageType.LocalMessage,
|
|
511
|
-
);
|
|
512
|
-
|
|
513
|
-
return resultEvent;
|
|
514
|
-
})
|
|
515
|
-
.catch();
|
|
516
|
-
//
|
|
517
|
-
};
|
|
518
|
-
QB.chat.onDeliveredStatusListener = (messageId, dialogId, userId) => {
|
|
519
|
-
console.log(
|
|
520
|
-
`EVENT: receive delivered message id: ${messageId}, dialogid: ${dialogId} userid: ${userId}`,
|
|
521
|
-
);
|
|
522
|
-
|
|
523
|
-
QBGetDialogById(dialogId)
|
|
524
|
-
.then(async (result) => {
|
|
525
|
-
//
|
|
526
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
527
|
-
|
|
528
|
-
const dialogs: QBChatDialog[] | undefined = result?.items.filter(
|
|
529
|
-
(v) => v._id === dialogId,
|
|
530
|
-
);
|
|
531
|
-
const current =
|
|
532
|
-
dialogs && dialogs.length > 0 ? dialogs[0] : undefined;
|
|
533
|
-
//
|
|
534
|
-
const dialogDTO: RemoteDialogDTO =
|
|
535
|
-
await this.getCurrentDialogDTOMapper().toTDO(current);
|
|
536
|
-
const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
|
|
537
|
-
|
|
538
|
-
const dialogEntity: DialogEntity =
|
|
539
|
-
await dialogsDTOtoEntityMapper.toEntity(dialogDTO);
|
|
540
|
-
//
|
|
541
|
-
//
|
|
542
|
-
const resultMessage: DialogEventInfo = {
|
|
543
|
-
eventMessageType: EventMessageType.LocalMessage,
|
|
544
|
-
dialogInfo: dialogEntity,
|
|
545
|
-
messageInfo: undefined,
|
|
546
|
-
messageStatus: {
|
|
547
|
-
isTyping: false,
|
|
548
|
-
userId,
|
|
549
|
-
dialogId,
|
|
550
|
-
messageId,
|
|
551
|
-
deliveryStatus: 'delivered',
|
|
552
|
-
},
|
|
553
|
-
notificationTypes: undefined,
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
this.subscriptionOnMessageStatus.informSubscribers(
|
|
557
|
-
resultMessage,
|
|
558
|
-
EventMessageType.LocalMessage,
|
|
559
|
-
);
|
|
560
|
-
//
|
|
561
|
-
//
|
|
562
|
-
// eslint-disable-next-line promise/always-return
|
|
563
|
-
if (current && current.type === DialogType.private) {
|
|
564
|
-
qbChatGetMessagesExtended(dialogId, {
|
|
565
|
-
_id: messageId,
|
|
566
|
-
mark_as_read: 0,
|
|
567
|
-
})
|
|
568
|
-
// eslint-disable-next-line promise/always-return
|
|
569
|
-
.then((qbMessages: GetMessagesResult) => {
|
|
570
|
-
///
|
|
571
|
-
qbMessages.items.map(async (currentItem) => {
|
|
572
|
-
const dtoMessage: RemoteMessageDTO =
|
|
573
|
-
await this.messageDTOMapper.toTDO<
|
|
574
|
-
QBChatMessage,
|
|
575
|
-
RemoteMessageDTO
|
|
576
|
-
>(currentItem);
|
|
577
|
-
|
|
578
|
-
dtoMessage.dialogId = dialogId;
|
|
579
|
-
this.subscriptionOnChatMessages.informSubscribers(
|
|
580
|
-
dtoMessage,
|
|
581
|
-
EventMessageType.RegularMessage,
|
|
582
|
-
);
|
|
583
|
-
//
|
|
584
|
-
if (this.currentDialog?.id === dialogId) {
|
|
585
|
-
QBChatMarkMessageRead({
|
|
586
|
-
messageId,
|
|
587
|
-
dialogId,
|
|
588
|
-
userId: dtoMessage.sender_id,
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return dtoMessage;
|
|
593
|
-
});
|
|
594
|
-
|
|
595
|
-
///
|
|
596
|
-
})
|
|
597
|
-
.catch();
|
|
598
|
-
//
|
|
599
|
-
}
|
|
600
|
-
})
|
|
601
|
-
.catch();
|
|
602
|
-
};
|
|
603
|
-
QB.chat.onMessageTypingListener = (isTyping, userId, dialogId) => {
|
|
604
|
-
console.log(
|
|
605
|
-
`EVENT: receive typing: ${
|
|
606
|
-
isTyping ? 'true' : 'false'
|
|
607
|
-
}, dialog id: ${dialogId} userid: ${userId}`,
|
|
608
|
-
);
|
|
609
|
-
if (this.authProcessed && this.authInformation?.userId === userId) return;
|
|
610
|
-
|
|
611
|
-
const resultMessage: DialogEventInfo = {
|
|
612
|
-
eventMessageType: EventMessageType.LocalMessage,
|
|
613
|
-
messageInfo: undefined,
|
|
614
|
-
dialogInfo: undefined,
|
|
615
|
-
messageStatus: {
|
|
616
|
-
isTyping,
|
|
617
|
-
userId,
|
|
618
|
-
dialogId,
|
|
619
|
-
messageId: '',
|
|
620
|
-
deliveryStatus: 'sending',
|
|
621
|
-
},
|
|
622
|
-
notificationTypes: undefined,
|
|
623
|
-
};
|
|
624
|
-
|
|
625
|
-
this.subscriptionOnMessageStatus.informSubscribers(
|
|
626
|
-
resultMessage,
|
|
627
|
-
EventMessageType.LocalMessage,
|
|
628
|
-
);
|
|
629
|
-
};
|
|
630
|
-
QB.chat.onSessionExpiredListener = (error) => {
|
|
631
|
-
console.log('call onSessionExpiredListener');
|
|
632
|
-
console.timeLog('onSessionExpiredListener');
|
|
633
|
-
let result = true;
|
|
634
|
-
|
|
635
|
-
if (error) {
|
|
636
|
-
console.log(
|
|
637
|
-
'EVENT:onSessionExpiredListener - error: ',
|
|
638
|
-
stringifyError(error),
|
|
639
|
-
);
|
|
640
|
-
result = false;
|
|
641
|
-
} else {
|
|
642
|
-
console.log(
|
|
643
|
-
'EVENT: Hello from SessionExpiredListener. session is expired.',
|
|
644
|
-
);
|
|
645
|
-
result = true;
|
|
646
|
-
}
|
|
647
|
-
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
648
|
-
result,
|
|
649
|
-
EventMessageType.LocalMessage,
|
|
650
|
-
);
|
|
651
|
-
};
|
|
652
|
-
QB.chat.onDisconnectedListener = () => {
|
|
653
|
-
console.log('EVENT: disconnect');
|
|
654
|
-
};
|
|
655
|
-
QB.chat.onReconnectListener = () => {
|
|
656
|
-
console.log('EVENT: reconnect');
|
|
657
|
-
};
|
|
658
|
-
QB.chat.onMessageErrorListener = (messageId: string, error: unknown) => {
|
|
659
|
-
console.log(
|
|
660
|
-
`EVENT: receive error message id: ${messageId}, error: ${stringifyError(
|
|
661
|
-
error,
|
|
662
|
-
)}, current auth status is: ${this.authProcessed ? 'true' : 'false'}`,
|
|
663
|
-
);
|
|
664
|
-
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
665
|
-
true,
|
|
666
|
-
EventMessageType.LocalMessage,
|
|
667
|
-
);
|
|
668
|
-
};
|
|
669
|
-
|
|
670
|
-
QB.chat.onReadStatusListener = (messageId, dialogId, userId) => {
|
|
671
|
-
console.log(
|
|
672
|
-
`EVENT: receive read message id: ${messageId}, dialogid: ${dialogId} userid: ${userId}`,
|
|
673
|
-
);
|
|
674
|
-
const resultMessage: DialogEventInfo = {
|
|
675
|
-
eventMessageType: EventMessageType.LocalMessage,
|
|
676
|
-
messageInfo: undefined,
|
|
677
|
-
dialogInfo: undefined,
|
|
678
|
-
messageStatus: {
|
|
679
|
-
isTyping: false,
|
|
680
|
-
userId,
|
|
681
|
-
dialogId,
|
|
682
|
-
messageId,
|
|
683
|
-
deliveryStatus: 'read',
|
|
684
|
-
},
|
|
685
|
-
notificationTypes: undefined,
|
|
686
|
-
};
|
|
687
|
-
|
|
688
|
-
this.subscriptionOnMessageStatus.informSubscribers(
|
|
689
|
-
resultMessage,
|
|
690
|
-
EventMessageType.LocalMessage,
|
|
691
|
-
);
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
//
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
// eslint-disable-next-line class-methods-use-this
|
|
698
|
-
public releaseEventsHandlers() {
|
|
699
|
-
QB.chat.onSessionExpiredListener = undefined;
|
|
700
|
-
QB.chat.onReconnectListener = undefined;
|
|
701
|
-
QB.chat.onDisconnectedListener = undefined;
|
|
702
|
-
QB.chat.onSystemMessageListener = undefined;
|
|
703
|
-
QB.chat.onMessageListener = undefined;
|
|
704
|
-
QB.chat.onMessageErrorListener = undefined;
|
|
705
|
-
QB.chat.onDeliveredStatusListener = undefined;
|
|
706
|
-
QB.chat.onReadStatusListener = undefined;
|
|
707
|
-
QB.chat.onMessageTypingListener = undefined;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
public async loginWithUser(authParams: LoginData) {
|
|
711
|
-
if (this.needInit) return;
|
|
712
|
-
if (this.authProcessed) return;
|
|
713
|
-
//
|
|
714
|
-
console.log('CALL createUserSession....');
|
|
715
|
-
const userRequiredParams = {
|
|
716
|
-
login: authParams.login,
|
|
717
|
-
password: authParams.password,
|
|
718
|
-
};
|
|
719
|
-
const sessionResult = await this.createUserSession(
|
|
720
|
-
userRequiredParams,
|
|
721
|
-
).catch((e) => {
|
|
722
|
-
this._needInit = true;
|
|
723
|
-
this.authProcessed = false;
|
|
724
|
-
console.log(
|
|
725
|
-
`EXCEPTION IN CREATE USER SESSION (${
|
|
726
|
-
userRequiredParams.login
|
|
727
|
-
}) : ${stringifyError(e)}`,
|
|
728
|
-
);
|
|
729
|
-
});
|
|
730
|
-
|
|
731
|
-
if (!sessionResult) return;
|
|
732
|
-
//
|
|
733
|
-
//
|
|
734
|
-
this.initEventsHandlers();
|
|
735
|
-
//
|
|
736
|
-
//
|
|
737
|
-
console.log('USER DATA : ', userRequiredParams);
|
|
738
|
-
console.log('USER SESSION DATA : ', sessionResult);
|
|
739
|
-
console.log('Session token : ', sessionResult.token);
|
|
740
|
-
|
|
741
|
-
const session = sessionResult;
|
|
742
|
-
const sessionDataTmp = JSON.stringify(session);
|
|
743
|
-
|
|
744
|
-
const sessionData = JSON.parse(sessionDataTmp);
|
|
745
|
-
|
|
746
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
747
|
-
console.log(`user_id = ${sessionData.user_id}`);
|
|
748
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
749
|
-
console.log(`session token to chat init = ${sessionData.token}`);
|
|
750
|
-
const authInformation = {
|
|
751
|
-
userName: authParams.login,
|
|
752
|
-
userId: sessionData.user_id,
|
|
753
|
-
sessionToken: sessionData.token,
|
|
754
|
-
password: sessionData.token,
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
const paramsConnect = {
|
|
758
|
-
userId: authInformation.userId,
|
|
759
|
-
password: authInformation.password,
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
console.log(paramsConnect);
|
|
763
|
-
//
|
|
764
|
-
const connectResult = await QBChatConnect(paramsConnect);
|
|
765
|
-
|
|
766
|
-
if (connectResult) {
|
|
767
|
-
//
|
|
768
|
-
this._authInformation = authInformation;
|
|
769
|
-
this.setAuthProcessedSuccessed();
|
|
770
|
-
console.log('CHAT CONNECTED. CAN WORK!');
|
|
771
|
-
console.log('CONNECTION DATA: ', JSON.stringify(authInformation));
|
|
772
|
-
// //
|
|
773
|
-
// this.initEventsHandlers();
|
|
774
|
-
// //
|
|
775
|
-
} else {
|
|
776
|
-
console.log('could not connect to chat');
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
//
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
async getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO> {
|
|
783
|
-
let currentPagination: Pagination = pagination || new Pagination();
|
|
784
|
-
|
|
785
|
-
console.log(
|
|
786
|
-
'call getDialogs in RemoteDataSourceMock param pagination: ',
|
|
787
|
-
JSON.stringify(pagination),
|
|
788
|
-
);
|
|
789
|
-
console.log(
|
|
790
|
-
'call getDialogs in RemoteDataSourceMock with result pagination: ',
|
|
791
|
-
JSON.stringify(currentPagination),
|
|
792
|
-
);
|
|
793
|
-
const pageNumber = currentPagination.getCurrentPage() || 1;
|
|
794
|
-
|
|
795
|
-
console.log('pageNumber: ', pageNumber);
|
|
796
|
-
const perPage = currentPagination.perPage || 100;
|
|
797
|
-
|
|
798
|
-
console.log('perPage: ', perPage);
|
|
799
|
-
const params = {
|
|
800
|
-
created_at: {
|
|
801
|
-
lt: Date.now() / 1000,
|
|
802
|
-
},
|
|
803
|
-
// sort_desc: 'created_at',// artan 19.0.2024
|
|
804
|
-
sort_desc: 'updated_at',
|
|
805
|
-
page: pageNumber,
|
|
806
|
-
// per_page: perPage,
|
|
807
|
-
limit: perPage,
|
|
808
|
-
type: {
|
|
809
|
-
in: [2, 3],
|
|
810
|
-
},
|
|
811
|
-
};
|
|
812
|
-
// filter['type[in]'] = [3, 2].join(',');
|
|
813
|
-
|
|
814
|
-
console.log(
|
|
815
|
-
'call getDialogs in RemoteDataSourceMock with params: ',
|
|
816
|
-
JSON.stringify(params),
|
|
817
|
-
);
|
|
818
|
-
const dialogsDTO: Array<RemoteDialogDTO> = [];
|
|
819
|
-
const qbDialogs: QBGetDialogResult | undefined = await QBGetDialogs(params);
|
|
820
|
-
|
|
821
|
-
if (qbDialogs) {
|
|
822
|
-
console.log(
|
|
823
|
-
`request completed. have: total_entries ${
|
|
824
|
-
qbDialogs.total_entries
|
|
825
|
-
}, limit: ${qbDialogs.limit}, skip: ${
|
|
826
|
-
qbDialogs.skip
|
|
827
|
-
} items: ${JSON.stringify(qbDialogs.items)}`,
|
|
828
|
-
);
|
|
829
|
-
currentPagination = new Pagination(0, perPage);
|
|
830
|
-
currentPagination.totalPages = qbDialogs.total_entries / perPage;
|
|
831
|
-
currentPagination.setCurrentPage(pageNumber);
|
|
832
|
-
|
|
833
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
834
|
-
for (const item of qbDialogs.items) {
|
|
835
|
-
const qbEntity: QBChatDialog = item;
|
|
836
|
-
|
|
837
|
-
const newDTO: RemoteDialogDTO =
|
|
838
|
-
// eslint-disable-next-line no-await-in-loop
|
|
839
|
-
await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
|
|
840
|
-
|
|
841
|
-
// artan 27/06/23
|
|
842
|
-
if (newDTO.type === DialogType.group) {
|
|
843
|
-
// eslint-disable-next-line no-await-in-loop
|
|
844
|
-
await QBJoinGroupDialog(newDTO.id).catch((reason) => {
|
|
845
|
-
console.log('getDialogs. QBJoinGroupDialog error', reason);
|
|
846
|
-
throw new RemoteDataSourceException(
|
|
847
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
848
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
849
|
-
);
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
//
|
|
854
|
-
const currentUserId = this._authInformation?.userId || 0;
|
|
855
|
-
const statusMessageParams: QBMessageStatusParams = {
|
|
856
|
-
userId: newDTO.lastMessageUserId || currentUserId,
|
|
857
|
-
dialogId: newDTO.id,
|
|
858
|
-
messageId: newDTO.lastMessageId,
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
862
|
-
QBChatMarkMessageDelivered(statusMessageParams);
|
|
863
|
-
|
|
864
|
-
dialogsDTO.push(newDTO);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
// eslint-disable-next-line class-methods-use-this
|
|
872
|
-
async createDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
873
|
-
console.log(
|
|
874
|
-
'call createDialog in remote with params: ',
|
|
875
|
-
JSON.stringify(dto),
|
|
876
|
-
);
|
|
877
|
-
const qbEntity: QBChatDialog =
|
|
878
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
879
|
-
|
|
880
|
-
let qbDialog: QBChatDialog | undefined | null;
|
|
881
|
-
|
|
882
|
-
if (qbEntity.type === DialogType.private) {
|
|
883
|
-
const participantId = qbEntity.occupants_ids[0];
|
|
884
|
-
|
|
885
|
-
qbDialog = await QBCreatePrivateDialog(participantId, qbEntity.name);
|
|
886
|
-
} else if (qbEntity.type === DialogType.group) {
|
|
887
|
-
const participants = qbEntity.occupants_ids;
|
|
888
|
-
|
|
889
|
-
const data = { photo: qbEntity.photo };
|
|
890
|
-
|
|
891
|
-
qbDialog = await QBCreateGroupDialog(participants, qbEntity.name, data);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
if (qbDialog === null || qbDialog === undefined) {
|
|
895
|
-
return Promise.reject(
|
|
896
|
-
new RemoteDataSourceException(
|
|
897
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
898
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
899
|
-
),
|
|
900
|
-
);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
const newDTO: RemoteDialogDTO =
|
|
904
|
-
await this.getCurrentDialogDTOMapper().toTDO(qbDialog);
|
|
905
|
-
|
|
906
|
-
console.log(
|
|
907
|
-
'have result in createDialog in remote ds: ',
|
|
908
|
-
JSON.stringify(newDTO),
|
|
909
|
-
);
|
|
910
|
-
|
|
911
|
-
return Promise.resolve(newDTO);
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
async updateDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
915
|
-
const qbEntity: QBUIKitChatDialog =
|
|
916
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
917
|
-
|
|
918
|
-
let data = {};
|
|
919
|
-
|
|
920
|
-
if (qbEntity.name && qbEntity.name.length > 0) {
|
|
921
|
-
data = {
|
|
922
|
-
name: qbEntity.name,
|
|
923
|
-
// photo: qbEntity.photo,
|
|
924
|
-
// photo: 'null',
|
|
925
|
-
...data,
|
|
926
|
-
};
|
|
927
|
-
}
|
|
928
|
-
if (qbEntity.photo) {
|
|
929
|
-
data = {
|
|
930
|
-
...data,
|
|
931
|
-
photo: qbEntity.photo,
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
if (qbEntity.new_occupants_ids && qbEntity.new_occupants_ids.length > 0) {
|
|
935
|
-
data = {
|
|
936
|
-
...data,
|
|
937
|
-
push_all: { occupants_ids: qbEntity.new_occupants_ids },
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
const qbDialogs: QBUIKitChatDialog = await QBUpdateDialog(
|
|
942
|
-
qbEntity._id,
|
|
943
|
-
data,
|
|
944
|
-
);
|
|
945
|
-
|
|
946
|
-
if (qbDialogs === null || qbDialogs === undefined) {
|
|
947
|
-
return Promise.reject(
|
|
948
|
-
new RemoteDataSourceException(
|
|
949
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
950
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
951
|
-
),
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
const newDTO: RemoteDialogDTO =
|
|
956
|
-
await this.getCurrentDialogDTOMapper().toTDO(qbDialogs);
|
|
957
|
-
|
|
958
|
-
return Promise.resolve(newDTO);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
// eslint-disable-next-line class-methods-use-this
|
|
962
|
-
async getDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
963
|
-
const qbEntity: QBChatDialog =
|
|
964
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
965
|
-
|
|
966
|
-
const qbDialog: QBGetDialogResult | undefined = await QBGetDialogById(
|
|
967
|
-
qbEntity._id,
|
|
968
|
-
);
|
|
969
|
-
|
|
970
|
-
if (qbDialog === null || qbDialog === undefined) {
|
|
971
|
-
return Promise.reject(
|
|
972
|
-
new RemoteDataSourceException(
|
|
973
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
974
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
975
|
-
),
|
|
976
|
-
);
|
|
977
|
-
}
|
|
978
|
-
const qbEntityFromDB: QBChatDialog = qbDialog.items[0];
|
|
979
|
-
|
|
980
|
-
const resultDTO: RemoteDialogDTO =
|
|
981
|
-
await this.getCurrentDialogDTOMapper().toTDO(qbEntityFromDB);
|
|
982
|
-
|
|
983
|
-
return Promise.resolve(resultDTO);
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
// eslint-disable-next-line class-methods-use-this
|
|
987
|
-
async deleteDialog(dto: RemoteDialogDTO): Promise<void> {
|
|
988
|
-
const qbEntity: QBChatDialog =
|
|
989
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
990
|
-
|
|
991
|
-
await QBDeleteDialog([qbEntity._id]).catch(() => {
|
|
992
|
-
throw new RemoteDataSourceException(
|
|
993
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
994
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
995
|
-
);
|
|
996
|
-
});
|
|
997
|
-
|
|
998
|
-
return Promise.resolve();
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
async deleteUsersFromDialog(
|
|
1002
|
-
dialogDTO: RemoteDialogDTO,
|
|
1003
|
-
usersDTO: Array<RemoteUserDTO>,
|
|
1004
|
-
): Promise<void> {
|
|
1005
|
-
const qbEntity: QBChatDialog =
|
|
1006
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
1007
|
-
const usersIds: string[] = [];
|
|
1008
|
-
|
|
1009
|
-
usersDTO.forEach((item) => {
|
|
1010
|
-
usersIds.push(item.id);
|
|
1011
|
-
});
|
|
1012
|
-
|
|
1013
|
-
let data = {};
|
|
1014
|
-
|
|
1015
|
-
if (usersIds.length > 0) {
|
|
1016
|
-
data = {
|
|
1017
|
-
pull_all: { occupants_ids: usersIds },
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
const qbDialogs: QBChatDialog = await QBUpdateDialog(qbEntity._id, data);
|
|
1021
|
-
|
|
1022
|
-
if (qbDialogs === null || qbDialogs === undefined) {
|
|
1023
|
-
return Promise.reject(
|
|
1024
|
-
new RemoteDataSourceException(
|
|
1025
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1026
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1027
|
-
),
|
|
1028
|
-
);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
return Promise.resolve();
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1035
|
-
async getUser(dto: RemoteUserDTO): Promise<RemoteUserDTO> {
|
|
1036
|
-
const currentItem: QBUser | undefined = await QBUsersGetById(
|
|
1037
|
-
parseInt(dto.id, 10),
|
|
1038
|
-
);
|
|
1039
|
-
|
|
1040
|
-
if (currentItem === null || currentItem === undefined) {
|
|
1041
|
-
return Promise.reject(
|
|
1042
|
-
new RemoteDataSourceException(
|
|
1043
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1044
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1045
|
-
),
|
|
1046
|
-
);
|
|
1047
|
-
}
|
|
1048
|
-
let dtoUser: RemoteUserDTO | undefined;
|
|
1049
|
-
|
|
1050
|
-
try {
|
|
1051
|
-
dtoUser = await this.userDTOMapper.toTDO<QBUser, RemoteUserDTO>(
|
|
1052
|
-
currentItem,
|
|
1053
|
-
);
|
|
1054
|
-
} catch (e) {
|
|
1055
|
-
console.log('problem with:');
|
|
1056
|
-
console.log(JSON.stringify(currentItem));
|
|
1057
|
-
console.log((e as MapperDTOException).message);
|
|
1058
|
-
console.log((e as MapperDTOException)._description);
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
if (dtoUser !== null || dtoUser !== undefined) {
|
|
1062
|
-
return Promise.resolve(dtoUser as RemoteUserDTO);
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
return Promise.reject(
|
|
1066
|
-
new RemoteDataSourceException(
|
|
1067
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
1068
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
1069
|
-
`not found user with id: ${dto.id} (${dto.full_name})`,
|
|
1070
|
-
),
|
|
1071
|
-
);
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1075
|
-
async getUsers(remoteUsersDTO: RemoteUsersDTO): Promise<RemoteUsersDTO> {
|
|
1076
|
-
const usersDTO: Array<RemoteUserDTO> = new Array<RemoteUserDTO>();
|
|
1077
|
-
|
|
1078
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1079
|
-
for (const item of remoteUsersDTO.users) {
|
|
1080
|
-
// eslint-disable-next-line no-await-in-loop
|
|
1081
|
-
const userDTO = await this.getUser(item);
|
|
1082
|
-
|
|
1083
|
-
usersDTO.push(userDTO);
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
return Promise.resolve(new RemoteUsersDTO(usersDTO, new Pagination()));
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
//
|
|
1090
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1091
|
-
public async getAllUsers(
|
|
1092
|
-
pagination: Pagination,
|
|
1093
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1094
|
-
filter?: string,
|
|
1095
|
-
): Promise<PaginatedDTOResult> {
|
|
1096
|
-
console.log('call getAllUsers');
|
|
1097
|
-
|
|
1098
|
-
console.log('pagination: ', JSON.stringify(pagination));
|
|
1099
|
-
|
|
1100
|
-
const users: RemoteUserDTO[] = [];
|
|
1101
|
-
const pageTemplate = {
|
|
1102
|
-
pageSize: pagination.perPage,
|
|
1103
|
-
startPageNumber: pagination.getCurrentPage(),
|
|
1104
|
-
};
|
|
1105
|
-
const pageNumber = pageTemplate.startPageNumber;
|
|
1106
|
-
const resultPagination = new Pagination(
|
|
1107
|
-
pageNumber,
|
|
1108
|
-
pageTemplate.startPageNumber,
|
|
1109
|
-
);
|
|
1110
|
-
|
|
1111
|
-
let params: GetUserParams = {
|
|
1112
|
-
per_page: pageTemplate.pageSize,
|
|
1113
|
-
page: pageNumber,
|
|
1114
|
-
};
|
|
1115
|
-
|
|
1116
|
-
if (filter && filter.length > 2) {
|
|
1117
|
-
params = {
|
|
1118
|
-
full_name: filter,
|
|
1119
|
-
per_page: pageTemplate.pageSize,
|
|
1120
|
-
page: pageNumber > 0 ? pageNumber : 1,
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
console.log('params: ', JSON.stringify(params));
|
|
1125
|
-
|
|
1126
|
-
// eslint-disable-next-line no-await-in-loop
|
|
1127
|
-
const response: ListUserResponse | void = await QBUsersGet(params).catch(
|
|
1128
|
-
(err) => {
|
|
1129
|
-
console.log('catch call QBUsersGet : ', stringifyError(err));
|
|
1130
|
-
},
|
|
1131
|
-
);
|
|
1132
|
-
|
|
1133
|
-
if (response === undefined || response === null) {
|
|
1134
|
-
throw new RemoteDataSourceException(
|
|
1135
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
1136
|
-
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
1137
|
-
`params: ${JSON.stringify(params)}`,
|
|
1138
|
-
);
|
|
1139
|
-
}
|
|
1140
|
-
let currentItem: QBUser;
|
|
1141
|
-
|
|
1142
|
-
console.log('response: total_entries: ', response.total_entries);
|
|
1143
|
-
console.log('response: per_page: ', response.per_page);
|
|
1144
|
-
console.log('response: current_page: ', response.current_page);
|
|
1145
|
-
|
|
1146
|
-
resultPagination.totalPages =
|
|
1147
|
-
response.total_entries / pageTemplate.pageSize;
|
|
1148
|
-
resultPagination.setCurrentPage(response.current_page);
|
|
1149
|
-
console.log(
|
|
1150
|
-
`response result: count of items ${
|
|
1151
|
-
response.items.length
|
|
1152
|
-
} items: ${JSON.stringify(response.items)}`,
|
|
1153
|
-
);
|
|
1154
|
-
try {
|
|
1155
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1156
|
-
for (const item of response.items) {
|
|
1157
|
-
currentItem = item.user;
|
|
1158
|
-
// eslint-disable-next-line no-await-in-loop
|
|
1159
|
-
const dtoUser: RemoteUserDTO = await this.userDTOMapper.toTDO<
|
|
1160
|
-
QBUser,
|
|
1161
|
-
RemoteUserDTO
|
|
1162
|
-
>(currentItem);
|
|
1163
|
-
|
|
1164
|
-
users.push(dtoUser);
|
|
1165
|
-
}
|
|
1166
|
-
} catch (e) {
|
|
1167
|
-
console.log('problem with:');
|
|
1168
|
-
console.log(JSON.stringify(currentItem!));
|
|
1169
|
-
console.log((e as MapperDTOException).message);
|
|
1170
|
-
console.log((e as MapperDTOException)._description);
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
return { ResultData: users, PaginationResult: resultPagination };
|
|
1174
|
-
}
|
|
1175
|
-
//
|
|
1176
|
-
//
|
|
1177
|
-
|
|
1178
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment
|
|
1179
|
-
// @ts-ignore
|
|
1180
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this
|
|
1181
|
-
async getMessages(
|
|
1182
|
-
dialogId: string,
|
|
1183
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1184
|
-
pagination: Pagination,
|
|
1185
|
-
): Promise<RemoteMessagesDTO> {
|
|
1186
|
-
const messagesDTO: Array<RemoteMessageDTO> = new Array<RemoteMessageDTO>();
|
|
1187
|
-
|
|
1188
|
-
const qbMessages: GetMessagesResult = await qbChatGetMessagesExtended(
|
|
1189
|
-
dialogId,
|
|
1190
|
-
);
|
|
1191
|
-
|
|
1192
|
-
if (qbMessages === null || qbMessages === undefined) {
|
|
1193
|
-
return Promise.reject(
|
|
1194
|
-
new RemoteDataSourceException(
|
|
1195
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1196
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1197
|
-
),
|
|
1198
|
-
);
|
|
1199
|
-
}
|
|
1200
|
-
console.log(
|
|
1201
|
-
`GET MESSAGES ${qbMessages.items.length} FROM SERVER: ${JSON.stringify(
|
|
1202
|
-
qbMessages,
|
|
1203
|
-
)} `,
|
|
1204
|
-
);
|
|
1205
|
-
const currentUserId = this._authInformation?.userId;
|
|
1206
|
-
|
|
1207
|
-
await Promise.all(
|
|
1208
|
-
qbMessages.items.map(async (currentItem) => {
|
|
1209
|
-
const dtoMessage: RemoteMessageDTO = await this.messageDTOMapper.toTDO<
|
|
1210
|
-
QBChatMessage,
|
|
1211
|
-
RemoteMessageDTO
|
|
1212
|
-
>(currentItem);
|
|
1213
|
-
|
|
1214
|
-
if (
|
|
1215
|
-
this.authProcessed &&
|
|
1216
|
-
currentUserId &&
|
|
1217
|
-
dtoMessage.read_ids &&
|
|
1218
|
-
dtoMessage.read_ids.length > 0 &&
|
|
1219
|
-
dtoMessage.read_ids.includes(currentUserId) === false
|
|
1220
|
-
) {
|
|
1221
|
-
QBChatMarkMessageRead({
|
|
1222
|
-
messageId: dtoMessage.id,
|
|
1223
|
-
dialogId: dtoMessage.dialogId,
|
|
1224
|
-
userId: dtoMessage.sender_id,
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
messagesDTO.push(dtoMessage);
|
|
1229
|
-
|
|
1230
|
-
return dtoMessage;
|
|
1231
|
-
}),
|
|
1232
|
-
);
|
|
1233
|
-
|
|
1234
|
-
return Promise.resolve(
|
|
1235
|
-
new RemoteMessagesDTO(messagesDTO, new Pagination()),
|
|
1236
|
-
);
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1240
|
-
async typingMessageStart(
|
|
1241
|
-
dialogDTO: RemoteDialogDTO,
|
|
1242
|
-
senderId: number,
|
|
1243
|
-
): Promise<void> {
|
|
1244
|
-
const qbEntity: QBChatDialog =
|
|
1245
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
1246
|
-
|
|
1247
|
-
if (dialogDTO.type === DialogType.group) {
|
|
1248
|
-
await QBJoinGroupDialog(dialogDTO.id).catch(() => {
|
|
1249
|
-
throw new RemoteDataSourceException(
|
|
1250
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1251
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1252
|
-
);
|
|
1253
|
-
});
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
QBSendIsTypingStatus(qbEntity, senderId);
|
|
1257
|
-
|
|
1258
|
-
return Promise.resolve();
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1262
|
-
async typingMessageStop(
|
|
1263
|
-
dialogDTO: RemoteDialogDTO,
|
|
1264
|
-
senderId: number,
|
|
1265
|
-
): Promise<void> {
|
|
1266
|
-
const qbEntity: QBChatDialog =
|
|
1267
|
-
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
1268
|
-
|
|
1269
|
-
QBSendIsStopTypingStatus(qbEntity, senderId);
|
|
1270
|
-
|
|
1271
|
-
return Promise.resolve();
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1275
|
-
async sendMessage(dto: RemoteMessageDTO): Promise<RemoteMessageDTO> {
|
|
1276
|
-
console.log('call sendMessage');
|
|
1277
|
-
//
|
|
1278
|
-
|
|
1279
|
-
//
|
|
1280
|
-
const messageText = dto.message;
|
|
1281
|
-
|
|
1282
|
-
const qbEntity: QBUIKitChatNewMessage = {
|
|
1283
|
-
type: dto.dialog_type === DialogType.private ? 'chat' : 'groupchat',
|
|
1284
|
-
body: messageText || '',
|
|
1285
|
-
notification_type: dto.notification_type,
|
|
1286
|
-
dialog_id: dto.dialogId,
|
|
1287
|
-
extension: {
|
|
1288
|
-
save_to_history: 1,
|
|
1289
|
-
dialog_id: dto.dialogId,
|
|
1290
|
-
notification_type: dto.notification_type,
|
|
1291
|
-
sender_id: dto.sender_id || dto.recipient_id,
|
|
1292
|
-
qb_message_action: dto.qb_message_action, // 'forward' 'reply'
|
|
1293
|
-
origin_sender_name: dto.origin_sender_name,
|
|
1294
|
-
qb_original_messages: MessageDTOMapper.translateOriginalDataToJSON(
|
|
1295
|
-
MessageDTOMapper.convertToQBChatNewMessage(
|
|
1296
|
-
dto.qb_original_messages || [],
|
|
1297
|
-
) || [],
|
|
1298
|
-
),
|
|
1299
|
-
},
|
|
1300
|
-
markable: 1,
|
|
1301
|
-
// markable: 0, // mark_as_read ??
|
|
1302
|
-
};
|
|
1303
|
-
|
|
1304
|
-
if (dto.attachments?.length > 0) {
|
|
1305
|
-
qbEntity.extension.attachments = [];
|
|
1306
|
-
dto.attachments.forEach((att) => {
|
|
1307
|
-
const chatMessageAttachment: ChatMessageAttachment = {
|
|
1308
|
-
id: att.id,
|
|
1309
|
-
name: att.name,
|
|
1310
|
-
size: att.size,
|
|
1311
|
-
type: att.type.toString(),
|
|
1312
|
-
uid: att.uid,
|
|
1313
|
-
};
|
|
1314
|
-
|
|
1315
|
-
qbEntity.extension.attachments?.push(chatMessageAttachment);
|
|
1316
|
-
});
|
|
1317
|
-
}
|
|
1318
|
-
let qbMessageId: QBChatMessage['_id'];
|
|
1319
|
-
|
|
1320
|
-
if (dto.dialog_type === DialogType.private) {
|
|
1321
|
-
qbMessageId = await QBChatSendMessage(dto.recipient_id, qbEntity);
|
|
1322
|
-
} else {
|
|
1323
|
-
await QBJoinGroupDialog(dto.dialogId).catch(() => {
|
|
1324
|
-
throw new RemoteDataSourceException(
|
|
1325
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1326
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1327
|
-
);
|
|
1328
|
-
});
|
|
1329
|
-
const dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dto.dialogId);
|
|
1330
|
-
|
|
1331
|
-
qbMessageId = await QBChatSendMessage(dialogJid, qbEntity);
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
if (qbMessageId === null || qbMessageId === undefined) {
|
|
1335
|
-
return Promise.reject(
|
|
1336
|
-
new RemoteDataSourceException(
|
|
1337
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1338
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1339
|
-
),
|
|
1340
|
-
);
|
|
1341
|
-
}
|
|
1342
|
-
console.log('regular message was sent');
|
|
1343
|
-
// eslint-disable-next-line no-param-reassign
|
|
1344
|
-
dto.id = qbMessageId;
|
|
1345
|
-
|
|
1346
|
-
return Promise.resolve(dto);
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1350
|
-
|
|
1351
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1352
|
-
async sendSystemMessage(dto: RemoteMessageDTO): Promise<boolean> {
|
|
1353
|
-
let qbMessages: QBSystemMessage | QBChatMessage['_id'] | undefined;
|
|
1354
|
-
|
|
1355
|
-
if (dto.notification_type && dto.notification_type.length > 0) {
|
|
1356
|
-
const systemMessage: { extension: QBSystemMessage['extension'] } = {
|
|
1357
|
-
extension: {
|
|
1358
|
-
notification_type: dto.notification_type,
|
|
1359
|
-
dialog_id: dto.dialogId,
|
|
1360
|
-
},
|
|
1361
|
-
};
|
|
1362
|
-
|
|
1363
|
-
qbMessages = await QBChatSendSystemMessage(
|
|
1364
|
-
dto.recipient_id,
|
|
1365
|
-
systemMessage,
|
|
1366
|
-
);
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
if (qbMessages === null || qbMessages === undefined) {
|
|
1370
|
-
return Promise.reject(
|
|
1371
|
-
new RemoteDataSourceException(
|
|
1372
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1373
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1374
|
-
),
|
|
1375
|
-
);
|
|
1376
|
-
}
|
|
1377
|
-
console.log('system message was sent');
|
|
1378
|
-
|
|
1379
|
-
return Promise.resolve(true);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1383
|
-
async updateMessage(
|
|
1384
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1385
|
-
dto: RemoteMessageDTO,
|
|
1386
|
-
): Promise<RemoteMessageDTO> {
|
|
1387
|
-
const qbEntity: QBChatMessage = await this.messageDTOMapper.fromDTO(dto);
|
|
1388
|
-
|
|
1389
|
-
const storageValue = localStorage.getItem('qbMessages');
|
|
1390
|
-
const result: string = storageValue ?? '';
|
|
1391
|
-
|
|
1392
|
-
const qbMessages: Record<string, QBChatMessage> =
|
|
1393
|
-
result === '' ? {} : JSON.parse(result);
|
|
1394
|
-
|
|
1395
|
-
if (qbMessages === null || qbMessages === undefined) {
|
|
1396
|
-
return Promise.reject(
|
|
1397
|
-
new RemoteDataSourceException(
|
|
1398
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1399
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1400
|
-
),
|
|
1401
|
-
);
|
|
1402
|
-
}
|
|
1403
|
-
qbMessages[qbEntity._id] = qbEntity;
|
|
1404
|
-
|
|
1405
|
-
// TODO: How get updated QBChatDialog and return to DTO
|
|
1406
|
-
localStorage.setItem('qbMessages', JSON.stringify(qbMessages));
|
|
1407
|
-
|
|
1408
|
-
const newDTO: RemoteMessageDTO = await this.messageDTOMapper.toTDO(
|
|
1409
|
-
qbEntity,
|
|
1410
|
-
);
|
|
1411
|
-
|
|
1412
|
-
return Promise.resolve(newDTO);
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1416
|
-
async deleteMessage(dto: RemoteMessageDTO): Promise<void> {
|
|
1417
|
-
const qbEntity: QBChatMessage = await this.messageDTOMapper.fromDTO(dto);
|
|
1418
|
-
|
|
1419
|
-
const storageValue = localStorage.getItem('qbMessages');
|
|
1420
|
-
const result: string = storageValue ?? '';
|
|
1421
|
-
|
|
1422
|
-
const qbMessages: Record<string, QBChatMessage> =
|
|
1423
|
-
result === '' ? {} : JSON.parse(result);
|
|
1424
|
-
|
|
1425
|
-
if (qbMessages === null || qbMessages === undefined) {
|
|
1426
|
-
return Promise.reject(
|
|
1427
|
-
new RemoteDataSourceException(
|
|
1428
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1429
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1430
|
-
),
|
|
1431
|
-
);
|
|
1432
|
-
}
|
|
1433
|
-
// TODO: try catch for delete
|
|
1434
|
-
const filteredqbMessages: Record<string, QBChatMessage> = {};
|
|
1435
|
-
|
|
1436
|
-
Object.keys(qbMessages).forEach((key) => {
|
|
1437
|
-
if (key !== qbEntity._id) {
|
|
1438
|
-
filteredqbMessages[key] = qbMessages[key];
|
|
1439
|
-
}
|
|
1440
|
-
});
|
|
1441
|
-
|
|
1442
|
-
localStorage.setItem('qbMessages', JSON.stringify(filteredqbMessages));
|
|
1443
|
-
|
|
1444
|
-
return Promise.resolve();
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1448
|
-
async createFile(dto: RemoteFileDTO): Promise<RemoteFileDTO> {
|
|
1449
|
-
console.log('call createFile in remote with params: ', JSON.stringify(dto));
|
|
1450
|
-
const qbParam: QBBlobCreateUploadParams = await this.fileDTOMapper.fromDTO(
|
|
1451
|
-
dto,
|
|
1452
|
-
);
|
|
1453
|
-
|
|
1454
|
-
const result = await QBCreateAndUploadContent(qbParam).catch((err) => {
|
|
1455
|
-
console.log('Error: ', stringifyError(err));
|
|
1456
|
-
throw new RemoteDataSourceException(
|
|
1457
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1458
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1459
|
-
`exception: ${stringifyError(err)}`,
|
|
1460
|
-
);
|
|
1461
|
-
});
|
|
1462
|
-
|
|
1463
|
-
if (result === null || result === undefined) {
|
|
1464
|
-
return Promise.reject(
|
|
1465
|
-
new RemoteDataSourceException(
|
|
1466
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1467
|
-
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1468
|
-
),
|
|
1469
|
-
);
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
const qbContentObject: QBBlobCreate = result as QBBlobCreate;
|
|
1473
|
-
const newDto: RemoteFileDTO = await this.fileDTOMapper.toTDO<
|
|
1474
|
-
QBBlobCreate,
|
|
1475
|
-
RemoteFileDTO
|
|
1476
|
-
>(qbContentObject);
|
|
1477
|
-
|
|
1478
|
-
console.log(
|
|
1479
|
-
'have result in createFile in remote ds: ',
|
|
1480
|
-
JSON.stringify(newDto),
|
|
1481
|
-
);
|
|
1482
|
-
|
|
1483
|
-
return Promise.resolve(newDto);
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1487
|
-
async getFile(dto: RemoteFileDTO): Promise<RemoteFileDTO> {
|
|
1488
|
-
throw new Error('Method not implemented.');
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1492
|
-
async deleteFile(dto: RemoteFileDTO): Promise<void> {
|
|
1493
|
-
throw new Error('Method not implemented.');
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1497
|
-
async subscribeToChatConnectionEvents(
|
|
1498
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1499
|
-
fileId: string,
|
|
1500
|
-
): Promise<void> {
|
|
1501
|
-
throw new Error('Method not implemented.');
|
|
1502
|
-
}
|
|
1503
|
-
}
|