@abyss-project/cloud 2.1.1 → 2.2.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/README.md CHANGED
@@ -30,4 +30,4 @@ Voir la [documentation produit](https://docs.abyss-project.fr/cloud) pour les gu
30
30
 
31
31
  ## Support
32
32
 
33
- Pour toute demande, ouvrir un ticket depuis [l'application Abyss](https://app.abyss-project.fr/dashboard/my-account/ticket/create).
33
+ Pour toute demande, ouvrir un ticket depuis [l'application Abyss](https://app.abyss-project.fr/dashboard/account/tickets/create).
@@ -0,0 +1,6 @@
1
+ import { IListInfectedFileParams, IListInfectedFileQuery, IListInfectedFileResponse, IListUnscannedFileParams, IListUnscannedFileQuery, IListUnscannedFileResponse, IAcknowledgeSafeFileParams, IAcknowledgeSafeFileBody, IAcknowledgeSafeFileResponse, IRescanFileParams, IRescanFileBody, IRescanFileResponse, IGetFileScanStatusParams, IGetFileScanStatusResponse } from '..';
2
+ export declare const listInfectedFile: (params: IListInfectedFileParams, query: IListInfectedFileQuery) => Promise<IListInfectedFileResponse>;
3
+ export declare const listUnscannedFile: (params: IListUnscannedFileParams, query: IListUnscannedFileQuery) => Promise<IListUnscannedFileResponse>;
4
+ export declare const acknowledgeSafeFile: (params: IAcknowledgeSafeFileParams, body: IAcknowledgeSafeFileBody) => Promise<IAcknowledgeSafeFileResponse>;
5
+ export declare const rescanFile: (params: IRescanFileParams, body: IRescanFileBody) => Promise<IRescanFileResponse>;
6
+ export declare const getFileScanStatus: (params: IGetFileScanStatusParams) => Promise<IGetFileScanStatusResponse>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFileScanStatus = exports.rescanFile = exports.acknowledgeSafeFile = exports.listUnscannedFile = exports.listInfectedFile = void 0;
4
+ const __1 = require("..");
5
+ const listInfectedFile = async (params, query) => {
6
+ return (await __1.AbyssCloudCore.axios.get(`space-file/${params.spaceId}/file-scan/infected`, { params: query })).data;
7
+ };
8
+ exports.listInfectedFile = listInfectedFile;
9
+ const listUnscannedFile = async (params, query) => {
10
+ return (await __1.AbyssCloudCore.axios.get(`space-file/${params.spaceId}/file-scan/unscanned`, { params: query })).data;
11
+ };
12
+ exports.listUnscannedFile = listUnscannedFile;
13
+ const acknowledgeSafeFile = async (params, body) => {
14
+ return (await __1.AbyssCloudCore.axios.post(`space-file/${params.spaceId}/file-scan/${params.fileId}/acknowledge-safe`, body)).data;
15
+ };
16
+ exports.acknowledgeSafeFile = acknowledgeSafeFile;
17
+ const rescanFile = async (params, body) => {
18
+ return (await __1.AbyssCloudCore.axios.post(`space-file/${params.spaceId}/file-scan/${params.fileId}/rescan`, body)).data;
19
+ };
20
+ exports.rescanFile = rescanFile;
21
+ const getFileScanStatus = async (params) => {
22
+ return (await __1.AbyssCloudCore.axios.get(`space-file/${params.spaceId}/file-scan/${params.fileId}/status`)).data;
23
+ };
24
+ exports.getFileScanStatus = getFileScanStatus;
25
+ //# sourceMappingURL=file-scan.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-scan.api.js","sourceRoot":"","sources":["../../src/api/file-scan.api.ts"],"names":[],"mappings":";;;AAAA,0BAgBY;AAEL,MAAM,gBAAgB,GAAG,KAAK,EACnC,MAA+B,EAC/B,KAA6B,EACO,EAAE;IACtC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,OAAO,qBAAqB,EACjD,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAAgC,EAChC,KAA8B,EACO,EAAE;IACvC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,OAAO,sBAAsB,EAClD,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EACtC,MAAkC,EAClC,IAA8B,EACS,EAAE;IACzC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAC7B,cAAc,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,MAAM,mBAAmB,EAC1E,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,UAAU,GAAG,KAAK,EAC7B,MAAyB,EACzB,IAAqB,EACS,EAAE;IAChC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAC7B,cAAc,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,MAAM,SAAS,EAChE,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB;AAEK,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAAgC,EACK,EAAE;IACvC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,MAAM,SAAS,CACjE,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"space-share.api.js","sourceRoot":"","sources":["../../src/api/space-share.api.ts"],"names":[],"mappings":";;;AAAA,0BAAoC;AAe7B,MAAM,2BAA2B,GAAG,KAAK,EAC9C,KAAwC,EACO,EAAE;IACjD,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,kCAAkC,EAClC,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AATW,QAAA,2BAA2B,+BAStC;AAEK,MAAM,kBAAkB,GAAG,KAAK,EACrC,KAA+B,EACO,EAAE;IACxC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAA8B,sBAAsB,EAAE;QAClF,MAAM,EAAE,KAAK;KACd,CAAC,CACH,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEK,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAA2B,EACS,EAAE;IACtC,OAAO,CAAC,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAA4B,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAChG,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B;AAEK,MAAM,gBAAgB,GAAG,KAAK,EACnC,MAA+B,EAC/B,KAA6B,EACO,EAAE;IACtC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,MAAM,CAC/B,eAAe,MAAM,CAAC,cAAc,EAAE,EACtC,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,eAAe,GAAG,KAAK,EAClC,MAA8B,EACK,EAAE;IACrC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAC7B,eAAe,MAAM,CAAC,OAAO,QAAQ,CACtC,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B"}
1
+ {"version":3,"file":"space-share.api.js","sourceRoot":"","sources":["../../src/api/space-share.api.ts"],"names":[],"mappings":";;;AAAA,0BAAoC;AAe7B,MAAM,2BAA2B,GAAG,KAAK,EAC9C,KAAwC,EACO,EAAE;IACjD,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,kCAAkC,EAClC,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AATW,QAAA,2BAA2B,+BAStC;AAEK,MAAM,kBAAkB,GAAG,KAAK,EACrC,KAA+B,EACO,EAAE;IACxC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAA8B,sBAAsB,EAAE;QAClF,MAAM,EAAE,KAAK;KACd,CAAC,CACH,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEK,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAA2B,EACS,EAAE;IACtC,OAAO,CAAC,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAA4B,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAChG,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B;AAEK,MAAM,gBAAgB,GAAG,KAAK,EACnC,MAA+B,EAC/B,KAA6B,EACO,EAAE;IACtC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,MAAM,CAC/B,eAAe,MAAM,CAAC,cAAc,EAAE,EACtC,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,eAAe,GAAG,KAAK,EAClC,MAA8B,EACK,EAAE;IACrC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAA2B,eAAe,MAAM,CAAC,OAAO,QAAQ,CAAC,CACjG,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
@@ -0,0 +1,33 @@
1
+ import { QueryPaginate } from '..';
2
+ import { FileScanStatus, ScanMode } from '../..';
3
+ export interface IListInfectedFileParams {
4
+ spaceId: string;
5
+ }
6
+ export type IListInfectedFileQuery = QueryPaginate & {
7
+ acknowledged?: boolean;
8
+ };
9
+ export interface IListUnscannedFileParams {
10
+ spaceId: string;
11
+ }
12
+ export type IListUnscannedFileQuery = QueryPaginate & {
13
+ scanStatus?: FileScanStatus[];
14
+ };
15
+ export interface IAcknowledgeSafeFileParams {
16
+ spaceId: string;
17
+ fileId: string;
18
+ }
19
+ export interface IAcknowledgeSafeFileBody {
20
+ safe: boolean;
21
+ }
22
+ export interface IRescanFileParams {
23
+ spaceId: string;
24
+ fileId: string;
25
+ }
26
+ export interface IRescanFileBody {
27
+ force: boolean;
28
+ mode?: ScanMode;
29
+ }
30
+ export interface IGetFileScanStatusParams {
31
+ spaceId: string;
32
+ fileId: string;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=file-scan.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-scan.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/file-scan.request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { IResponse, BasePaginate } from '..';
2
+ import { IScanFile, FileScanStatus } from '../..';
3
+ export type IListInfectedFileResponse = IResponse<BasePaginate<IScanFile>>;
4
+ export type IListUnscannedFileResponse = IResponse<BasePaginate<IScanFile>>;
5
+ export interface IAcknowledgeSafeFileData {
6
+ file: IScanFile;
7
+ }
8
+ export type IAcknowledgeSafeFileResponse = IResponse<IAcknowledgeSafeFileData>;
9
+ export interface IRescanFileData {
10
+ file: IScanFile;
11
+ }
12
+ export type IRescanFileResponse = IResponse<IRescanFileData>;
13
+ export interface IGetFileScanStatusData {
14
+ scanStatus: FileScanStatus | null;
15
+ }
16
+ export type IGetFileScanStatusResponse = IResponse<IGetFileScanStatusData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=file-scan.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-scan.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/file-scan.response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export type FileScanStatus = 'pending_scan' | 'clean' | 'infected' | 'skipped' | 'error';
2
+ export type AnalysisStatus = 'pending' | 'clean' | 'infected' | 'skipped' | 'error';
3
+ export interface IFileAnalysis {
4
+ status: AnalysisStatus;
5
+ engine: string | null;
6
+ engineVersion: string | null;
7
+ contentHash: string | null;
8
+ viruses: string[];
9
+ startedAt: string | null;
10
+ finishedAt: string | null;
11
+ durationMs: number | null;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=file-scan.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-scan.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/file-scan.dto.ts"],"names":[],"mappings":""}
@@ -5,6 +5,7 @@ export interface IUser {
5
5
  isAdmin: boolean;
6
6
  personalApiKeyLookupHash?: string | null;
7
7
  personalApiKeyRevokedAt?: Date | null;
8
+ accountDeletedAt?: Date | null;
8
9
  updatedAt?: Date;
9
10
  createdAt?: Date;
10
11
  cloud?: ISpace[];
package/package.json CHANGED
@@ -1,21 +1,9 @@
1
1
  {
2
2
  "name": "@abyss-project/cloud",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Core package to interact with Abyss-Project Cloud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
- "publishConfig": {
8
- "main": "dist/index.js",
9
- "types": "dist/index.d.ts"
10
- },
11
- "scripts": {
12
- "lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
13
- "lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
14
- "tsc": "tsc",
15
- "build": "tsc",
16
- "prepublish": "tsc",
17
- "dev": "tsc --watch"
18
- },
19
7
  "repository": {
20
8
  "type": "git",
21
9
  "url": "https://gitlab.com/abyss-group"
@@ -60,5 +48,13 @@
60
48
  "sequelize-cli": "^6.2.0",
61
49
  "typescript": "5.4.2",
62
50
  "tsc-watch": "^4.6.2"
51
+ },
52
+ "scripts": {
53
+ "lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
54
+ "lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
55
+ "tsc": "tsc",
56
+ "build": "tsc",
57
+ "prepublish": "tsc",
58
+ "dev": "tsc --watch"
63
59
  }
64
- }
60
+ }
package/tsconfig.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "compilerOptions": {
3
- "incremental": false,
4
- "target": "es2021",
5
- "lib": [
6
- "dom",
7
- "es2021"
8
- ],
9
- "experimentalDecorators": true,
10
- "emitDecoratorMetadata": true,
11
- "module": "commonjs",
12
- "rootDir": "src",
13
- "moduleResolution": "node",
14
- "resolveJsonModule": true,
15
- "allowJs": true,
16
- "declaration": true,
17
- "sourceMap": true,
18
- "outDir": "./dist",
19
- "removeComments": true,
20
- "allowSyntheticDefaultImports": true,
21
- "esModuleInterop": true,
22
- "forceConsistentCasingInFileNames": true,
23
- "strict": true,
24
- "strictNullChecks": true,
25
- "strictFunctionTypes": true,
26
- "strictPropertyInitialization": false,
27
- "skipLibCheck": true
28
- },
29
- "include": [
30
- "./src"
31
- ],
32
- "exclude": [
33
- "./dist/**/*"
34
- ]
35
- }
1
+ {
2
+ "compilerOptions": {
3
+ "incremental": false,
4
+ "target": "es2021",
5
+ "lib": [
6
+ "dom",
7
+ "es2021"
8
+ ],
9
+ "experimentalDecorators": true,
10
+ "emitDecoratorMetadata": true,
11
+ "module": "commonjs",
12
+ "rootDir": "src",
13
+ "moduleResolution": "node",
14
+ "resolveJsonModule": true,
15
+ "allowJs": true,
16
+ "declaration": true,
17
+ "sourceMap": true,
18
+ "outDir": "./dist",
19
+ "removeComments": true,
20
+ "allowSyntheticDefaultImports": true,
21
+ "esModuleInterop": true,
22
+ "forceConsistentCasingInFileNames": true,
23
+ "strict": true,
24
+ "strictNullChecks": true,
25
+ "strictFunctionTypes": true,
26
+ "strictPropertyInitialization": false,
27
+ "skipLibCheck": true
28
+ },
29
+ "include": [
30
+ "./src"
31
+ ],
32
+ "exclude": [
33
+ "./dist/**/*"
34
+ ]
35
+ }