@abyss-project/storage 4.0.1 → 4.1.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.
@@ -0,0 +1,8 @@
1
+ export declare enum StorageFileDeletionReason {
2
+ API_KEY = "API_KEY",
3
+ ADMIN = "ADMIN",
4
+ BUCKET = "BUCKET",
5
+ ENVIRONMENT = "ENVIRONMENT",
6
+ INTEGRITY = "INTEGRITY"
7
+ }
8
+ export declare const STORAGE_DELETE_WEBHOOK_BATCH_SIZE = 100;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STORAGE_DELETE_WEBHOOK_BATCH_SIZE = exports.StorageFileDeletionReason = void 0;
4
+ var StorageFileDeletionReason;
5
+ (function (StorageFileDeletionReason) {
6
+ StorageFileDeletionReason["API_KEY"] = "API_KEY";
7
+ StorageFileDeletionReason["ADMIN"] = "ADMIN";
8
+ StorageFileDeletionReason["BUCKET"] = "BUCKET";
9
+ StorageFileDeletionReason["ENVIRONMENT"] = "ENVIRONMENT";
10
+ StorageFileDeletionReason["INTEGRITY"] = "INTEGRITY";
11
+ })(StorageFileDeletionReason || (exports.StorageFileDeletionReason = StorageFileDeletionReason = {}));
12
+ exports.STORAGE_DELETE_WEBHOOK_BATCH_SIZE = 100;
13
+ //# sourceMappingURL=file-deletion-reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-deletion-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/file-deletion-reason.enum.ts"],"names":[],"mappings":";;;AAIA,IAAY,yBAWX;AAXD,WAAY,yBAAyB;IAEnC,gDAAmB,CAAA;IAEnB,4CAAe,CAAA;IAEf,8CAAiB,CAAA;IAEjB,wDAA2B,CAAA;IAE3B,oDAAuB,CAAA;AACzB,CAAC,EAXW,yBAAyB,yCAAzB,yBAAyB,QAWpC;AAGY,QAAA,iCAAiC,GAAG,GAAG,CAAC"}
@@ -6,3 +6,4 @@ export * from './checksum-algorithm.enum';
6
6
  export * from './algorithm.enum';
7
7
  export * from './analysis.enum';
8
8
  export * from './store-entry-type.enum';
9
+ export * from './file-deletion-reason.enum';
@@ -22,4 +22,5 @@ __exportStar(require("./checksum-algorithm.enum"), exports);
22
22
  __exportStar(require("./algorithm.enum"), exports);
23
23
  __exportStar(require("./analysis.enum"), exports);
24
24
  __exportStar(require("./store-entry-type.enum"), exports);
25
+ __exportStar(require("./file-deletion-reason.enum"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,sDAAoC;AACpC,6DAA2C;AAC3C,4DAA0C;AAC1C,mDAAiC;AACjC,kDAAgC;AAChC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,sDAAoC;AACpC,6DAA2C;AAC3C,4DAA0C;AAC1C,mDAAiC;AACjC,kDAAgC;AAChC,0DAAwC;AACxC,8DAA4C"}
@@ -1,4 +1,5 @@
1
1
  import { WebhookType } from '../../enum/webhook-type.enum';
2
+ import { StorageFileDeletionReason } from '../../enum/file-deletion-reason.enum';
2
3
  import { IApplicationFileThumbnail } from '../models/application-file-thumbnail.model';
3
4
  import { IApplicationFile } from '../models/application-file.model';
4
5
  import { IFileAnalysis } from '../models/application-file-analysis.model';
@@ -28,9 +29,12 @@ export type ScanResultWebhook = BaseWebhookBody & {
28
29
  };
29
30
  export type DeleteWebhook = BaseWebhookBody & {
30
31
  type: WebhookType.DELETE;
31
- isIntegrityCheckDelete?: boolean;
32
+ reason: StorageFileDeletionReason;
33
+ isIntegrityCheckDelete: boolean;
32
34
  } & ({
33
35
  applicationFile: IApplicationFile;
34
36
  } | {
35
37
  applicationFileThumbnails: IApplicationFileThumbnail;
38
+ } | {
39
+ applicationFiles: IApplicationFile[];
36
40
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/storage",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Core package to interact with Abyss-Storage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",