@wireapp/core 46.46.6-beta.10.d7a6c4c53 → 46.46.6-beta.14.f6fd03fe6
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/lib/Account.d.ts +51 -168
- package/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +127 -517
- package/lib/Account.test.js +147 -158
- package/lib/broadcast/AvailabilityType.d.ts +1 -1
- package/lib/broadcast/AvailabilityType.d.ts.map +1 -1
- package/lib/broadcast/BroadcastService.d.ts +1 -1
- package/lib/broadcast/BroadcastService.d.ts.map +1 -1
- package/lib/broadcast/BroadcastService.js +1 -1
- package/lib/client/ClientService.d.ts +3 -4
- package/lib/client/ClientService.d.ts.map +1 -1
- package/lib/client/ClientService.js +5 -19
- package/lib/conversation/AbortReason.d.ts +1 -1
- package/lib/conversation/AbortReason.d.ts.map +1 -1
- package/lib/conversation/AssetService/AssetService.d.ts +30 -12
- package/lib/conversation/AssetService/AssetService.d.ts.map +1 -1
- package/lib/conversation/AssetService/AssetService.js +10 -1
- package/lib/conversation/AssetService/AssetService.test.js +3 -8
- package/lib/conversation/ClientActionType.d.ts +1 -1
- package/lib/conversation/ClientActionType.d.ts.map +1 -1
- package/lib/conversation/ClientActionType.js +1 -1
- package/lib/conversation/ConversationService/ConversationService.d.ts +14 -98
- package/lib/conversation/ConversationService/ConversationService.d.ts.map +1 -1
- package/lib/conversation/ConversationService/ConversationService.js +101 -314
- package/lib/conversation/ConversationService/ConversationService.test.js +47 -441
- package/lib/conversation/ConversationService/ConversationService.types.d.ts +4 -5
- package/lib/conversation/ConversationService/ConversationService.types.d.ts.map +1 -1
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts.map +1 -1
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.js +3 -6
- package/lib/conversation/SubconversationService/SubconversationService.d.ts.map +1 -1
- package/lib/conversation/SubconversationService/SubconversationService.js +11 -158
- package/lib/conversation/SubconversationService/SubconversationService.test.js +2 -8
- package/lib/conversation/content/AssetContent.d.ts +1 -1
- package/lib/conversation/content/AssetContent.d.ts.map +1 -1
- package/lib/conversation/content/ButtonActionConfirmationContent.d.ts +1 -1
- package/lib/conversation/content/ButtonActionConfirmationContent.d.ts.map +1 -1
- package/lib/conversation/content/ButtonActionContent.d.ts +1 -1
- package/lib/conversation/content/ButtonActionContent.d.ts.map +1 -1
- package/lib/conversation/content/ClearedContent.d.ts +1 -1
- package/lib/conversation/content/ClearedContent.d.ts.map +1 -1
- package/lib/conversation/content/ClientActionContent.d.ts +1 -1
- package/lib/conversation/content/ClientActionContent.d.ts.map +1 -1
- package/lib/conversation/content/CompositeContent.d.ts +1 -1
- package/lib/conversation/content/CompositeContent.d.ts.map +1 -1
- package/lib/conversation/content/ConfirmationContent.d.ts +1 -1
- package/lib/conversation/content/ConfirmationContent.d.ts.map +1 -1
- package/lib/conversation/content/DeletedContent.d.ts +1 -1
- package/lib/conversation/content/DeletedContent.d.ts.map +1 -1
- package/lib/conversation/content/HiddenContent.d.ts +1 -1
- package/lib/conversation/content/HiddenContent.d.ts.map +1 -1
- package/lib/conversation/content/KnockContent.d.ts +1 -1
- package/lib/conversation/content/KnockContent.d.ts.map +1 -1
- package/lib/conversation/content/LinkPreviewContent.d.ts +1 -1
- package/lib/conversation/content/LinkPreviewContent.d.ts.map +1 -1
- package/lib/conversation/content/MentionContent.d.ts +1 -1
- package/lib/conversation/content/MentionContent.d.ts.map +1 -1
- package/lib/conversation/content/MultipartContent.d.ts +1 -1
- package/lib/conversation/content/MultipartContent.d.ts.map +1 -1
- package/lib/conversation/content/QuoteContent.d.ts +1 -1
- package/lib/conversation/content/QuoteContent.d.ts.map +1 -1
- package/lib/conversation/content/TweetContent.d.ts +1 -1
- package/lib/conversation/content/TweetContent.d.ts.map +1 -1
- package/lib/conversation/content/index.d.ts +1 -1
- package/lib/conversation/content/index.d.ts.map +1 -1
- package/lib/conversation/content/index.js +1 -1
- package/lib/conversation/message/MessageBuilder.d.ts +1 -1
- package/lib/conversation/message/MessageBuilder.d.ts.map +1 -1
- package/lib/conversation/message/MessageBuilder.js +1 -1
- package/lib/conversation/message/MessageService.d.ts.map +1 -1
- package/lib/conversation/message/MessageService.js +1 -1
- package/lib/conversation/message/MessageService.test.js +1 -7
- package/lib/conversation/message/MessageToProtoMapper.d.ts +1 -1
- package/lib/conversation/message/MessageToProtoMapper.d.ts.map +1 -1
- package/lib/conversation/message/MessageToProtoMapper.js +1 -1
- package/lib/conversation/message/messageSender.js +2 -2
- package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts +2 -2
- package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts.map +1 -1
- package/lib/messagingProtocols/common.types.d.ts +0 -9
- package/lib/messagingProtocols/common.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.js +1 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.js +11 -13
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.test.js +16 -21
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +3 -9
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +12 -31
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts +0 -6
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.js +1 -19
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/IncomingMesssagesQueue.d.ts +4 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/IncomingMesssagesQueue.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/IncomingMesssagesQueue.js +69 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/index.d.ts +2 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/{IncomingProposalsQueue → IncomingMessagesQueue}/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/{IncomingProposalsQueue → IncomingMessagesQueue}/index.js +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.d.ts +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.js +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.js +14 -23
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.d.ts +2 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.js +98 -0
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.js +2 -5
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.test.js +3 -13
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.d.ts +2 -38
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.js +6 -41
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +34 -38
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +208 -267
- package/lib/messagingProtocols/mls/MLSService/MLSService.test.js +160 -157
- package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.js +3 -3
- package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.test.js +5 -5
- package/lib/messagingProtocols/mls/conversationRejoinQueue.js +2 -2
- package/lib/messagingProtocols/mls/types.d.ts +8 -0
- package/lib/messagingProtocols/mls/types.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/EventHandler/events/otrMessageAdd/otrMessageAdd.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/EventHandler/events/otrMessageAdd/otrMessageAdd.js +1 -7
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.d.ts +15 -8
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.js +62 -97
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoClient.types.d.ts +6 -0
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoClient.types.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.d.ts +6 -1
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.js +22 -19
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts +3 -5
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.js +24 -11
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.d.ts +0 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.js +2 -11
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.test.js +9 -13
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts +2 -3
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/WithMockedGenerics.test.js +4 -11
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.d.ts +4 -0
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.js +5 -0
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.d.ts +1 -2
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.js +2 -8
- package/lib/messagingProtocols/proteus/Utility/SessionHandler/SessionHandler.test.js +0 -4
- package/lib/messagingProtocols/proteus/Utility/getGenericMessageParams.d.ts +1 -1
- package/lib/messagingProtocols/proteus/Utility/getGenericMessageParams.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/Utility/getGenericMessageParams.js +1 -1
- package/lib/notification/NotificationService.d.ts +6 -20
- package/lib/notification/NotificationService.d.ts.map +1 -1
- package/lib/notification/NotificationService.js +14 -23
- package/lib/notification/NotificationService.test.js +0 -8
- package/lib/secretStore/secretKeyGenerator.d.ts +0 -1
- package/lib/secretStore/secretKeyGenerator.d.ts.map +1 -1
- package/lib/secretStore/secretKeyGenerator.js +1 -3
- package/lib/self/SelfService.d.ts +2 -2
- package/lib/self/SelfService.d.ts.map +1 -1
- package/lib/self/SelfService.test.js +2 -5
- package/lib/team/TeamService.d.ts +2 -5
- package/lib/team/TeamService.d.ts.map +1 -1
- package/lib/team/TeamService.js +2 -12
- package/lib/user/UserService.d.ts +2 -2
- package/lib/user/UserService.d.ts.map +1 -1
- package/lib/user/UserService.js +3 -3
- package/lib/util/TypePredicateUtil.d.ts.map +1 -1
- package/lib/util/TypePredicateUtil.js +2 -2
- package/package.json +3 -3
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts +0 -7
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.js +0 -48
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.d.ts +0 -2
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.js +0 -124
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.d.ts +0 -78
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.js +0 -173
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.d.ts +0 -2
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.js +0 -117
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.d.ts +0 -167
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.js +0 -317
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.d.ts +0 -2
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.js +0 -248
- package/lib/messagingProtocols/mls/recovery/index.d.ts +0 -5
- package/lib/messagingProtocols/mls/recovery/index.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/recovery/index.js +0 -28
- package/lib/test/StoreHelper.d.ts +0 -2
- package/lib/test/StoreHelper.d.ts.map +0 -1
- package/lib/test/StoreHelper.js +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteContent.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/QuoteContent.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"QuoteContent.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/QuoteContent.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAC,MAAM,GAAG,CAAC;AAE/E,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,YAAY,GAAG,eAAe,GAAG,WAAW,GAAG,gBAAgB,CAAC;IACzE,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TweetContent.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/TweetContent.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"TweetContent.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/TweetContent.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { LegalHoldStatus } from '@
|
|
1
|
+
export { LegalHoldStatus } from '@pydio/protocol-messaging';
|
|
2
2
|
export { Connection as ConnectionContent } from '@wireapp/api-client/lib/connection/';
|
|
3
3
|
import * as ContentType from './ContentType.guards';
|
|
4
4
|
export { ContentType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conversation/content/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,UAAU,IAAI,iBAAiB,EAAC,MAAM,qCAAqC,CAAC;AAEpF,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,CAAC;AAErB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
@@ -45,7 +45,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
45
45
|
};
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
exports.ContentType = exports.LegalHoldStatus = void 0;
|
|
48
|
-
var protocol_messaging_1 = require("@
|
|
48
|
+
var protocol_messaging_1 = require("@pydio/protocol-messaging");
|
|
49
49
|
Object.defineProperty(exports, "LegalHoldStatus", { enumerable: true, get: function () { return protocol_messaging_1.LegalHoldStatus; } });
|
|
50
50
|
const ContentType = __importStar(require("./ContentType.guards"));
|
|
51
51
|
exports.ContentType = ContentType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { IComposite, GenericMessage, ICalling } from '@pydio/protocol-messaging';
|
|
1
2
|
import { QualifiedId } from '@wireapp/api-client/lib/user';
|
|
2
|
-
import { IComposite, GenericMessage, ICalling } from '@wireapp/protocol-messaging';
|
|
3
3
|
import { ButtonActionConfirmationMessage, ButtonActionMessage, ConfirmationMessage, DeleteMessage, EditedTextMessage, FileAssetAbortMessage, FileAssetMessage, FileAssetMetaDataMessage, HideMessage, ImageAssetMessageOutgoing, InCallEmojiMessage, InCallHandRaiseMessage, LocationMessage, PingMessage, ReactionMessage, TextMessage } from './OtrMessage';
|
|
4
4
|
import { MultiPartContent, TextContent } from '../content';
|
|
5
5
|
export declare function createId(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBuilder.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageBuilder.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"MessageBuilder.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageBuilder.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,UAAU,EAUV,cAAc,EAUd,QAAQ,EAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,WAAW,EA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AAiB,EAAE,MAAM,GAAG,cAAc,CAYjH"}
|
|
@@ -43,8 +43,8 @@ exports.buildHideMessage = buildHideMessage;
|
|
|
43
43
|
exports.buildMultipartMessage = buildMultipartMessage;
|
|
44
44
|
exports.buildTextMessage = buildTextMessage;
|
|
45
45
|
exports.wrapInEphemeral = wrapInEphemeral;
|
|
46
|
+
const protocol_messaging_1 = require("@pydio/protocol-messaging");
|
|
46
47
|
const uuid_1 = require("uuid");
|
|
47
|
-
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
48
48
|
const AssetTransferState_1 = require("../AssetTransferState");
|
|
49
49
|
const GenericMessageType_1 = require("../GenericMessageType");
|
|
50
50
|
const MessageToProtoMapper_1 = require("../message/MessageToProtoMapper");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageService.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageService.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageService.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,oBAAoB,EAA0B,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAC,WAAW,EAAE,4BAA4B,EAAC,MAAM,8BAA8B,CAAC;AAOvF,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,KAAK,EAAmB,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAKvF,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBADd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc;IAGjD;;;;;;;;;;;OAWG;IACU,WAAW,CACtB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,oBAAoB,GAAG,4BAA4B,EAC/D,SAAS,EAAE,UAAU,EACrB,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,cAAc,CAAC,EAAE,WAAW,CAAC;QAC7B,aAAa,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE,CAAC;QACxC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KACrF,GACL,OAAO,CAAC,oBAAoB,GAAG;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;KAAC,CAAC;YAyBjE,cAAc;IAiE5B,OAAO,CAAC,qBAAqB;IAI7B;;;;;;;OAOG;YACW,sBAAsB;CAiBrC"}
|
|
@@ -22,8 +22,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.MessageService = void 0;
|
|
25
|
+
const otr_1 = require("@pydio/protocol-messaging/web/otr");
|
|
25
26
|
const StringUtil_1 = require("@wireapp/commons/lib/util/StringUtil");
|
|
26
|
-
const otr_1 = require("@wireapp/protocol-messaging/web/otr");
|
|
27
27
|
const deepmerge_ts_1 = require("deepmerge-ts");
|
|
28
28
|
const http_status_codes_1 = require("http-status-codes");
|
|
29
29
|
const long_1 = __importDefault(require("long"));
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
const protocol_messaging_1 = require("@pydio/protocol-messaging");
|
|
21
22
|
const http_status_codes_1 = require("http-status-codes");
|
|
22
23
|
const uuid_1 = require("uuid");
|
|
23
24
|
const api_client_1 = require("@wireapp/api-client");
|
|
24
|
-
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
25
25
|
const MessageService_1 = require("./MessageService");
|
|
26
26
|
const ProteusService_mocks_1 = require("../../messagingProtocols/proteus/ProteusService/ProteusService.mocks");
|
|
27
27
|
const PayloadHelper_1 = require("../../test/PayloadHelper");
|
|
@@ -71,20 +71,14 @@ function fakeEncrypt(_, recipients) {
|
|
|
71
71
|
}, {});
|
|
72
72
|
return Promise.resolve({ payloads: encryptedPayload });
|
|
73
73
|
}
|
|
74
|
-
const apiClients = [];
|
|
75
74
|
const buildMessageService = async () => {
|
|
76
75
|
const apiClient = new api_client_1.APIClient();
|
|
77
|
-
apiClients.push(apiClient);
|
|
78
76
|
const [proteusService] = await (0, ProteusService_mocks_1.buildProteusService)();
|
|
79
77
|
const messageService = new MessageService_1.MessageService(apiClient, proteusService);
|
|
80
78
|
jest.spyOn(proteusService, 'encrypt').mockImplementation(fakeEncrypt);
|
|
81
79
|
return [messageService, { apiClient, proteusService }];
|
|
82
80
|
};
|
|
83
81
|
describe('MessageService', () => {
|
|
84
|
-
afterAll(() => {
|
|
85
|
-
apiClients.forEach(client => client.disconnect());
|
|
86
|
-
(0, ProteusService_mocks_1.cleanupProteusServiceMocks)();
|
|
87
|
-
});
|
|
88
82
|
describe('sendMessage', () => {
|
|
89
83
|
const generateUsers = (userCount, clientsPerUser) => {
|
|
90
84
|
return Array.from(Array(userCount)).map((_, i) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinkPreview, Text } from '@
|
|
1
|
+
import { LinkPreview, Text } from '@pydio/protocol-messaging';
|
|
2
2
|
import { EditedTextContent, LinkPreviewUploadedContent, TextContent } from '../content';
|
|
3
3
|
export declare class MessageToProtoMapper {
|
|
4
4
|
static mapLinkPreviews(linkPreviews: LinkPreviewUploadedContent[]): LinkPreview[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageToProtoMapper.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageToProtoMapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAiB,WAAW,EAAkB,IAAI,EAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"MessageToProtoMapper.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/MessageToProtoMapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAiB,WAAW,EAAkB,IAAI,EAAQ,MAAM,2BAA2B,CAAC;AAEnG,OAAO,EAAC,iBAAiB,EAAE,0BAA0B,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAGtF,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,eAAe,CAAC,YAAY,EAAE,0BAA0B,EAAE,GAAG,WAAW,EAAE;IA+DjF,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,WAAW,GAAG,iBAAiB,GAAG,IAAI;CA0BrE"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.MessageToProtoMapper = void 0;
|
|
22
|
-
const protocol_messaging_1 = require("@
|
|
22
|
+
const protocol_messaging_1 = require("@pydio/protocol-messaging");
|
|
23
23
|
const GenericMessageType_1 = require("../GenericMessageType");
|
|
24
24
|
class MessageToProtoMapper {
|
|
25
25
|
static mapLinkPreviews(linkPreviews) {
|
|
@@ -35,8 +35,8 @@ function isSendingMessage() {
|
|
|
35
35
|
return sendingQueue.hasRunningTasks();
|
|
36
36
|
}
|
|
37
37
|
function resumeMessageSending() {
|
|
38
|
-
sendingQueue.
|
|
38
|
+
sendingQueue.pause(false);
|
|
39
39
|
}
|
|
40
40
|
function pauseMessageSending() {
|
|
41
|
-
sendingQueue.pause();
|
|
41
|
+
sendingQueue.pause(true);
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncryptedAsset.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/EncryptedAsset.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,UAAU,CAAC;IACrB,sCAAsC;IACtC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"EncryptedAsset.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/EncryptedAsset.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,UAAU,CAAC;IACrB,sCAAsC;IACtC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { HandledEventPayload } from '../notification';
|
|
2
2
|
export type EventHandlerResult = Promise<HandledEventPayload | void>;
|
|
3
|
-
export interface CoreCryptoConfig {
|
|
4
|
-
/**
|
|
5
|
-
* path on the public server to the core crypto wasm file.
|
|
6
|
-
* This file will be downloaded lazily when corecrypto is needed.
|
|
7
|
-
* It, thus, needs to know where, on the server, the file can be found
|
|
8
|
-
*/
|
|
9
|
-
wasmFilePath: string;
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
}
|
|
12
3
|
//# sourceMappingURL=common.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/messagingProtocols/common.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/messagingProtocols/common.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E2eiEnrollment, Ciphersuite, CoreCrypto, WireIdentity, E2eiConversationState, DeviceStatus, CredentialType } from '@wireapp/core-crypto';
|
|
1
|
+
import { E2eiEnrollment, Ciphersuite, CoreCrypto, RotateBundle, WireIdentity, E2eiConversationState, DeviceStatus, CredentialType } from '@wireapp/core-crypto';
|
|
2
2
|
/**
|
|
3
3
|
* Proxy types relevant to the E2EIService from CoreCrypto
|
|
4
4
|
*/
|
|
@@ -8,7 +8,7 @@ export type AcmeDirectory = OmitFree<Awaited<ReturnType<E2eiEnrollment['director
|
|
|
8
8
|
export type AcmeChallenge = OmitFree<NonNullable<NewAcmeAuthzOriginal['challenge']>>;
|
|
9
9
|
export type NewAcmeOrder = OmitFree<Awaited<ReturnType<E2eiEnrollment['newOrderResponse']>>>;
|
|
10
10
|
export type NewAcmeAuthz = Pick<Awaited<ReturnType<E2eiEnrollment['newAuthzResponse']>>, 'identifier' | 'keyauth' | 'challenge'>;
|
|
11
|
-
export { E2eiEnrollment, Ciphersuite, CoreCrypto, DeviceStatus, WireIdentity, E2eiConversationState, CredentialType };
|
|
11
|
+
export { E2eiEnrollment, Ciphersuite, CoreCrypto, RotateBundle, DeviceStatus, WireIdentity, E2eiConversationState, CredentialType, };
|
|
12
12
|
export type User = {
|
|
13
13
|
id: string;
|
|
14
14
|
domain: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B;;GA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AC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACrF,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,EACvD,YAAY,GAAG,SAAS,GAAG,WAAW,CACvC,CAAC;AACF,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,cAAc,GACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;AACjC,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.CredentialType = exports.E2eiConversationState = exports.
|
|
21
|
+
exports.CredentialType = exports.E2eiConversationState = exports.DeviceStatus = exports.CoreCrypto = exports.Ciphersuite = exports.E2eiEnrollment = void 0;
|
|
22
22
|
const core_crypto_1 = require("@wireapp/core-crypto");
|
|
23
23
|
Object.defineProperty(exports, "E2eiEnrollment", { enumerable: true, get: function () { return core_crypto_1.E2eiEnrollment; } });
|
|
24
24
|
Object.defineProperty(exports, "Ciphersuite", { enumerable: true, get: function () { return core_crypto_1.Ciphersuite; } });
|
|
25
25
|
Object.defineProperty(exports, "CoreCrypto", { enumerable: true, get: function () { return core_crypto_1.CoreCrypto; } });
|
|
26
|
-
Object.defineProperty(exports, "WireIdentity", { enumerable: true, get: function () { return core_crypto_1.WireIdentity; } });
|
|
27
26
|
Object.defineProperty(exports, "E2eiConversationState", { enumerable: true, get: function () { return core_crypto_1.E2eiConversationState; } });
|
|
28
27
|
Object.defineProperty(exports, "DeviceStatus", { enumerable: true, get: function () { return core_crypto_1.DeviceStatus; } });
|
|
29
28
|
Object.defineProperty(exports, "CredentialType", { enumerable: true, get: function () { return core_crypto_1.CredentialType; } });
|
|
@@ -6,7 +6,7 @@ import { CoreDatabase } from '../../../storage/CoreDB';
|
|
|
6
6
|
import { StringifiedQualifiedId } from '../../../util/qualifiedIdUtil';
|
|
7
7
|
import { RecurringTaskScheduler } from '../../../util/RecurringTaskScheduler';
|
|
8
8
|
import { MLSService } from '../MLSService';
|
|
9
|
-
export type DeviceIdentity = Omit<WireIdentity, 'free' | 'status'
|
|
9
|
+
export type DeviceIdentity = Omit<WireIdentity, 'free' | 'status'> & {
|
|
10
10
|
status?: DeviceStatus;
|
|
11
11
|
deviceId: string;
|
|
12
12
|
qualifiedUserId: QualifiedId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIServiceExternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"E2EIServiceExternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.ts"],"names":[],"mappings":"AAmBA,OAAO,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AAO,CAAC,OAAO,CAAC;IAKhD,gBAAgB;IAIV,oBAAoB,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAItF,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAI3B,0BAA0B,CACrC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,cAAc,EAAE,CAAC,GAAG,SAAS,CAAC;IAsBxD,kBAAkB,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EAAE,GACrB,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,cAAc,EAAE,CAAC,GAAG,SAAS,CAAC;IAyDxD,oBAAoB,CAC/B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAC1C,OAAO,CAAC,cAAc,EAAE,CAAC;IAiBf,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;YAKvC,4BAA4B;IAO1C;;;;;OAKG;IACU,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,OAAO,KAAK,WAAW,GAKtB;YAEa,+BAA+B;IAK7C;;;;;;;;;;;;OAYG;YACW,0BAA0B;IA2BxC,OAAO,CAAC,4BAA4B;YAStB,+BAA+B;YAQ/B,uBAAuB;YAKvB,0BAA0B;YAI1B,4BAA4B;YAO5B,WAAW;YAkBX,8BAA8B;CAM7C"}
|
|
@@ -29,7 +29,6 @@ const E2EIStorage_1 = require("./Storage/E2EIStorage");
|
|
|
29
29
|
const fullyQualifiedClientIdUtils_1 = require("../../../util/fullyQualifiedClientIdUtils");
|
|
30
30
|
const LowPrecisionTaskScheduler_1 = require("../../../util/LowPrecisionTaskScheduler");
|
|
31
31
|
const qualifiedIdUtil_1 = require("../../../util/qualifiedIdUtil");
|
|
32
|
-
const MLSService_1 = require("../MLSService");
|
|
33
32
|
// This export is meant to be accessible from the outside (e.g the Webapp / UI)
|
|
34
33
|
class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
35
34
|
coreCryptoClient;
|
|
@@ -57,7 +56,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
57
56
|
return this.enrollmentStorage.deletePendingEnrollmentData();
|
|
58
57
|
}
|
|
59
58
|
async getConversationState(conversationId) {
|
|
60
|
-
return this.coreCryptoClient.
|
|
59
|
+
return this.coreCryptoClient.e2eiConversationState(conversationId);
|
|
61
60
|
}
|
|
62
61
|
isE2EIEnabled() {
|
|
63
62
|
return this.coreCryptoClient.e2eiIsEnabled(this.mlsService.config.defaultCiphersuite);
|
|
@@ -84,10 +83,10 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
84
83
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
85
84
|
const textDecoder = new TextDecoder();
|
|
86
85
|
// we get all the devices that have an identity (either valid, expired or revoked)
|
|
87
|
-
const userIdentities = await this.coreCryptoClient.getUserIdentities(
|
|
86
|
+
const userIdentities = await this.coreCryptoClient.getUserIdentities(groupIdBytes, userIds.map(userId => userId.id));
|
|
88
87
|
// We get all the devices in the conversation (in order to get devices that have no identity)
|
|
89
|
-
const allUsersMLSDevices = (await this.coreCryptoClient.getClientIds(
|
|
90
|
-
.map(id => textDecoder.decode(id
|
|
88
|
+
const allUsersMLSDevices = (await this.coreCryptoClient.getClientIds(groupIdBytes))
|
|
89
|
+
.map(id => textDecoder.decode(id))
|
|
91
90
|
.map(fullyQualifiedId => (0, fullyQualifiedClientIdUtils_1.parseFullQualifiedClientId)(fullyQualifiedId));
|
|
92
91
|
const mappedUserIdentities = new Map();
|
|
93
92
|
for (const userId of userIds) {
|
|
@@ -115,7 +114,6 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
115
114
|
clientId: id.client,
|
|
116
115
|
qualifiedUserId: userId,
|
|
117
116
|
credentialType: core_crypto_1.CredentialType.Basic,
|
|
118
|
-
x509Identity: undefined,
|
|
119
117
|
}));
|
|
120
118
|
mappedUserIdentities.set((0, qualifiedIdUtil_1.stringifyQualifiedId)(userId), [...identities, ...basicMLSDevices]);
|
|
121
119
|
}
|
|
@@ -123,8 +121,8 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
123
121
|
}
|
|
124
122
|
// Returns devices e2ei certificates
|
|
125
123
|
async getDevicesIdentities(groupId, userClientsMap) {
|
|
126
|
-
const clientIds = Object.entries(userClientsMap).map(([clientId, userId]) =>
|
|
127
|
-
const deviceIdentities = await this.coreCryptoClient.getDeviceIdentities(
|
|
124
|
+
const clientIds = Object.entries(userClientsMap).map(([clientId, userId]) => (0, Helper_1.getE2EIClientId)(clientId, userId.id, userId.domain).asBytes);
|
|
125
|
+
const deviceIdentities = await this.coreCryptoClient.getDeviceIdentities(bazinga64_1.Decoder.fromBase64(groupId).asBytes, clientIds);
|
|
128
126
|
return deviceIdentities.map(identity => ({
|
|
129
127
|
...identity,
|
|
130
128
|
deviceId: (0, fullyQualifiedClientIdUtils_1.parseFullQualifiedClientId)(identity.clientId).client,
|
|
@@ -138,7 +136,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
138
136
|
}
|
|
139
137
|
async registerLocalCertificateRoot(acmeService) {
|
|
140
138
|
const localCertificateRoot = await acmeService.getLocalCertificateRoot();
|
|
141
|
-
await this.coreCryptoClient.
|
|
139
|
+
await this.coreCryptoClient.e2eiRegisterAcmeCA(localCertificateRoot);
|
|
142
140
|
return localCertificateRoot;
|
|
143
141
|
}
|
|
144
142
|
/**
|
|
@@ -149,7 +147,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
149
147
|
*/
|
|
150
148
|
async initialize(discoveryUrl) {
|
|
151
149
|
this._acmeService = new Connection_1.AcmeService(discoveryUrl);
|
|
152
|
-
this.mlsService.on(
|
|
150
|
+
this.mlsService.on('newCrlDistributionPoints', distributionPoints => this.handleNewCrlDistributionPoints(distributionPoints));
|
|
153
151
|
await this.registerServerCertificates();
|
|
154
152
|
await this.initialiseCrlDistributionTimers();
|
|
155
153
|
}
|
|
@@ -161,7 +159,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
161
159
|
}
|
|
162
160
|
async registerCrossSignedCertificates(acmeService) {
|
|
163
161
|
const certificates = await acmeService.getFederationCrossSignedCertificates();
|
|
164
|
-
await Promise.all(certificates.map(cert => this.coreCryptoClient.
|
|
162
|
+
await Promise.all(certificates.map(cert => this.coreCryptoClient.e2eiRegisterIntermediateCA(cert)));
|
|
165
163
|
}
|
|
166
164
|
/**
|
|
167
165
|
* This function is used to register different server certificates in CoreCrypto.
|
|
@@ -177,7 +175,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
177
175
|
* Both must be registered before the first enrollment.
|
|
178
176
|
*/
|
|
179
177
|
async registerServerCertificates() {
|
|
180
|
-
const isRootRegistered = await this.coreCryptoClient.
|
|
178
|
+
const isRootRegistered = await this.coreCryptoClient.e2eiIsPKIEnvSetup();
|
|
181
179
|
// Register root certificate if not already registered
|
|
182
180
|
if (!isRootRegistered) {
|
|
183
181
|
await this.registerLocalCertificateRoot(this.acmeService);
|
|
@@ -223,7 +221,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
223
221
|
await this.validateCrl(distributionPointUrl, crl, () => this.emit('crlChanged', { domain }));
|
|
224
222
|
}
|
|
225
223
|
async validateCrl(url, crl, onDirty) {
|
|
226
|
-
const { expiration: expirationTimestampSeconds, dirty } = await this.coreCryptoClient.
|
|
224
|
+
const { expiration: expirationTimestampSeconds, dirty } = await this.coreCryptoClient.e2eiRegisterCRL(url, crl);
|
|
227
225
|
const expirationTimestamp = expirationTimestampSeconds && expirationTimestampSeconds * TimeUtil_1.TimeInMillis.SECOND;
|
|
228
226
|
await this.cancelCrlDistributionTimer(url);
|
|
229
227
|
//set a new timer that will execute a task once the CRL is expired
|
|
@@ -30,17 +30,12 @@ const PayloadHelper_1 = require("../../../test/PayloadHelper");
|
|
|
30
30
|
const qualifiedIdUtil_1 = require("../../../util/qualifiedIdUtil");
|
|
31
31
|
const RecurringTaskScheduler_1 = require("../../../util/RecurringTaskScheduler");
|
|
32
32
|
async function buildE2EIService(dbName = 'core-test-db') {
|
|
33
|
-
const transactionContext = {
|
|
34
|
-
e2eiIsPKIEnvSetup: jest.fn(),
|
|
35
|
-
e2eiRegisterAcmeCA: jest.fn(),
|
|
36
|
-
e2eiRegisterIntermediateCA: jest.fn(),
|
|
37
|
-
};
|
|
38
33
|
const coreCrypto = {
|
|
39
34
|
getUserIdentities: jest.fn(),
|
|
40
35
|
getClientIds: jest.fn().mockResolvedValue([]),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
e2eiIsPKIEnvSetup: jest.fn(),
|
|
37
|
+
e2eiRegisterAcmeCA: jest.fn(),
|
|
38
|
+
e2eiRegisterIntermediateCA: jest.fn(),
|
|
44
39
|
};
|
|
45
40
|
const clientService = {};
|
|
46
41
|
const mockedDb = await (0, CoreDB_1.openDB)(dbName);
|
|
@@ -58,7 +53,7 @@ async function buildE2EIService(dbName = 'core-test-db') {
|
|
|
58
53
|
});
|
|
59
54
|
return [
|
|
60
55
|
new E2EIServiceExternal_1.E2EIServiceExternal(coreCrypto, mockedDb, recurringTaskScheduler, clientService, mockedMLSService),
|
|
61
|
-
{ coreCrypto, mlsService: mockedMLSService, recurringTaskScheduler
|
|
56
|
+
{ coreCrypto, mlsService: mockedMLSService, recurringTaskScheduler },
|
|
62
57
|
];
|
|
63
58
|
}
|
|
64
59
|
function generateCoreCryptoIdentity({ userId, status = 'Valid', deviceId = (0, PayloadHelper_1.getUUID)(), }) {
|
|
@@ -116,7 +111,7 @@ describe('E2EIServiceExternal', () => {
|
|
|
116
111
|
`${user1.id}:74a50c1f4352b41f@elna.wire.link`,
|
|
117
112
|
`${user2.id}:452cb4c65f0369a8@elna.wire.link`,
|
|
118
113
|
];
|
|
119
|
-
coreCrypto.getClientIds.mockResolvedValue(allClients.map(clientId =>
|
|
114
|
+
coreCrypto.getClientIds.mockResolvedValue(allClients.map(clientId => encoder.encode(clientId)));
|
|
120
115
|
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(true);
|
|
121
116
|
const userIdentities = await service.getUsersIdentities(groupId, userIds);
|
|
122
117
|
expect(userIdentities?.get((0, qualifiedIdUtil_1.stringifyQualifiedId)(user1))).toHaveLength(3);
|
|
@@ -192,24 +187,24 @@ describe('E2EIServiceExternal', () => {
|
|
|
192
187
|
});
|
|
193
188
|
it('registers the server certificates and shedules a timer to refresh intermediate certs every', async () => {
|
|
194
189
|
jest.useFakeTimers();
|
|
195
|
-
const [service, {
|
|
196
|
-
jest.spyOn(
|
|
190
|
+
const [service, { coreCrypto }] = await buildE2EIService('mockedDB1');
|
|
191
|
+
jest.spyOn(coreCrypto, 'e2eiIsPKIEnvSetup').mockResolvedValueOnce(false);
|
|
197
192
|
await service.initialize('https://some.crl.discovery.url');
|
|
198
|
-
expect(
|
|
199
|
-
expect(
|
|
200
|
-
expect(
|
|
201
|
-
expect(
|
|
193
|
+
expect(coreCrypto.e2eiRegisterAcmeCA).toHaveBeenCalledWith(mockedRootCA);
|
|
194
|
+
expect(coreCrypto.e2eiRegisterIntermediateCA).toHaveBeenCalledWith(federatedCerts[0]);
|
|
195
|
+
expect(coreCrypto.e2eiRegisterIntermediateCA).toHaveBeenCalledWith(federatedCerts[1]);
|
|
196
|
+
expect(coreCrypto.e2eiRegisterIntermediateCA).toHaveBeenCalledTimes(2);
|
|
202
197
|
await jest.advanceTimersByTimeAsync(TimeUtil_1.TimeInMillis.DAY);
|
|
203
198
|
await jest.runAllTimersAsync();
|
|
204
|
-
expect(
|
|
199
|
+
expect(coreCrypto.e2eiRegisterIntermediateCA).toHaveBeenCalledTimes(4);
|
|
205
200
|
});
|
|
206
201
|
it('does not register the root cert if it was already registered', async () => {
|
|
207
202
|
jest.useFakeTimers();
|
|
208
|
-
const [service, {
|
|
209
|
-
jest.spyOn(
|
|
203
|
+
const [service, { coreCrypto }] = await buildE2EIService('mockedDB2');
|
|
204
|
+
jest.spyOn(coreCrypto, 'e2eiIsPKIEnvSetup').mockResolvedValueOnce(true);
|
|
210
205
|
await service.initialize('https://some.crl.discovery.url');
|
|
211
|
-
expect(
|
|
212
|
-
expect(
|
|
206
|
+
expect(coreCrypto.e2eiRegisterAcmeCA).not.toHaveBeenCalled();
|
|
207
|
+
expect(coreCrypto.e2eiRegisterIntermediateCA).toHaveBeenCalledTimes(2);
|
|
213
208
|
});
|
|
214
209
|
});
|
|
215
210
|
});
|
|
@@ -6,9 +6,6 @@ export type getTokenCallback = (challengesData?: {
|
|
|
6
6
|
challenge: any;
|
|
7
7
|
keyAuth: string;
|
|
8
8
|
}) => Promise<string | undefined>;
|
|
9
|
-
export type getAllConversationsCallback = () => Promise<{
|
|
10
|
-
group_id: string;
|
|
11
|
-
}[]>;
|
|
12
9
|
export declare class E2EIServiceInternal {
|
|
13
10
|
private readonly coreCryptoClient;
|
|
14
11
|
private readonly apiClient;
|
|
@@ -27,10 +24,7 @@ export declare class E2EIServiceInternal {
|
|
|
27
24
|
* @param getOAuthToken function called when the process needs an oauth token
|
|
28
25
|
* @param refresh should the process refresh the current certificate or get a new one
|
|
29
26
|
*/
|
|
30
|
-
generateCertificate(getOAuthToken: getTokenCallback, refresh: boolean,
|
|
31
|
-
newCrlDistributionPoints: import("@wireapp/core-crypto").NewCrlDistributionPoints;
|
|
32
|
-
keyPackages: Uint8Array[];
|
|
33
|
-
}>;
|
|
27
|
+
generateCertificate(getOAuthToken: getTokenCallback, refresh: boolean, ciphersuite: Ciphersuite): Promise<import("@wireapp/core-crypto").RotateBundle>;
|
|
34
28
|
private continueCertificateGeneration;
|
|
35
29
|
private initIdentity;
|
|
36
30
|
private getDirectory;
|
|
@@ -48,8 +42,8 @@ export declare class E2EIServiceInternal {
|
|
|
48
42
|
* Stores the received certificate data in local storage for later use
|
|
49
43
|
*
|
|
50
44
|
* @param oAuthIdToken
|
|
51
|
-
* @returns
|
|
45
|
+
* @returns RotateBundle
|
|
52
46
|
*/
|
|
53
|
-
private
|
|
47
|
+
private getRotateBundle;
|
|
54
48
|
}
|
|
55
49
|
//# sourceMappingURL=E2EIServiceInternal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIServiceInternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"E2EIServiceInternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAgB,WAAW,EAAE,UAAU,EAAiB,MAAM,qBAAqB,CAAC;AAS3F,OAAO,EAAqB,WAAW,EAAiC,MAAM,8BAA8B,CAAC;AAE7G,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,CAAC,cAAc,CAAC,EAAE;IAAC,SAAS,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AACnH,qBAAa,mBAAmB;IAO5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,wDAAwD;IACxD,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAX9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoE;IAC3F,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,iBAAiB,CAAiD;gBAGxE,MAAM,EAAE,YAAY,EACH,gBAAgB,EAAE,UAAU,EAC5B,SAAS,EAAE,SAAS;IACrC,wDAAwD;IACvC,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,WAAW;IAO3C;;;;OAIG;IACU,mBAAmB,CAAC,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW;YAkC9F,6BAA6B;YAQ7B,YAAY;YAoBZ,YAAY;YAUZ,eAAe;IAQ7B;;;;;OAKG;YACW,uBAAuB;IAyCrC;;;;;;;OAOG;YACW,eAAe;CAgE9B"}
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.E2EIServiceInternal = void 0;
|
|
22
22
|
const commons_1 = require("@wireapp/commons");
|
|
23
|
-
const core_crypto_1 = require("@wireapp/core-crypto");
|
|
24
23
|
const AcmeServer_1 = require("./Connection/AcmeServer");
|
|
25
|
-
const E2EIService_types_1 = require("./E2EIService.types");
|
|
26
24
|
const Helper_1 = require("./Helper");
|
|
27
25
|
const Account_1 = require("./Steps/Account");
|
|
28
26
|
const Authorization_1 = require("./Steps/Authorization");
|
|
@@ -57,7 +55,7 @@ class E2EIServiceInternal {
|
|
|
57
55
|
* @param getOAuthToken function called when the process needs an oauth token
|
|
58
56
|
* @param refresh should the process refresh the current certificate or get a new one
|
|
59
57
|
*/
|
|
60
|
-
async generateCertificate(getOAuthToken, refresh,
|
|
58
|
+
async generateCertificate(getOAuthToken, refresh, ciphersuite) {
|
|
61
59
|
const stashedEnrollmentData = await this.enrollmentStorage.getPendingEnrollmentData();
|
|
62
60
|
if (stashedEnrollmentData) {
|
|
63
61
|
// In case we have stashed data, we continue the enrollment flow (we are coming back from a redirect)
|
|
@@ -65,7 +63,7 @@ class E2EIServiceInternal {
|
|
|
65
63
|
if (!oAuthToken) {
|
|
66
64
|
throw new Error('No OAuthToken received for in progress enrollment process');
|
|
67
65
|
}
|
|
68
|
-
return this.continueCertificateGeneration(oAuthToken, stashedEnrollmentData
|
|
66
|
+
return this.continueCertificateGeneration(oAuthToken, stashedEnrollmentData);
|
|
69
67
|
}
|
|
70
68
|
// We first get the challenges needed to validate the user identity
|
|
71
69
|
const identity = await this.initIdentity(refresh, ciphersuite);
|
|
@@ -73,7 +71,7 @@ class E2EIServiceInternal {
|
|
|
73
71
|
const { keyauth, oidcChallenge } = enrollmentChallenges.authorization;
|
|
74
72
|
const challengeData = { challenge: oidcChallenge, keyAuth: keyauth };
|
|
75
73
|
// store auth data for continuing the flow later on (in case we are redirected to the identity provider)
|
|
76
|
-
const handle = await this.coreCryptoClient.
|
|
74
|
+
const handle = await this.coreCryptoClient.e2eiEnrollmentStash(identity);
|
|
77
75
|
const enrollmentData = {
|
|
78
76
|
handle,
|
|
79
77
|
...enrollmentChallenges,
|
|
@@ -84,19 +82,19 @@ class E2EIServiceInternal {
|
|
|
84
82
|
if (!oAuthToken) {
|
|
85
83
|
throw new Error('No OAuthToken received for in initial enrollment process');
|
|
86
84
|
}
|
|
87
|
-
return this.continueCertificateGeneration(oAuthToken, enrollmentData
|
|
85
|
+
return this.continueCertificateGeneration(oAuthToken, enrollmentData);
|
|
88
86
|
}
|
|
89
|
-
async continueCertificateGeneration(oAuthToken, enrollmentData
|
|
87
|
+
async continueCertificateGeneration(oAuthToken, enrollmentData) {
|
|
90
88
|
const handle = enrollmentData.handle;
|
|
91
|
-
const identity = await this.coreCryptoClient.
|
|
92
|
-
return this.
|
|
89
|
+
const identity = await this.coreCryptoClient.e2eiEnrollmentStashPop(handle);
|
|
90
|
+
return this.getRotateBundle(identity, oAuthToken, enrollmentData);
|
|
93
91
|
}
|
|
94
92
|
// ############ Internal Functions ############
|
|
95
93
|
async initIdentity(hasActiveCertificate, ciphersuite) {
|
|
96
94
|
const { user } = this.initialData;
|
|
97
95
|
return hasActiveCertificate
|
|
98
|
-
? this.coreCryptoClient.
|
|
99
|
-
: this.coreCryptoClient.
|
|
96
|
+
? this.coreCryptoClient.e2eiNewRotateEnrollment(this.certificateTtl, ciphersuite, user.displayName, user.handle, user.teamId)
|
|
97
|
+
: this.coreCryptoClient.e2eiNewActivationEnrollment(user.displayName, user.handle, this.certificateTtl, ciphersuite, user.teamId);
|
|
100
98
|
}
|
|
101
99
|
async getDirectory(identity, connection) {
|
|
102
100
|
const directory = await connection.getDirectory();
|
|
@@ -160,9 +158,9 @@ class E2EIServiceInternal {
|
|
|
160
158
|
* Stores the received certificate data in local storage for later use
|
|
161
159
|
*
|
|
162
160
|
* @param oAuthIdToken
|
|
163
|
-
* @returns
|
|
161
|
+
* @returns RotateBundle
|
|
164
162
|
*/
|
|
165
|
-
async
|
|
163
|
+
async getRotateBundle(identity, oAuthIdToken, enrollmentData) {
|
|
166
164
|
// Step 7: Do OIDC client challenge
|
|
167
165
|
const oidcData = await (0, OidcChallenge_1.doWireOidcChallenge)({
|
|
168
166
|
oAuthIdToken,
|
|
@@ -212,24 +210,7 @@ class E2EIServiceInternal {
|
|
|
212
210
|
throw new Error('Error while trying to continue OAuth flow. No certificate received');
|
|
213
211
|
}
|
|
214
212
|
// Step 10: Initialize MLS with the certificate
|
|
215
|
-
return this.coreCryptoClient.
|
|
216
|
-
const conversations = await getAllConversations();
|
|
217
|
-
const newCrlDistributionPoints = await cx.saveX509Credential(identity, certificate);
|
|
218
|
-
for (const conversation of conversations) {
|
|
219
|
-
if (Boolean(conversation.group_id?.length)) {
|
|
220
|
-
const idAsBytes = new TextEncoder().encode(conversation.group_id);
|
|
221
|
-
await cx.e2eiRotate(new core_crypto_1.ConversationId(idAsBytes));
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
this.logger.error('No group id found in conversation');
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
const keyPackages = await cx.clientKeypackages(cipherSuite, E2EIService_types_1.CredentialType.X509, this.keyPackagesAmount);
|
|
228
|
-
return {
|
|
229
|
-
newCrlDistributionPoints,
|
|
230
|
-
keyPackages,
|
|
231
|
-
};
|
|
232
|
-
});
|
|
213
|
+
return this.coreCryptoClient.e2eiRotateAll(identity, certificate, this.keyPackagesAmount);
|
|
233
214
|
}
|
|
234
215
|
}
|
|
235
216
|
exports.E2EIServiceInternal = E2EIServiceInternal;
|
|
@@ -9,12 +9,6 @@ type GetE2EIClientIdReturnType = {
|
|
|
9
9
|
export declare const getE2EIClientId: (clientId: string, userId: string, userDomain: string) => GetE2EIClientIdReturnType;
|
|
10
10
|
export declare const getSignatureAlgorithmForCiphersuite: (ciphersuite: Ciphersuite) => MLSPublicKeyAlgorithmKeys;
|
|
11
11
|
export declare const isMLSDevice: ({ mls_public_keys }: RegisteredClient, ciphersuite: Ciphersuite) => boolean;
|
|
12
|
-
export declare enum MLSDeviceStatus {
|
|
13
|
-
REGISTERED = "registered",
|
|
14
|
-
FRESH = "fresh",
|
|
15
|
-
MISMATCH = "mismatch"
|
|
16
|
-
}
|
|
17
|
-
export declare const getMLSDeviceStatus: ({ mls_public_keys }: RegisteredClient, ciphersuite: Ciphersuite, existingClientSignature: string) => MLSDeviceStatus;
|
|
18
12
|
export declare const isResponseStatusValid: (status: string | undefined) => boolean | "" | undefined;
|
|
19
13
|
export {};
|
|
20
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/E2EIdentityService/Helper/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,yBAAyB,EAAE,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAE3F,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAC,kBAAkB,EAAkC,MAAM,8CAA8C,CAAC;AAEjH,eAAO,MAAM,eAAe,SAAU,GAAG,KAAG,UAG3C,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,kBAAkB,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