@wireapp/core 30.11.1 → 30.11.2

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +13 -16
  3. package/src/main/Account.js +5 -1
  4. package/src/main/account/index.js +5 -1
  5. package/src/main/account/index.js.map +1 -1
  6. package/src/main/auth/index.js +5 -1
  7. package/src/main/broadcast/index.js +5 -1
  8. package/src/main/client/index.js +5 -1
  9. package/src/main/connection/index.js +5 -1
  10. package/src/main/conversation/AssetService/index.js +5 -1
  11. package/src/main/conversation/ConversationMapper/index.js +5 -1
  12. package/src/main/conversation/ConversationService/ConversationService.js +2 -1
  13. package/src/main/conversation/ConversationService/index.js +5 -1
  14. package/src/main/conversation/MessageTimer/index.js +5 -1
  15. package/src/main/conversation/content/AssetContent.d.ts +4 -4
  16. package/src/main/conversation/content/ButtonActionConfirmationContent.d.ts +1 -1
  17. package/src/main/conversation/content/ButtonActionContent.d.ts +1 -1
  18. package/src/main/conversation/content/ClearedContent.d.ts +1 -1
  19. package/src/main/conversation/content/ClientActionContent.d.ts +1 -1
  20. package/src/main/conversation/content/ClientAddContent.d.ts +1 -1
  21. package/src/main/conversation/content/CompositeContent.d.ts +1 -1
  22. package/src/main/conversation/content/ConfirmationContent.d.ts +1 -1
  23. package/src/main/conversation/content/ContentType.d.ts +3 -3
  24. package/src/main/conversation/content/ConversationContent.d.ts +2 -2
  25. package/src/main/conversation/content/DeletedContent.d.ts +1 -1
  26. package/src/main/conversation/content/EditedTextContent.d.ts +1 -1
  27. package/src/main/conversation/content/FileContent.d.ts +1 -1
  28. package/src/main/conversation/content/HiddenContent.d.ts +1 -1
  29. package/src/main/conversation/content/KnockContent.d.ts +1 -1
  30. package/src/main/conversation/content/LinkPreviewContent.d.ts +2 -2
  31. package/src/main/conversation/content/LocationContent.d.ts +1 -1
  32. package/src/main/conversation/content/MentionContent.d.ts +1 -1
  33. package/src/main/conversation/content/QuoteContent.d.ts +2 -2
  34. package/src/main/conversation/content/ReactionContent.d.ts +2 -2
  35. package/src/main/conversation/content/TextContent.d.ts +1 -1
  36. package/src/main/conversation/content/TweetContent.d.ts +1 -1
  37. package/src/main/conversation/content/index.js +5 -1
  38. package/src/main/conversation/index.js +5 -1
  39. package/src/main/cryptography/AssetCryptography/crypto.node.js +5 -1
  40. package/src/main/cryptography/AssetCryptography/index.d.ts +1 -1
  41. package/src/main/cryptography/AssetCryptography/interfaces.d.ts +1 -1
  42. package/src/main/cryptography/MessageHashService.js +5 -1
  43. package/src/main/cryptography/index.js +5 -1
  44. package/src/main/giphy/index.js +5 -1
  45. package/src/main/index.js +5 -1
  46. package/src/main/linkPreview/index.js +5 -1
  47. package/src/main/mls/MLSService/MLSService.d.ts +1 -1
  48. package/src/main/mls/MLSService/MLSService.js +1 -1
  49. package/src/main/mls/index.js +5 -1
  50. package/src/main/mls/keyMaterialUpdatesStore/index.js +5 -1
  51. package/src/main/notification/NotificationService.js +5 -1
  52. package/src/main/notification/index.js +5 -1
  53. package/src/main/self/index.js +5 -1
  54. package/src/main/team/index.js +5 -1
  55. package/src/main/test/CryptographyHelper.js +5 -1
  56. package/src/main/test/PayloadHelper.js +2 -2
  57. package/src/main/user/index.js +5 -1
  58. package/src/main/util/encryptedStore.d.ts +2 -2
  59. package/src/main/util/index.js +5 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [30.11.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@30.11.1...@wireapp/core@30.11.2) (2022-09-19)
7
+
8
+ **Note:** Version bump only for package @wireapp/core
9
+
10
+
11
+
12
+
13
+
6
14
  ## [30.11.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@30.11.0...@wireapp/core@30.11.1) (2022-09-19)
7
15
 
8
16
  **Note:** Version bump only for package @wireapp/core
