@wireapp/core 25.1.0 → 25.3.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
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
|
+
# [25.3.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@25.2.1...@wireapp/core@25.3.0) (2022-05-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **api-client:** Add MLS clients endpoints ([#4260](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4260)) ([d7bf7c1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/d7bf7c12dfe215e79f57cf99ad91cb7d05b36a12))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [25.2.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@25.2.0...@wireapp/core@25.2.1) (2022-05-11)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @wireapp/core
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [25.2.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@25.1.0...@wireapp/core@25.2.0) (2022-05-11)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* Add MLS device creation types ([#4259](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4259)) ([c88ed7c](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/c88ed7cf3804828b4fe8e56d842a6207abea4c2d))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [25.1.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@25.0.0...@wireapp/core@25.1.0) (2022-05-04)
|
|
7
37
|
|
|
8
38
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@types/long": "4.0.1",
|
|
7
7
|
"@types/node": "~14",
|
|
8
|
-
"@wireapp/api-client": "19.
|
|
8
|
+
"@wireapp/api-client": "19.2.0",
|
|
9
9
|
"@wireapp/cryptobox": "12.8.0",
|
|
10
10
|
"bazinga64": "5.10.0",
|
|
11
11
|
"hash.js": "1.1.7",
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
"test:project": "yarn dist && yarn test",
|
|
70
70
|
"test:node": "nyc jasmine --config=jasmine.json"
|
|
71
71
|
},
|
|
72
|
-
"version": "25.
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"version": "25.3.0",
|
|
73
|
+
"gitHead": "a8bf270b2a73f44d611bcb9bb2965dc24e6918a1"
|
|
74
74
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { APIClient } from '@wireapp/api-client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { 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);
|
|
6
6
|
getClients(): Promise<RegisteredClient[]>;
|
|
7
|
-
postClient(client:
|
|
7
|
+
postClient(client: CreateClientPayload): Promise<RegisteredClient>;
|
|
8
|
+
putClient(clientId: string, updates: UpdateClientPayload): Promise<void>;
|
|
9
|
+
deleteClient(clientId: string, password: string): Promise<void>;
|
|
10
|
+
uploadMLSKeyPackages(clientId: string, keyPackages: string[]): Promise<void>;
|
|
8
11
|
}
|
|
@@ -29,6 +29,15 @@ class ClientBackendRepository {
|
|
|
29
29
|
postClient(client) {
|
|
30
30
|
return this.apiClient.api.client.postClient(client);
|
|
31
31
|
}
|
|
32
|
+
putClient(clientId, updates) {
|
|
33
|
+
return this.apiClient.api.client.putClient(clientId, updates);
|
|
34
|
+
}
|
|
35
|
+
deleteClient(clientId, password) {
|
|
36
|
+
return this.apiClient.api.client.deleteClient(clientId, password);
|
|
37
|
+
}
|
|
38
|
+
uploadMLSKeyPackages(clientId, keyPackages) {
|
|
39
|
+
return this.apiClient.api.client.uploadMLSKeyPackages(clientId, keyPackages);
|
|
40
|
+
}
|
|
32
41
|
}
|
|
33
42
|
exports.ClientBackendRepository = ClientBackendRepository;
|
|
34
43
|
//# sourceMappingURL=ClientBackendRepository.js.map
|
|
@@ -20,6 +20,14 @@ export declare class ClientService {
|
|
|
20
20
|
constructor(apiClient: APIClient, storeEngine: CRUDEngine, cryptographyService: CryptographyService);
|
|
21
21
|
deleteLocalClient(): Promise<string>;
|
|
22
22
|
getClients(): Promise<RegisteredClient[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Will delete the given client from backend and will also delete it from the local database
|
|
25
|
+
* @param clientId The id of the client to delete
|
|
26
|
+
* @param password Password of the owning user
|
|
27
|
+
* @param isLocalClient Is the client also the client currently used by the app (as opposed to a client the user owns but not currenly in use)
|
|
28
|
+
* @returns Promise
|
|
29
|
+
*/
|
|
30
|
+
deleteClient(clientId: string, password: string, isLocalClient?: boolean): Promise<unknown>;
|
|
23
31
|
getLocalClient(): Promise<MetaClient>;
|
|
24
32
|
createLocalClient(client: RegisteredClient, domain?: string): Promise<MetaClient>;
|
|
25
33
|
synchronizeClients(): Promise<MetaClient[]>;
|
|
@@ -35,6 +35,20 @@ class ClientService {
|
|
|
35
35
|
getClients() {
|
|
36
36
|
return this.backend.getClients();
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Will delete the given client from backend and will also delete it from the local database
|
|
40
|
+
* @param clientId The id of the client to delete
|
|
41
|
+
* @param password Password of the owning user
|
|
42
|
+
* @param isLocalClient Is the client also the client currently used by the app (as opposed to a client the user owns but not currenly in use)
|
|
43
|
+
* @returns Promise
|
|
44
|
+
*/
|
|
45
|
+
async deleteClient(clientId, password, isLocalClient = false) {
|
|
46
|
+
const userId = { id: this.apiClient.userId, domain: this.apiClient.domain || '' };
|
|
47
|
+
await this.backend.deleteClient(clientId, password);
|
|
48
|
+
return isLocalClient
|
|
49
|
+
? this.database.deleteLocalClient()
|
|
50
|
+
: this.database.deleteClient(this.cryptographyService.constructSessionId(userId, clientId));
|
|
51
|
+
}
|
|
38
52
|
getLocalClient() {
|
|
39
53
|
return this.database.getLocalClient();
|
|
40
54
|
}
|