@wireapp/core 46.46.6-beta.14.f6fd03fe6 → 46.46.6
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 +156 -51
- package/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +503 -127
- package/lib/Account.test.js +158 -147
- 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 +4 -3
- package/lib/client/ClientService.d.ts.map +1 -1
- package/lib/client/ClientService.js +19 -5
- package/lib/conversation/AbortReason.d.ts +1 -1
- package/lib/conversation/AbortReason.d.ts.map +1 -1
- package/lib/conversation/AssetService/AssetService.d.ts +12 -30
- package/lib/conversation/AssetService/AssetService.d.ts.map +1 -1
- package/lib/conversation/AssetService/AssetService.js +1 -10
- package/lib/conversation/AssetService/AssetService.test.js +8 -3
- 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 +98 -14
- package/lib/conversation/ConversationService/ConversationService.d.ts.map +1 -1
- package/lib/conversation/ConversationService/ConversationService.js +314 -101
- package/lib/conversation/ConversationService/ConversationService.test.js +441 -47
- package/lib/conversation/ConversationService/ConversationService.types.d.ts +5 -4
- 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 +6 -3
- package/lib/conversation/SubconversationService/SubconversationService.d.ts.map +1 -1
- package/lib/conversation/SubconversationService/SubconversationService.js +158 -11
- package/lib/conversation/SubconversationService/SubconversationService.test.js +8 -2
- 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 +7 -1
- 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 +9 -0
- 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 +2 -1
- 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 +13 -11
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.test.js +21 -16
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +9 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +31 -12
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts +6 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.js +19 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts +7 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.js +48 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.d.ts +2 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/{IncomingMessagesQueue → IncomingProposalsQueue}/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/{IncomingMessagesQueue → IncomingProposalsQueue}/index.js +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.d.ts +0 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/index.js +0 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.js +23 -14
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.js +5 -2
- package/lib/messagingProtocols/mls/EventHandler/events/welcomeMessage/welcomeMessage.test.js +13 -3
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.d.ts +38 -2
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.js +41 -6
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.d.ts +2 -0
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/MLSService/CoreCryptoMLSError.test.js +124 -0
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +38 -34
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +267 -208
- package/lib/messagingProtocols/mls/MLSService/MLSService.test.js +157 -160
- 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/recovery/MlsErrorMapper.d.ts +78 -0
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.js +173 -0
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.d.ts +2 -0
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/recovery/MlsErrorMapper.test.js +117 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.d.ts +167 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.js +317 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.d.ts +2 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/recovery/MlsRecoveryOrchestrator.test.js +248 -0
- package/lib/messagingProtocols/mls/recovery/index.d.ts +5 -0
- package/lib/messagingProtocols/mls/recovery/index.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/recovery/index.js +28 -0
- package/lib/messagingProtocols/mls/types.d.ts +0 -8
- 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 +7 -1
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.d.ts +8 -15
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper/CoreCryptoWrapper.js +97 -62
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoClient.types.d.ts +0 -6
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoClient.types.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.d.ts +1 -6
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/DecryptionErrorGenerator/DecryptionErrorGenerator.js +19 -22
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts +5 -3
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.js +11 -24
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.d.ts +1 -0
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.mocks.js +11 -2
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.test.js +13 -9
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts +3 -2
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/WithMockedGenerics.test.js +11 -4
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.d.ts +0 -4
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/cryptoMigrationStateStore.js +0 -5
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.d.ts +2 -1
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/identityClearer.js +8 -2
- package/lib/messagingProtocols/proteus/Utility/SessionHandler/SessionHandler.test.js +4 -0
- 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 +20 -6
- package/lib/notification/NotificationService.d.ts.map +1 -1
- package/lib/notification/NotificationService.js +23 -14
- package/lib/notification/NotificationService.test.js +8 -0
- package/lib/secretStore/secretKeyGenerator.d.ts +1 -0
- package/lib/secretStore/secretKeyGenerator.d.ts.map +1 -1
- package/lib/secretStore/secretKeyGenerator.js +3 -1
- package/lib/self/SelfService.d.ts +2 -2
- package/lib/self/SelfService.d.ts.map +1 -1
- package/lib/self/SelfService.test.js +5 -2
- package/lib/team/TeamService.d.ts +5 -2
- package/lib/team/TeamService.d.ts.map +1 -1
- package/lib/team/TeamService.js +12 -2
- package/lib/test/StoreHelper.d.ts +2 -0
- package/lib/test/StoreHelper.d.ts.map +1 -0
- package/lib/test/StoreHelper.js +27 -0
- 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/IncomingMessagesQueue/IncomingMesssagesQueue.d.ts +0 -4
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/IncomingMesssagesQueue.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/IncomingMesssagesQueue.js +0 -69
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingMessagesQueue/index.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.d.ts.map +0 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.test.js +0 -98
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { MLSPublicKeyRecord, RegisteredClient } from '@wireapp/api-client/lib/client';
|
|
2
|
-
import {
|
|
2
|
+
import { SUBCONVERSATION_ID } from '@wireapp/api-client/lib/conversation';
|
|
3
3
|
import { ConversationMLSMessageAddEvent, ConversationMLSWelcomeEvent } from '@wireapp/api-client/lib/event';
|
|
4
4
|
import { QualifiedId } from '@wireapp/api-client/lib/user';
|
|
5
5
|
import { APIClient } from '@wireapp/api-client';
|
|
6
6
|
import { TypedEventEmitter } from '@wireapp/commons';
|
|
7
|
-
import {
|
|
7
|
+
import { Ciphersuite, ConversationId, CoreCrypto, DecryptedMessage } from '@wireapp/core-crypto';
|
|
8
8
|
import { AddUsersFailure, KeyPackageClaimUser } from '../../../conversation';
|
|
9
9
|
import { CoreDatabase } from '../../../storage/CoreDB';
|
|
10
10
|
import { RecurringTaskScheduler } from '../../../util/RecurringTaskScheduler';
|
|
11
11
|
import { User } from '../E2EIdentityService';
|
|
12
|
-
import { getTokenCallback } from '../E2EIdentityService/E2EIServiceInternal';
|
|
12
|
+
import { getAllConversationsCallback, getTokenCallback } from '../E2EIdentityService/E2EIServiceInternal';
|
|
13
13
|
import { ClientId, HandlePendingProposalsParams } from '../types';
|
|
14
14
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
15
15
|
interface MLSConfig {
|
|
@@ -30,12 +30,28 @@ export type InitClientOptions = Optional<MLSConfig, 'keyingMaterialUpdateThresho
|
|
|
30
30
|
skipInitIdentity?: boolean;
|
|
31
31
|
};
|
|
32
32
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
33
|
+
export declare enum MLSServiceEvents {
|
|
34
|
+
NEW_EPOCH = "newEpoch",
|
|
35
|
+
MLS_CLIENT_MISMATCH = "mlsClientMismatch",
|
|
36
|
+
NEW_CRL_DISTRIBUTION_POINTS = "newCrlDistributionPoints",
|
|
37
|
+
MLS_EVENT_DISTRIBUTED = "mlsEventDistributed",
|
|
38
|
+
KEY_MATERIAL_UPDATE_FAILURE = "keyMaterialUpdateFailure"
|
|
39
|
+
}
|
|
33
40
|
type Events = {
|
|
34
|
-
|
|
41
|
+
[MLSServiceEvents.KEY_MATERIAL_UPDATE_FAILURE]: {
|
|
42
|
+
error: unknown;
|
|
43
|
+
groupId: string;
|
|
44
|
+
};
|
|
45
|
+
[MLSServiceEvents.NEW_EPOCH]: {
|
|
35
46
|
epoch: number;
|
|
36
47
|
groupId: string;
|
|
37
48
|
};
|
|
38
|
-
|
|
49
|
+
[MLSServiceEvents.NEW_CRL_DISTRIBUTION_POINTS]: string[];
|
|
50
|
+
[MLSServiceEvents.MLS_CLIENT_MISMATCH]: void;
|
|
51
|
+
[MLSServiceEvents.MLS_EVENT_DISTRIBUTED]: {
|
|
52
|
+
events: any;
|
|
53
|
+
time: string;
|
|
54
|
+
};
|
|
39
55
|
};
|
|
40
56
|
export declare class MLSService extends TypedEventEmitter<Events> {
|
|
41
57
|
private readonly apiClient;
|
|
@@ -46,7 +62,6 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
46
62
|
private _config?;
|
|
47
63
|
private readonly textEncoder;
|
|
48
64
|
private readonly textDecoder;
|
|
49
|
-
private readonly conflictBackoffQueue;
|
|
50
65
|
constructor(apiClient: APIClient, coreCryptoClient: CoreCrypto, coreDatabase: CoreDatabase, recurringTaskScheduler: RecurringTaskScheduler);
|
|
51
66
|
/**
|
|
52
67
|
* return true if the MLS service if configured and ready to be used
|
|
@@ -67,7 +82,6 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
67
82
|
*/
|
|
68
83
|
isInitializedMLSClient: (client: RegisteredClient) => boolean;
|
|
69
84
|
private getCredentialType;
|
|
70
|
-
private uploadCommitBundle;
|
|
71
85
|
private readonly _uploadCommitBundle;
|
|
72
86
|
/**
|
|
73
87
|
* Will add users to an existing MLS group and send a commit bundle to backend.
|
|
@@ -76,32 +90,25 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
76
90
|
* @param groupId - the group id of the MLS group
|
|
77
91
|
* @param keyPackages - the list of keys of clients to add to the MLS group
|
|
78
92
|
*/
|
|
79
|
-
addUsersToExistingConversation(groupId: string, keyPackages: Uint8Array[]): Promise<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
addUsersToExistingConversation(groupId: string, keyPackages: Uint8Array[]): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Will return a list of client ids which are already in the group at core crypto level
|
|
96
|
+
*
|
|
97
|
+
* @param groupId - the group id of the MLS group
|
|
98
|
+
* @returns list of client ids
|
|
99
|
+
*/
|
|
100
|
+
getClientIdsInGroup(groupId: string): Promise<string[]>;
|
|
101
|
+
getKeyPackagesPayload(qualifiedUsers: KeyPackageClaimUser[], skipClientIds?: string[]): Promise<{
|
|
83
102
|
keyPackages: Uint8Array[];
|
|
84
103
|
failures: AddUsersFailure[];
|
|
85
104
|
}>;
|
|
86
105
|
getEpoch(groupId: string | Uint8Array): Promise<number>;
|
|
87
|
-
|
|
88
|
-
joinByExternalCommit(getGroupInfo: () => Promise<Uint8Array>): Promise<PostMlsMessageResponse>;
|
|
106
|
+
joinByExternalCommit(getGroupInfo: () => Promise<Uint8Array>): Promise<void>;
|
|
89
107
|
exportSecretKey(groupId: string, keyLength: number): Promise<string>;
|
|
90
108
|
private dispatchNewCrlDistributionPoints;
|
|
91
109
|
processWelcomeMessage(welcomeMessage: Uint8Array): Promise<ConversationId>;
|
|
92
|
-
decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage>;
|
|
110
|
+
decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage | undefined>;
|
|
93
111
|
encryptMessage(conversationId: ConversationId, message: Uint8Array): Promise<Uint8Array>;
|
|
94
|
-
/**
|
|
95
|
-
* Will wrap a coreCrypto call that generates a CommitBundle and do all the necessary work so that commitbundle is handled the right way.
|
|
96
|
-
* It does:
|
|
97
|
-
* - commit the pending proposal
|
|
98
|
-
* - then generates the commitBundle with the given function
|
|
99
|
-
* - uploads the commitBundle to backend
|
|
100
|
-
* - warns coreCrypto that the commit was successfully processed
|
|
101
|
-
* @param groupId
|
|
102
|
-
* @param generateCommit The function that will generate a coreCrypto CommitBundle
|
|
103
|
-
*/
|
|
104
|
-
private processCommitAction;
|
|
105
112
|
private updateKeyingMaterial;
|
|
106
113
|
/**
|
|
107
114
|
* Will create an empty conversation inside of coreCrypto.
|
|
@@ -122,9 +129,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
122
129
|
client?: string;
|
|
123
130
|
};
|
|
124
131
|
parentGroupId?: string;
|
|
125
|
-
}): Promise<
|
|
126
|
-
failures: AddUsersFailure[];
|
|
127
|
-
}>;
|
|
132
|
+
}): Promise<AddUsersFailure[]>;
|
|
128
133
|
/**
|
|
129
134
|
* Will create a 1:1 conversation inside of coreCrypto, try claiming key packages for user and (if succesfull) add them to the MLS group.
|
|
130
135
|
* @param groupId the id of the group to create inside of coreCrypto
|
|
@@ -134,9 +139,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
134
139
|
register1to1Conversation(groupId: string, userId: QualifiedId, selfUser: {
|
|
135
140
|
user: QualifiedId;
|
|
136
141
|
client: string;
|
|
137
|
-
}, removalKeyFor1to1Signature?: MLSPublicKeyRecord): Promise<
|
|
138
|
-
failures: AddUsersFailure[];
|
|
139
|
-
}>;
|
|
142
|
+
}, removalKeyFor1to1Signature?: MLSPublicKeyRecord): Promise<AddUsersFailure[]>;
|
|
140
143
|
/**
|
|
141
144
|
* Will try to register mls group and send an empty commit to establish it.
|
|
142
145
|
*
|
|
@@ -149,7 +152,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
149
152
|
* @param groupId groupId of the conversation
|
|
150
153
|
* @param clientIds the list of **qualified** ids of the clients we want to remove from the group
|
|
151
154
|
*/
|
|
152
|
-
removeClientsFromConversation(groupId: string, clientIds: ClientId[]): Promise<
|
|
155
|
+
removeClientsFromConversation(groupId: string, clientIds: ClientId[]): Promise<void>;
|
|
153
156
|
/**
|
|
154
157
|
* Will check if mls group exists in corecrypto.
|
|
155
158
|
* @param groupId groupId of the conversation
|
|
@@ -204,6 +207,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
204
207
|
private verifyLocalMLSKeyPackagesAmount;
|
|
205
208
|
private verifyRemoteMLSKeyPackagesAmount;
|
|
206
209
|
private getRemoteMLSKeyPackageCount;
|
|
210
|
+
private getCCClientSignatureString;
|
|
207
211
|
/**
|
|
208
212
|
* Will update the given client on backend with its public key.
|
|
209
213
|
*
|
|
@@ -231,7 +235,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
231
235
|
*
|
|
232
236
|
* @param groupId groupId of the conversation
|
|
233
237
|
*/
|
|
234
|
-
commitPendingProposals(groupId: string, shouldRetry?: boolean): Promise<void>;
|
|
238
|
+
commitPendingProposals(groupId: string, shouldRetry?: boolean, params?: any): Promise<void>;
|
|
235
239
|
/**
|
|
236
240
|
* Get all pending proposals from the database and schedule them
|
|
237
241
|
* Function must only be called once, after application start
|
|
@@ -259,7 +263,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
259
263
|
* @param oAuthIdToken The OAuth id token if the user is already authenticated
|
|
260
264
|
* @returns AcmeChallenge if the user is not authenticated, true if the user is authenticated
|
|
261
265
|
*/
|
|
262
|
-
enrollE2EI(discoveryUrl: string, user: User, client: RegisteredClient, nbPrekeys: number, certificateTtl: number, getOAuthToken: getTokenCallback): Promise<void>;
|
|
266
|
+
enrollE2EI(discoveryUrl: string, user: User, client: RegisteredClient, nbPrekeys: number, certificateTtl: number, getOAuthToken: getTokenCallback, getAllConversations: getAllConversationsCallback): Promise<void>;
|
|
263
267
|
}
|
|
264
268
|
export {};
|
|
265
269
|
//# sourceMappingURL=MLSService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAqB,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAC7G,OAAO,
|
|
1
|
+
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAqB,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAC7G,OAAO,EAKL,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAC,8BAA8B,EAAE,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAuB,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,WAAW,EAIX,cAAc,EACd,UAAU,EAEV,gBAAgB,EASjB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,EAAC,eAAe,EAA0B,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAEL,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,2CAA2C,CAAC;AAQ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