@abyss-project/tools 3.0.0 → 3.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/.eslintrc.js +1 -2
- package/README.md +1 -1
- package/dist/api/atlas-document.api.d.ts +2 -1
- package/dist/api/atlas-document.api.js +5 -1
- package/dist/api/atlas-document.api.js.map +1 -1
- package/dist/api/atlas-group.api.js.map +1 -1
- package/dist/api/atlas-page.api.js.map +1 -1
- package/dist/api/atlas.api.js +3 -3
- package/dist/api/atlas.api.js.map +1 -1
- package/dist/api/atlas.public.api.js.map +1 -1
- package/dist/api/board-card.api.js.map +1 -1
- package/dist/api/board-column.api.js.map +1 -1
- package/dist/api/board-label.api.js +1 -2
- package/dist/api/board-label.api.js.map +1 -1
- package/dist/api/board.api.js +7 -5
- package/dist/api/board.api.js.map +1 -1
- package/dist/api/draw.api.js +1 -2
- package/dist/api/draw.api.js.map +1 -1
- package/dist/api/draw.public.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.js +19 -6
- package/dist/api/extraction-plan-preset.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.test.js +17 -7
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -1
- package/dist/api/extraction-settings.api.js.map +1 -1
- package/dist/api/extraction.api.d.ts +3 -4
- package/dist/api/extraction.api.js +41 -80
- package/dist/api/extraction.api.js.map +1 -1
- package/dist/api/extraction.application.api.d.ts +4 -0
- package/dist/api/extraction.application.api.js +23 -0
- package/dist/api/extraction.application.api.js.map +1 -0
- package/dist/api/extraction.application.api.test.d.ts +1 -0
- package/dist/api/extraction.application.api.test.js +69 -0
- package/dist/api/extraction.application.api.test.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/probe-scan.api.d.ts +4 -11
- package/dist/api/probe-scan.api.js +18 -28
- package/dist/api/probe-scan.api.js.map +1 -1
- package/dist/api/probe-scan.api.test.js +27 -7
- package/dist/api/probe-scan.api.test.js.map +1 -1
- package/dist/api/probe-scan.application.api.d.ts +4 -4
- package/dist/api/probe-scan.application.api.js +2 -2
- package/dist/api/probe-scan.application.api.js.map +1 -1
- package/dist/api/probe-scan.application.api.test.js +21 -7
- package/dist/api/probe-scan.application.api.test.js.map +1 -1
- package/dist/api/probe-webhook.api.test.js +17 -7
- package/dist/api/probe-webhook.api.test.js.map +1 -1
- package/dist/api/probe-webhook.application.api.d.ts +1 -1
- package/dist/api/probe-webhook.application.api.test.js +17 -7
- package/dist/api/probe-webhook.application.api.test.js.map +1 -1
- package/dist/api/retrospective.api.js +2 -1
- package/dist/api/retrospective.api.js.map +1 -1
- package/dist/api/short-link.admin.api.js.map +1 -1
- package/dist/api/short-link.api.js.map +1 -1
- package/dist/api/short-link.public.api.js.map +1 -1
- package/dist/api/tag.api.js.map +1 -1
- package/dist/constants/atlas.constants.js +1 -1
- package/dist/constants/atlas.constants.js.map +1 -1
- package/dist/constants/extract.constants.d.ts +4 -0
- package/dist/constants/extract.constants.js +91 -0
- package/dist/constants/extract.constants.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +1 -0
- package/dist/types/enum/document-type.enum.js +1 -0
- package/dist/types/enum/document-type.enum.js.map +1 -1
- package/dist/types/enum/extract-field-format.enum.d.ts +7 -0
- package/dist/types/enum/extract-field-format.enum.js +12 -0
- package/dist/types/enum/extract-field-format.enum.js.map +1 -0
- package/dist/types/enum/extract-field-key.enum.d.ts +59 -0
- package/dist/types/enum/extract-field-key.enum.js +64 -0
- package/dist/types/enum/extract-field-key.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +4 -1
- package/dist/types/enum/extraction-warning.enum.js +3 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/rcb-bank.enum.js +255 -39
- package/dist/types/enum/rcb-bank.enum.js.map +1 -1
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +1 -1
- package/dist/types/interface/api/requests/atlas-document.request.d.ts +6 -0
- package/dist/types/interface/api/requests/board-card-document.request.d.ts +1 -0
- package/dist/types/interface/api/requests/extraction.request.d.ts +12 -2
- package/dist/types/interface/api/responses/atlas-document.response.d.ts +6 -4
- package/dist/types/interface/api/responses/board-card-document.response.d.ts +2 -4
- package/dist/types/interface/api/responses/draw.public.response.d.ts +2 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction.dto.d.ts +13 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -1
- package/dist/types/interface/models/index.d.ts +1 -0
- package/dist/types/interface/models/index.js +1 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/project.dto.d.ts +1 -1
- package/dist/types/interface/models/short-link.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.js +3 -0
- package/dist/types/interface/models/upload-session.dto.js.map +1 -0
- package/dist/types/interface/models/user.dto.d.ts +1 -0
- package/dist/utils/extraction-webhook.utils.d.ts +0 -2
- package/dist/utils/extraction-webhook.utils.js +1 -2
- package/dist/utils/extraction-webhook.utils.js.map +1 -1
- package/dist/utils/probe-scan-cost.utils.d.ts +1 -1
- package/dist/utils/probe-webhook-signature.utils.d.ts +0 -2
- package/dist/utils/probe-webhook-signature.utils.js +1 -2
- package/dist/utils/probe-webhook-signature.utils.js.map +1 -1
- package/package.json +16 -18
- package/src/api/atlas-document.api.ts +20 -3
- package/src/api/atlas-group.api.ts +4 -1
- package/src/api/atlas-page.api.ts +12 -6
- package/src/api/atlas.api.ts +12 -7
- package/src/api/atlas.public.api.ts +3 -1
- package/src/api/board-card.api.ts +6 -3
- package/src/api/board-column.api.ts +4 -1
- package/src/api/board-label.api.ts +7 -3
- package/src/api/board.api.ts +19 -10
- package/src/api/draw.api.ts +16 -12
- package/src/api/draw.public.api.ts +3 -1
- package/src/api/extraction-plan-preset.api.ts +64 -18
- package/src/api/extraction-settings.api.ts +2 -8
- package/src/api/extraction.api.ts +82 -84
- package/src/api/extraction.application.api.test.ts +55 -0
- package/src/api/extraction.application.api.ts +73 -0
- package/src/api/index.ts +1 -0
- package/src/api/probe-scan.api.test.ts +26 -0
- package/src/api/probe-scan.api.ts +66 -54
- package/src/api/probe-scan.application.api.test.ts +14 -0
- package/src/api/probe-scan.application.api.ts +5 -5
- package/src/api/retrospective.api.ts +8 -5
- package/src/api/short-link.admin.api.ts +14 -4
- package/src/api/short-link.api.ts +39 -17
- package/src/api/short-link.public.api.ts +25 -11
- package/src/api/tag.api.ts +3 -1
- package/src/constants/atlas.constants.ts +1 -1
- package/src/constants/extract.constants.ts +109 -0
- package/src/constants/index.ts +1 -0
- package/src/index.ts +19 -0
- package/src/server-sent-events/server-sent-events.manager.ts +5 -3
- package/src/types/enum/document-type.enum.ts +1 -0
- package/src/types/enum/extract-field-format.enum.ts +16 -0
- package/src/types/enum/extract-field-key.enum.ts +77 -0
- package/src/types/enum/extraction-warning.enum.ts +57 -0
- package/src/types/enum/index.ts +2 -0
- package/src/types/enum/rcb-bank.enum.ts +255 -41
- package/src/types/interface/api/requests/abyss.admin.request.ts +2 -1
- package/src/types/interface/api/requests/atlas-document.request.ts +14 -0
- package/src/types/interface/api/requests/board-card-document.request.ts +5 -0
- package/src/types/interface/api/requests/extraction.request.ts +23 -0
- package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
- package/src/types/interface/api/responses/atlas-document.response.ts +12 -4
- package/src/types/interface/api/responses/atlas-group.response.ts +1 -0
- package/src/types/interface/api/responses/atlas-page.response.ts +1 -0
- package/src/types/interface/api/responses/atlas.response.ts +1 -0
- package/src/types/interface/api/responses/beam.response.ts +2 -0
- package/src/types/interface/api/responses/board-card-checklist.response.ts +3 -0
- package/src/types/interface/api/responses/board-card-comment.response.ts +1 -0
- package/src/types/interface/api/responses/board-card-document.response.ts +6 -4
- package/src/types/interface/api/responses/board-card.response.ts +3 -0
- package/src/types/interface/api/responses/board-column.response.ts +1 -0
- package/src/types/interface/api/responses/board-label.response.ts +3 -0
- package/src/types/interface/api/responses/board.response.ts +1 -0
- package/src/types/interface/api/responses/draw.public.response.ts +3 -0
- package/src/types/interface/api/responses/draw.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-card.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-section.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective.response.ts +3 -1
- package/src/types/interface/api/responses/short-link.admin.response.ts +1 -0
- package/src/types/interface/api/responses/short-link.response.ts +1 -0
- package/src/types/interface/api/responses/tag.response.ts +2 -0
- package/src/types/interface/models/content-share.dto.ts +5 -1
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
- package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
- package/src/types/interface/models/extraction.dto.ts +35 -0
- package/src/types/interface/models/index.ts +1 -0
- package/src/types/interface/models/probe-webhook.dto.ts +3 -4
- package/src/types/interface/models/project.dto.ts +2 -1
- package/src/types/interface/models/short-link.dto.ts +2 -0
- package/src/types/interface/models/upload-session.dto.ts +24 -0
- package/src/types/interface/models/user.dto.ts +3 -0
- package/src/utils/extraction-webhook.utils.ts +1 -1
- package/src/utils/probe-webhook-signature.utils.ts +1 -1
- package/tsconfig.check.json +15 -0
|
@@ -10,6 +10,7 @@ export interface IGetShortLinkAdminData {
|
|
|
10
10
|
}
|
|
11
11
|
export type IGetShortLinkAdminResponse = IResponse<IGetShortLinkAdminData>;
|
|
12
12
|
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
13
14
|
export interface IDeleteShortLinkAdminData {}
|
|
14
15
|
export type IDeleteShortLinkAdminResponse = IResponse<IDeleteShortLinkAdminData>;
|
|
15
16
|
|
|
@@ -20,6 +20,7 @@ export interface IUpdateShortLinkData {
|
|
|
20
20
|
}
|
|
21
21
|
export type IUpdateShortLinkResponse = IResponse<IUpdateShortLinkData>;
|
|
22
22
|
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
23
24
|
export interface IDeleteShortLinkData {}
|
|
24
25
|
export type IDeleteShortLinkResponse = IResponse<IDeleteShortLinkData>;
|
|
25
26
|
|
|
@@ -16,6 +16,7 @@ export interface IUpdateTagData {
|
|
|
16
16
|
}
|
|
17
17
|
export type IUpdateTagResponse = IResponse<IUpdateTagData>;
|
|
18
18
|
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
19
20
|
export interface IDeleteTagData {}
|
|
20
21
|
export type IDeleteTagResponse = IResponse<IDeleteTagData>;
|
|
21
22
|
|
|
@@ -24,6 +25,7 @@ export interface IAssignTagData {
|
|
|
24
25
|
}
|
|
25
26
|
export type IAssignTagResponse = IResponse<IAssignTagData>;
|
|
26
27
|
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
27
29
|
export interface IUnassignTagData {}
|
|
28
30
|
export type IUnassignTagResponse = IResponse<IUnassignTagData>;
|
|
29
31
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ShareableContentType,
|
|
3
|
+
SharePermission,
|
|
4
|
+
ShareTargetType,
|
|
5
|
+
} from '../../enum/content-share.enum';
|
|
2
6
|
|
|
3
7
|
export interface IContentShare {
|
|
4
8
|
id: string;
|
|
@@ -80,14 +80,16 @@ for (const sig of fvWithSignals.signals) {
|
|
|
80
80
|
if (sig.kind === 'format' || sig.kind === 'coherence') {
|
|
81
81
|
const _check: string = sig.check;
|
|
82
82
|
const _passed: boolean = sig.passed;
|
|
83
|
-
void _check;
|
|
83
|
+
void _check;
|
|
84
|
+
void _passed;
|
|
84
85
|
} else if (sig.kind === 'anchor') {
|
|
85
86
|
const _detail: string = sig.detail;
|
|
86
87
|
void _detail;
|
|
87
88
|
} else {
|
|
88
89
|
const _agreed: boolean = sig.agreed;
|
|
89
90
|
const _modes: number = sig.modes;
|
|
90
|
-
void _agreed;
|
|
91
|
+
void _agreed;
|
|
92
|
+
void _modes;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -102,7 +104,12 @@ const manifest: IExecutionManifest = {
|
|
|
102
104
|
},
|
|
103
105
|
combine: CombineStrategy.MAX_CONFIDENCE,
|
|
104
106
|
passes: [
|
|
105
|
-
{
|
|
107
|
+
{
|
|
108
|
+
providerId: 'pdf-auto',
|
|
109
|
+
providerVersion: '1.0.0',
|
|
110
|
+
interpreterId: 'algo-v1',
|
|
111
|
+
interpreterVersion: '1.0.0',
|
|
112
|
+
},
|
|
106
113
|
],
|
|
107
114
|
createdAt: '2026-06-28T00:00:00.000Z',
|
|
108
115
|
};
|
|
@@ -154,12 +161,13 @@ const totalTtc = (fetched.fieldsJson ?? {}).totalTtc;
|
|
|
154
161
|
if (totalTtc) {
|
|
155
162
|
const _chosenId: string = totalTtc.chosen.interpreterId;
|
|
156
163
|
const _sourceCount: number = totalTtc.sources.length;
|
|
157
|
-
void _chosenId;
|
|
164
|
+
void _chosenId;
|
|
165
|
+
void _sourceCount;
|
|
158
166
|
}
|
|
159
167
|
|
|
160
168
|
// Backward-compat: an old reader that only knows value+confidence still works.
|
|
161
|
-
const _legacyRead: { value: unknown; confidence: number } | undefined =
|
|
162
|
-
|
|
169
|
+
const _legacyRead: { value: unknown; confidence: number } | undefined = (fetched.fieldsJson ?? {})
|
|
170
|
+
.totalTtc;
|
|
163
171
|
void _legacyRead;
|
|
164
172
|
|
|
165
173
|
// The GET extraction response data exposes the same superset under `fields`
|
|
@@ -174,7 +182,8 @@ void getData;
|
|
|
174
182
|
// usedOcr/ocrPageCount remain readable as before.
|
|
175
183
|
const _usedOcr: boolean | undefined = fetched.usedOcr;
|
|
176
184
|
const _ocrPages: number | undefined = fetched.ocrPageCount;
|
|
177
|
-
void _usedOcr;
|
|
185
|
+
void _usedOcr;
|
|
186
|
+
void _ocrPages;
|
|
178
187
|
|
|
179
188
|
// A CONSUMER reads the manifest + globalConfidence fields that the backend
|
|
180
189
|
// actually persists/surfaces (createdAt — NOT resolvedAt — and the stats block),
|
|
@@ -182,12 +191,14 @@ void _usedOcr; void _ocrPages;
|
|
|
182
191
|
if (fetched.executionManifest) {
|
|
183
192
|
const _createdAt: string = fetched.executionManifest.createdAt;
|
|
184
193
|
const _passCount: number = fetched.executionManifest.passes.length;
|
|
185
|
-
void _createdAt;
|
|
194
|
+
void _createdAt;
|
|
195
|
+
void _passCount;
|
|
186
196
|
}
|
|
187
197
|
if (fetched.globalConfidence) {
|
|
188
198
|
const _overall: number = fetched.globalConfidence.stats.overall;
|
|
189
199
|
const _agg: 'weighted-by-field-importance' = fetched.globalConfidence.aggregation;
|
|
190
|
-
void _overall;
|
|
200
|
+
void _overall;
|
|
201
|
+
void _agg;
|
|
191
202
|
}
|
|
192
203
|
|
|
193
204
|
export {};
|
|
@@ -3,13 +3,20 @@
|
|
|
3
3
|
// Run: npx tsc --noEmit (from packages/abyss_tools_core).
|
|
4
4
|
|
|
5
5
|
import { ProviderKind, InterpreterKind, CombineStrategy } from '../../enum';
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
IExtractionPlan,
|
|
8
|
+
IFieldValue,
|
|
9
|
+
IExtractModesData,
|
|
10
|
+
IPositionedToken,
|
|
11
|
+
} from './extraction-plan.dto';
|
|
7
12
|
|
|
8
13
|
// Verify enum string values match the api side.
|
|
9
14
|
const _pk: string = ProviderKind.TEXT; // 'text'
|
|
10
15
|
const _ik: string = InterpreterKind.TEMPLATE; // 'template'
|
|
11
16
|
const _cs: string = CombineStrategy.MAX_CONFIDENCE; // 'maxConfidence'
|
|
12
|
-
void _pk;
|
|
17
|
+
void _pk;
|
|
18
|
+
void _ik;
|
|
19
|
+
void _cs;
|
|
13
20
|
|
|
14
21
|
// Verify IFieldValue is a structural superset of {value,confidence}.
|
|
15
22
|
const fv: IFieldValue = {
|
|
@@ -40,8 +47,14 @@ const _plan: IExtractionPlan = {
|
|
|
40
47
|
void _plan;
|
|
41
48
|
|
|
42
49
|
// Verify IPositionedToken is { text, page, bbox{x,y,w,h}, conf? } (conf optional).
|
|
43
|
-
const _tok: IPositionedToken = {
|
|
50
|
+
const _tok: IPositionedToken = {
|
|
51
|
+
text: 'IBAN',
|
|
52
|
+
page: 1,
|
|
53
|
+
bbox: { x: 1, y: 2, w: 3, h: 4 },
|
|
54
|
+
conf: 95,
|
|
55
|
+
};
|
|
44
56
|
const _tokNoConf: IPositionedToken = { text: 'x', page: 2, bbox: { x: 0, y: 0, w: 1, h: 1 } };
|
|
45
|
-
void _tok;
|
|
57
|
+
void _tok;
|
|
58
|
+
void _tokNoConf;
|
|
46
59
|
|
|
47
60
|
export {};
|
|
@@ -3,24 +3,45 @@
|
|
|
3
3
|
// Run: npx tsc --noEmit (from packages/abyss_tools_core).
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
|
-
ISpatialZone,
|
|
6
|
+
ISpatialZone,
|
|
7
|
+
ISpatialTemplateConfig,
|
|
8
|
+
IExtractionTemplateVersionDto,
|
|
9
|
+
ISpatialZoneExtractor,
|
|
7
10
|
} from './extraction-spatial-template.dto';
|
|
8
11
|
import { DocumentType } from '../../enum/document-type.enum';
|
|
9
12
|
|
|
10
13
|
// A spatial zone + config type correctly (mirrors the backend schema).
|
|
11
|
-
const zone: ISpatialZone = {
|
|
12
|
-
|
|
14
|
+
const zone: ISpatialZone = {
|
|
15
|
+
fieldKey: 'totalTtc',
|
|
16
|
+
page: 1,
|
|
17
|
+
rect: { x: 0.6, y: 0.8, w: 0.3, h: 0.05 },
|
|
18
|
+
extractor: 'amount',
|
|
19
|
+
amountLocale: 'fr',
|
|
20
|
+
};
|
|
21
|
+
const config: ISpatialTemplateConfig = {
|
|
22
|
+
kind: 'spatial',
|
|
23
|
+
documentType: DocumentType.INVOICE,
|
|
24
|
+
zones: [zone],
|
|
25
|
+
};
|
|
13
26
|
// The fieldKey + kind discriminant are reachable.
|
|
14
27
|
const _fieldKey: string = config.zones[0].fieldKey; // 'totalTtc'
|
|
15
28
|
const _kind: 'spatial' = config.kind;
|
|
16
|
-
void _fieldKey;
|
|
29
|
+
void _fieldKey;
|
|
30
|
+
void _kind;
|
|
17
31
|
|
|
18
32
|
// Every extractor literal is assignable to the union.
|
|
19
33
|
const _extractors: ISpatialZoneExtractor[] = ['raw', 'regex', 'date', 'amount', 'iban'];
|
|
20
34
|
void _extractors;
|
|
21
35
|
|
|
22
36
|
// A template version dto types (serialized dates, nullable comment).
|
|
23
|
-
const v: IExtractionTemplateVersionDto = {
|
|
37
|
+
const v: IExtractionTemplateVersionDto = {
|
|
38
|
+
id: 'v1',
|
|
39
|
+
templateId: 't1',
|
|
40
|
+
version: 1,
|
|
41
|
+
templateJson: { kind: 'spatial' },
|
|
42
|
+
comment: null,
|
|
43
|
+
createdAt: '2026-06-28T00:00:00.000Z',
|
|
44
|
+
};
|
|
24
45
|
const _version: number = v.version; // 1
|
|
25
46
|
void _version;
|
|
26
47
|
|
|
@@ -63,6 +63,23 @@ export interface IExtractionMetadata {
|
|
|
63
63
|
[k: string]: unknown;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Payslip (fiche de paie) metadata, extracted generically by FR labels — no
|
|
68
|
+
* per-employer template. Amounts are integer cents; `pasRatePct` is a percent
|
|
69
|
+
* (e.g. 3.6 for 3,6 %). `period` is a stable label (ISO month or a "du … au …"
|
|
70
|
+
* span). Every field is optional: a field is present only when confidently found.
|
|
71
|
+
*/
|
|
72
|
+
export interface IPayslipMetadata {
|
|
73
|
+
netCents?: number;
|
|
74
|
+
grossCents?: number;
|
|
75
|
+
netTaxableCents?: number;
|
|
76
|
+
pasRatePct?: number;
|
|
77
|
+
pasAmountCents?: number;
|
|
78
|
+
period?: string;
|
|
79
|
+
employer?: string;
|
|
80
|
+
currency?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
66
83
|
export interface IExtractionFile {
|
|
67
84
|
id: string;
|
|
68
85
|
userId: string;
|
|
@@ -113,6 +130,24 @@ export interface IExtractionWarning {
|
|
|
113
130
|
type?: string;
|
|
114
131
|
/** Human-readable explanation from the adapter's ValidationResult. */
|
|
115
132
|
message?: string;
|
|
133
|
+
/**
|
|
134
|
+
* The withheld field's name. Present for the per-field withdrawal codes
|
|
135
|
+
* (`FIELD_BELOW_PUBLISH_FLOOR`, `FIELD_FORMAT_ONLY_DATE` #575,
|
|
136
|
+
* `FIELD_MRZ_OUT_OF_DOMAIN` #614).
|
|
137
|
+
*/
|
|
138
|
+
fieldKey?: string;
|
|
139
|
+
/**
|
|
140
|
+
* The field's calibrated confidence at the time it was withheld. Present
|
|
141
|
+
* for the per-field withdrawal codes. Never the value itself.
|
|
142
|
+
*/
|
|
143
|
+
confidence?: number;
|
|
144
|
+
/**
|
|
145
|
+
* The publish floor the field missed. Present only for
|
|
146
|
+
* `FIELD_BELOW_PUBLISH_FLOOR` — neither a `FIELD_FORMAT_ONLY_DATE` nor a
|
|
147
|
+
* `FIELD_MRZ_OUT_OF_DOMAIN` withdrawal is a floor comparison, and their
|
|
148
|
+
* confidence can sit above the field's floor.
|
|
149
|
+
*/
|
|
150
|
+
floor?: number;
|
|
116
151
|
};
|
|
117
152
|
}
|
|
118
153
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// Mirrors apps/api/src/api/controllers/probe-webhook.controller.ts's local
|
|
2
|
-
// WebhookResponseData
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// scan models.
|
|
2
|
+
// WebhookResponseData. Public shape of a registered `probe_webhooks` row —
|
|
3
|
+
// never echoes the internal ownership columns
|
|
4
|
+
// (userId/organizationId/applicationId), same discipline as the scan models.
|
|
6
5
|
//
|
|
7
6
|
// WS5-7 (AbyssProbe UX rework): `secret` is ALWAYS re-displayable now —
|
|
8
7
|
// returned on every read (GET /webhook list, and PATCH /webhook/:id), not
|
|
@@ -8,7 +8,8 @@ import { IUser } from './user.dto';
|
|
|
8
8
|
export interface IProject {
|
|
9
9
|
id?: string;
|
|
10
10
|
name: string;
|
|
11
|
-
|
|
11
|
+
// Historical creator of the project, null once their account is deleted. NOT used for access control.
|
|
12
|
+
createdByUserId: string | null;
|
|
12
13
|
organizationId: string;
|
|
13
14
|
updatedAt?: Date;
|
|
14
15
|
createdAt?: Date;
|
|
@@ -40,6 +40,8 @@ export interface IShortLinkWithStats extends IShortLink {
|
|
|
40
40
|
clicksByBrowser: { browser: string; clicks: number }[];
|
|
41
41
|
clicksByReferer: { referer: string; clicks: number }[];
|
|
42
42
|
clicksByUtmSource: { utmSource: string; clicks: number }[];
|
|
43
|
+
clicksByUtmMedium: { utmMedium: string; clicks: number }[];
|
|
44
|
+
clicksByUtmCampaign: { utmCampaign: string; clicks: number }[];
|
|
43
45
|
clicksByLanguage: { language: string; clicks: number }[];
|
|
44
46
|
clicksByRefererDomain: { refererDomain: string; clicks: number }[];
|
|
45
47
|
clicksLast24h: number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SP3 — transparent multipart upload.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors @abyss-project/storage's `UploadSession` (the return type of
|
|
5
|
+
* `initiateUpload`) as a LOCAL type instead of importing storage's own type,
|
|
6
|
+
* decoupling abyss-tools's public API contract from storage's package
|
|
7
|
+
* boundary — a front consumer of @abyss-project/tools should not need to
|
|
8
|
+
* also depend on @abyss-project/storage just to type a presign response
|
|
9
|
+
* (same mirroring rationale as abyss-memories's `IUploadSession`, abyss-form's
|
|
10
|
+
* `IUploadSession` and abyss-cloud's `IUploadSession`).
|
|
11
|
+
*
|
|
12
|
+
* `kind: 'single'` — size at or below storage's single-shot threshold:
|
|
13
|
+
* `token` is the one-shot pre-signed upload URL to PUT the whole file to.
|
|
14
|
+
* `kind: 'multipart'` — above the threshold: `multipartToken` identifies the
|
|
15
|
+
* multipart session and `partSizeOctet` is the fixed part size the front must
|
|
16
|
+
* chunk the file into (see @abyss-project/storage's `uploadWithSession`).
|
|
17
|
+
*
|
|
18
|
+
* Shared by every presign response DTO that proxies a *UploadUrl service
|
|
19
|
+
* method's `UploadSession` result as-is: board-card-document upload and
|
|
20
|
+
* atlas-document upload.
|
|
21
|
+
*/
|
|
22
|
+
export type IUploadSession =
|
|
23
|
+
| { kind: 'single'; token: string }
|
|
24
|
+
| { kind: 'multipart'; multipartToken: string; partSizeOctet: number };
|
|
@@ -14,6 +14,9 @@ export interface IUser {
|
|
|
14
14
|
// a mirrored key that must no longer authenticate.
|
|
15
15
|
personalApiKeyLookupHash?: string | null;
|
|
16
16
|
personalApiKeyRevokedAt?: Date | null;
|
|
17
|
+
// Set when the account was deleted in abyss-main (USER_DELETED, #199): the row stays, marked,
|
|
18
|
+
// and a session token signed before the deletion no longer authenticates.
|
|
19
|
+
accountDeletedAt?: Date | null;
|
|
17
20
|
updatedAt?: Date;
|
|
18
21
|
createdAt?: Date;
|
|
19
22
|
|
|
@@ -18,7 +18,7 @@ export interface VerifyExtractionWebhookInput {
|
|
|
18
18
|
|
|
19
19
|
export function verifyExtractionWebhook(input: VerifyExtractionWebhookInput): boolean {
|
|
20
20
|
if (!input.signatureHeader || !input.secret) return false;
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
22
22
|
const crypto = require('crypto');
|
|
23
23
|
const provided = input.signatureHeader.replace(/^sha256=/, '');
|
|
24
24
|
const computed: string = crypto
|
|
@@ -34,7 +34,7 @@ export interface VerifyProbeWebhookSignatureInput {
|
|
|
34
34
|
export function verifyProbeWebhookSignature(input: VerifyProbeWebhookSignatureInput): boolean {
|
|
35
35
|
if (!input.signatureHeader || !input.secret) return false;
|
|
36
36
|
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
38
38
|
const crypto = require('crypto');
|
|
39
39
|
const computed: string = crypto
|
|
40
40
|
.createHmac('sha256', input.secret)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Perimetre de VERIFICATION, distinct de celui du build.
|
|
3
|
+
//
|
|
4
|
+
// `tsconfig.json` exclut `src/**/*.spec.ts` parce qu'il sert a emettre `dist/`, ou une spec
|
|
5
|
+
// n'a rien a faire. Mais eslint s'appuie sur ce meme fichier via `parserOptions.project` :
|
|
6
|
+
// les cinq specs du paquet sortaient donc en « Parsing error: that TSConfig does not include
|
|
7
|
+
// this file », mesure du 2026-09-09, et n'etaient lintees par personne.
|
|
8
|
+
//
|
|
9
|
+
// Ce fichier sert uniquement a eslint. Il n'emet rien et ne change pas ce que `build` produit.
|
|
10
|
+
"extends": "./tsconfig.json",
|
|
11
|
+
"compilerOptions": {
|
|
12
|
+
"noEmit": true
|
|
13
|
+
},
|
|
14
|
+
"exclude": ["./dist/**/*"]
|
|
15
|
+
}
|