import { SUBCONVERSATION_ID } from '@wireapp/api-client/lib/conversation'; import { QualifiedId } from '@wireapp/api-client/lib/user'; import { APIClient } from '@wireapp/api-client'; import { TypedEventEmitter } from '@wireapp/commons'; import { MLSService } from '../../messagingProtocols/mls'; import { CoreDatabase } from '../../storage/CoreDB'; type Events = { MLSConversationRecovered: { conversationId: QualifiedId; }; }; export interface SubconversationEpochInfoMember { userid: string; clientid: string; in_subconv: boolean; } export declare class SubconversationService extends TypedEventEmitter { private readonly apiClient; private readonly coreDatabase; private readonly _mlsService?; private readonly logger; constructor(apiClient: APIClient, coreDatabase: CoreDatabase, _mlsService?: MLSService | undefined); get mlsService(): MLSService; /** * Will join or register an mls subconversation for conference calls. * Will return the secret key derived from the subconversation * * @param conversationId Id of the parent conversation in which the call should happen * @param groupId groupId of the parent conversation in which the call should happen */ joinConferenceSubconversation(conversationId: QualifiedId, groupId: string, shouldRetry?: boolean): Promise<{ groupId: string; epoch: number; }>; /** * Will leave conference subconversation if it's known by client and established. * * @param conversationId Id of the parent conversation which subconversation we want to leave */ leaveConferenceSubconversation(conversationId: QualifiedId): Promise; leaveStaleConferenceSubconversations(): Promise; getSubconversationEpochInfo(parentConversationId: QualifiedId, parentConversationGroupId: string, shouldAdvanceEpoch?: boolean): Promise<{ members: SubconversationEpochInfoMember[]; epoch: number; secretKey: string; keyLength: number; } | null>; subscribeToEpochUpdates(parentConversationId: QualifiedId, parentConversationGroupId: string, findConversationByGroupId: (groupId: string) => QualifiedId | undefined, onEpochUpdate: (info: { members: SubconversationEpochInfoMember[]; epoch: number; secretKey: string; keyLength: number; }) => void): Promise<() => void>; removeClientFromConferenceSubconversation(conversationId: QualifiedId, clientToRemove: { user: QualifiedId; clientId: string; }): Promise; private joinSubconversationByExternalCommit; private getConferenceSubconversation; private deleteConferenceSubconversation; private generateSubconversationMembers; getSubconversationGroupId: (parentConversationId: QualifiedId, subconversationId: SUBCONVERSATION_ID) => Promise; getAllGroupIdsBySubconversationId: (subconversationId: SUBCONVERSATION_ID) => Promise<{ parentConversationId: QualifiedId; subconversationId: SUBCONVERSATION_ID; groupId: string; }[]>; saveSubconversationGroupId: (parentConversationId: QualifiedId, subconversationId: SUBCONVERSATION_ID, groupId: string) => Promise; clearSubconversationGroupId: (parentConversationId: QualifiedId, subconversationId: SUBCONVERSATION_ID) => Promise; } export {}; //# sourceMappingURL=SubconversationService.d.ts.map