@wireapp/api-client 27.19.2 → 27.20.1
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/lib/APIClient.d.ts +2 -0
- package/lib/APIClient.d.ts.map +1 -1
- package/lib/APIClient.js +12 -0
- package/lib/Config.d.ts +14 -0
- package/lib/Config.d.ts.map +1 -1
- package/lib/cells/CellsAPI.d.ts +43 -0
- package/lib/cells/CellsAPI.d.ts.map +1 -0
- package/lib/cells/CellsAPI.js +108 -0
- package/lib/cells/CellsStorage/CellsStorage.d.ts +12 -0
- package/lib/cells/CellsStorage/CellsStorage.d.ts.map +1 -0
- package/lib/cells/CellsStorage/CellsStorage.js +30 -0
- package/lib/cells/CellsStorage/S3Service.d.ts +19 -0
- package/lib/cells/CellsStorage/S3Service.d.ts.map +1 -0
- package/lib/cells/CellsStorage/S3Service.js +63 -0
- package/lib/demo/initClient.d.ts.map +1 -1
- package/lib/demo/initClient.js +13 -0
- package/lib/http/HttpClient.d.ts +2 -2
- package/lib/http/HttpClient.d.ts.map +1 -1
- package/lib/http/HttpClient.js +1 -0
- package/lib/mocks/cells.d.ts +14 -0
- package/lib/mocks/cells.d.ts.map +1 -0
- package/lib/mocks/cells.js +34 -0
- package/package.json +6 -3
package/lib/APIClient.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AccountAPI } from './account/AccountAPI';
|
|
|
3
3
|
import { AssetAPI } from './asset/';
|
|
4
4
|
import { AccessTokenData, AuthAPI, Context, Cookie, InvalidTokenError, LoginData, RegisterData } from './auth/';
|
|
5
5
|
import { BroadcastAPI } from './broadcast/';
|
|
6
|
+
import { CellsAPI } from './cells/CellsAPI';
|
|
6
7
|
import { ClientAPI, ClientType } from './client/';
|
|
7
8
|
import { Config } from './Config';
|
|
8
9
|
import { ConnectionAPI } from './connection/';
|
|
@@ -36,6 +37,7 @@ type Apis = {
|
|
|
36
37
|
asset: AssetAPI;
|
|
37
38
|
auth: AuthAPI;
|
|
38
39
|
broadcast: BroadcastAPI;
|
|
40
|
+
cells: CellsAPI;
|
|
39
41
|
client: ClientAPI;
|
|
40
42
|
connection: ConnectionAPI;
|
|
41
43
|
conversation: ConversationAPI;
|
package/lib/APIClient.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIClient.d.ts","sourceRoot":"","sources":["../src/APIClient.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAIpC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,eAAe,EAEf,OAAO,EACP,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,SAAS,EAET,YAAY,EACb,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,EAAe,UAAU,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"APIClient.d.ts","sourceRoot":"","sources":["../src/APIClient.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAIpC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,eAAe,EAEf,OAAO,EACP,OAAO,EACP,MAAM,EACN,iBAAiB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E,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IAwB3E,IAAI,CAAC,UAAU,GAAE,UAA4B,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWjF,KAAK,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB7C,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,UAAU,GAAE,UAA4B,GAAG,OAAO,CAAC,OAAO,CAAC;IAerG,QAAQ,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,GAAE,UAAiC,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpG,MAAM,CAAC,OAAO,GAAE;QAAC,iBAAiB,EAAE,OAAO,CAAA;KAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAe/F,OAAO,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,eAAe;YAIxC,aAAa;IAepB,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIxC,IAAW,QAAQ,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,IAAW,MAAM,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAW,MAAM,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,8DAA8D;IAC9D,IAAW,eAAe,IAAI,MAAM,CAKnC;IAED,gEAAgE;IAChE,IAAW,iBAAiB,IAAI,MAAM,CAKrC;IAED;;OAEG;IACU,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAc7C"}
|
package/lib/APIClient.js
CHANGED
|
@@ -27,6 +27,7 @@ const auth_1 = require("./auth/");
|
|
|
27
27
|
const CookieStore_1 = require("./auth/CookieStore");
|
|
28
28
|
const parseAccessToken_1 = require("./auth/parseAccessToken");
|
|
29
29
|
const broadcast_1 = require("./broadcast/");
|
|
30
|
+
const CellsAPI_1 = require("./cells/CellsAPI");
|
|
30
31
|
const client_1 = require("./client/");
|
|
31
32
|
const connection_1 = require("./connection/");
|
|
32
33
|
const conversation_1 = require("./conversation/");
|
|
@@ -34,6 +35,7 @@ const env_1 = require("./env/");
|
|
|
34
35
|
const generic_1 = require("./generic");
|
|
35
36
|
const giphy_1 = require("./giphy/");
|
|
36
37
|
const http_1 = require("./http/");
|
|
38
|
+
const cells_1 = require("./mocks/cells");
|
|
37
39
|
const notification_1 = require("./notification/");
|
|
38
40
|
const OAuthAPI_1 = require("./oauth/OAuthAPI");
|
|
39
41
|
const obfuscation_1 = require("./obfuscation/");
|
|
@@ -99,12 +101,22 @@ class APIClient extends events_1.EventEmitter {
|
|
|
99
101
|
configureApis(backendFeatures) {
|
|
100
102
|
this.logger.info('configuring APIs with config', backendFeatures);
|
|
101
103
|
const assetAPI = new asset_1.AssetAPI(this.transport.http, backendFeatures);
|
|
104
|
+
// To not mark "cells" as optional, we use the mock config for APIClient instances that are not using the cells feature.
|
|
105
|
+
const cellsConfig = this.config.cells || cells_1.cellsConfigMock;
|
|
102
106
|
return {
|
|
103
107
|
account: new AccountAPI_1.AccountAPI(this.transport.http),
|
|
104
108
|
asset: assetAPI,
|
|
105
109
|
auth: new auth_1.AuthAPI(this.transport.http),
|
|
106
110
|
services: new services_1.ServicesAPI(this.transport.http, assetAPI),
|
|
107
111
|
broadcast: new broadcast_1.BroadcastAPI(this.transport.http),
|
|
112
|
+
cells: new CellsAPI_1.CellsAPI({
|
|
113
|
+
httpClient: new http_1.HttpClient({
|
|
114
|
+
...this.config,
|
|
115
|
+
urls: { ...this.config.urls, rest: cellsConfig.pydio.url + cellsConfig.pydio.segment },
|
|
116
|
+
headers: { ...this.config.headers, Authorization: `Bearer ${cellsConfig.pydio.apiKey}` },
|
|
117
|
+
}, this.accessTokenStore),
|
|
118
|
+
config: cellsConfig,
|
|
119
|
+
}),
|
|
108
120
|
client: new client_1.ClientAPI(this.transport.http),
|
|
109
121
|
connection: new connection_1.ConnectionAPI(this.transport.http),
|
|
110
122
|
conversation: new conversation_1.ConversationAPI(this.transport.http, backendFeatures),
|
package/lib/Config.d.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { BackendData } from './env/';
|
|
2
2
|
export interface Config {
|
|
3
3
|
urls: BackendData;
|
|
4
|
+
cells?: {
|
|
5
|
+
pydio: {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
segment: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
s3: {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
bucket: string;
|
|
13
|
+
endpoint: string;
|
|
14
|
+
region: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
headers?: Record<string, string>;
|
|
4
18
|
}
|
|
5
19
|
//# sourceMappingURL=Config.d.ts.map
|
package/lib/Config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,EAAE,EAAE;YACF,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RestCreateCheckResponse, RestDeleteVersionResponse, RestNode, RestNodeCollection, RestPerformActionResponse, RestPromoteVersionResponse, RestPublicLinkDeleteSuccess, RestShareLink, RestVersion } from 'cells-sdk-ts';
|
|
2
|
+
import { CellsStorage } from './CellsStorage/CellsStorage';
|
|
3
|
+
import { Config } from '../Config';
|
|
4
|
+
import { HttpClient } from '../http';
|
|
5
|
+
export declare class CellsAPI {
|
|
6
|
+
private readonly storageService;
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor({ httpClient, storageService, config, }: {
|
|
9
|
+
httpClient: HttpClient;
|
|
10
|
+
storageService?: CellsStorage;
|
|
11
|
+
config: NonNullable<Config['cells']>;
|
|
12
|
+
});
|
|
13
|
+
uploadFileDraft({ uuid, versionId, filePath, file, autoRename, }: {
|
|
14
|
+
uuid: string;
|
|
15
|
+
versionId: string;
|
|
16
|
+
filePath: string;
|
|
17
|
+
file: File;
|
|
18
|
+
autoRename?: boolean;
|
|
19
|
+
}): Promise<RestCreateCheckResponse>;
|
|
20
|
+
promoteFileDraft({ uuid, versionId }: {
|
|
21
|
+
uuid: string;
|
|
22
|
+
versionId: string;
|
|
23
|
+
}): Promise<RestPromoteVersionResponse>;
|
|
24
|
+
deleteFileDraft({ uuid, versionId }: {
|
|
25
|
+
uuid: string;
|
|
26
|
+
versionId: string;
|
|
27
|
+
}): Promise<RestDeleteVersionResponse>;
|
|
28
|
+
deleteFile(path: string): Promise<RestPerformActionResponse>;
|
|
29
|
+
lookupFileByPath(path: string): Promise<RestNode | undefined>;
|
|
30
|
+
lookupFileByUuid(uuid: string): Promise<RestNode | undefined>;
|
|
31
|
+
getFileVersions(uuid: string): Promise<RestVersion[] | undefined>;
|
|
32
|
+
getFile(id: string): Promise<RestNode>;
|
|
33
|
+
getAllFiles(): Promise<RestNodeCollection>;
|
|
34
|
+
deleteFilePublicLink({ uuid }: {
|
|
35
|
+
uuid: string;
|
|
36
|
+
}): Promise<RestPublicLinkDeleteSuccess>;
|
|
37
|
+
getFilePublicLink({ uuid, label, alreadyShared, }: {
|
|
38
|
+
uuid: string;
|
|
39
|
+
label: string;
|
|
40
|
+
alreadyShared: boolean;
|
|
41
|
+
}): Promise<RestShareLink>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=CellsAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellsAPI.d.ts","sourceRoot":"","sources":["../../src/cells/CellsAPI.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,uBAAuB,EACvB,yBAAyB,EACzB,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,aAAa,EACb,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AAGzD,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAEnC,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;gBAE5B,EACV,UAAU,EACV,cAAc,EACd,MAAM,GACP,EAAE;QACD,UAAU,EAAE,UAAU,CAAC;QACvB,cAAc,CAAC,EAAE,YAAY,CAAC;QAC9B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;KACtC;IAMK,eAAe,CAAC,EACpB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,UAAiB,GAClB,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,IAAI,CAAC;QACX,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAuB9B,gBAAgB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAM3G,eAAe,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAMzG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAM5D,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAY7D,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAY7D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC;IAMjE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAMtC,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAS1C,oBAAoB,CAAC,EAAC,IAAI,EAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAMlF,iBAAiB,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,aAAa,GACd,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,OAAO,CAAC;KACxB,GAAG,OAAO,CAAC,aAAa,CAAC;CAc3B"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.CellsAPI = void 0;
|
|
22
|
+
const cells_sdk_ts_1 = require("cells-sdk-ts");
|
|
23
|
+
const S3Service_1 = require("./CellsStorage/S3Service");
|
|
24
|
+
class CellsAPI {
|
|
25
|
+
storageService;
|
|
26
|
+
client;
|
|
27
|
+
constructor({ httpClient, storageService, config, }) {
|
|
28
|
+
this.storageService = storageService || new S3Service_1.S3Service(config.s3);
|
|
29
|
+
this.client = new cells_sdk_ts_1.NodeServiceApi(undefined, undefined, httpClient.client);
|
|
30
|
+
}
|
|
31
|
+
async uploadFileDraft({ uuid, versionId, filePath, file, autoRename = true, }) {
|
|
32
|
+
let path = `/${filePath}`.normalize('NFC');
|
|
33
|
+
const result = await this.client.createCheck({
|
|
34
|
+
Inputs: [{ Type: 'LEAF', Locator: { Path: path, Uuid: uuid }, VersionId: versionId }],
|
|
35
|
+
FindAvailablePath: true,
|
|
36
|
+
});
|
|
37
|
+
if (autoRename && result.data.Results?.length && result.data.Results[0].Exists) {
|
|
38
|
+
path = result.data.Results[0].NextPath || path;
|
|
39
|
+
}
|
|
40
|
+
const metadata = {
|
|
41
|
+
'Draft-Mode': 'true',
|
|
42
|
+
'Create-Resource-Uuid': uuid,
|
|
43
|
+
'Create-Version-Id': versionId,
|
|
44
|
+
};
|
|
45
|
+
await this.storageService.putObject({ filePath: path, file, metadata });
|
|
46
|
+
return result.data;
|
|
47
|
+
}
|
|
48
|
+
async promoteFileDraft({ uuid, versionId }) {
|
|
49
|
+
const result = await this.client.promoteVersion(uuid, versionId, { Publish: true });
|
|
50
|
+
return result.data;
|
|
51
|
+
}
|
|
52
|
+
async deleteFileDraft({ uuid, versionId }) {
|
|
53
|
+
const result = await this.client.deleteVersion(uuid, versionId);
|
|
54
|
+
return result.data;
|
|
55
|
+
}
|
|
56
|
+
async deleteFile(path) {
|
|
57
|
+
const result = await this.client.performAction('delete', { Nodes: [{ Path: path }] });
|
|
58
|
+
return result.data;
|
|
59
|
+
}
|
|
60
|
+
async lookupFileByPath(path) {
|
|
61
|
+
const result = await this.client.lookup({ Locators: { Many: [{ Path: path }] } });
|
|
62
|
+
const node = result.data.Nodes?.[0];
|
|
63
|
+
if (!node) {
|
|
64
|
+
throw new Error(`File not found: ${path}`);
|
|
65
|
+
}
|
|
66
|
+
return node;
|
|
67
|
+
}
|
|
68
|
+
async lookupFileByUuid(uuid) {
|
|
69
|
+
const result = await this.client.lookup({ Locators: { Many: [{ Uuid: uuid }] } });
|
|
70
|
+
const node = result.data.Nodes?.[0];
|
|
71
|
+
if (!node) {
|
|
72
|
+
throw new Error(`File not found: ${uuid}`);
|
|
73
|
+
}
|
|
74
|
+
return node;
|
|
75
|
+
}
|
|
76
|
+
async getFileVersions(uuid) {
|
|
77
|
+
const result = await this.client.nodeVersions(uuid, { FilterBy: 'VersionsAll' });
|
|
78
|
+
return result.data.Versions;
|
|
79
|
+
}
|
|
80
|
+
async getFile(id) {
|
|
81
|
+
const result = await this.client.getByUuid(id);
|
|
82
|
+
return result.data;
|
|
83
|
+
}
|
|
84
|
+
async getAllFiles() {
|
|
85
|
+
const result = await this.client.lookup({
|
|
86
|
+
Locators: { Many: [{ Path: `/*` }] },
|
|
87
|
+
Flags: ['WithVersionsAll'],
|
|
88
|
+
});
|
|
89
|
+
return result.data;
|
|
90
|
+
}
|
|
91
|
+
async deleteFilePublicLink({ uuid }) {
|
|
92
|
+
const result = await this.client.deletePublicLink(uuid);
|
|
93
|
+
return result.data;
|
|
94
|
+
}
|
|
95
|
+
async getFilePublicLink({ uuid, label, alreadyShared, }) {
|
|
96
|
+
if (alreadyShared) {
|
|
97
|
+
await this.deleteFilePublicLink({ uuid });
|
|
98
|
+
}
|
|
99
|
+
const result = await this.client.createPublicLink(uuid, {
|
|
100
|
+
Link: {
|
|
101
|
+
Label: label,
|
|
102
|
+
Permissions: ['Preview', 'Download'],
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
return result.data;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.CellsAPI = CellsAPI;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CellsStorage {
|
|
2
|
+
putObject({ filePath, file, metadata, }: {
|
|
3
|
+
filePath: string;
|
|
4
|
+
file: File;
|
|
5
|
+
metadata?: Record<string, string>;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare class CellsStorageError extends Error {
|
|
9
|
+
readonly cause?: Error | undefined;
|
|
10
|
+
constructor(message: string, cause?: Error | undefined);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=CellsStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellsStorage.d.ts","sourceRoot":"","sources":["../../../src/cells/CellsStorage/CellsStorage.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EACR,QAAQ,EACR,IAAI,EACJ,QAAQ,GACT,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,IAAI,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;aAGxB,KAAK,CAAC,EAAE,KAAK;gBAD7B,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.CellsStorageError = void 0;
|
|
22
|
+
class CellsStorageError extends Error {
|
|
23
|
+
cause;
|
|
24
|
+
constructor(message, cause) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.cause = cause;
|
|
27
|
+
this.name = 'CellsStorageError';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.CellsStorageError = CellsStorageError;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CellsStorage } from './CellsStorage';
|
|
2
|
+
interface S3ServiceConfig {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
bucket: string;
|
|
5
|
+
endpoint: string;
|
|
6
|
+
region: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class S3Service implements CellsStorage {
|
|
9
|
+
private client;
|
|
10
|
+
private bucket;
|
|
11
|
+
constructor({ apiKey, bucket, endpoint, region }: S3ServiceConfig);
|
|
12
|
+
putObject({ filePath, file, metadata, }: {
|
|
13
|
+
filePath: string;
|
|
14
|
+
file: File;
|
|
15
|
+
metadata?: Record<string, string>;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=S3Service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"S3Service.d.ts","sourceRoot":"","sources":["../../../src/cells/CellsStorage/S3Service.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAE/D,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,SAAU,YAAW,YAAY;IAC5C,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAC,EAAE,eAAe;IAezD,SAAS,CAAC,EACd,QAAQ,EACR,IAAI,EACJ,QAAQ,GACT,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,IAAI,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BlB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.S3Service = void 0;
|
|
22
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
23
|
+
const CellsStorage_1 = require("./CellsStorage");
|
|
24
|
+
class S3Service {
|
|
25
|
+
client;
|
|
26
|
+
bucket;
|
|
27
|
+
constructor({ apiKey, bucket, endpoint, region }) {
|
|
28
|
+
this.bucket = bucket;
|
|
29
|
+
this.client = new client_s3_1.S3Client({
|
|
30
|
+
endpoint,
|
|
31
|
+
forcePathStyle: true,
|
|
32
|
+
region,
|
|
33
|
+
credentials: async () => ({
|
|
34
|
+
accessKeyId: apiKey,
|
|
35
|
+
secretAccessKey: 'gatewaysecret',
|
|
36
|
+
}),
|
|
37
|
+
requestChecksumCalculation: 'WHEN_REQUIRED',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async putObject({ filePath, file, metadata, }) {
|
|
41
|
+
const command = new client_s3_1.PutObjectCommand({
|
|
42
|
+
Bucket: this.bucket,
|
|
43
|
+
Body: file,
|
|
44
|
+
Key: filePath,
|
|
45
|
+
ContentType: file.type,
|
|
46
|
+
ContentLength: file.size,
|
|
47
|
+
Metadata: metadata,
|
|
48
|
+
});
|
|
49
|
+
try {
|
|
50
|
+
await this.client.send(command);
|
|
51
|
+
}
|
|
52
|
+
catch (caught) {
|
|
53
|
+
if (caught instanceof client_s3_1.S3ServiceException && caught.name === 'EntityTooLarge') {
|
|
54
|
+
throw new CellsStorage_1.CellsStorageError('The object was too large. To upload objects larger than 5GB, use the S3 console (160GB max) or the multipart upload API (5TB max).', caught);
|
|
55
|
+
}
|
|
56
|
+
else if (caught instanceof client_s3_1.S3ServiceException) {
|
|
57
|
+
throw new CellsStorage_1.CellsStorageError(`Error from S3 while uploading object to ${this.bucket}. ${caught.name}: ${caught.message}`, caught);
|
|
58
|
+
}
|
|
59
|
+
throw caught;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.S3Service = S3Service;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initClient.d.ts","sourceRoot":"","sources":["../../src/demo/initClient.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAOvC,wBAAsB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"initClient.d.ts","sourceRoot":"","sources":["../../src/demo/initClient.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAOvC,wBAAsB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,CAiCrD"}
|
package/lib/demo/initClient.js
CHANGED
|
@@ -34,6 +34,19 @@ async function initClient() {
|
|
|
34
34
|
rest: process.env.WIRE_BACKEND_REST,
|
|
35
35
|
ws: process.env.WIRE_BACKEND_WS,
|
|
36
36
|
},
|
|
37
|
+
cells: {
|
|
38
|
+
pydio: {
|
|
39
|
+
apiKey: process.env.CELLS_PYDIO_API_KEY,
|
|
40
|
+
url: process.env.CELLS_PYDIO_URL,
|
|
41
|
+
segment: process.env.CELLS_PYDIO_REST_SEGMENT,
|
|
42
|
+
},
|
|
43
|
+
s3: {
|
|
44
|
+
apiKey: process.env.CELLS_S3_API_KEY,
|
|
45
|
+
bucket: process.env.CELLS_S3_BUCKET,
|
|
46
|
+
endpoint: process.env.CELLS_S3_ENDPOINT,
|
|
47
|
+
region: process.env.CELLS_S3_REGION,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
37
50
|
};
|
|
38
51
|
const apiClient = new APIClient_1.APIClient(apiConfig);
|
|
39
52
|
await apiClient.login(credentials);
|
package/lib/http/HttpClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
1
|
+
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import { AccessTokenData, AccessTokenStore, InvalidTokenError, MissingCookieError } from '../auth/';
|
|
4
4
|
import { Config } from '../Config';
|
|
@@ -19,7 +19,7 @@ export interface HttpClient {
|
|
|
19
19
|
export declare class HttpClient extends EventEmitter {
|
|
20
20
|
private readonly config;
|
|
21
21
|
accessTokenStore: AccessTokenStore;
|
|
22
|
-
|
|
22
|
+
readonly client: AxiosInstance;
|
|
23
23
|
private readonly logger;
|
|
24
24
|
private connectionState;
|
|
25
25
|
private readonly requestQueue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.ts"],"names":[],"mappings":"AAmBA,OAAc,EAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.ts"],"names":[],"mappings":"AAmBA,OAAc,EAAC,UAAU,EAAgB,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAC,MAAM,OAAO,CAAC;AAKxG,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAKpC,OAAO,EACL,eAAe,EACf,gBAAgB,EAEhB,iBAAiB,EAEjB,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,YAAY,EAAsB,eAAe,EAA0B,MAAM,UAAU,CAAC;AAIpG,aAAK,KAAK;IACR,0BAA0B,gDAAgD;IAC1E,gBAAgB,sCAAsC;CACvD;AAED,KAA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,GAAG;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAC;IAOjH;;;;OAIG;IACI,mBAAmB,CAAC,WAAW,GAAE,MAAc,GAAG,OAAO;IASnD,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAc9C,UAAU,CAAC,kBAAkB,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAoB1G;;;;OAIG;IACU,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAOtE,WAAW,CAAC,CAAC,EACxB,MAAM,EAAE,kBAAkB,EAC1B,oBAAoB,GAAE,OAAe,EACrC,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAoBrB,QAAQ,CAAC,CAAC,EACf,MAAM,EAAE,kBAAkB,EAC1B,oBAAoB,GAAE,OAAe,EACrC,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAmBrB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAQjE,kBAAkB,CAAC,CAAC,EACzB,MAAM,EAAE,kBAAkB,EAC1B,oBAAoB,GAAE,OAAe,GACpC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAQrB,eAAe,CAAC,CAAC,EACtB,MAAM,EAAE,kBAAkB,EAC1B,oBAAoB,GAAE,OAAe,GACpC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAO7B"}
|
package/lib/http/HttpClient.js
CHANGED
|
@@ -74,6 +74,7 @@ class HttpClient extends events_1.EventEmitter {
|
|
|
74
74
|
this.accessTokenStore = accessTokenStore;
|
|
75
75
|
this.client = axios_1.default.create({
|
|
76
76
|
baseURL: this.config.urls.rest,
|
|
77
|
+
headers: this.config.headers,
|
|
77
78
|
});
|
|
78
79
|
(0, axios_retry_1.default)(this.client, {
|
|
79
80
|
retries: Infinity,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../src/mocks/cells.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,eAAe;;;;;;;;;;;;CAY3B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.cellsConfigMock = void 0;
|
|
22
|
+
exports.cellsConfigMock = {
|
|
23
|
+
pydio: {
|
|
24
|
+
apiKey: 'mock-api-key',
|
|
25
|
+
segment: '/mock-segment',
|
|
26
|
+
url: 'https://mock-url',
|
|
27
|
+
},
|
|
28
|
+
s3: {
|
|
29
|
+
apiKey: 'mock-api-key',
|
|
30
|
+
bucket: 'mock-bucket',
|
|
31
|
+
endpoint: 'https://mock-url',
|
|
32
|
+
region: 'mock-region',
|
|
33
|
+
},
|
|
34
|
+
};
|
package/package.json
CHANGED
|
@@ -13,17 +13,20 @@
|
|
|
13
13
|
"./lib/shims/node/websocket": "./lib/shims/browser/websocket.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@
|
|
16
|
+
"@aws-sdk/client-s3": "3.750.0",
|
|
17
|
+
"@wireapp/commons": "^5.4.2",
|
|
17
18
|
"@wireapp/priority-queue": "^2.1.11",
|
|
18
19
|
"@wireapp/protocol-messaging": "1.51.0",
|
|
19
20
|
"axios": "1.7.9",
|
|
20
21
|
"axios-retry": "4.5.0",
|
|
22
|
+
"cells-sdk-ts": "https://github.com/pydio/cells-sdk-ts#dev",
|
|
21
23
|
"http-status-codes": "2.3.0",
|
|
22
24
|
"logdown": "3.3.1",
|
|
23
25
|
"pako": "2.1.0",
|
|
24
26
|
"reconnecting-websocket": "4.4.0",
|
|
25
27
|
"spark-md5": "3.0.2",
|
|
26
28
|
"tough-cookie": "4.1.4",
|
|
29
|
+
"uuid": "11.1.0",
|
|
27
30
|
"ws": "8.18.1",
|
|
28
31
|
"zod": "3.24.2"
|
|
29
32
|
},
|
|
@@ -66,6 +69,6 @@
|
|
|
66
69
|
"watch": "webpack serve --config webpack.browser.js",
|
|
67
70
|
"prepare": "yarn dist"
|
|
68
71
|
},
|
|
69
|
-
"version": "27.
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"version": "27.20.1",
|
|
73
|
+
"gitHead": "64b4dd660cc72a9b6d27f70a188b3de7a6406aed"
|
|
71
74
|
}
|