@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,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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.ClientService = void 0;
|
|
22
|
-
const client_1 = require("@wireapp/api-client/lib/client/");
|
|
23
|
-
const _1 = require("./");
|
|
24
|
-
class ClientService {
|
|
25
|
-
constructor(apiClient, storeEngine, cryptographyService) {
|
|
26
|
-
this.apiClient = apiClient;
|
|
27
|
-
this.storeEngine = storeEngine;
|
|
28
|
-
this.cryptographyService = cryptographyService;
|
|
29
|
-
this.database = new _1.ClientDatabaseRepository(this.storeEngine, this.cryptographyService);
|
|
30
|
-
this.backend = new _1.ClientBackendRepository(this.apiClient);
|
|
31
|
-
}
|
|
32
|
-
getClients() {
|
|
33
|
-
return this.backend.getClients();
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Will delete the given client from backend and will also delete it from the local database
|
|
37
|
-
*
|
|
38
|
-
* note: use deleteLocalClient if you wish to delete the client currently used by the user
|
|
39
|
-
*
|
|
40
|
-
* @param clientId The id of the client to delete
|
|
41
|
-
* @param password? Password of the owning user. Can be omitted for temporary devices
|
|
42
|
-
*/
|
|
43
|
-
async deleteClient(clientId, password) {
|
|
44
|
-
const userId = { id: this.apiClient.userId, domain: this.apiClient.domain || '' };
|
|
45
|
-
await this.backend.deleteClient(clientId, password);
|
|
46
|
-
return this.database.deleteClient(this.cryptographyService.constructSessionId(userId, clientId));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Will delete the local client (client currently in use by the user) from backend and will also delete it from the local database
|
|
50
|
-
* @param password? Password of the owning user. Can be omitted for temporary devices
|
|
51
|
-
*/
|
|
52
|
-
async deleteLocalClient(password) {
|
|
53
|
-
var _a;
|
|
54
|
-
const localClientId = (_a = this.apiClient.context) === null || _a === void 0 ? void 0 : _a.clientId;
|
|
55
|
-
if (!localClientId) {
|
|
56
|
-
throw new Error('Trying to delete local client, but local client has not been set');
|
|
57
|
-
}
|
|
58
|
-
await this.backend.deleteClient(localClientId, password);
|
|
59
|
-
return this.database.deleteLocalClient();
|
|
60
|
-
}
|
|
61
|
-
getLocalClient() {
|
|
62
|
-
return this.database.getLocalClient();
|
|
63
|
-
}
|
|
64
|
-
createLocalClient(client, domain) {
|
|
65
|
-
return this.database.createLocalClient(client, domain);
|
|
66
|
-
}
|
|
67
|
-
async synchronizeClients() {
|
|
68
|
-
var _a;
|
|
69
|
-
const registeredClients = await this.backend.getClients();
|
|
70
|
-
const filteredClients = registeredClients.filter(client => client.id !== this.apiClient.context.clientId);
|
|
71
|
-
return this.database.createClientList(this.apiClient.context.userId, filteredClients, (_a = this.apiClient.context) === null || _a === void 0 ? void 0 : _a.domain);
|
|
72
|
-
}
|
|
73
|
-
// TODO: Split functionality into "create" and "register" client
|
|
74
|
-
async register(loginData, clientInfo, entropyData) {
|
|
75
|
-
if (!this.apiClient.context) {
|
|
76
|
-
throw new Error('Context is not set.');
|
|
77
|
-
}
|
|
78
|
-
if (loginData.clientType === client_1.ClientType.NONE) {
|
|
79
|
-
throw new Error(`Can't register client of type "${client_1.ClientType.NONE}"`);
|
|
80
|
-
}
|
|
81
|
-
const serializedPreKeys = await this.cryptographyService.createCryptobox(entropyData);
|
|
82
|
-
if (!this.cryptographyService.cryptobox.lastResortPreKey) {
|
|
83
|
-
throw new Error('Cryptobox got initialized without a last resort PreKey.');
|
|
84
|
-
}
|
|
85
|
-
const newClient = {
|
|
86
|
-
class: clientInfo.classification,
|
|
87
|
-
cookie: clientInfo.cookieLabel,
|
|
88
|
-
label: clientInfo.label,
|
|
89
|
-
lastkey: this.cryptographyService.cryptobox.serialize_prekey(this.cryptographyService.cryptobox.lastResortPreKey),
|
|
90
|
-
location: clientInfo.location,
|
|
91
|
-
model: clientInfo.model,
|
|
92
|
-
password: loginData.password ? String(loginData.password) : undefined,
|
|
93
|
-
verification_code: loginData.verificationCode,
|
|
94
|
-
prekeys: serializedPreKeys,
|
|
95
|
-
type: loginData.clientType,
|
|
96
|
-
};
|
|
97
|
-
const client = await this.backend.postClient(newClient);
|
|
98
|
-
await this.createLocalClient(client, this.apiClient.context.domain);
|
|
99
|
-
return client;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.ClientService = ClientService;
|
package/lib/client/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAmBA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
|
package/lib/client/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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("./ClientInfo"), exports);
|
|
36
|
-
__exportStar(require("./ClientService"), exports);
|
|
37
|
-
__exportStar(require("./ClientBackendRepository"), exports);
|
|
38
|
-
__exportStar(require("./ClientDatabaseRepository"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Connection } from '@wireapp/api-client/lib/connection/';
|
|
2
|
-
import { QualifiedId } from '@wireapp/api-client/lib/user';
|
|
3
|
-
import { APIClient } from '@wireapp/api-client';
|
|
4
|
-
export declare class ConnectionService {
|
|
5
|
-
private readonly apiClient;
|
|
6
|
-
constructor(apiClient: APIClient);
|
|
7
|
-
getConnections(): Promise<Connection[]>;
|
|
8
|
-
acceptConnection(userId: string): Promise<Connection>;
|
|
9
|
-
ignoreConnection(userId: string): Promise<Connection>;
|
|
10
|
-
createConnection(userId: QualifiedId): Promise<Connection>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=ConnectionService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionService.d.ts","sourceRoot":"","sources":["../../src/connection/ConnectionService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,UAAU,EAAmB,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAE1C,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAIvC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAMrD,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAMrD,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CAGlE"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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.ConnectionService = void 0;
|
|
22
|
-
const connection_1 = require("@wireapp/api-client/lib/connection/");
|
|
23
|
-
class ConnectionService {
|
|
24
|
-
constructor(apiClient) {
|
|
25
|
-
this.apiClient = apiClient;
|
|
26
|
-
}
|
|
27
|
-
getConnections() {
|
|
28
|
-
return this.apiClient.api.connection.getAllConnections();
|
|
29
|
-
}
|
|
30
|
-
acceptConnection(userId) {
|
|
31
|
-
return this.apiClient.api.connection.putConnection(userId, {
|
|
32
|
-
status: connection_1.ConnectionStatus.ACCEPTED,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
ignoreConnection(userId) {
|
|
36
|
-
return this.apiClient.api.connection.putConnection(userId, {
|
|
37
|
-
status: connection_1.ConnectionStatus.IGNORED,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
createConnection(userId) {
|
|
41
|
-
return this.apiClient.api.connection.postConnection(userId, '');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.ConnectionService = ConnectionService;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC"}
|
package/lib/connection/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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("./ConnectionService"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbortReason.d.ts","sourceRoot":"","sources":["../../src/conversation/AbortReason.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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,66 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { AssetOptions } from '@wireapp/api-client/lib/asset';
|
|
3
|
-
import { ProgressCallback, RequestCancelable } from '@wireapp/api-client/lib/http';
|
|
4
|
-
import { APIClient } from '@wireapp/api-client';
|
|
5
|
-
import { EncryptedAssetUploaded } from '../../cryptography';
|
|
6
|
-
export interface AssetDataV4 {
|
|
7
|
-
assetKey: string;
|
|
8
|
-
assetToken: string;
|
|
9
|
-
assetDomain: string;
|
|
10
|
-
forceCaching: boolean;
|
|
11
|
-
version: 4;
|
|
12
|
-
}
|
|
13
|
-
export interface AssetDataV3 {
|
|
14
|
-
assetKey: string;
|
|
15
|
-
assetToken: string;
|
|
16
|
-
forceCaching: boolean;
|
|
17
|
-
version: 3;
|
|
18
|
-
}
|
|
19
|
-
export interface AssetDataV2 {
|
|
20
|
-
assetId: string;
|
|
21
|
-
conversationId: string;
|
|
22
|
-
forceCaching: boolean;
|
|
23
|
-
version: 2;
|
|
24
|
-
}
|
|
25
|
-
export interface AssetDataV1 {
|
|
26
|
-
assetId: string;
|
|
27
|
-
conversationId: string;
|
|
28
|
-
forceCaching: boolean;
|
|
29
|
-
version: 1;
|
|
30
|
-
}
|
|
31
|
-
export type AssetUrlData = AssetDataV1 | AssetDataV2 | AssetDataV3 | AssetDataV4;
|
|
32
|
-
export declare class AssetService {
|
|
33
|
-
private readonly apiClient;
|
|
34
|
-
constructor(apiClient: APIClient);
|
|
35
|
-
/**
|
|
36
|
-
* Will download an asset on the server.
|
|
37
|
-
* Will route the request to the right endpoint depending on the asset version
|
|
38
|
-
*
|
|
39
|
-
* @param assetData The versioned asset data
|
|
40
|
-
* @param progressCallback?
|
|
41
|
-
* @return Resolves when the asset has been uploaded
|
|
42
|
-
*/
|
|
43
|
-
downloadAsset(assetData: AssetUrlData, progressCallback?: ProgressCallback): {
|
|
44
|
-
cancel: () => void;
|
|
45
|
-
response: Promise<import("@wireapp/api-client/lib/asset").AssetResponse>;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Uploads a raw asset to the backend without encrypting it
|
|
49
|
-
*
|
|
50
|
-
* @param plainText The raw content of the asset to upload
|
|
51
|
-
* @param options?
|
|
52
|
-
* @param progressCallback?
|
|
53
|
-
* @return cancellable request that resolves with the uploaded image
|
|
54
|
-
*/
|
|
55
|
-
uploadRawAsset(asset: Buffer | Uint8Array, options?: AssetOptions, progressCallback?: ProgressCallback): RequestCancelable<import("@wireapp/api-client/lib/asset").AssetUploadData>;
|
|
56
|
-
/**
|
|
57
|
-
* Will encrypt and upload an asset to the backend
|
|
58
|
-
*
|
|
59
|
-
* @param plainText The raw content of the asset to upload
|
|
60
|
-
* @param options?
|
|
61
|
-
* @param progressCallback?
|
|
62
|
-
* @return cancellable request that resolves with the uploaded image and decryption keys
|
|
63
|
-
*/
|
|
64
|
-
uploadAsset(plainText: Buffer | Uint8Array, options?: AssetOptions, progressCallback?: ProgressCallback): Promise<RequestCancelable<EncryptedAssetUploaded>>;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=AssetService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AssetService.d.ts","sourceRoot":"","sources":["../../../src/conversation/AssetService/AssetService.ts"],"names":[],"mappings":";AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAEjF,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAG1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC;CACZ;AACD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAEjF,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;;;OAOG;IACI,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE,gBAAgB;;;;IAoCjF;;;;;;;OAOG;IACI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE,gBAAgB;IAI7G;;;;;;;OAOG;IACU,WAAW,CACtB,SAAS,EAAE,MAAM,GAAG,UAAU,EAC9B,OAAO,CAAC,EAAE,YAAY,EACtB,gBAAgB,CAAC,EAAE,gBAAgB,GAClC,OAAO,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;CAwBtD"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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.AssetService = void 0;
|
|
22
|
-
const AssetCryptography_1 = require("../../cryptography/AssetCryptography");
|
|
23
|
-
class AssetService {
|
|
24
|
-
constructor(apiClient) {
|
|
25
|
-
this.apiClient = apiClient;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Will download an asset on the server.
|
|
29
|
-
* Will route the request to the right endpoint depending on the asset version
|
|
30
|
-
*
|
|
31
|
-
* @param assetData The versioned asset data
|
|
32
|
-
* @param progressCallback?
|
|
33
|
-
* @return Resolves when the asset has been uploaded
|
|
34
|
-
*/
|
|
35
|
-
downloadAsset(assetData, progressCallback) {
|
|
36
|
-
const { forceCaching } = assetData;
|
|
37
|
-
switch (assetData.version) {
|
|
38
|
-
case 1:
|
|
39
|
-
return this.apiClient.api.asset.getAssetV1(assetData.assetId, assetData.conversationId, forceCaching, progressCallback);
|
|
40
|
-
case 2:
|
|
41
|
-
return this.apiClient.api.asset.getAssetV2(assetData.assetId, assetData.conversationId, forceCaching, progressCallback);
|
|
42
|
-
case 3:
|
|
43
|
-
return this.apiClient.api.asset.getAssetV3(assetData.assetKey, assetData.assetToken, forceCaching, progressCallback);
|
|
44
|
-
case 4:
|
|
45
|
-
return this.apiClient.api.asset.getAssetV4(assetData.assetKey, assetData.assetDomain, assetData.assetToken, forceCaching, progressCallback);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Uploads a raw asset to the backend without encrypting it
|
|
50
|
-
*
|
|
51
|
-
* @param plainText The raw content of the asset to upload
|
|
52
|
-
* @param options?
|
|
53
|
-
* @param progressCallback?
|
|
54
|
-
* @return cancellable request that resolves with the uploaded image
|
|
55
|
-
*/
|
|
56
|
-
uploadRawAsset(asset, options, progressCallback) {
|
|
57
|
-
return this.apiClient.api.asset.postAsset(new Uint8Array(asset), options, progressCallback);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Will encrypt and upload an asset to the backend
|
|
61
|
-
*
|
|
62
|
-
* @param plainText The raw content of the asset to upload
|
|
63
|
-
* @param options?
|
|
64
|
-
* @param progressCallback?
|
|
65
|
-
* @return cancellable request that resolves with the uploaded image and decryption keys
|
|
66
|
-
*/
|
|
67
|
-
async uploadAsset(plainText, options, progressCallback) {
|
|
68
|
-
const { cipherText, keyBytes, sha256 } = await (0, AssetCryptography_1.encryptAsset)({
|
|
69
|
-
plainText,
|
|
70
|
-
algorithm: options === null || options === void 0 ? void 0 : options.algorithm,
|
|
71
|
-
hash: options === null || options === void 0 ? void 0 : options.hash,
|
|
72
|
-
});
|
|
73
|
-
const request = this.uploadRawAsset(cipherText, options, progressCallback);
|
|
74
|
-
return Object.assign(Object.assign({}, request), { response: request.response.then(response => {
|
|
75
|
-
const { key, token, domain } = response;
|
|
76
|
-
return {
|
|
77
|
-
cipherText,
|
|
78
|
-
domain,
|
|
79
|
-
key,
|
|
80
|
-
keyBytes,
|
|
81
|
-
sha256,
|
|
82
|
-
token,
|
|
83
|
-
};
|
|
84
|
-
}) });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.AssetService = AssetService;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conversation/AssetService/index.ts"],"names":[],"mappings":"AAmBA,cAAc,gBAAgB,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("./AssetService"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AssetTransferState.d.ts","sourceRoot":"","sources":["../../src/conversation/AssetTransferState.ts"],"names":[],"mappings":"AAmBA,oBAAY,kBAAkB;IAC5B,YAAY,gBAAgB;IAC5B,QAAQ,aAAa;CACtB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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.AssetTransferState = void 0;
|
|
22
|
-
var AssetTransferState;
|
|
23
|
-
(function (AssetTransferState) {
|
|
24
|
-
AssetTransferState["NOT_UPLOADED"] = "notUploaded";
|
|
25
|
-
AssetTransferState["UPLOADED"] = "uploaded";
|
|
26
|
-
})(AssetTransferState = exports.AssetTransferState || (exports.AssetTransferState = {}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClientActionType.d.ts","sourceRoot":"","sources":["../../src/conversation/ClientActionType.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,IAAI,gBAAgB,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 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.ClientActionType = void 0;
|
|
22
|
-
var protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
23
|
-
Object.defineProperty(exports, "ClientActionType", { enumerable: true, get: function () { return protocol_messaging_1.ClientAction; } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ConversationEvent } from '@wireapp/api-client/lib/event';
|
|
2
|
-
import { NotificationSource } from '../../notification';
|
|
3
|
-
import { PayloadBundle } from '../message/PayloadBundle';
|
|
4
|
-
export declare class ConversationMapper {
|
|
5
|
-
static mapConversationEvent(event: ConversationEvent, source: NotificationSource): PayloadBundle;
|
|
6
|
-
private static mapConversationEventType;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=ConversationMapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationMapper.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationMapper/ConversationMapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAqB,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAEpF,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAC,aAAa,EAAoB,MAAM,0BAA0B,CAAC;AAC1E,qBAAa,kBAAkB;WACf,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,kBAAkB,GAAG,aAAa;IAgBvG,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAcxC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2019 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.ConversationMapper = void 0;
|
|
22
|
-
const event_1 = require("@wireapp/api-client/lib/event");
|
|
23
|
-
const message_1 = require("../message");
|
|
24
|
-
const MessageBuilder_1 = require("../message/MessageBuilder");
|
|
25
|
-
const PayloadBundle_1 = require("../message/PayloadBundle");
|
|
26
|
-
class ConversationMapper {
|
|
27
|
-
static mapConversationEvent(event, source) {
|
|
28
|
-
return {
|
|
29
|
-
content: event.data,
|
|
30
|
-
conversation: event.conversation,
|
|
31
|
-
qualifiedConversation: event.qualified_conversation,
|
|
32
|
-
qualifiedFrom: event.qualified_from,
|
|
33
|
-
from: event.from,
|
|
34
|
-
id: (0, MessageBuilder_1.createId)(),
|
|
35
|
-
messageTimer: 0,
|
|
36
|
-
source,
|
|
37
|
-
state: message_1.MessageSendingState.INCOMING,
|
|
38
|
-
timestamp: new Date(event.time).getTime(),
|
|
39
|
-
type: this.mapConversationEventType(event.type),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
static mapConversationEventType(type) {
|
|
43
|
-
switch (type) {
|
|
44
|
-
case event_1.CONVERSATION_EVENT.MEMBER_JOIN:
|
|
45
|
-
return PayloadBundle_1.PayloadBundleType.MEMBER_JOIN;
|
|
46
|
-
case event_1.CONVERSATION_EVENT.MESSAGE_TIMER_UPDATE:
|
|
47
|
-
return PayloadBundle_1.PayloadBundleType.TIMER_UPDATE;
|
|
48
|
-
case event_1.CONVERSATION_EVENT.RENAME:
|
|
49
|
-
return PayloadBundle_1.PayloadBundleType.CONVERSATION_RENAME;
|
|
50
|
-
case event_1.CONVERSATION_EVENT.TYPING:
|
|
51
|
-
return PayloadBundle_1.PayloadBundleType.TYPING;
|
|
52
|
-
default:
|
|
53
|
-
return PayloadBundle_1.PayloadBundleType.UNKNOWN;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.ConversationMapper = ConversationMapper;
|