@wireapp/core 30.13.0 → 31.0.0
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 +28 -22
- package/src/main/Account.d.ts +3 -3
- package/src/main/CoreError.d.ts +1 -1
- package/src/main/account/AccountService.d.ts +2 -2
- package/src/main/account/AccountService.ts +2 -2
- package/src/main/auth/LoginSanitizer.d.ts +1 -1
- package/src/main/broadcast/AvailabilityType.d.ts +1 -1
- package/src/main/broadcast/BroadcastService.d.ts +3 -3
- package/src/main/client/ClientBackendRepository.d.ts +2 -2
- package/src/main/client/ClientDatabaseRepository.d.ts +3 -3
- package/src/main/client/ClientInfo.d.ts +1 -1
- package/src/main/client/ClientService.d.ts +4 -4
- package/src/main/connection/ConnectionService.d.ts +1 -1
- package/src/main/conversation/AbortReason.d.ts +1 -1
- package/src/main/conversation/AssetService/AssetService.d.ts +4 -4
- package/src/main/conversation/ConversationService/ConversationService.d.ts +9 -28
- package/src/main/conversation/ConversationService/ConversationService.js +2 -309
- package/src/main/conversation/ConversationService/ConversationService.types.d.ts +2 -0
- package/src/main/conversation/ConversationService/messageGenerator.d.ts +9 -0
- package/src/main/conversation/ConversationService/messageGenerator.js +301 -0
- package/src/main/conversation/message/CompositeContentBuilder.d.ts +1 -1
- package/src/main/conversation/message/Message.d.ts +3 -3
- package/src/main/conversation/message/MessageBuilder.d.ts +6 -2
- package/src/main/conversation/message/MessageBuilder.js +3 -0
- package/src/main/conversation/message/MessageToProtoMapper.d.ts +2 -2
- package/src/main/conversation/message/OtrMessage.d.ts +2 -2
- package/src/main/conversation/message/PayloadBundle.d.ts +3 -3
- package/src/main/conversation/message/TeamMessage.d.ts +2 -2
- package/src/main/conversation/message/TextContentBuilder.d.ts +1 -1
- package/src/main/conversation/message/UserMessage.d.ts +2 -2
- package/src/main/cryptography/AssetCryptography/index.d.ts +1 -1
- package/src/main/cryptography/CryptographyDatabaseRepository.d.ts +1 -1
- package/src/main/cryptography/CryptographyService.d.ts +7 -7
- package/src/main/cryptography/GenericMessageMapper.d.ts +1 -1
- package/src/main/giphy/GiphyService.d.ts +2 -2
- package/src/main/mls/MLSService/MLSService.d.ts +1 -1
- package/src/main/notification/NotificationBackendRepository.d.ts +2 -2
- package/src/main/notification/NotificationDatabaseRepository.d.ts +3 -3
- package/src/main/notification/NotificationService.d.ts +4 -4
- package/src/main/self/SelfService.d.ts +2 -2
- package/src/main/team/TeamService.d.ts +2 -2
- package/src/main/test/CryptographyHelper.d.ts +1 -1
- package/src/main/user/UserService.d.ts +3 -3
- package/src/main/util/TypePredicateUtil.d.ts +2 -2
- package/CHANGELOG.md +0 -12419
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Text } from '@wireapp/protocol-messaging';
|
|
2
2
|
import { LegalHoldStatus } from '../content';
|
|
3
|
-
import
|
|
3
|
+
import { CompositeMessage } from './OtrMessage';
|
|
4
4
|
export declare class CompositeContentBuilder {
|
|
5
5
|
private readonly content;
|
|
6
6
|
private readonly payloadBundle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { OtrMessage } from './OtrMessage';
|
|
2
|
+
import { TeamMessage } from './TeamMessage';
|
|
3
|
+
import { UserMessage } from './UserMessage';
|
|
4
4
|
export declare type Message = OtrMessage | TeamMessage | UserMessage;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Confirmation } from '@wireapp/protocol-messaging';
|
|
2
2
|
import { AbortReason } from '..';
|
|
3
3
|
import { EncryptedAssetUploaded } from '../../cryptography';
|
|
4
|
-
import
|
|
4
|
+
import { ButtonActionConfirmationContent, ButtonActionContent, CallingContent, FileContent, FileMetaDataContent, ImageContent, KnockContent, LegalHoldStatus, LocationContent, ReactionContent } from '../content';
|
|
5
5
|
import { CompositeContentBuilder } from './CompositeContentBuilder';
|
|
6
|
-
import
|
|
6
|
+
import { ButtonActionConfirmationMessage, ButtonActionMessage, CallMessage, ConfirmationMessage, DeleteMessage, FileAssetAbortMessage, FileAssetMessage, FileAssetMetaDataMessage, ImageAssetMessageOutgoing, LocationMessage, PingMessage, ReactionMessage, ResetSessionMessage } from './OtrMessage';
|
|
7
7
|
import { TextContentBuilder } from './TextContentBuilder';
|
|
8
8
|
interface BaseOptions {
|
|
9
9
|
conversationId: string;
|
|
10
10
|
from: string;
|
|
11
11
|
messageId?: string;
|
|
12
12
|
}
|
|
13
|
+
interface CreateDeleteOption extends BaseOptions {
|
|
14
|
+
messageIdToDelete: string;
|
|
15
|
+
}
|
|
13
16
|
interface CreateImageOptions extends BaseOptions {
|
|
14
17
|
expectsReadConfirmation?: boolean;
|
|
15
18
|
asset: EncryptedAssetUploaded;
|
|
@@ -69,6 +72,7 @@ interface CreateActionMessageOptions extends BaseOptions {
|
|
|
69
72
|
export declare class MessageBuilder {
|
|
70
73
|
static createEditedText(payload: CreateEditedTextOptions): TextContentBuilder;
|
|
71
74
|
static createFileData(payload: CreateFileOptions): FileAssetMessage;
|
|
75
|
+
static createDelete(payload: CreateDeleteOption): DeleteMessage;
|
|
72
76
|
static createFileMetadata(payload: CreateFileMetadataOptions): FileAssetMetaDataMessage;
|
|
73
77
|
static createFileAbort(payload: CreateFileAbortOptions): FileAssetAbortMessage;
|
|
74
78
|
static createImage(payload: CreateImageOptions): ImageAssetMessageOutgoing;
|
|
@@ -53,6 +53,9 @@ class MessageBuilder {
|
|
|
53
53
|
legalHoldStatus,
|
|
54
54
|
}, id: originalMessageId, type: __1.PayloadBundleType.ASSET });
|
|
55
55
|
}
|
|
56
|
+
static createDelete(payload) {
|
|
57
|
+
return Object.assign(Object.assign({}, createCommonProperties(payload)), { content: { messageId: payload.messageIdToDelete }, type: __1.PayloadBundleType.MESSAGE_DELETE });
|
|
58
|
+
}
|
|
56
59
|
static createFileMetadata(payload) {
|
|
57
60
|
const { expectsReadConfirmation, legalHoldStatus, metaData } = payload;
|
|
58
61
|
return Object.assign(Object.assign({}, createCommonProperties(payload)), { content: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkPreview, Text } from '@wireapp/protocol-messaging';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { LinkPreviewUploadedContent } from '../content';
|
|
3
|
+
import { EditedTextMessage, TextMessage } from './OtrMessage';
|
|
4
4
|
export declare class MessageToProtoMapper {
|
|
5
5
|
static mapLinkPreviews(linkPreviews: LinkPreviewUploadedContent[]): LinkPreview[];
|
|
6
6
|
static mapText(payloadBundle: TextMessage | EditedTextMessage): Text;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AssetContent, ButtonActionContent, ButtonActionConfirmationContent, CallingContent, ClearedContent, ClientActionContent, CompositeContent, ConfirmationContent, DeletedContent, EditedTextContent, FileAssetAbortContent, FileAssetContent, FileAssetMetaDataContent, HiddenContent, ImageAssetContent, KnockContent, LocationContent, ReactionContent, TextContent } from '../content';
|
|
2
|
+
import { BasePayloadBundle, PayloadBundleType } from './PayloadBundle';
|
|
3
3
|
export interface TextMessage extends BasePayloadBundle {
|
|
4
4
|
content: TextContent;
|
|
5
5
|
type: PayloadBundleType.TEXT;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ConversationEventData, TeamEventData, UserEventData } from '@wireapp/api-client/src/event/';
|
|
2
2
|
import { QualifiedId } from '@wireapp/api-client/src/user';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { ConversationContent } from '../content';
|
|
4
|
+
import { Message } from './Message';
|
|
5
5
|
export declare type PayloadBundleContent = ConversationContent | ConversationEventData | TeamEventData | UserEventData;
|
|
6
6
|
export declare enum PayloadBundleSource {
|
|
7
7
|
LOCAL = "PayloadBundleSource.LOCAL",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TeamConversationCreateData, TeamConversationDeleteData, TeamMemberJoinData, TeamMemberLeaveData, TeamUpdateData } from '@wireapp/api-client/src/team/data';
|
|
2
|
+
import { BasePayloadBundle, PayloadBundleType } from './PayloadBundle';
|
|
3
3
|
export interface TeamConversationCreateMessage extends BasePayloadBundle {
|
|
4
4
|
content: TeamConversationCreateData;
|
|
5
5
|
type: PayloadBundleType.TEAM_CONVERSATION_CREATE;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LegalHoldStatus, LinkPreviewUploadedContent, MentionContent, QuoteContent } from '../content';
|
|
2
|
-
import
|
|
2
|
+
import { EditedTextMessage, TextMessage, QuotableMessage } from './OtrMessage';
|
|
3
3
|
export declare class TextContentBuilder {
|
|
4
4
|
private readonly content;
|
|
5
5
|
private readonly payloadBundle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { UserActivateData, UserClientAddData, UserClientRemoveData, UserConnectionData, UserDeleteData, UserLegalHoldDisableData, UserLegalHoldEnableData, UserLegalHoldRequestData, UserPropertiesSetData, UserUpdateData } from '@wireapp/api-client/src/user/data';
|
|
2
|
+
import { BasePayloadBundle, PayloadBundleType } from './PayloadBundle';
|
|
3
3
|
export interface UserActivateMessage extends BasePayloadBundle {
|
|
4
4
|
content: UserActivateData;
|
|
5
5
|
type: PayloadBundleType.USER_ACTIVATE;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { PreKey as SerializedPreKey } from '@wireapp/api-client/src/auth/';
|
|
3
|
+
import { RegisteredClient } from '@wireapp/api-client/src/client/';
|
|
4
|
+
import { OTRRecipients, QualifiedOTRRecipients, QualifiedUserClients, UserClients } from '@wireapp/api-client/src/conversation/';
|
|
5
|
+
import { ConversationOtrMessageAddEvent } from '@wireapp/api-client/src/event';
|
|
6
|
+
import { QualifiedId, QualifiedUserPreKeyBundleMap, UserPreKeyBundleMap } from '@wireapp/api-client/src/user/';
|
|
7
7
|
import { Cryptobox } from '@wireapp/cryptobox';
|
|
8
8
|
import { GenericMessage } from '@wireapp/protocol-messaging';
|
|
9
|
-
import
|
|
9
|
+
import { CRUDEngine } from '@wireapp/store-engine';
|
|
10
10
|
import { PayloadBundle, PayloadBundleSource } from '../conversation';
|
|
11
11
|
export declare type DecryptionError = {
|
|
12
12
|
code: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ConversationOtrMessageAddEvent } from '@wireapp/api-client/src/event/';
|
|
2
2
|
import { PayloadBundle, PayloadBundleSource } from '../conversation';
|
|
3
3
|
export declare class GenericMessageMapper {
|
|
4
4
|
private static readonly logger;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { GiphySearchOptions, GiphyMultipleResult, GiphyResult, GIPHY_RATING } from '@wireapp/api-client/src/giphy/';
|
|
3
3
|
export declare class GiphyService {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AddProposalArgs, ConversationConfiguration, ConversationId, CoreCrypto, DecryptedMessage, ExternalProposalArgs, ExternalProposalType, ExternalRemoveProposalArgs, Invitee, ProposalArgs, ProposalType, RemoveProposalArgs } from '@wireapp/core-crypto';
|
|
2
2
|
import { APIClient } from '@wireapp/api-client';
|
|
3
3
|
import { QualifiedUsers } from '../../conversation';
|
|
4
|
-
import
|
|
4
|
+
import { MLSCallbacks, MLSConfig } from '../types';
|
|
5
5
|
import { PostMlsMessageResponse } from '@wireapp/api-client/src/conversation';
|
|
6
6
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
7
7
|
export declare class MLSService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { Notification } from '@wireapp/api-client/src/notification/';
|
|
3
3
|
export declare class NotificationBackendRepository {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { BackendEvent } from '@wireapp/api-client/src/event';
|
|
2
|
+
import { Notification } from '@wireapp/api-client/src/notification/';
|
|
3
|
+
import { CRUDEngine } from '@wireapp/store-engine';
|
|
4
4
|
import { CommonMLS, StorePendingProposalsParams } from './types';
|
|
5
5
|
export declare enum DatabaseStores {
|
|
6
6
|
EVENTS = "events"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
2
|
+
import { APIClient } from '@wireapp/api-client';
|
|
3
3
|
import * as Events from '@wireapp/api-client/src/event';
|
|
4
|
-
import
|
|
4
|
+
import { Notification } from '@wireapp/api-client/src/notification/';
|
|
5
5
|
import { CRUDEngine } from '@wireapp/store-engine';
|
|
6
6
|
import { EventEmitter } from 'events';
|
|
7
7
|
import { PayloadBundle, PayloadBundleSource } from '../conversation';
|
|
8
8
|
import { NotificationError } from '../CoreError';
|
|
9
|
-
import
|
|
9
|
+
import { CryptographyService } from '../cryptography';
|
|
10
10
|
import { GenericMessage } from '@wireapp/protocol-messaging';
|
|
11
11
|
import { AbortHandler } from '@wireapp/api-client/src/tcp';
|
|
12
12
|
import { CommitPendingProposalsParams, LastKeyMaterialUpdateParams } from './types';
|
|
13
|
-
import
|
|
13
|
+
import { MLSService } from '../mls';
|
|
14
14
|
export declare type HandledEventPayload = {
|
|
15
15
|
event: Events.BackendEvent;
|
|
16
16
|
mappedEvent?: PayloadBundle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { Self } from '@wireapp/api-client/src/self/';
|
|
3
3
|
export declare class SelfService {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { MemberData, Members, NewTeamData, TeamChunkData, TeamData, UpdateTeamData } from '@wireapp/api-client/src/team/';
|
|
3
3
|
export declare class TeamService {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { keys } from '@wireapp/proteus';
|
|
2
|
-
import
|
|
2
|
+
import { CryptographyService } from '../cryptography';
|
|
3
3
|
export declare function createEncodedCipherText(receiver: keys.IdentityKeyPair, preKey: keys.PreKey, text: string): Promise<string>;
|
|
4
4
|
export declare function getPlainText(cryptographyService: CryptographyService, encodedPreKeyMessage: string, sessionId?: string): Promise<string | void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { QualifiedId, User } from '@wireapp/api-client/src/user/';
|
|
3
|
+
import { AvailabilityType, BroadcastService } from '../broadcast/';
|
|
4
4
|
import { ConnectionService } from '../connection';
|
|
5
5
|
import { ConversationService } from '../conversation';
|
|
6
6
|
export declare class UserService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { QualifiedUserClients, UserClients } from '@wireapp/api-client/src/conversation/';
|
|
2
|
+
import { QualifiedId } from '@wireapp/api-client/src/user/';
|
|
3
3
|
export declare function isStringArray(obj: any): obj is string[];
|
|
4
4
|
export declare function isQualifiedId(obj: any): obj is QualifiedId;
|
|
5
5
|
export declare function isQualifiedIdArray(obj: any): obj is QualifiedId[];
|