@abyss-project/tools 2.4.0 → 2.5.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/dist/types/enum/file-scan-status.enum.d.ts +1 -0
- package/dist/types/enum/file-scan-status.enum.js +3 -0
- package/dist/types/enum/file-scan-status.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/interface/models/atlas-document.dto.d.ts +2 -0
- package/dist/types/interface/models/board-card-document.dto.d.ts +2 -0
- package/dist/types/interface/models/extraction.dto.d.ts +2 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -1
- package/package.json +1 -1
- package/src/types/enum/file-scan-status.enum.ts +33 -0
- package/src/types/enum/index.ts +1 -0
- package/src/types/interface/models/atlas-document.dto.ts +10 -0
- package/src/types/interface/models/board-card-document.dto.ts +10 -0
- package/src/types/interface/models/extraction.dto.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FileScanStatus = 'pending_scan' | 'clean' | 'infected' | 'skipped' | 'error';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-scan-status.enum.js","sourceRoot":"","sources":["../../../src/types/enum/file-scan-status.enum.ts"],"names":[],"mappings":""}
|
package/dist/types/enum/index.js
CHANGED
|
@@ -28,4 +28,5 @@ __exportStar(require("./provider-kind.enum"), exports);
|
|
|
28
28
|
__exportStar(require("./interpreter-kind.enum"), exports);
|
|
29
29
|
__exportStar(require("./combine-strategy.enum"), exports);
|
|
30
30
|
__exportStar(require("./probe-scan.enum"), exports);
|
|
31
|
+
__exportStar(require("./file-scan-status.enum"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,8CAA4B;AAC5B,uDAAqC;AACrC,uDAAqC;AACrC,kDAAgC;AAChC,4DAA0C;AAC1C,wEAAsD;AACtD,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,8CAA4B;AAC5B,uDAAqC;AACrC,uDAAqC;AACrC,kDAAgC;AAChC,4DAA0C;AAC1C,wEAAsD;AACtD,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,oDAAkC;AAClC,0DAAwC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IAtlasPage } from './atlas-page.dto';
|
|
2
2
|
import { IAtlas } from './atlas.dto';
|
|
3
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
3
4
|
export interface IAtlasDocument {
|
|
4
5
|
id: string;
|
|
5
6
|
atlasPageId: string;
|
|
@@ -12,6 +13,7 @@ export interface IAtlasDocument {
|
|
|
12
13
|
sizeOctet: number;
|
|
13
14
|
mimeType: string;
|
|
14
15
|
checksum: string;
|
|
16
|
+
scanStatus: FileScanStatus | null;
|
|
15
17
|
createdAt?: Date;
|
|
16
18
|
updatedAt?: Date;
|
|
17
19
|
atlasPage?: IAtlasPage;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IBoardCard } from './board-card.dto';
|
|
2
2
|
import { IBoard } from './board.dto';
|
|
3
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
3
4
|
export interface IBoardCardDocument {
|
|
4
5
|
id: string;
|
|
5
6
|
boardCardId: string;
|
|
@@ -12,6 +13,7 @@ export interface IBoardCardDocument {
|
|
|
12
13
|
checksum: string;
|
|
13
14
|
mimeType: string;
|
|
14
15
|
sizeOctet: number;
|
|
16
|
+
scanStatus: FileScanStatus | null;
|
|
15
17
|
updatedAt?: Date;
|
|
16
18
|
createdAt?: Date;
|
|
17
19
|
boardCard: IBoardCard;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
|
|
2
2
|
import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
|
|
3
3
|
import { DocumentType } from '../../../types/enum/document-type.enum';
|
|
4
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
4
5
|
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
5
6
|
export { ExtractionFeedbackIssueType };
|
|
6
7
|
export type ExtractionMode = 'auto' | 'hint' | 'template';
|
|
@@ -51,6 +52,7 @@ export interface IExtractionFile {
|
|
|
51
52
|
detectedIban: string | null;
|
|
52
53
|
detectedBic: string | null;
|
|
53
54
|
detectedCurrency: string | null;
|
|
55
|
+
scanStatus: FileScanStatus | null;
|
|
54
56
|
createdAt: string;
|
|
55
57
|
updatedAt: string;
|
|
56
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;
|
|
1
|
+
{"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AAwF3E,sGAxFA,+CAAqB,OAwFA;AAvF9B,iHAAsG;AAM7F,4GANA,iEAA2B,OAMA;AA+QpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antivirus scan verdict for a stored file, mirrored from AbyssStorage.
|
|
3
|
+
*
|
|
4
|
+
* Same vocabulary as `@abyss-project/storage`'s `FileScanStatus` enum
|
|
5
|
+
* (`application_files.scanStatus`): `pending_scan` | `clean` | `infected` |
|
|
6
|
+
* `skipped` | `error`. Intentionally re-declared here as a string union — NOT
|
|
7
|
+
* imported — because abyss-tools-core is standalone (does not depend on
|
|
8
|
+
* `@abyss-project/storage`), the same approach every other core package
|
|
9
|
+
* (abyss-main asset-core, abyss-banking-core, abyss-memories-core) takes for
|
|
10
|
+
* a mirrored external vocabulary. `BeamFileScanStatus` (beam.enum.ts) mirrors
|
|
11
|
+
* the SAME storage vocabulary as a real TS enum instead: that shape fits
|
|
12
|
+
* beam, which converts a single Map of live-read values at ONE serialization
|
|
13
|
+
* boundary (an explicit `Record<FileScanStatus, BeamFileScanStatus>`
|
|
14
|
+
* suffices there). This column is denormalized and WRITTEN from several call
|
|
15
|
+
* sites (webhook UPLOAD seed, webhook SCAN_RESULT update, cloud-import
|
|
16
|
+
* mirror, archive-upload seed) — a string union lets the backend assign a
|
|
17
|
+
* storage `FileScanStatus` enum value straight into it with no cast (a
|
|
18
|
+
* string-enum member is assignable to a matching string-literal union, but
|
|
19
|
+
* NOT to a distinct local enum with identical values), avoiding a repeated
|
|
20
|
+
* conversion Record at every one of those sites. Keep the members in sync
|
|
21
|
+
* with storage's enum.
|
|
22
|
+
*
|
|
23
|
+
* Storage-neutral posture (ADR-0038): this field is purely informational —
|
|
24
|
+
* exposed so the front can render an AbyssProbe indicator (clean / "en
|
|
25
|
+
* analyse" / infected). Nothing in abyss-tools purges an infected row,
|
|
26
|
+
* redacts a servable id, or blocks a read while pending; the front decides
|
|
27
|
+
* what to show (e.g. blurring a pending thumbnail).
|
|
28
|
+
*
|
|
29
|
+
* Used by BoardCardDocument, AtlasDocument and ExtractionFile (the last only
|
|
30
|
+
* for an archive-owned row — see ExtractionFile.scanStatus's own doc
|
|
31
|
+
* comment).
|
|
32
|
+
*/
|
|
33
|
+
export type FileScanStatus = 'pending_scan' | 'clean' | 'infected' | 'skipped' | 'error';
|
package/src/types/enum/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IAtlasPage } from './atlas-page.dto';
|
|
2
2
|
import { IAtlas } from './atlas.dto';
|
|
3
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
3
4
|
|
|
4
5
|
export interface IAtlasDocument {
|
|
5
6
|
id: string;
|
|
@@ -13,6 +14,15 @@ export interface IAtlasDocument {
|
|
|
13
14
|
sizeOctet: number;
|
|
14
15
|
mimeType: string;
|
|
15
16
|
checksum: string;
|
|
17
|
+
/**
|
|
18
|
+
* Antivirus verdict mirrored from AbyssStorage (denormalized, seeded at the
|
|
19
|
+
* UPLOAD webhook and updated by the SCAN_RESULT webhook — see
|
|
20
|
+
* storage-webhook.service.ts#handleScanResult). Null for a document
|
|
21
|
+
* created before this column existed. Storage-neutral (ADR-0038): purely
|
|
22
|
+
* informational — never redacted, never gates a read. The front renders
|
|
23
|
+
* the AbyssProbe indicator (and blurs a pending thumbnail) from this field.
|
|
24
|
+
*/
|
|
25
|
+
scanStatus: FileScanStatus | null;
|
|
16
26
|
createdAt?: Date;
|
|
17
27
|
updatedAt?: Date;
|
|
18
28
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IBoardCard } from './board-card.dto';
|
|
2
2
|
import { IBoard } from './board.dto';
|
|
3
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
3
4
|
|
|
4
5
|
export interface IBoardCardDocument {
|
|
5
6
|
id: string;
|
|
@@ -13,6 +14,15 @@ export interface IBoardCardDocument {
|
|
|
13
14
|
checksum: string;
|
|
14
15
|
mimeType: string;
|
|
15
16
|
sizeOctet: number;
|
|
17
|
+
/**
|
|
18
|
+
* Antivirus verdict mirrored from AbyssStorage (denormalized, seeded at the
|
|
19
|
+
* UPLOAD webhook and updated by the SCAN_RESULT webhook — see
|
|
20
|
+
* storage-webhook.service.ts#handleScanResult). Null for a document
|
|
21
|
+
* created before this column existed. Storage-neutral (ADR-0038): purely
|
|
22
|
+
* informational — never redacted, never gates a read. The front renders
|
|
23
|
+
* the AbyssProbe indicator (and blurs a pending thumbnail) from this field.
|
|
24
|
+
*/
|
|
25
|
+
scanStatus: FileScanStatus | null;
|
|
16
26
|
updatedAt?: Date;
|
|
17
27
|
createdAt?: Date;
|
|
18
28
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
|
|
7
7
|
import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
|
|
8
8
|
import { DocumentType } from '../../../types/enum/document-type.enum';
|
|
9
|
+
import { FileScanStatus } from '../../enum/file-scan-status.enum';
|
|
9
10
|
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
10
11
|
|
|
11
12
|
// Re-export so consumers can import ExtractionFeedbackIssueType from the DTO barrel.
|
|
@@ -74,6 +75,17 @@ export interface IExtractionFile {
|
|
|
74
75
|
detectedIban: string | null;
|
|
75
76
|
detectedBic: string | null;
|
|
76
77
|
detectedCurrency: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Antivirus verdict mirrored from AbyssStorage for an ARCHIVE-OWNED file
|
|
80
|
+
* only (seeded at extractionFileService.upsert from the archive-upload
|
|
81
|
+
* response — see extraction-extract.service.ts#archivePdf — and updated by
|
|
82
|
+
* the SCAN_RESULT webhook, storage-webhook.service.ts#handleScanResult).
|
|
83
|
+
* Null for a by-reference file (AbyssExtract never requested that scan, so
|
|
84
|
+
* it never mirrors a verdict for it) and for rows created before this
|
|
85
|
+
* column existed. Storage-neutral (ADR-0038): purely informational — never
|
|
86
|
+
* redacted, never gates a read.
|
|
87
|
+
*/
|
|
88
|
+
scanStatus: FileScanStatus | null;
|
|
77
89
|
createdAt: string;
|
|
78
90
|
updatedAt: string;
|
|
79
91
|
}
|