@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.
Files changed (196) hide show
  1. package/.eslintrc.js +1 -2
  2. package/README.md +1 -1
  3. package/dist/api/atlas-document.api.d.ts +2 -1
  4. package/dist/api/atlas-document.api.js +5 -1
  5. package/dist/api/atlas-document.api.js.map +1 -1
  6. package/dist/api/atlas-group.api.js.map +1 -1
  7. package/dist/api/atlas-page.api.js.map +1 -1
  8. package/dist/api/atlas.api.js +3 -3
  9. package/dist/api/atlas.api.js.map +1 -1
  10. package/dist/api/atlas.public.api.js.map +1 -1
  11. package/dist/api/board-card.api.js.map +1 -1
  12. package/dist/api/board-column.api.js.map +1 -1
  13. package/dist/api/board-label.api.js +1 -2
  14. package/dist/api/board-label.api.js.map +1 -1
  15. package/dist/api/board.api.js +7 -5
  16. package/dist/api/board.api.js.map +1 -1
  17. package/dist/api/draw.api.js +1 -2
  18. package/dist/api/draw.api.js.map +1 -1
  19. package/dist/api/draw.public.api.js.map +1 -1
  20. package/dist/api/extraction-plan-preset.api.js +19 -6
  21. package/dist/api/extraction-plan-preset.api.js.map +1 -1
  22. package/dist/api/extraction-plan-preset.api.test.js +17 -7
  23. package/dist/api/extraction-plan-preset.api.test.js.map +1 -1
  24. package/dist/api/extraction-settings.api.js.map +1 -1
  25. package/dist/api/extraction.api.d.ts +3 -4
  26. package/dist/api/extraction.api.js +41 -80
  27. package/dist/api/extraction.api.js.map +1 -1
  28. package/dist/api/extraction.application.api.d.ts +4 -0
  29. package/dist/api/extraction.application.api.js +23 -0
  30. package/dist/api/extraction.application.api.js.map +1 -0
  31. package/dist/api/extraction.application.api.test.d.ts +1 -0
  32. package/dist/api/extraction.application.api.test.js +69 -0
  33. package/dist/api/extraction.application.api.test.js.map +1 -0
  34. package/dist/api/index.d.ts +1 -0
  35. package/dist/api/index.js +1 -0
  36. package/dist/api/index.js.map +1 -1
  37. package/dist/api/probe-scan.api.d.ts +4 -11
  38. package/dist/api/probe-scan.api.js +18 -28
  39. package/dist/api/probe-scan.api.js.map +1 -1
  40. package/dist/api/probe-scan.api.test.js +27 -7
  41. package/dist/api/probe-scan.api.test.js.map +1 -1
  42. package/dist/api/probe-scan.application.api.d.ts +4 -4
  43. package/dist/api/probe-scan.application.api.js +2 -2
  44. package/dist/api/probe-scan.application.api.js.map +1 -1
  45. package/dist/api/probe-scan.application.api.test.js +21 -7
  46. package/dist/api/probe-scan.application.api.test.js.map +1 -1
  47. package/dist/api/probe-webhook.api.test.js +17 -7
  48. package/dist/api/probe-webhook.api.test.js.map +1 -1
  49. package/dist/api/probe-webhook.application.api.d.ts +1 -1
  50. package/dist/api/probe-webhook.application.api.test.js +17 -7
  51. package/dist/api/probe-webhook.application.api.test.js.map +1 -1
  52. package/dist/api/retrospective.api.js +2 -1
  53. package/dist/api/retrospective.api.js.map +1 -1
  54. package/dist/api/short-link.admin.api.js.map +1 -1
  55. package/dist/api/short-link.api.js.map +1 -1
  56. package/dist/api/short-link.public.api.js.map +1 -1
  57. package/dist/api/tag.api.js.map +1 -1
  58. package/dist/constants/atlas.constants.js +1 -1
  59. package/dist/constants/atlas.constants.js.map +1 -1
  60. package/dist/constants/extract.constants.d.ts +4 -0
  61. package/dist/constants/extract.constants.js +91 -0
  62. package/dist/constants/extract.constants.js.map +1 -0
  63. package/dist/constants/index.d.ts +1 -0
  64. package/dist/constants/index.js +1 -0
  65. package/dist/constants/index.js.map +1 -1
  66. package/dist/index.d.ts +5 -0
  67. package/dist/index.js +22 -7
  68. package/dist/index.js.map +1 -1
  69. package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
  70. package/dist/server-sent-events/server-sent-events.manager.js +1 -2
  71. package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
  72. package/dist/types/enum/document-type.enum.d.ts +1 -0
  73. package/dist/types/enum/document-type.enum.js +1 -0
  74. package/dist/types/enum/document-type.enum.js.map +1 -1
  75. package/dist/types/enum/extract-field-format.enum.d.ts +7 -0
  76. package/dist/types/enum/extract-field-format.enum.js +12 -0
  77. package/dist/types/enum/extract-field-format.enum.js.map +1 -0
  78. package/dist/types/enum/extract-field-key.enum.d.ts +59 -0
  79. package/dist/types/enum/extract-field-key.enum.js +64 -0
  80. package/dist/types/enum/extract-field-key.enum.js.map +1 -0
  81. package/dist/types/enum/extraction-warning.enum.d.ts +4 -1
  82. package/dist/types/enum/extraction-warning.enum.js +3 -0
  83. package/dist/types/enum/extraction-warning.enum.js.map +1 -1
  84. package/dist/types/enum/index.d.ts +2 -0
  85. package/dist/types/enum/index.js +2 -0
  86. package/dist/types/enum/index.js.map +1 -1
  87. package/dist/types/enum/rcb-bank.enum.js +255 -39
  88. package/dist/types/enum/rcb-bank.enum.js.map +1 -1
  89. package/dist/types/interface/api/requests/abyss.admin.request.d.ts +1 -1
  90. package/dist/types/interface/api/requests/atlas-document.request.d.ts +6 -0
  91. package/dist/types/interface/api/requests/board-card-document.request.d.ts +1 -0
  92. package/dist/types/interface/api/requests/extraction.request.d.ts +12 -2
  93. package/dist/types/interface/api/responses/atlas-document.response.d.ts +6 -4
  94. package/dist/types/interface/api/responses/board-card-document.response.d.ts +2 -4
  95. package/dist/types/interface/api/responses/draw.public.response.d.ts +2 -0
  96. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
  97. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
  98. package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
  99. package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
  100. package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
  101. package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
  102. package/dist/types/interface/models/extraction.dto.d.ts +13 -0
  103. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  104. package/dist/types/interface/models/index.d.ts +1 -0
  105. package/dist/types/interface/models/index.js +1 -0
  106. package/dist/types/interface/models/index.js.map +1 -1
  107. package/dist/types/interface/models/project.dto.d.ts +1 -1
  108. package/dist/types/interface/models/short-link.dto.d.ts +8 -0
  109. package/dist/types/interface/models/upload-session.dto.d.ts +8 -0
  110. package/dist/types/interface/models/upload-session.dto.js +3 -0
  111. package/dist/types/interface/models/upload-session.dto.js.map +1 -0
  112. package/dist/types/interface/models/user.dto.d.ts +1 -0
  113. package/dist/utils/extraction-webhook.utils.d.ts +0 -2
  114. package/dist/utils/extraction-webhook.utils.js +1 -2
  115. package/dist/utils/extraction-webhook.utils.js.map +1 -1
  116. package/dist/utils/probe-scan-cost.utils.d.ts +1 -1
  117. package/dist/utils/probe-webhook-signature.utils.d.ts +0 -2
  118. package/dist/utils/probe-webhook-signature.utils.js +1 -2
  119. package/dist/utils/probe-webhook-signature.utils.js.map +1 -1
  120. package/package.json +16 -18
  121. package/src/api/atlas-document.api.ts +20 -3
  122. package/src/api/atlas-group.api.ts +4 -1
  123. package/src/api/atlas-page.api.ts +12 -6
  124. package/src/api/atlas.api.ts +12 -7
  125. package/src/api/atlas.public.api.ts +3 -1
  126. package/src/api/board-card.api.ts +6 -3
  127. package/src/api/board-column.api.ts +4 -1
  128. package/src/api/board-label.api.ts +7 -3
  129. package/src/api/board.api.ts +19 -10
  130. package/src/api/draw.api.ts +16 -12
  131. package/src/api/draw.public.api.ts +3 -1
  132. package/src/api/extraction-plan-preset.api.ts +64 -18
  133. package/src/api/extraction-settings.api.ts +2 -8
  134. package/src/api/extraction.api.ts +82 -84
  135. package/src/api/extraction.application.api.test.ts +55 -0
  136. package/src/api/extraction.application.api.ts +73 -0
  137. package/src/api/index.ts +1 -0
  138. package/src/api/probe-scan.api.test.ts +26 -0
  139. package/src/api/probe-scan.api.ts +66 -54
  140. package/src/api/probe-scan.application.api.test.ts +14 -0
  141. package/src/api/probe-scan.application.api.ts +5 -5
  142. package/src/api/retrospective.api.ts +8 -5
  143. package/src/api/short-link.admin.api.ts +14 -4
  144. package/src/api/short-link.api.ts +39 -17
  145. package/src/api/short-link.public.api.ts +25 -11
  146. package/src/api/tag.api.ts +3 -1
  147. package/src/constants/atlas.constants.ts +1 -1
  148. package/src/constants/extract.constants.ts +109 -0
  149. package/src/constants/index.ts +1 -0
  150. package/src/index.ts +19 -0
  151. package/src/server-sent-events/server-sent-events.manager.ts +5 -3
  152. package/src/types/enum/document-type.enum.ts +1 -0
  153. package/src/types/enum/extract-field-format.enum.ts +16 -0
  154. package/src/types/enum/extract-field-key.enum.ts +77 -0
  155. package/src/types/enum/extraction-warning.enum.ts +57 -0
  156. package/src/types/enum/index.ts +2 -0
  157. package/src/types/enum/rcb-bank.enum.ts +255 -41
  158. package/src/types/interface/api/requests/abyss.admin.request.ts +2 -1
  159. package/src/types/interface/api/requests/atlas-document.request.ts +14 -0
  160. package/src/types/interface/api/requests/board-card-document.request.ts +5 -0
  161. package/src/types/interface/api/requests/extraction.request.ts +23 -0
  162. package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
  163. package/src/types/interface/api/responses/atlas-document.response.ts +12 -4
  164. package/src/types/interface/api/responses/atlas-group.response.ts +1 -0
  165. package/src/types/interface/api/responses/atlas-page.response.ts +1 -0
  166. package/src/types/interface/api/responses/atlas.response.ts +1 -0
  167. package/src/types/interface/api/responses/beam.response.ts +2 -0
  168. package/src/types/interface/api/responses/board-card-checklist.response.ts +3 -0
  169. package/src/types/interface/api/responses/board-card-comment.response.ts +1 -0
  170. package/src/types/interface/api/responses/board-card-document.response.ts +6 -4
  171. package/src/types/interface/api/responses/board-card.response.ts +3 -0
  172. package/src/types/interface/api/responses/board-column.response.ts +1 -0
  173. package/src/types/interface/api/responses/board-label.response.ts +3 -0
  174. package/src/types/interface/api/responses/board.response.ts +1 -0
  175. package/src/types/interface/api/responses/draw.public.response.ts +3 -0
  176. package/src/types/interface/api/responses/draw.response.ts +1 -0
  177. package/src/types/interface/api/responses/retrospective-card.response.ts +1 -0
  178. package/src/types/interface/api/responses/retrospective-section.response.ts +1 -0
  179. package/src/types/interface/api/responses/retrospective.response.ts +3 -1
  180. package/src/types/interface/api/responses/short-link.admin.response.ts +1 -0
  181. package/src/types/interface/api/responses/short-link.response.ts +1 -0
  182. package/src/types/interface/api/responses/tag.response.ts +2 -0
  183. package/src/types/interface/models/content-share.dto.ts +5 -1
  184. package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
  185. package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
  186. package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
  187. package/src/types/interface/models/extraction.dto.ts +35 -0
  188. package/src/types/interface/models/index.ts +1 -0
  189. package/src/types/interface/models/probe-webhook.dto.ts +3 -4
  190. package/src/types/interface/models/project.dto.ts +2 -1
  191. package/src/types/interface/models/short-link.dto.ts +2 -0
  192. package/src/types/interface/models/upload-session.dto.ts +24 -0
  193. package/src/types/interface/models/user.dto.ts +3 -0
  194. package/src/utils/extraction-webhook.utils.ts +1 -1
  195. package/src/utils/probe-webhook-signature.utils.ts +1 -1
  196. 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 { ShareableContentType, SharePermission, ShareTargetType } from '../../enum/content-share.enum';
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; void _passed;
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; void _modes;
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
- { providerId: 'pdf-auto', providerVersion: '1.0.0', interpreterId: 'algo-v1', interpreterVersion: '1.0.0' },
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; void _sourceCount;
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
- (fetched.fieldsJson ?? {}).totalTtc;
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; void _ocrPages;
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; void _passCount;
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; void _agg;
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 { IExtractionPlan, IFieldValue, IExtractModesData, IPositionedToken } from './extraction-plan.dto';
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; void _ik; void _cs;
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 = { text: 'IBAN', page: 1, bbox: { x: 1, y: 2, w: 3, h: 4 }, conf: 95 };
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; void _tokNoConf;
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, ISpatialTemplateConfig, IExtractionTemplateVersionDto, ISpatialZoneExtractor,
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 = { fieldKey: 'totalTtc', page: 1, rect: { x: 0.6, y: 0.8, w: 0.3, h: 0.05 }, extractor: 'amount', amountLocale: 'fr' };
12
- const config: ISpatialTemplateConfig = { kind: 'spatial', documentType: DocumentType.INVOICE, zones: [zone] };
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; void _kind;
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 = { id: 'v1', templateId: 't1', version: 1, templateJson: { kind: 'spatial' }, comment: null, createdAt: '2026-06-28T00:00:00.000Z' };
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
 
@@ -34,3 +34,4 @@ export * from './extraction-spatial-template.dto';
34
34
  export * from './probe-scan.dto';
35
35
  export * from './probe-webhook.dto';
36
36
  export * from './probe-webhook-delivery.dto';
37
+ export * from './upload-session.dto';
@@ -1,8 +1,7 @@
1
1
  // Mirrors apps/api/src/api/controllers/probe-webhook.controller.ts's local
2
- // WebhookResponseData / CreateWebhookResponseData. Public shape of a
3
- // registered `probe_webhooks` row — never echoes the internal ownership
4
- // columns (userId/organizationId/applicationId), same discipline as the
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
- createdByUserId: string; // Historical creator of the project. NOT used for access control.
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-var-requires
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-var-requires
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
+ }