package/package.json CHANGED
@@ -6,11 +6,11 @@
6
6
  "@open-wc/webpack-import-meta-loader": "0.4.7",
7
7
  "@types/long": "4.0.1",
8
8
  "@types/node": "~14",
9
- "@wireapp/api-client": "20.4.0",
10
- "@wireapp/commons": "4.3.0",
11
- "@wireapp/core-crypto": "0.4.0",
9
+ "@wireapp/api-client": "20.4.1",
10
+ "@wireapp/commons": "4.3.1",
11
+ "@wireapp/core-crypto": "0.5.0",
12
12
  "@wireapp/cryptobox": "12.8.0",
13
- "@wireapp/promise-queue": "1.1.1",
13
+ "@wireapp/promise-queue": "1.1.2",
14
14
  "@wireapp/store-engine-dexie": "1.6.10",
15
15
  "bazinga64": "5.10.0",
16
16
  "hash.js": "1.1.7",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/faker": "5.5.7",
26
- "@types/jasmine": "3.8.2",
26
+ "@types/jest": "29.0.3",
27
27
  "@types/karma": "6.3.1",
28
28
  "@types/tough-cookie": "4.0.2",
29
29
  "@wireapp/commons": "4.3.0",
@@ -34,7 +34,9 @@
34
34
  "fake-indexeddb": "3.1.8",
35
35
  "faker": "5.5.3",
36
36
  "istanbul": "1.1.0-alpha.1",
37
- "jasmine": "3.8.0",
37
+ "jest": "29.0.3",
38
+ "jest-babel": "1.0.1",
39
+ "jest-jasmine2": "29.0.3",
38
40
  "karma": "6.3.16",
39
41
  "karma-chrome-launcher": "3.1.0",
40
42
  "karma-jasmine": "4.0.1",
@@ -45,7 +47,7 @@
45
47
  "nock": "13.1.1",
46
48
  "nyc": "15.1.0",
47
49
  "rimraf": "3.0.2",
48
- "typescript": "4.4.2",
50
+ "typescript": "4.8.3",
49
51
  "webpack": "4.46.0",
50
52
  "webpack-cli": "4.7.2"
51
53
  },
@@ -61,9 +63,7 @@
61
63
  "name": "@wireapp/core",
62
64
  "repository": "https://github.com/wireapp/wire-web-packages/tree/main/packages/core",
63
65
  "scripts": {
64
- "build": "yarn build:node && yarn build:browser",
65
- "build:browser": "webpack --progress",
66
- "build:node": "tsc",
66
+ "build": "tsc",
67
67
  "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
68
  "coverage": "cross-env JASMINE_CONFIG_PATH=src/test/node/support/jasmine.json istanbul cover --report html ../../node_modules/jasmine/bin/jasmine.js",
69
69
  "demo:composite": "cross-env NODE_DEBUG=@wireapp* ts-node src/demo/composite.ts",
@@ -72,12 +72,9 @@
72
72
  "start": "yarn dist && node index.js",
73
73
  "start:echo": "cross-env NODE_DEBUG=@wireapp/core* node src/demo/echo.js",
74
74
  "start:sender": "cross-env NODE_DEBUG=@wireapp/core* node src/demo/sender.js",
75
- "test": "yarn clean && yarn build && yarn test:node && yarn test:browser",
76
- "test:browser": "webpack --mode=development && karma start",
77
- "test:project": "yarn dist && yarn test",
78
- "test:node": "nyc jasmine --config=jasmine.json",
75
+ "test": "jest",
79
76
  "watch": "tsc ---watch"
80
77
  },
81
- "version": "30.11.1",
82
- "gitHead": "42fe05962dfbaaaabc58eedc4213a29200c988e8"
78
+ "version": "30.11.2",
79
+ "gitHead": "4e82d31760bc2f55bc345027b3e01d3ecbd2ee07"
83
80
  }
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,mDAAiC"}
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,6 +19,7 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.ConversationService = void 0;
22
+ const core_crypto_1 = require("@wireapp/core-crypto");
22
23
  const conversation_1 = require("@wireapp/api-client/src/conversation");
23
24
  const data_1 = require("@wireapp/api-client/src/conversation/data");
24
25
  const protocol_messaging_1 = require("@wireapp/protocol-messaging");
