@wireapp/core 37.5.0 → 38.0.0-beta
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/package.json +9 -8
- package/LICENSE +0 -674
- package/lib/Account.d.ts +0 -213
- package/lib/Account.d.ts.map +0 -1
- package/lib/Account.js +0 -543
- package/lib/CoreError.d.ts +0 -10
- package/lib/CoreError.d.ts.map +0 -1
- package/lib/CoreError.js +0 -25
- package/lib/account/AccountService.d.ts +0 -8
- package/lib/account/AccountService.d.ts.map +0 -1
- package/lib/account/AccountService.js +0 -32
- package/lib/account/index.d.ts +0 -2
- package/lib/account/index.d.ts.map +0 -1
- package/lib/account/index.js +0 -35
- package/lib/auth/LoginSanitizer.d.ts +0 -6
- package/lib/auth/LoginSanitizer.d.ts.map +0 -1
- package/lib/auth/LoginSanitizer.js +0 -40
- package/lib/auth/index.d.ts +0 -2
- package/lib/auth/index.d.ts.map +0 -1
- package/lib/auth/index.js +0 -35
- package/lib/broadcast/AvailabilityType.d.ts +0 -3
- package/lib/broadcast/AvailabilityType.d.ts.map +0 -1
- package/lib/broadcast/AvailabilityType.js +0 -20
- package/lib/broadcast/BroadcastService.d.ts +0 -21
- package/lib/broadcast/BroadcastService.d.ts.map +0 -1
- package/lib/broadcast/BroadcastService.js +0 -77
- package/lib/broadcast/index.d.ts +0 -3
- package/lib/broadcast/index.d.ts.map +0 -1
- package/lib/broadcast/index.js +0 -36
- package/lib/client/ClientBackendRepository.d.ts +0 -12
- package/lib/client/ClientBackendRepository.d.ts.map +0 -1
- package/lib/client/ClientBackendRepository.js +0 -42
- package/lib/client/ClientDatabaseRepository.d.ts +0 -28
- package/lib/client/ClientDatabaseRepository.d.ts.map +0 -1
- package/lib/client/ClientDatabaseRepository.js +0 -84
- package/lib/client/ClientInfo.d.ts +0 -9
- package/lib/client/ClientInfo.d.ts.map +0 -1
- package/lib/client/ClientInfo.js +0 -20
- package/lib/client/ClientService.d.ts +0 -41
- package/lib/client/ClientService.d.ts.map +0 -1
- package/lib/client/ClientService.js +0 -102
- package/lib/client/index.d.ts +0 -5
- package/lib/client/index.d.ts.map +0 -1
- package/lib/client/index.js +0 -38
- package/lib/connection/ConnectionService.d.ts +0 -12
- package/lib/connection/ConnectionService.d.ts.map +0 -1
- package/lib/connection/ConnectionService.js +0 -44
- package/lib/connection/index.d.ts +0 -2
- package/lib/connection/index.d.ts.map +0 -1
- package/lib/connection/index.js +0 -35
- package/lib/conversation/AbortReason.d.ts +0 -3
- package/lib/conversation/AbortReason.d.ts.map +0 -1
- package/lib/conversation/AbortReason.js +0 -20
- package/lib/conversation/AssetService/AssetService.d.ts +0 -66
- package/lib/conversation/AssetService/AssetService.d.ts.map +0 -1
- package/lib/conversation/AssetService/AssetService.js +0 -87
- package/lib/conversation/AssetService/index.d.ts +0 -2
- package/lib/conversation/AssetService/index.d.ts.map +0 -1
- package/lib/conversation/AssetService/index.js +0 -35
- package/lib/conversation/AssetTransferState.d.ts +0 -5
- package/lib/conversation/AssetTransferState.d.ts.map +0 -1
- package/lib/conversation/AssetTransferState.js +0 -26
- package/lib/conversation/ClientActionType.d.ts +0 -2
- package/lib/conversation/ClientActionType.d.ts.map +0 -1
- package/lib/conversation/ClientActionType.js +0 -23
- package/lib/conversation/ConversationMapper/ConversationMapper.d.ts +0 -8
- package/lib/conversation/ConversationMapper/ConversationMapper.d.ts.map +0 -1
- package/lib/conversation/ConversationMapper/ConversationMapper.js +0 -57
- package/lib/conversation/ConversationService/ConversationService.d.ts +0 -98
- package/lib/conversation/ConversationService/ConversationService.d.ts.map +0 -1
- package/lib/conversation/ConversationService/ConversationService.js +0 -316
- package/lib/conversation/ConversationService/ConversationService.types.d.ts +0 -95
- package/lib/conversation/ConversationService/ConversationService.types.d.ts.map +0 -1
- package/lib/conversation/ConversationService/ConversationService.types.js +0 -27
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts +0 -9
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts.map +0 -1
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.js +0 -34
- package/lib/conversation/ConversationService/index.d.ts +0 -3
- package/lib/conversation/ConversationService/index.d.ts.map +0 -1
- package/lib/conversation/ConversationService/index.js +0 -36
- package/lib/conversation/GenericMessageType.d.ts +0 -26
- package/lib/conversation/GenericMessageType.d.ts.map +0 -1
- package/lib/conversation/GenericMessageType.js +0 -48
- package/lib/conversation/MessageTimer/MessageTimer.d.ts +0 -11
- package/lib/conversation/MessageTimer/MessageTimer.d.ts.map +0 -1
- package/lib/conversation/MessageTimer/MessageTimer.js +0 -53
- package/lib/conversation/MessageTimer/index.d.ts +0 -2
- package/lib/conversation/MessageTimer/index.d.ts.map +0 -1
- package/lib/conversation/MessageTimer/index.js +0 -35
- package/lib/conversation/ReactionType.d.ts +0 -5
- package/lib/conversation/ReactionType.d.ts.map +0 -1
- package/lib/conversation/ReactionType.js +0 -26
- package/lib/conversation/content/AssetContent.d.ts +0 -43
- package/lib/conversation/content/AssetContent.d.ts.map +0 -1
- package/lib/conversation/content/AssetContent.js +0 -20
- package/lib/conversation/content/ButtonActionConfirmationContent.d.ts +0 -3
- package/lib/conversation/content/ButtonActionConfirmationContent.d.ts.map +0 -1
- package/lib/conversation/content/ButtonActionConfirmationContent.js +0 -20
- package/lib/conversation/content/ButtonActionContent.d.ts +0 -3
- package/lib/conversation/content/ButtonActionContent.d.ts.map +0 -1
- package/lib/conversation/content/ButtonActionContent.js +0 -20
- package/lib/conversation/content/CallingContent.d.ts +0 -2
- package/lib/conversation/content/CallingContent.d.ts.map +0 -1
- package/lib/conversation/content/CallingContent.js +0 -20
- package/lib/conversation/content/ClearedContent.d.ts +0 -3
- package/lib/conversation/content/ClearedContent.d.ts.map +0 -1
- package/lib/conversation/content/ClearedContent.js +0 -20
- package/lib/conversation/content/ClientActionContent.d.ts +0 -3
- package/lib/conversation/content/ClientActionContent.d.ts.map +0 -1
- package/lib/conversation/content/ClientActionContent.js +0 -20
- package/lib/conversation/content/ClientAddContent.d.ts +0 -5
- package/lib/conversation/content/ClientAddContent.d.ts.map +0 -1
- package/lib/conversation/content/ClientAddContent.js +0 -20
- package/lib/conversation/content/ClientRemoveContent.d.ts +0 -7
- package/lib/conversation/content/ClientRemoveContent.d.ts.map +0 -1
- package/lib/conversation/content/ClientRemoveContent.js +0 -20
- package/lib/conversation/content/CompositeContent.d.ts +0 -3
- package/lib/conversation/content/CompositeContent.d.ts.map +0 -1
- package/lib/conversation/content/CompositeContent.js +0 -20
- package/lib/conversation/content/ConfirmationContent.d.ts +0 -3
- package/lib/conversation/content/ConfirmationContent.d.ts.map +0 -1
- package/lib/conversation/content/ConfirmationContent.js +0 -20
- package/lib/conversation/content/ContentType.d.ts +0 -22
- package/lib/conversation/content/ContentType.d.ts.map +0 -1
- package/lib/conversation/content/ContentType.js +0 -93
- package/lib/conversation/content/ConversationContent.d.ts +0 -4
- package/lib/conversation/content/ConversationContent.d.ts.map +0 -1
- package/lib/conversation/content/ConversationContent.js +0 -20
- package/lib/conversation/content/DeletedContent.d.ts +0 -3
- package/lib/conversation/content/DeletedContent.d.ts.map +0 -1
- package/lib/conversation/content/DeletedContent.js +0 -20
- package/lib/conversation/content/EditedTextContent.d.ts +0 -12
- package/lib/conversation/content/EditedTextContent.d.ts.map +0 -1
- package/lib/conversation/content/EditedTextContent.js +0 -20
- package/lib/conversation/content/FileContent.d.ts +0 -14
- package/lib/conversation/content/FileContent.d.ts.map +0 -1
- package/lib/conversation/content/FileContent.js +0 -20
- package/lib/conversation/content/HiddenContent.d.ts +0 -3
- package/lib/conversation/content/HiddenContent.d.ts.map +0 -1
- package/lib/conversation/content/HiddenContent.js +0 -20
- package/lib/conversation/content/ImageContent.d.ts +0 -8
- package/lib/conversation/content/ImageContent.d.ts.map +0 -1
- package/lib/conversation/content/ImageContent.js +0 -20
- package/lib/conversation/content/KnockContent.d.ts +0 -3
- package/lib/conversation/content/KnockContent.d.ts.map +0 -1
- package/lib/conversation/content/KnockContent.js +0 -20
- package/lib/conversation/content/LinkPreviewContent.d.ts +0 -11
- package/lib/conversation/content/LinkPreviewContent.d.ts.map +0 -1
- package/lib/conversation/content/LinkPreviewContent.js +0 -20
- package/lib/conversation/content/LocationContent.d.ts +0 -10
- package/lib/conversation/content/LocationContent.d.ts.map +0 -1
- package/lib/conversation/content/LocationContent.js +0 -20
- package/lib/conversation/content/MentionContent.d.ts +0 -3
- package/lib/conversation/content/MentionContent.d.ts.map +0 -1
- package/lib/conversation/content/MentionContent.js +0 -20
- package/lib/conversation/content/QuoteContent.d.ts +0 -8
- package/lib/conversation/content/QuoteContent.d.ts.map +0 -1
- package/lib/conversation/content/QuoteContent.js +0 -20
- package/lib/conversation/content/ReactionContent.d.ts +0 -8
- package/lib/conversation/content/ReactionContent.d.ts.map +0 -1
- package/lib/conversation/content/ReactionContent.js +0 -20
- package/lib/conversation/content/TextContent.d.ts +0 -10
- package/lib/conversation/content/TextContent.d.ts.map +0 -1
- package/lib/conversation/content/TextContent.js +0 -20
- package/lib/conversation/content/TweetContent.d.ts +0 -3
- package/lib/conversation/content/TweetContent.d.ts.map +0 -1
- package/lib/conversation/content/TweetContent.js +0 -20
- package/lib/conversation/content/index.d.ts +0 -29
- package/lib/conversation/content/index.d.ts.map +0 -1
- package/lib/conversation/content/index.js +0 -75
- package/lib/conversation/index.d.ts +0 -11
- package/lib/conversation/index.d.ts.map +0 -1
- package/lib/conversation/index.js +0 -44
- package/lib/conversation/message/Message.d.ts +0 -5
- package/lib/conversation/message/Message.d.ts.map +0 -1
- package/lib/conversation/message/Message.js +0 -20
- package/lib/conversation/message/Message.types.d.ts +0 -7
- package/lib/conversation/message/Message.types.d.ts.map +0 -1
- package/lib/conversation/message/Message.types.js +0 -28
- package/lib/conversation/message/MessageBuilder.d.ts +0 -26
- package/lib/conversation/message/MessageBuilder.d.ts.map +0 -1
- package/lib/conversation/message/MessageBuilder.js +0 -291
- package/lib/conversation/message/MessageService.d.ts +0 -68
- package/lib/conversation/message/MessageService.d.ts.map +0 -1
- package/lib/conversation/message/MessageService.js +0 -291
- package/lib/conversation/message/MessageToProtoMapper.d.ts +0 -7
- package/lib/conversation/message/MessageToProtoMapper.d.ts.map +0 -1
- package/lib/conversation/message/MessageToProtoMapper.js +0 -98
- package/lib/conversation/message/OtrMessage.d.ts +0 -81
- package/lib/conversation/message/OtrMessage.d.ts.map +0 -1
- package/lib/conversation/message/OtrMessage.js +0 -20
- package/lib/conversation/message/PayloadBundle.d.ts +0 -68
- package/lib/conversation/message/PayloadBundle.d.ts.map +0 -1
- package/lib/conversation/message/PayloadBundle.js +0 -67
- package/lib/conversation/message/TeamMessage.d.ts +0 -32
- package/lib/conversation/message/TeamMessage.d.ts.map +0 -1
- package/lib/conversation/message/TeamMessage.js +0 -20
- package/lib/conversation/message/TextContentBuilder.d.ts +0 -12
- package/lib/conversation/message/TextContentBuilder.d.ts.map +0 -1
- package/lib/conversation/message/TextContentBuilder.js +0 -61
- package/lib/conversation/message/UserClientsUtil.d.ts +0 -23
- package/lib/conversation/message/UserClientsUtil.d.ts.map +0 -1
- package/lib/conversation/message/UserClientsUtil.js +0 -37
- package/lib/conversation/message/UserMessage.d.ts +0 -44
- package/lib/conversation/message/UserMessage.d.ts.map +0 -1
- package/lib/conversation/message/UserMessage.js +0 -20
- package/lib/conversation/message/index.d.ts +0 -2
- package/lib/conversation/message/index.d.ts.map +0 -1
- package/lib/conversation/message/index.js +0 -35
- package/lib/conversation/message/messageSender.d.ts +0 -7
- package/lib/conversation/message/messageSender.d.ts.map +0 -1
- package/lib/conversation/message/messageSender.js +0 -43
- package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts +0 -12
- package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts.map +0 -1
- package/lib/cryptography/AssetCryptography/EncryptedAsset.js +0 -20
- package/lib/cryptography/AssetCryptography/crypto.browser.d.ts +0 -3
- package/lib/cryptography/AssetCryptography/crypto.browser.d.ts.map +0 -1
- package/lib/cryptography/AssetCryptography/crypto.browser.js +0 -45
- package/lib/cryptography/AssetCryptography/crypto.node.d.ts +0 -3
- package/lib/cryptography/AssetCryptography/crypto.node.d.ts.map +0 -1
- package/lib/cryptography/AssetCryptography/crypto.node.js +0 -71
- package/lib/cryptography/AssetCryptography/index.d.ts +0 -9
- package/lib/cryptography/AssetCryptography/index.d.ts.map +0 -1
- package/lib/cryptography/AssetCryptography/index.js +0 -52
- package/lib/cryptography/AssetCryptography/interfaces.d.ts +0 -10
- package/lib/cryptography/AssetCryptography/interfaces.d.ts.map +0 -1
- package/lib/cryptography/AssetCryptography/interfaces.js +0 -20
- package/lib/cryptography/CryptographyDatabaseRepository.d.ts +0 -16
- package/lib/cryptography/CryptographyDatabaseRepository.d.ts.map +0 -1
- package/lib/cryptography/CryptographyDatabaseRepository.js +0 -42
- package/lib/cryptography/CryptographyService.d.ts +0 -77
- package/lib/cryptography/CryptographyService.d.ts.map +0 -1
- package/lib/cryptography/CryptographyService.js +0 -222
- package/lib/cryptography/GenericMessageMapper.d.ts +0 -8
- package/lib/cryptography/GenericMessageMapper.d.ts.map +0 -1
- package/lib/cryptography/GenericMessageMapper.js +0 -159
- package/lib/cryptography/MessageHashService.d.ts +0 -17
- package/lib/cryptography/MessageHashService.d.ts.map +0 -1
- package/lib/cryptography/MessageHashService.js +0 -117
- package/lib/cryptography/SessionPayloadBundle.d.ts +0 -5
- package/lib/cryptography/SessionPayloadBundle.d.ts.map +0 -1
- package/lib/cryptography/SessionPayloadBundle.js +0 -20
- package/lib/cryptography/Utlility/generateDecryptionError.d.ts +0 -6
- package/lib/cryptography/Utlility/generateDecryptionError.d.ts.map +0 -1
- package/lib/cryptography/Utlility/generateDecryptionError.js +0 -50
- package/lib/cryptography/index.d.ts +0 -5
- package/lib/cryptography/index.d.ts.map +0 -1
- package/lib/cryptography/index.js +0 -38
- package/lib/errors/DecryptionError.d.ts +0 -6
- package/lib/errors/DecryptionError.d.ts.map +0 -1
- package/lib/errors/DecryptionError.js +0 -29
- package/lib/giphy/GiphyService.d.ts +0 -10
- package/lib/giphy/GiphyService.d.ts.map +0 -1
- package/lib/giphy/GiphyService.js +0 -36
- package/lib/giphy/index.d.ts +0 -2
- package/lib/giphy/index.d.ts.map +0 -1
- package/lib/giphy/index.js +0 -35
- package/lib/index.d.ts +0 -8
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -54
- package/lib/linkPreview/LinkPreviewService.d.ts +0 -8
- package/lib/linkPreview/LinkPreviewService.d.ts.map +0 -1
- package/lib/linkPreview/LinkPreviewService.js +0 -51
- package/lib/linkPreview/index.d.ts +0 -2
- package/lib/linkPreview/index.d.ts.map +0 -1
- package/lib/linkPreview/index.js +0 -35
- package/lib/messagingProtocols/common.types.d.ts +0 -3
- package/lib/messagingProtocols/common.types.d.ts.map +0 -1
- package/lib/messagingProtocols/common.types.js +0 -20
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts +0 -5
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.js +0 -37
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.d.ts +0 -3
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.js +0 -36
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.js +0 -35
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts +0 -12
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.js +0 -62
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.js +0 -35
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts +0 -10
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.js +0 -36
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.js +0 -35
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts +0 -5
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.js +0 -24
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts +0 -11
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.js +0 -20
- package/lib/messagingProtocols/mls/EventHandler/index.d.ts +0 -3
- package/lib/messagingProtocols/mls/EventHandler/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/index.js +0 -36
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +0 -126
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +0 -428
- package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts +0 -16
- package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.types.js +0 -20
- package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.d.ts +0 -8
- package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.js +0 -50
- package/lib/messagingProtocols/mls/MLSService/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/MLSService/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/index.js +0 -35
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.js +0 -35
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.d.ts +0 -11
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.js +0 -50
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.js +0 -35
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.d.ts +0 -10
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.js +0 -50
- package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.d.ts +0 -9
- package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.js +0 -43
- package/lib/messagingProtocols/mls/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/index.js +0 -35
- package/lib/messagingProtocols/mls/types.d.ts +0 -55
- package/lib/messagingProtocols/mls/types.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/types.js +0 -20
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts +0 -5
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.js +0 -29
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts +0 -2
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.js +0 -35
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts +0 -2
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.js +0 -35
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts +0 -10
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.js +0 -46
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts +0 -2
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.js +0 -35
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts +0 -5
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.js +0 -24
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts +0 -11
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.js +0 -20
- package/lib/messagingProtocols/proteus/EventHandler/index.d.ts +0 -3
- package/lib/messagingProtocols/proteus/EventHandler/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/EventHandler/index.js +0 -36
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts +0 -20
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.js +0 -93
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts +0 -25
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.js +0 -20
- package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.d.ts +0 -24
- package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.js +0 -86
- package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.d.ts +0 -17
- package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.js +0 -43
- package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.d.ts +0 -12
- package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.js +0 -38
- package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.d.ts +0 -35
- package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.js +0 -87
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts +0 -6
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.js +0 -39
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts +0 -4
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.js +0 -29
- package/lib/messagingProtocols/proteus/ProteusService/index.d.ts +0 -4
- package/lib/messagingProtocols/proteus/ProteusService/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/index.js +0 -37
- package/lib/messagingProtocols/proteus/index.d.ts +0 -2
- package/lib/messagingProtocols/proteus/index.d.ts.map +0 -1
- package/lib/messagingProtocols/proteus/index.js +0 -35
- package/lib/notification/NotificationBackendRepository.d.ts +0 -12
- package/lib/notification/NotificationBackendRepository.d.ts.map +0 -1
- package/lib/notification/NotificationBackendRepository.js +0 -33
- package/lib/notification/NotificationDatabaseRepository.d.ts +0 -21
- package/lib/notification/NotificationDatabaseRepository.d.ts.map +0 -1
- package/lib/notification/NotificationDatabaseRepository.js +0 -67
- package/lib/notification/NotificationService.d.ts +0 -70
- package/lib/notification/NotificationService.d.ts.map +0 -1
- package/lib/notification/NotificationService.js +0 -224
- package/lib/notification/Notifications.types.d.ts +0 -6
- package/lib/notification/Notifications.types.d.ts.map +0 -1
- package/lib/notification/Notifications.types.js +0 -27
- package/lib/notification/index.d.ts +0 -3
- package/lib/notification/index.d.ts.map +0 -1
- package/lib/notification/index.js +0 -36
- package/lib/self/SelfService.d.ts +0 -14
- package/lib/self/SelfService.d.ts.map +0 -1
- package/lib/self/SelfService.js +0 -54
- package/lib/self/index.d.ts +0 -2
- package/lib/self/index.d.ts.map +0 -1
- package/lib/self/index.js +0 -35
- package/lib/team/TeamService.d.ts +0 -16
- package/lib/team/TeamService.d.ts.map +0 -1
- package/lib/team/TeamService.js +0 -54
- package/lib/team/index.d.ts +0 -2
- package/lib/team/index.d.ts.map +0 -1
- package/lib/team/index.js +0 -35
- package/lib/user/UserMapper.d.ts +0 -7
- package/lib/user/UserMapper.d.ts.map +0 -1
- package/lib/user/UserMapper.js +0 -87
- package/lib/user/UserService.d.ts +0 -24
- package/lib/user/UserService.d.ts.map +0 -1
- package/lib/user/UserService.js +0 -81
- package/lib/user/index.d.ts +0 -2
- package/lib/user/index.d.ts.map +0 -1
- package/lib/user/index.js +0 -35
- package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.d.ts +0 -22
- package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.d.ts.map +0 -1
- package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.js +0 -66
- package/lib/util/LowPrecisionTaskScheduler/index.d.ts +0 -2
- package/lib/util/LowPrecisionTaskScheduler/index.d.ts.map +0 -1
- package/lib/util/LowPrecisionTaskScheduler/index.js +0 -35
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.d.ts +0 -9
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.d.ts.map +0 -1
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.js +0 -52
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.d.ts +0 -4
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.d.ts.map +0 -1
- package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.js +0 -34
- package/lib/util/RecurringTaskScheduler/index.d.ts +0 -2
- package/lib/util/RecurringTaskScheduler/index.d.ts.map +0 -1
- package/lib/util/RecurringTaskScheduler/index.js +0 -35
- package/lib/util/TaskScheduler/TaskScheduler.d.ts +0 -11
- package/lib/util/TaskScheduler/TaskScheduler.d.ts.map +0 -1
- package/lib/util/TaskScheduler/TaskScheduler.js +0 -70
- package/lib/util/TaskScheduler/index.d.ts +0 -2
- package/lib/util/TaskScheduler/index.d.ts.map +0 -1
- package/lib/util/TaskScheduler/index.js +0 -35
- package/lib/util/TypePredicateUtil.d.ts +0 -10
- package/lib/util/TypePredicateUtil.d.ts.map +0 -1
- package/lib/util/TypePredicateUtil.js +0 -60
- package/lib/util/encryptedStore.d.ts +0 -46
- package/lib/util/encryptedStore.d.ts.map +0 -1
- package/lib/util/encryptedStore.js +0 -115
- package/lib/util/encryptedStore.test.node.d.ts +0 -2
- package/lib/util/encryptedStore.test.node.d.ts.map +0 -1
- package/lib/util/encryptedStore.test.node.js +0 -53
- package/lib/util/fullyQualifiedClientIdUtils.d.ts +0 -14
- package/lib/util/fullyQualifiedClientIdUtils.d.ts.map +0 -1
- package/lib/util/fullyQualifiedClientIdUtils.js +0 -41
- package/lib/util/index.d.ts +0 -2
- package/lib/util/index.d.ts.map +0 -1
- package/lib/util/index.js +0 -35
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
21
|
-
var t = {};
|
|
22
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
23
|
-
t[p] = s[p];
|
|
24
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
25
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
27
|
-
t[p[i]] = s[p[i]];
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
};
|
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.MLSService = exports.optionalToUint8Array = void 0;
|
|
36
|
-
const axios_1 = __importDefault(require("axios"));
|
|
37
|
-
const bazinga64_1 = require("bazinga64");
|
|
38
|
-
const logdown_1 = __importDefault(require("logdown"));
|
|
39
|
-
const commons_1 = require("@wireapp/commons");
|
|
40
|
-
const commitBundleUtil_1 = require("./commitBundleUtil");
|
|
41
|
-
const keyMaterialUpdatesStore_1 = require("./stores/keyMaterialUpdatesStore");
|
|
42
|
-
const pendingProposalsStore_1 = require("./stores/pendingProposalsStore");
|
|
43
|
-
const messageSender_1 = require("../../../conversation/message/messageSender");
|
|
44
|
-
const fullyQualifiedClientIdUtils_1 = require("../../../util/fullyQualifiedClientIdUtils");
|
|
45
|
-
const RecurringTaskScheduler_1 = require("../../../util/RecurringTaskScheduler");
|
|
46
|
-
const TaskScheduler_1 = require("../../../util/TaskScheduler");
|
|
47
|
-
const EventHandler_1 = require("../EventHandler");
|
|
48
|
-
//@todo: this function is temporary, we wait for the update from core-crypto side
|
|
49
|
-
//they are returning regular array instead of Uint8Array for commit and welcome messages
|
|
50
|
-
const optionalToUint8Array = (array) => {
|
|
51
|
-
return Array.isArray(array) ? Uint8Array.from(array) : array;
|
|
52
|
-
};
|
|
53
|
-
exports.optionalToUint8Array = optionalToUint8Array;
|
|
54
|
-
const defaultConfig = {
|
|
55
|
-
keyingMaterialUpdateThreshold: 1000 * 60 * 60 * 24 * 30,
|
|
56
|
-
nbKeyPackages: 100,
|
|
57
|
-
};
|
|
58
|
-
class MLSService {
|
|
59
|
-
constructor(apiClient, coreCryptoClientProvider, { keyingMaterialUpdateThreshold = defaultConfig.keyingMaterialUpdateThreshold, nbKeyPackages = defaultConfig.nbKeyPackages, }) {
|
|
60
|
-
this.apiClient = apiClient;
|
|
61
|
-
this.coreCryptoClientProvider = coreCryptoClientProvider;
|
|
62
|
-
this.logger = (0, logdown_1.default)('@wireapp/core/MLSService');
|
|
63
|
-
this.config = {
|
|
64
|
-
keyingMaterialUpdateThreshold,
|
|
65
|
-
nbKeyPackages,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
get coreCryptoClient() {
|
|
69
|
-
const client = this.coreCryptoClientProvider();
|
|
70
|
-
if (!client) {
|
|
71
|
-
throw new Error('Could not get coreCryptoClient');
|
|
72
|
-
}
|
|
73
|
-
return client;
|
|
74
|
-
}
|
|
75
|
-
async uploadCommitBundle(groupId, commitBundle, { regenerateCommitBundle, isExternalCommit } = {}) {
|
|
76
|
-
const bundlePayload = (0, commitBundleUtil_1.toProtobufCommitBundle)(commitBundle);
|
|
77
|
-
try {
|
|
78
|
-
const response = await this.apiClient.api.conversation.postMlsCommitBundle(bundlePayload.slice());
|
|
79
|
-
if (isExternalCommit) {
|
|
80
|
-
await this.coreCryptoClient.mergePendingGroupFromExternalCommit(groupId, {});
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
await this.coreCryptoClient.commitAccepted(groupId);
|
|
84
|
-
}
|
|
85
|
-
const newEpoch = await this.getEpoch(groupId);
|
|
86
|
-
const groupIdStr = bazinga64_1.Encoder.toBase64(groupId).asString;
|
|
87
|
-
this.logger.log(`Commit have been accepted for group "${groupIdStr}". New epoch is "${newEpoch}"`);
|
|
88
|
-
return response;
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
const shouldRetry = axios_1.default.isAxiosError(error) && error.code === '409';
|
|
92
|
-
if (shouldRetry && regenerateCommitBundle) {
|
|
93
|
-
// in case of a 409, we want to retry to generate the commit and resend it
|
|
94
|
-
// could be that we are trying to upload a commit to a conversation that has a different epoch on backend
|
|
95
|
-
// in this case we will most likely receive a commit from backend that will increase our local epoch
|
|
96
|
-
this.logger.warn(`Uploading commitBundle failed. Will retry generating a new bundle`);
|
|
97
|
-
const updatedCommitBundle = await regenerateCommitBundle();
|
|
98
|
-
return this.uploadCommitBundle(groupId, updatedCommitBundle, { isExternalCommit });
|
|
99
|
-
}
|
|
100
|
-
if (isExternalCommit) {
|
|
101
|
-
await this.coreCryptoClient.clearPendingGroupFromExternalCommit(groupId);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
await this.coreCryptoClient.clearPendingCommit(groupId);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
addUsersToExistingConversation(groupId, invitee) {
|
|
110
|
-
return this.processCommitAction(groupId, () => this.coreCryptoClient.addClientsToConversation(groupId, invitee));
|
|
111
|
-
}
|
|
112
|
-
configureMLSCallbacks(_a) {
|
|
113
|
-
var { groupIdFromConversationId } = _a, coreCryptoCallbacks = __rest(_a, ["groupIdFromConversationId"]);
|
|
114
|
-
this.coreCryptoClient.registerCallbacks(Object.assign(Object.assign({}, coreCryptoCallbacks), { clientIsExistingGroupUser: (client, otherClients) => {
|
|
115
|
-
const decoder = new TextDecoder();
|
|
116
|
-
const { user } = (0, fullyQualifiedClientIdUtils_1.parseFullQualifiedClientId)(decoder.decode(client));
|
|
117
|
-
return otherClients.some(client => {
|
|
118
|
-
const { user: otherUser } = (0, fullyQualifiedClientIdUtils_1.parseFullQualifiedClientId)(decoder.decode(client));
|
|
119
|
-
return otherUser.toLowerCase() === user.toLowerCase();
|
|
120
|
-
});
|
|
121
|
-
} }));
|
|
122
|
-
this.groupIdFromConversationId = groupIdFromConversationId;
|
|
123
|
-
}
|
|
124
|
-
async getKeyPackagesPayload(qualifiedUsers) {
|
|
125
|
-
/**
|
|
126
|
-
* @note We need to fetch key packages for all the users
|
|
127
|
-
* we want to add to the new MLS conversations,
|
|
128
|
-
* includes self user too.
|
|
129
|
-
*/
|
|
130
|
-
const keyPackages = await Promise.all([
|
|
131
|
-
...qualifiedUsers.map(({ id, domain, skipOwn }) => this.apiClient.api.client.claimMLSKeyPackages(id, domain, skipOwn)),
|
|
132
|
-
]);
|
|
133
|
-
const coreCryptoKeyPackagesPayload = keyPackages.reduce((previousValue, currentValue) => {
|
|
134
|
-
// skip users that have not uploaded their MLS key packages
|
|
135
|
-
if (currentValue.key_packages.length > 0) {
|
|
136
|
-
return [
|
|
137
|
-
...previousValue,
|
|
138
|
-
...currentValue.key_packages.map(keyPackage => ({
|
|
139
|
-
id: bazinga64_1.Encoder.toBase64(keyPackage.client).asBytes,
|
|
140
|
-
kp: bazinga64_1.Decoder.fromBase64(keyPackage.key_package).asBytes,
|
|
141
|
-
})),
|
|
142
|
-
];
|
|
143
|
-
}
|
|
144
|
-
return previousValue;
|
|
145
|
-
}, []);
|
|
146
|
-
return coreCryptoKeyPackagesPayload;
|
|
147
|
-
}
|
|
148
|
-
getEpoch(groupId) {
|
|
149
|
-
const groupIdBytes = typeof groupId === 'string' ? bazinga64_1.Decoder.fromBase64(groupId).asBytes : groupId;
|
|
150
|
-
return this.coreCryptoClient.conversationEpoch(groupIdBytes);
|
|
151
|
-
}
|
|
152
|
-
async newProposal(proposalType, args) {
|
|
153
|
-
return this.coreCryptoClient.newProposal(proposalType, args);
|
|
154
|
-
}
|
|
155
|
-
async joinByExternalCommit(getGroupInfo) {
|
|
156
|
-
const generateCommit = async () => {
|
|
157
|
-
const groupInfo = await getGroupInfo();
|
|
158
|
-
const _a = await this.coreCryptoClient.joinByExternalCommit(groupInfo), { conversationId } = _a, commitBundle = __rest(_a, ["conversationId"]);
|
|
159
|
-
return { groupId: conversationId, commitBundle };
|
|
160
|
-
};
|
|
161
|
-
const { commitBundle, groupId } = await generateCommit();
|
|
162
|
-
return this.uploadCommitBundle(groupId, commitBundle, {
|
|
163
|
-
isExternalCommit: true,
|
|
164
|
-
regenerateCommitBundle: async () => (await generateCommit()).commitBundle,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
async newExternalProposal(externalProposalType, args) {
|
|
168
|
-
return this.coreCryptoClient.newExternalProposal(externalProposalType, args);
|
|
169
|
-
}
|
|
170
|
-
async processWelcomeMessage(welcomeMessage) {
|
|
171
|
-
return this.coreCryptoClient.processWelcomeMessage(welcomeMessage);
|
|
172
|
-
}
|
|
173
|
-
async decryptMessage(conversationId, payload) {
|
|
174
|
-
return this.coreCryptoClient.decryptMessage(conversationId, payload);
|
|
175
|
-
}
|
|
176
|
-
async encryptMessage(conversationId, message) {
|
|
177
|
-
return this.coreCryptoClient.encryptMessage(conversationId, message);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Will wrap a coreCrypto call that generates a CommitBundle and do all the necessary work so that commitbundle is handled the right way.
|
|
181
|
-
* It does:
|
|
182
|
-
* - commit the pending proposal
|
|
183
|
-
* - then generates the commitBundle with the given function
|
|
184
|
-
* - uploads the commitBundle to backend
|
|
185
|
-
* - warns coreCrypto that the commit was successfully processed
|
|
186
|
-
* @param groupId
|
|
187
|
-
* @param generateCommit The function that will generate a coreCrypto CommitBundle
|
|
188
|
-
*/
|
|
189
|
-
async processCommitAction(groupId, generateCommit) {
|
|
190
|
-
return (0, messageSender_1.sendMessage)(async () => {
|
|
191
|
-
await this.commitProposals(groupId);
|
|
192
|
-
const commitBundle = await generateCommit();
|
|
193
|
-
return this.uploadCommitBundle(groupId, commitBundle);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
updateKeyingMaterial(conversationId) {
|
|
197
|
-
return this.processCommitAction(conversationId, () => this.coreCryptoClient.updateKeyingMaterial(conversationId));
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Will create a conversation inside of coreCrypto.
|
|
201
|
-
* @param groupId the id of the group to create inside of coreCrypto
|
|
202
|
-
* @param users the list of users that will be members of the conversation (including the self user)
|
|
203
|
-
* @param creator the creator of the list. Most of the time will be the self user (or empty if the conversation was created by backend first)
|
|
204
|
-
*/
|
|
205
|
-
async registerConversation(groupId, users, creator) {
|
|
206
|
-
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
207
|
-
const mlsKeys = (await this.apiClient.api.client.getPublicKeys()).removal;
|
|
208
|
-
const mlsKeyBytes = Object.values(mlsKeys).map((key) => bazinga64_1.Decoder.fromBase64(key).asBytes);
|
|
209
|
-
const configuration = {
|
|
210
|
-
externalSenders: mlsKeyBytes,
|
|
211
|
-
ciphersuite: 1, // TODO: Use the correct ciphersuite enum.
|
|
212
|
-
};
|
|
213
|
-
await this.coreCryptoClient.createConversation(groupIdBytes, configuration);
|
|
214
|
-
const keyPackages = await this.getKeyPackagesPayload(users.map(user => {
|
|
215
|
-
if (user.id === (creator === null || creator === void 0 ? void 0 : creator.user.id)) {
|
|
216
|
-
/**
|
|
217
|
-
* we should skip fetching key packages for current self client,
|
|
218
|
-
* it's already added by the backend on the group creation time
|
|
219
|
-
*/
|
|
220
|
-
return Object.assign(Object.assign({}, creator.user), { skipOwn: creator.client });
|
|
221
|
-
}
|
|
222
|
-
return user;
|
|
223
|
-
}));
|
|
224
|
-
const response = keyPackages.length > 0
|
|
225
|
-
? await this.addUsersToExistingConversation(groupIdBytes, keyPackages)
|
|
226
|
-
: // If there are no clients to add, just update the keying material
|
|
227
|
-
await this.processCommitAction(groupIdBytes, () => this.coreCryptoClient.updateKeyingMaterial(groupIdBytes));
|
|
228
|
-
// We schedule a key material renewal
|
|
229
|
-
this.scheduleKeyMaterialRenewal(groupId);
|
|
230
|
-
return response;
|
|
231
|
-
}
|
|
232
|
-
removeClientsFromConversation(conversationId, clientIds) {
|
|
233
|
-
return this.processCommitAction(conversationId, () => this.coreCryptoClient.removeClientsFromConversation(conversationId, clientIds));
|
|
234
|
-
}
|
|
235
|
-
async commitProposals(groupId) {
|
|
236
|
-
const commitBundle = await this.coreCryptoClient.commitPendingProposals(groupId);
|
|
237
|
-
return commitBundle ? void (await this.uploadCommitBundle(groupId, commitBundle)) : undefined;
|
|
238
|
-
}
|
|
239
|
-
async conversationExists(conversationId) {
|
|
240
|
-
return this.coreCryptoClient.conversationExists(conversationId);
|
|
241
|
-
}
|
|
242
|
-
async clientValidKeypackagesCount() {
|
|
243
|
-
return this.coreCryptoClient.clientValidKeypackagesCount();
|
|
244
|
-
}
|
|
245
|
-
async clientKeypackages(amountRequested) {
|
|
246
|
-
return this.coreCryptoClient.clientKeypackages(amountRequested);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Renew key material for a given groupId
|
|
250
|
-
*
|
|
251
|
-
* @param groupId groupId of the conversation
|
|
252
|
-
*/
|
|
253
|
-
async renewKeyMaterial(groupId) {
|
|
254
|
-
try {
|
|
255
|
-
const groupConversationExists = await this.conversationExists(bazinga64_1.Decoder.fromBase64(groupId).asBytes);
|
|
256
|
-
if (!groupConversationExists) {
|
|
257
|
-
keyMaterialUpdatesStore_1.keyMaterialUpdatesStore.deleteLastKeyMaterialUpdateDate({ groupId });
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
const groupIdDecodedFromBase64 = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
261
|
-
await this.updateKeyingMaterial(groupIdDecodedFromBase64);
|
|
262
|
-
}
|
|
263
|
-
catch (error) {
|
|
264
|
-
this.logger.error(`Error while renewing key material for groupId ${groupId}`, error);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
createKeyMaterialUpdateTaskSchedulerId(groupId) {
|
|
268
|
-
return `renew-key-material-update-${groupId}`;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Will reset the renewal to the threshold given as config
|
|
272
|
-
* @param groupId The group that should have its key material updated
|
|
273
|
-
*/
|
|
274
|
-
resetKeyMaterialRenewal(groupId) {
|
|
275
|
-
(0, RecurringTaskScheduler_1.cancelRecurringTask)(this.createKeyMaterialUpdateTaskSchedulerId(groupId));
|
|
276
|
-
this.scheduleKeyMaterialRenewal(groupId);
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Will schedule a task to update the key material of the conversation according to the threshold given as config
|
|
280
|
-
* @param groupId
|
|
281
|
-
*/
|
|
282
|
-
scheduleKeyMaterialRenewal(groupId) {
|
|
283
|
-
const key = this.createKeyMaterialUpdateTaskSchedulerId(groupId);
|
|
284
|
-
(0, RecurringTaskScheduler_1.registerRecurringTask)({
|
|
285
|
-
task: () => this.renewKeyMaterial(groupId),
|
|
286
|
-
every: this.config.keyingMaterialUpdateThreshold,
|
|
287
|
-
key,
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Get all keying material last update dates and schedule tasks for renewal
|
|
292
|
-
* Function must only be called once, after application start
|
|
293
|
-
*/
|
|
294
|
-
checkForKeyMaterialsUpdate() {
|
|
295
|
-
try {
|
|
296
|
-
const keyMaterialUpdateDates = keyMaterialUpdatesStore_1.keyMaterialUpdatesStore.getAllUpdateDates();
|
|
297
|
-
keyMaterialUpdateDates.forEach(({ groupId }) => this.scheduleKeyMaterialRenewal(groupId));
|
|
298
|
-
}
|
|
299
|
-
catch (error) {
|
|
300
|
-
this.logger.error('Could not get last key material update dates', error);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Get date of last key packages count query and schedule a task to sync it with backend
|
|
305
|
-
* Function must only be called once, after application start
|
|
306
|
-
*/
|
|
307
|
-
checkForKeyPackagesBackendSync() {
|
|
308
|
-
(0, RecurringTaskScheduler_1.registerRecurringTask)({
|
|
309
|
-
every: commons_1.TimeUtil.TimeInMillis.DAY,
|
|
310
|
-
key: 'try-key-packages-backend-sync',
|
|
311
|
-
task: () => this.syncKeyPackages(),
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
async syncKeyPackages() {
|
|
315
|
-
const validKeyPackagesCount = await this.clientValidKeypackagesCount();
|
|
316
|
-
const minAllowedNumberOfKeyPackages = this.config.nbKeyPackages / 2;
|
|
317
|
-
if (validKeyPackagesCount <= minAllowedNumberOfKeyPackages) {
|
|
318
|
-
const clientId = this.apiClient.validatedClientId;
|
|
319
|
-
//check numbers of keys on backend
|
|
320
|
-
const backendKeyPackagesCount = await this.apiClient.api.client.getMLSKeyPackageCount(clientId);
|
|
321
|
-
if (backendKeyPackagesCount <= minAllowedNumberOfKeyPackages) {
|
|
322
|
-
//upload new keys
|
|
323
|
-
const newKeyPackages = await this.clientKeypackages(this.config.nbKeyPackages);
|
|
324
|
-
await this.uploadMLSKeyPackages(newKeyPackages, clientId);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Will make the given client mls capable (generate and upload key packages)
|
|
330
|
-
*
|
|
331
|
-
* @param mlsClient Intance of the coreCrypto that represents the mls client
|
|
332
|
-
* @param clientId The id of the client
|
|
333
|
-
*/
|
|
334
|
-
async uploadMLSPublicKeys(publicKey, clientId) {
|
|
335
|
-
return this.apiClient.api.client.putClient(clientId, {
|
|
336
|
-
mls_public_keys: { ed25519: btoa(bazinga64_1.Converter.arrayBufferViewToBaselineString(publicKey)) },
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
async uploadMLSKeyPackages(keypackages, clientId) {
|
|
340
|
-
return this.apiClient.api.client.uploadMLSKeyPackages(clientId, keypackages.map(keypackage => btoa(bazinga64_1.Converter.arrayBufferViewToBaselineString(keypackage))));
|
|
341
|
-
}
|
|
342
|
-
async wipeConversation(conversationId) {
|
|
343
|
-
return this.coreCryptoClient.wipeConversation(conversationId);
|
|
344
|
-
}
|
|
345
|
-
async handleEvent(params) {
|
|
346
|
-
return (0, EventHandler_1.handleBackendEvent)(Object.assign(Object.assign({}, params), { mlsService: this }));
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* If there is a matching conversationId => groupId pair in the database,
|
|
350
|
-
* we can find the groupId and return it as a string
|
|
351
|
-
*
|
|
352
|
-
* @param conversationQualifiedId
|
|
353
|
-
*/
|
|
354
|
-
async getGroupIdFromConversationId(conversationQualifiedId) {
|
|
355
|
-
var _a;
|
|
356
|
-
const { id: conversationId, domain: conversationDomain } = conversationQualifiedId;
|
|
357
|
-
const groupId = await ((_a = this.groupIdFromConversationId) === null || _a === void 0 ? void 0 : _a.call(this, conversationQualifiedId));
|
|
358
|
-
if (!groupId) {
|
|
359
|
-
throw new Error(`Could not find a group_id for conversation ${conversationId}@${conversationDomain}`);
|
|
360
|
-
}
|
|
361
|
-
return groupId;
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* If there are pending proposals, we need to either process them,
|
|
365
|
-
* or save them in the database for later processing
|
|
366
|
-
*
|
|
367
|
-
* @param groupId groupId of the mls conversation
|
|
368
|
-
* @param delayInMs delay in ms before processing proposals
|
|
369
|
-
* @param eventTime time of the event that had the proposals
|
|
370
|
-
*/
|
|
371
|
-
async handlePendingProposals({ delayInMs, groupId, eventTime }) {
|
|
372
|
-
if (delayInMs > 0) {
|
|
373
|
-
const eventDate = new Date(eventTime);
|
|
374
|
-
const firingDate = eventDate.setTime(eventDate.getTime() + delayInMs);
|
|
375
|
-
pendingProposalsStore_1.pendingProposalsStore.storeItem({
|
|
376
|
-
groupId,
|
|
377
|
-
firingDate,
|
|
378
|
-
});
|
|
379
|
-
TaskScheduler_1.TaskScheduler.addTask({
|
|
380
|
-
task: () => this.commitPendingProposals({ groupId }),
|
|
381
|
-
firingDate,
|
|
382
|
-
key: groupId,
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
await this.commitPendingProposals({ groupId, skipDelete: true });
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Commit all pending proposals for a given groupId
|
|
391
|
-
*
|
|
392
|
-
* @param groupId groupId of the conversation
|
|
393
|
-
* @param skipDelete if true, do not delete the pending proposals from the database
|
|
394
|
-
*/
|
|
395
|
-
async commitPendingProposals({ groupId, skipDelete = false }) {
|
|
396
|
-
try {
|
|
397
|
-
await this.commitProposals(bazinga64_1.Decoder.fromBase64(groupId).asBytes);
|
|
398
|
-
if (!skipDelete) {
|
|
399
|
-
TaskScheduler_1.TaskScheduler.cancelTask(groupId);
|
|
400
|
-
pendingProposalsStore_1.pendingProposalsStore.deleteItem({ groupId });
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
catch (error) {
|
|
404
|
-
this.logger.error(`Error while committing pending proposals for groupId ${groupId}`, error);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Get all pending proposals from the database and schedule them
|
|
409
|
-
* Function must only be called once, after application start
|
|
410
|
-
*
|
|
411
|
-
*/
|
|
412
|
-
async checkExistingPendingProposals() {
|
|
413
|
-
try {
|
|
414
|
-
const pendingProposals = pendingProposalsStore_1.pendingProposalsStore.getAllItems();
|
|
415
|
-
if (pendingProposals.length > 0) {
|
|
416
|
-
pendingProposals.forEach(({ groupId, firingDate }) => TaskScheduler_1.TaskScheduler.addTask({
|
|
417
|
-
task: () => this.commitPendingProposals({ groupId }),
|
|
418
|
-
firingDate,
|
|
419
|
-
key: groupId,
|
|
420
|
-
}));
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
catch (error) {
|
|
424
|
-
this.logger.error('Could not get pending proposals', error);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
exports.MLSService = MLSService;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CommitBundle } from '@wireapp/core-crypto/platforms/web/corecrypto';
|
|
2
|
-
export interface UploadCommitOptions {
|
|
3
|
-
/**
|
|
4
|
-
* If uploading the commit fails and we endup in a scenario where a retrial is possible, then this callback will be called to re-generate a new commit bundle
|
|
5
|
-
*/
|
|
6
|
-
regenerateCommitBundle?: () => Promise<CommitBundle>;
|
|
7
|
-
/**
|
|
8
|
-
* Is the current commitBundle an external commit.
|
|
9
|
-
*/
|
|
10
|
-
isExternalCommit?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface MLSServiceConfig {
|
|
13
|
-
keyingMaterialUpdateThreshold: number;
|
|
14
|
-
nbKeyPackages: number;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=MLSService.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+CAA+C,CAAC;AAE3E,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B,EAAE,MAAM,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CommitBundle } from '@wireapp/core-crypto';
|
|
2
|
-
/**
|
|
3
|
-
* Will convert a coreCrypto commit bundle into a Uint8Array representing a protobuf object
|
|
4
|
-
* @param commitBundle a commit bundle generated by coreCrypto
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare function toProtobufCommitBundle({ commit, welcome, publicGroupState }: CommitBundle): Uint8Array;
|
|
8
|
-
//# sourceMappingURL=commitBundleUtil.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commitBundleUtil.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/commitBundleUtil.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,YAAY,EAAkD,MAAM,sBAAsB,CAAC;AAYnG;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAC,EAAE,YAAY,GAAG,UAAU,CAWpG"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.toProtobufCommitBundle = void 0;
|
|
22
|
-
const mls_1 = require("@wireapp/protocol-messaging/web/mls");
|
|
23
|
-
const core_crypto_1 = require("@wireapp/core-crypto");
|
|
24
|
-
const ratchetTreeMapping = {
|
|
25
|
-
[core_crypto_1.RatchetTreeType.Full]: mls_1.mls.RatchetTreeType.FULL,
|
|
26
|
-
[core_crypto_1.RatchetTreeType.ByRef]: mls_1.mls.RatchetTreeType.REFERENCE,
|
|
27
|
-
[core_crypto_1.RatchetTreeType.Delta]: mls_1.mls.RatchetTreeType.DELTA,
|
|
28
|
-
};
|
|
29
|
-
const groupInfoType = {
|
|
30
|
-
[core_crypto_1.PublicGroupStateEncryptionType.Plaintext]: mls_1.mls.GroupInfoType.PUBLIC_GROUP_STATE,
|
|
31
|
-
[core_crypto_1.PublicGroupStateEncryptionType.JweEncrypted]: mls_1.mls.GroupInfoType.GROUP_INFO_JWE,
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Will convert a coreCrypto commit bundle into a Uint8Array representing a protobuf object
|
|
35
|
-
* @param commitBundle a commit bundle generated by coreCrypto
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
function toProtobufCommitBundle({ commit, welcome, publicGroupState }) {
|
|
39
|
-
const { ratchetTreeType, encryptionType } = publicGroupState;
|
|
40
|
-
return mls_1.mls.CommitBundle.encode({
|
|
41
|
-
groupInfoBundle: {
|
|
42
|
-
ratchetTreeType: ratchetTreeMapping[ratchetTreeType],
|
|
43
|
-
groupInfo: publicGroupState.payload,
|
|
44
|
-
groupInfoType: groupInfoType[encryptionType],
|
|
45
|
-
},
|
|
46
|
-
commit,
|
|
47
|
-
welcome,
|
|
48
|
-
}).finish();
|
|
49
|
-
}
|
|
50
|
-
exports.toProtobufCommitBundle = toProtobufCommitBundle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/index.ts"],"names":[],"mappings":"AAmBA,cAAc,cAAc,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
-
}
|
|
26
|
-
Object.defineProperty(o, k2, desc);
|
|
27
|
-
}) : (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
o[k2] = m[k];
|
|
30
|
-
}));
|
|
31
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./MLSService"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.ts"],"names":[],"mappings":"AAmBA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
-
}
|
|
26
|
-
Object.defineProperty(o, k2, desc);
|
|
27
|
-
}) : (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
o[k2] = m[k];
|
|
30
|
-
}));
|
|
31
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./keyMaterialUpdatesStore"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CommonMLS } from '../../../types';
|
|
2
|
-
export type LastKeyMaterialUpdateParams = CommonMLS;
|
|
3
|
-
export interface KeyMaterialUpdatesStore {
|
|
4
|
-
[groupId: string]: LastKeyMaterialUpdateParams;
|
|
5
|
-
}
|
|
6
|
-
export declare const keyMaterialUpdatesStore: {
|
|
7
|
-
getAllUpdateDates: () => LastKeyMaterialUpdateParams[];
|
|
8
|
-
storeLastKeyMaterialUpdateDate: ({ groupId }: LastKeyMaterialUpdateParams) => void;
|
|
9
|
-
deleteLastKeyMaterialUpdateDate: ({ groupId }: CommonMLS) => void;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=keyMaterialUpdatesStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyMaterialUpdatesStore.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC;AACpD,MAAM,WAAW,uBAAuB;IACtC,CAAC,OAAO,EAAE,MAAM,GAAG,2BAA2B,CAAC;CAChD;AA+BD,eAAO,MAAM,uBAAuB;6BAnBN,2BAA2B,EAAE;kDAKR,2BAA2B;mDAM1B,SAAS;CAY5D,CAAC"}
|