@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
package/package.json
CHANGED
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
"./src/main/cryptography/AssetCryptography/crypto.node": "./src/main/cryptography/AssetCryptography/crypto.browser.js"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"@
|
|
8
|
-
"@types/node": "~14",
|
|
9
|
-
"@wireapp/api-client": "20.4.1",
|
|
10
|
-
"@wireapp/commons": "4.3.1",
|
|
6
|
+
"@wireapp/api-client": "workspace:^",
|
|
7
|
+
"@wireapp/commons": "workspace:^",
|
|
11
8
|
"@wireapp/core-crypto": "0.5.0",
|
|
12
9
|
"@wireapp/cryptobox": "12.8.0",
|
|
13
|
-
"@wireapp/promise-queue": "
|
|
14
|
-
"@wireapp/store-engine-dexie": "
|
|
15
|
-
"
|
|
10
|
+
"@wireapp/promise-queue": "workspace:^",
|
|
11
|
+
"@wireapp/store-engine-dexie": "workspace:^",
|
|
12
|
+
"axios": "^0.27.2",
|
|
13
|
+
"bazinga64": "5.11.0",
|
|
16
14
|
"hash.js": "1.1.7",
|
|
17
15
|
"http-status-codes": "2.1.4",
|
|
18
16
|
"idb": "7.0.2",
|
|
@@ -22,12 +20,20 @@
|
|
|
22
20
|
"uuidjs": "4.2.8"
|
|
23
21
|
},
|
|
24
22
|
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.19.1",
|
|
24
|
+
"@babel/preset-env": "^7.19.1",
|
|
25
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
26
|
+
"@open-wc/webpack-import-meta-loader": "0.4.7",
|
|
27
|
+
"@types/babel__core": "^7",
|
|
25
28
|
"@types/faker": "5.5.7",
|
|
26
29
|
"@types/jest": "29.0.3",
|
|
27
|
-
"@types/karma": "6.3.
|
|
30
|
+
"@types/karma": "6.3.3",
|
|
31
|
+
"@types/long": "4.0.1",
|
|
32
|
+
"@types/node": "^14.18.29",
|
|
28
33
|
"@types/tough-cookie": "4.0.2",
|
|
29
|
-
"@wireapp/commons": "
|
|
30
|
-
"@wireapp/
|
|
34
|
+
"@wireapp/commons": "workspace:^",
|
|
35
|
+
"@wireapp/protocol-messaging": "1.38.0",
|
|
36
|
+
"@wireapp/store-engine-dexie": "workspace:^",
|
|
31
37
|
"commander": "8.0.0",
|
|
32
38
|
"cross-env": "7.0.3",
|
|
33
39
|
"dotenv-defaults": "2.0.2",
|
|
@@ -37,12 +43,12 @@
|
|
|
37
43
|
"jest": "29.0.3",
|
|
38
44
|
"jest-babel": "1.0.1",
|
|
39
45
|
"jest-jasmine2": "29.0.3",
|
|
40
|
-
"karma": "6.
|
|
41
|
-
"karma-chrome-launcher": "3.1.
|
|
42
|
-
"karma-jasmine": "4.0.
|
|
46
|
+
"karma": "6.4.1",
|
|
47
|
+
"karma-chrome-launcher": "3.1.1",
|
|
48
|
+
"karma-jasmine": "4.0.2",
|
|
43
49
|
"karma-jasmine-diff-reporter": "2.0.1",
|
|
44
50
|
"karma-sourcemap-loader": "0.3.8",
|
|
45
|
-
"karma-spec-reporter": "0.0.
|
|
51
|
+
"karma-spec-reporter": "0.0.34",
|
|
46
52
|
"mock-socket": "9.0.3",
|
|
47
53
|
"nock": "13.1.1",
|
|
48
54
|
"nyc": "15.1.0",
|
|
@@ -65,16 +71,16 @@
|
|
|
65
71
|
"scripts": {
|
|
66
72
|
"build": "tsc",
|
|
67
73
|
"clean": "rimraf .tmp \"src/main/{!(*.test*).js,*.js.map,*.d.ts}\" \"src/main/test/{*.js.map,*.d.ts}\" \"src/main/!(test)/{!(*.test*).js,*.js.map,*.d.ts}\" \"src/main/**/{!(*.test*|AccountHelper|StoreHelper).js,*.js.map,*.d.ts}\" \"src/main/**/*.node.js\"",
|
|
68
|
-
"coverage": "cross-env JASMINE_CONFIG_PATH=src/test/node/support/jasmine.json istanbul cover --report html
|
|
69
|
-
"demo:composite": "cross-env NODE_DEBUG
|
|
70
|
-
"demo:sendCounter": "cross-env NODE_DEBUG
|
|
74
|
+
"coverage": "cross-env JASMINE_CONFIG_PATH=src/test/node/support/jasmine.json istanbul cover --report html node_modules/jasmine/bin/jasmine.js",
|
|
75
|
+
"demo:composite": "cross-env NODE_DEBUG='@wireapp*' ts-node src/demo/composite.ts",
|
|
76
|
+
"demo:sendCounter": "cross-env NODE_DEBUG='@wireapp*' ts-node src/demo/sendCounter.ts",
|
|
71
77
|
"dist": "yarn clean && yarn build",
|
|
72
78
|
"start": "yarn dist && node index.js",
|
|
73
|
-
"start:echo": "cross-env NODE_DEBUG
|
|
74
|
-
"start:sender": "cross-env NODE_DEBUG
|
|
79
|
+
"start:echo": "cross-env NODE_DEBUG='@wireapp/core*' node src/demo/echo.js",
|
|
80
|
+
"start:sender": "cross-env NODE_DEBUG='@wireapp/core*' node src/demo/sender.js",
|
|
75
81
|
"test": "jest",
|
|
76
82
|
"watch": "tsc ---watch"
|
|
77
83
|
},
|
|
78
|
-
"version": "
|
|
79
|
-
"gitHead": "
|
|
84
|
+
"version": "31.0.0",
|
|
85
|
+
"gitHead": "a23001a062060cec72d2e3687e381c8ae6ca31a7"
|
|
80
86
|
}
|
package/src/main/Account.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { APIClient, BackendFeatures } from '@wireapp/api-client';
|
|
3
|
-
import
|
|
3
|
+
import { RegisterData } from '@wireapp/api-client/src/auth';
|
|
4
4
|
import { Context, Cookie, LoginData } from '@wireapp/api-client/src/auth/';
|
|
5
5
|
import { ClientType, RegisteredClient } from '@wireapp/api-client/src/client/';
|
|
6
6
|
import * as Events from '@wireapp/api-client/src/event';
|
|
@@ -12,7 +12,7 @@ import { ConnectionService } from './connection/';
|
|
|
12
12
|
import { AssetService, ConversationService, PayloadBundleSource, PayloadBundleType } from './conversation/';
|
|
13
13
|
import * as OtrMessage from './conversation/message/OtrMessage';
|
|
14
14
|
import * as UserMessage from './conversation/message/UserMessage';
|
|
15
|
-
import
|
|
15
|
+
import { CoreError } from './CoreError';
|
|
16
16
|
import { CryptographyService } from './cryptography/';
|
|
17
17
|
import { GiphyService } from './giphy/';
|
|
18
18
|
import { HandledEventPayload, NotificationService } from './notification/';
|
|
@@ -23,7 +23,7 @@ import { AccountService } from './account/';
|
|
|
23
23
|
import { LinkPreviewService } from './linkPreview';
|
|
24
24
|
import { WEBSOCKET_STATE } from '@wireapp/api-client/src/tcp/ReconnectingWebsocket';
|
|
25
25
|
import { MLSService } from './mls';
|
|
26
|
-
import
|
|
26
|
+
import { MLSCallbacks, MLSConfig } from './mls/types';
|
|
27
27
|
export declare type ProcessedEventPayload = HandledEventPayload;
|
|
28
28
|
declare enum TOPIC {
|
|
29
29
|
ERROR = "Account.TOPIC.ERROR"
|
package/src/main/CoreError.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { CallConfigData } from '@wireapp/api-client/src/account/CallConfigData';
|
|
3
3
|
export declare class AccountService {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import
|
|
20
|
+
import {APIClient} from '@wireapp/api-client';
|
|
21
21
|
import {Runtime} from '@wireapp/commons';
|
|
22
|
-
import
|
|
22
|
+
import {CallConfigData} from '@wireapp/api-client/src/account/CallConfigData';
|
|
23
23
|
|
|
24
24
|
export class AccountService {
|
|
25
25
|
constructor(private readonly apiClient: APIClient) {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Availability } from '@wireapp/protocol-messaging';
|
|
2
2
|
export declare type AvailabilityType = Availability.Type;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
2
|
import { ClientMismatch, MessageSendingStatus, QualifiedUserClients, UserClients } from '@wireapp/api-client/src/conversation';
|
|
3
|
-
import
|
|
3
|
+
import { UserPreKeyBundleMap } from '@wireapp/api-client/src/user/';
|
|
4
4
|
import { GenericMessage } from '@wireapp/protocol-messaging';
|
|
5
|
-
import
|
|
5
|
+
import { CryptographyService } from '../cryptography/';
|
|
6
6
|
export declare class BroadcastService {
|
|
7
7
|
private readonly apiClient;
|
|
8
8
|
private readonly cryptographyService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { CreateClientPayload, RegisteredClient, UpdateClientPayload } from '@wireapp/api-client/src/client/';
|
|
3
3
|
export declare class ClientBackendRepository {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
constructor(apiClient: APIClient);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { RegisteredClient } from '@wireapp/api-client/src/client/';
|
|
2
|
+
import { CRUDEngine } from '@wireapp/store-engine';
|
|
3
3
|
import { CryptographyService } from '../cryptography/';
|
|
4
|
-
import
|
|
4
|
+
import { MetaClient } from './ClientService';
|
|
5
5
|
export declare enum DatabaseStores {
|
|
6
6
|
CLIENTS = "clients"
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ClientClassification, Location } from '@wireapp/api-client/src/client/';
|
|
2
2
|
export interface ClientInfo {
|
|
3
3
|
classification: ClientClassification.DESKTOP | ClientClassification.PHONE | ClientClassification.TABLET;
|
|
4
4
|
cookieLabel: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
|
+
import { LoginData } from '@wireapp/api-client/src/auth/';
|
|
3
3
|
import { RegisteredClient } from '@wireapp/api-client/src/client/';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { CRUDEngine } from '@wireapp/store-engine';
|
|
5
|
+
import { CryptographyService } from '../cryptography/';
|
|
6
6
|
import { ClientInfo } from './';
|
|
7
7
|
export interface MetaClient extends RegisteredClient {
|
|
8
8
|
domain?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
2
|
import { Connection } from '@wireapp/api-client/src/connection/';
|
|
3
3
|
import { QualifiedId } from '@wireapp/api-client/src/user';
|
|
4
4
|
export declare class ConnectionService {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Asset } from '@wireapp/protocol-messaging';
|
|
2
2
|
export declare type AbortReason = Asset.NotUploaded;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { APIClient } from '@wireapp/api-client';
|
|
3
|
+
import { AssetOptions } from '@wireapp/api-client/src/asset';
|
|
4
|
+
import { ProgressCallback, RequestCancelable } from '@wireapp/api-client/src/http';
|
|
5
|
+
import { EncryptedAssetUploaded } from '../../cryptography';
|
|
6
6
|
export interface AssetDataV4 {
|
|
7
7
|
assetKey: string;
|
|
8
8
|
assetToken: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { APIClient } from '@wireapp/api-client';
|
|
2
2
|
import { MessageSendingStatus, Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, UserClients, ClientMismatch } from '@wireapp/api-client/src/conversation';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { ConversationMemberLeaveEvent } from '@wireapp/api-client/src/event';
|
|
4
|
+
import { QualifiedId, UserPreKeyBundleMap } from '@wireapp/api-client/src/user';
|
|
5
5
|
import { MessageTimer, RemoveUsersParams } from '../../conversation/';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
6
|
+
import { RemoteData } from '../content';
|
|
7
|
+
import { CryptographyService } from '../../cryptography/';
|
|
8
|
+
import { MLSService } from '../../mls';
|
|
9
|
+
import { NotificationService } from '../../notification';
|
|
10
|
+
import { ClearConversationMessage, HideMessage, OtrMessage } from '../message/OtrMessage';
|
|
11
11
|
import { XOR } from '@wireapp/commons/src/main/util/TypeUtil';
|
|
12
|
-
import { AddUsersParams,
|
|
12
|
+
import { AddUsersParams, MessageSendingOptions, MLSReturnType, SendMlsMessageParams, SendProteusMessageParams } from './ConversationService.types';
|
|
13
13
|
export declare class ConversationService {
|
|
14
14
|
private readonly apiClient;
|
|
15
15
|
private readonly config;
|
|
@@ -21,7 +21,6 @@ export declare class ConversationService {
|
|
|
21
21
|
constructor(apiClient: APIClient, cryptographyService: CryptographyService, config: {
|
|
22
22
|
useQualifiedIds?: boolean;
|
|
23
23
|
}, notificationService: NotificationService, mlsService: MLSService);
|
|
24
|
-
private createEphemeral;
|
|
25
24
|
private getConversationQualifiedMembers;
|
|
26
25
|
/**
|
|
27
26
|
* Will generate a prekey bundle for specific users.
|
|
@@ -47,22 +46,6 @@ export declare class ConversationService {
|
|
|
47
46
|
private sendGenericMessage;
|
|
48
47
|
private extractUserIds;
|
|
49
48
|
private extractQualifiedUserIds;
|
|
50
|
-
private generateButtonActionGenericMessage;
|
|
51
|
-
private generateButtonActionConfirmationGenericMessage;
|
|
52
|
-
private generateCompositeGenericMessage;
|
|
53
|
-
private generateConfirmationGenericMessage;
|
|
54
|
-
private generateEditedTextGenericMessage;
|
|
55
|
-
private generateFileDataGenericMessage;
|
|
56
|
-
private generateFileMetaDataGenericMessage;
|
|
57
|
-
private generateFileAbortGenericMessage;
|
|
58
|
-
private generateAsset;
|
|
59
|
-
private generateImageGenericMessage;
|
|
60
|
-
private generateLocationGenericMessage;
|
|
61
|
-
private generatePingGenericMessage;
|
|
62
|
-
private generateReactionGenericMessage;
|
|
63
|
-
private generateSessionResetGenericMessage;
|
|
64
|
-
private generateCallGenericMessage;
|
|
65
|
-
private generateTextGenericMessage;
|
|
66
49
|
clearConversation(conversationId: string, timestamp?: number | Date, messageId?: string, sendAsProtobuf?: boolean): Promise<ClearConversationMessage>;
|
|
67
50
|
/**
|
|
68
51
|
* Sends a LastRead message to the current user's self conversation.
|
|
@@ -109,7 +92,6 @@ export declare class ConversationService {
|
|
|
109
92
|
*/
|
|
110
93
|
fetchAllParticipantsClients(conversationId: string, conversationDomain?: string): Promise<UserClients | QualifiedUserClients>;
|
|
111
94
|
deleteMessageLocal(conversationId: string, messageIdToHide: string, sendAsProtobuf?: boolean, conversationDomain?: string): Promise<HideMessage>;
|
|
112
|
-
deleteMessageEveryone(conversationId: string, messageIdToDelete: string, userIds?: string[] | QualifiedId[] | UserClients | QualifiedUserClients, sendAsProtobuf?: boolean, conversationDomain?: string, callbacks?: MessageSendingCallbacks): Promise<DeleteMessage>;
|
|
113
95
|
/**
|
|
114
96
|
* Create a group conversation.
|
|
115
97
|
* @param {string} name
|
|
@@ -146,7 +128,6 @@ export declare class ConversationService {
|
|
|
146
128
|
toggleArchiveConversation(conversationId: string, archived: boolean, archiveTimestamp?: number | Date): Promise<void>;
|
|
147
129
|
setMemberConversationRole(conversationId: string, userId: string, conversationRole: DefaultConversationRoleName | string): Promise<void>;
|
|
148
130
|
private isClearFromMismatch;
|
|
149
|
-
private generateGenericMessage;
|
|
150
131
|
/**
|
|
151
132
|
* ###############################################
|
|
152
133
|
* ################ MLS Functions ################
|