@@ -916,7 +917,7 @@ class ConversationService {
916
917
  async sendExternalJoinProposal(conversationGroupId, epoch) {
917
918
  return (0, messageSender_1.sendMessage)(async () => {
918
919
  const groupIdDecodedFromBase64 = bazinga64_1.Decoder.fromBase64(conversationGroupId).asBytes;
919
- const externalProposal = await this.mlsService.newExternalProposal(0 /* Add */, {
920
+ const externalProposal = await this.mlsService.newExternalProposal(core_crypto_1.ExternalProposalType.Add, {
920
921
  epoch,
921
922
  conversationId: groupIdDecodedFromBase64,
922
923
  });
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
- import type { Asset } from '@wireapp/protocol-messaging';
3
- import type { AbortReason, AssetTransferState } from '..';
4
- import type { FileContent, FileMetaDataContent, ImageContent, LegalHoldStatus } from '.';
5
- import type { EncryptedAssetUploaded } from '../../cryptography';
2
+ import { Asset } from '@wireapp/protocol-messaging';
3
+ import { AbortReason, AssetTransferState } from '..';
4
+ import { FileContent, FileMetaDataContent, ImageContent, LegalHoldStatus } from '.';
5
+ import { EncryptedAssetUploaded } from '../../cryptography';
6
6
  export declare type ImageMetaData = Asset.IImageMetaData;
7
7
  export declare type VideoMetaData = Asset.IVideoMetaData;
8
8
  export declare type Preview = Asset.IPreview;
@@ -1,2 +1,2 @@
1
- import type { IButtonActionConfirmation } from '@wireapp/protocol-messaging';
1
+ import { IButtonActionConfirmation } from '@wireapp/protocol-messaging';
2
2
  export { IButtonActionConfirmation as ButtonActionConfirmationContent };
@@ -1,2 +1,2 @@
1
- import type { IButtonAction } from '@wireapp/protocol-messaging';
1
+ import { IButtonAction } from '@wireapp/protocol-messaging';
2
2
  export { IButtonAction as ButtonActionContent };
@@ -1,2 +1,2 @@
1
- import type { ICleared } from '@wireapp/protocol-messaging';
1
+ import { ICleared } from '@wireapp/protocol-messaging';
2
2
  export { ICleared as ClearedContent };
@@ -1,2 +1,2 @@
1
- import type { IGenericMessage } from '@wireapp/protocol-messaging';
1
+ import { IGenericMessage } from '@wireapp/protocol-messaging';
2
2
  export declare type ClientActionContent = Required<Pick<IGenericMessage, 'clientAction'>>;
@@ -1,4 +1,4 @@
1
- import type { RegisteredClient } from '@wireapp/api-client/src/client/';
1
+ import { RegisteredClient } from '@wireapp/api-client/src/client/';
2
2
  export interface ClientAddContent {
3
3
  client: RegisteredClient;
4
4
  }
@@ -1,2 +1,2 @@
1
- import type { IComposite } from '@wireapp/protocol-messaging';
1
+ import { IComposite } from '@wireapp/protocol-messaging';
2
2
  export { IComposite as CompositeContent };
@@ -1,2 +1,2 @@
1
- import type { IConfirmation } from '@wireapp/protocol-messaging';
1
+ import { IConfirmation } from '@wireapp/protocol-messaging';
2
2
  export { IConfirmation as ConfirmationContent };
@@ -1,6 +1,6 @@
1
- import type { Connection } from '@wireapp/api-client/src/connection/';
2
- import type { ClientActionType } from '..';
3
- import type { AssetContent, ClearedContent, ClientActionContent, ConfirmationContent, ConversationContent, DeletedContent, EditedTextContent, FileAssetAbortContent, FileAssetContent, FileAssetMetaDataContent, HiddenContent, ImageAssetContent, ImageContent, LocationContent, ReactionContent, TextContent } from '.';
1
+ import { Connection } from '@wireapp/api-client/src/connection/';
2
+ import { ClientActionType } from '..';
3
+ import { AssetContent, ClearedContent, ClientActionContent, ConfirmationContent, ConversationContent, DeletedContent, EditedTextContent, FileAssetAbortContent, FileAssetContent, FileAssetMetaDataContent, HiddenContent, ImageAssetContent, ImageContent, LocationContent, ReactionContent, TextContent } from '.';
4
4
  export declare function isAbortedAssetContent(content: ConversationContent): content is AssetContent;
5
5
  export declare function isAssetContent(content: ConversationContent): content is AssetContent;
6
6
  export declare function isClearedContent(content: ConversationContent): content is ClearedContent;
@@ -1,3 +1,3 @@
1
- import type { ClientActionType } from '..';
2
- import type { AssetContent, ButtonActionContent, ButtonActionConfirmationContent, CallingContent, ClearedContent, ClientActionContent, ClientAddContent, ClientRemoveContent, CompositeContent, ConfirmationContent, ConnectionContent, DeletedContent, EditedTextContent, FileAssetAbortContent, FileAssetContent, FileAssetMetaDataContent, HiddenContent, ImageAssetContent, ImageContent, KnockContent, LocationContent, ReactionContent, TextContent } from '.';
1
+ import { ClientActionType } from '..';
2
+ import { AssetContent, ButtonActionContent, ButtonActionConfirmationContent, CallingContent, ClearedContent, ClientActionContent, ClientAddContent, ClientRemoveContent, CompositeContent, ConfirmationContent, ConnectionContent, DeletedContent, EditedTextContent, FileAssetAbortContent, FileAssetContent, FileAssetMetaDataContent, HiddenContent, ImageAssetContent, ImageContent, KnockContent, LocationContent, ReactionContent, TextContent } from '.';
3
3
  export declare type ConversationContent = AssetContent | ButtonActionContent | ButtonActionConfirmationContent | CallingContent | ClearedContent | ClientActionContent | ClientActionType | ClientAddContent | ClientRemoveContent | CompositeContent | ConfirmationContent | ConnectionContent | DeletedContent | EditedTextContent | FileAssetAbortContent | FileAssetContent | FileAssetMetaDataContent | HiddenContent | ImageAssetContent | ImageContent | KnockContent | LocationContent | ReactionContent | TextContent;
@@ -1,2 +1,2 @@
1
- import type { IMessageDelete } from '@wireapp/protocol-messaging';
1
+ import { IMessageDelete } from '@wireapp/protocol-messaging';
2
2
  export { IMessageDelete as DeletedContent };
@@ -1,4 +1,4 @@
1
- import type { QuoteContent, TextContent } from '.';
1
+ import { QuoteContent, TextContent } from '.';
2
2
  export interface EditedTextContent extends TextContent {
3
3
  originalMessageId: string;
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { AudioMetaData, VideoMetaData, ImageMetaData } from './AssetContent';
2
+ import { AudioMetaData, VideoMetaData, ImageMetaData } from './AssetContent';
3
3
  export interface FileContent {
4
4
  data: Buffer;
5
5
  }
@@ -1,2 +1,2 @@
1
- import type { IMessageHide } from '@wireapp/protocol-messaging';
1
+ import { IMessageHide } from '@wireapp/protocol-messaging';
2
2
  export { IMessageHide as HiddenContent };
@@ -1,2 +1,2 @@
1
- import type { IKnock } from '@wireapp/protocol-messaging';
1
+ import { IKnock } from '@wireapp/protocol-messaging';
2
2
  export { IKnock as KnockContent };
@@ -1,5 +1,5 @@
1
- import type { ILinkPreview } from '@wireapp/protocol-messaging';
2
- import type { ImageAssetContent, ImageContent, LegalHoldStatus } from '.';
1
+ import { ILinkPreview } from '@wireapp/protocol-messaging';
2
+ import { ImageAssetContent, ImageContent, LegalHoldStatus } from '.';
3
3
  export interface LinkPreviewContent extends Omit<ILinkPreview, 'image'> {
4
4
  expectsReadConfirmation?: boolean;
5
5
  legalHoldStatus?: LegalHoldStatus;
@@ -1,4 +1,4 @@
1
- import type { LegalHoldStatus } from '.';
1
+ import { LegalHoldStatus } from '.';
2
2
  export interface LocationContent {
3
3
  expectsReadConfirmation?: boolean;
4
4
  latitude: number;
@@ -1,2 +1,2 @@
1
- import type { IMention } from '@wireapp/protocol-messaging';
1
+ import { IMention } from '@wireapp/protocol-messaging';
2
2
  export { IMention as MentionContent };
@@ -1,5 +1,5 @@
1
- import type { IQuote } from '@wireapp/protocol-messaging';
2
- import type { AssetContent, LocationContent, TextContent } from '.';
1
+ import { IQuote } from '@wireapp/protocol-messaging';
2
+ import { AssetContent, LocationContent, TextContent } from '.';
3
3
  export { IQuote as QuoteContent };
4
4
  export interface QuoteMessageContent {
5
5
  content: AssetContent | LocationContent | TextContent;
@@ -1,5 +1,5 @@
1
- import type { LegalHoldStatus } from '.';
2
- import type { ReactionType } from '..';
1
+ import { LegalHoldStatus } from '.';
2
+ import { ReactionType } from '..';
3
3
  export interface ReactionContent {
4
4
  legalHoldStatus?: LegalHoldStatus;
5
5
  originalMessageId: string;
@@ -1,4 +1,4 @@
1
- import type { LegalHoldStatus, LinkPreviewUploadedContent, MentionContent, QuoteContent } from '.';
1
+ import { LegalHoldStatus, LinkPreviewUploadedContent, MentionContent, QuoteContent } from '.';
2
2
  export interface TextContent {
3
3
  expectsReadConfirmation?: boolean;
4
4
  legalHoldStatus?: LegalHoldStatus;
@@ -1,2 +1,2 @@
1
- import type { ITweet } from '@wireapp/protocol-messaging';
1
+ import { ITweet } from '@wireapp/protocol-messaging';
2
2
  export { ITweet as TweetContent };
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -3,6 +3,6 @@ import type { EncryptedAsset } from './EncryptedAsset';
3
3
  interface EncryptOptions extends CipherOptions {
4
4
  plainText: Uint8Array;
5
5
  }
6
- export declare const decryptAsset: ({ cipherText, keyBytes, sha256: referenceSha256, }: EncryptedAsset) => Promise<Uint8Array>;
6
+ export declare const decryptAsset: ({ cipherText, keyBytes, sha256, }: EncryptedAsset) => Promise<Uint8Array>;
7
7
  export declare const encryptAsset: ({ plainText, algorithm }: EncryptOptions) => Promise<EncryptedAsset>;
8
8
  export {};
@@ -4,6 +4,6 @@ export interface Crypto {
4
4
  getRandomValues(size: number): Uint8Array;
5
5
  encrypt(plainText: Uint8Array, keyBytes: Uint8Array, initializationVector: Uint8Array, algorithm: string): Promise<{
6
6
  key: Uint8Array;
7
- cipher: Uint8Array;
7
+ cipher: Uint8Array | ArrayBuffer;
8
8
  }>;
9
9
  }
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
package/src/main/index.js CHANGED
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -21,7 +21,7 @@ export declare class MLSService {
21
21
  updateKeyingMaterial(conversationId: ConversationId): Promise<PostMlsMessageResponse | null>;
22
22
  createConversation(conversationId: ConversationId, configuration?: ConversationConfiguration): Promise<any>;
23
23
  removeClientsFromConversation(conversationId: ConversationId, clientIds: Uint8Array[]): Promise<PostMlsMessageResponse | null>;
24
- commitPendingProposals(conversationId: ConversationId): Promise<CommitBundle>;
24
+ commitPendingProposals(conversationId: ConversationId): Promise<CommitBundle | undefined>;
25
25
  conversationExists(conversationId: ConversationId): Promise<boolean>;
26
26
  clientValidKeypackagesCount(): Promise<number>;
27
27
  clientKeypackages(amountRequested: number): Promise<Uint8Array[]>;
@@ -55,7 +55,7 @@ class MLSService {
55
55
  return messageResponse;
56
56
  }
57
57
  catch (error) {
58
- await coreCryptoClient.clear_pending_commit(groupId);
58
+ await coreCryptoClient.clearPendingCommit(groupId);
59
59
  return null;
60
60
  }
61
61
  }
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
24
  exports.mockUserPayload = exports.getUrlParameter = exports.getUUID = void 0;
25
- const faker = require("faker");
25
+ const faker_1 = __importDefault(require("faker"));
26
26
  const uuidjs_1 = __importDefault(require("uuidjs"));
27
27
  function getUUID() {
28
28
  return uuidjs_1.default.genV4().toString();
@@ -41,7 +41,7 @@ function mockUserPayload(userId) {
41
41
  assets: [],
42
42
  id: userId,
43
43
  locale: 'en',
44
- name: faker.name.findName(),
44
+ name: faker_1.default.name.findName(),
45
45
  picture: [
46
46
  {
47
47
  content_length: 263345,
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];
@@ -1,7 +1,7 @@
1
1
  import { DBSchema, IDBPDatabase } from 'idb';
2
2
  interface DefaultEncryptedPayload {
3
- iv: Uint8Array;
4
- value: Uint8Array;
3
+ iv: Uint8Array | ArrayBuffer;
4
+ value: Uint8Array | ArrayBuffer;
5
5
  }
6
6
  interface EncryptedDB<EncryptedPayload> extends DBSchema {
7
7
  key: {
@@ -19,7 +19,11 @@
19
19
  */
20
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
21
  if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
23
27
  }) : (function(o, m, k, k2) {
24
28
  if (k2 === undefined) k2 = k;
25
29
  o[k2] = m[k];