@abyss-project/tools 2.10.0 → 2.12.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 (119) hide show
  1. package/.eslintrc.js +33 -33
  2. package/.prettierrc +5 -5
  3. package/dist/api/atlas-group.api.js.map +1 -1
  4. package/dist/api/atlas-page.api.js.map +1 -1
  5. package/dist/api/atlas.api.js +3 -3
  6. package/dist/api/atlas.api.js.map +1 -1
  7. package/dist/api/atlas.public.api.js.map +1 -1
  8. package/dist/api/board-card.api.js.map +1 -1
  9. package/dist/api/board-column.api.js.map +1 -1
  10. package/dist/api/board-label.api.js +1 -2
  11. package/dist/api/board-label.api.js.map +1 -1
  12. package/dist/api/board.api.js +7 -5
  13. package/dist/api/board.api.js.map +1 -1
  14. package/dist/api/draw.api.js +1 -2
  15. package/dist/api/draw.api.js.map +1 -1
  16. package/dist/api/draw.public.api.js.map +1 -1
  17. package/dist/api/extraction-plan-preset.api.js +19 -6
  18. package/dist/api/extraction-plan-preset.api.js.map +1 -1
  19. package/dist/api/extraction-settings.api.js.map +1 -1
  20. package/dist/api/extraction.api.d.ts +0 -4
  21. package/dist/api/extraction.api.js +57 -46
  22. package/dist/api/extraction.api.js.map +1 -1
  23. package/dist/api/index.d.ts +0 -1
  24. package/dist/api/index.js +0 -1
  25. package/dist/api/index.js.map +1 -1
  26. package/dist/api/probe-scan.api.d.ts +2 -9
  27. package/dist/api/probe-scan.api.js +16 -26
  28. package/dist/api/probe-scan.api.js.map +1 -1
  29. package/dist/api/probe-scan.api.test.js +10 -0
  30. package/dist/api/probe-scan.api.test.js.map +1 -1
  31. package/dist/api/probe-scan.application.api.js +2 -2
  32. package/dist/api/probe-scan.application.api.js.map +1 -1
  33. package/dist/api/probe-scan.application.api.test.js +4 -0
  34. package/dist/api/probe-scan.application.api.test.js.map +1 -1
  35. package/dist/api/retrospective.api.js +2 -1
  36. package/dist/api/retrospective.api.js.map +1 -1
  37. package/dist/api/short-link.admin.api.js.map +1 -1
  38. package/dist/api/short-link.api.js.map +1 -1
  39. package/dist/api/short-link.public.api.js.map +1 -1
  40. package/dist/api/tag.api.js.map +1 -1
  41. package/dist/index.d.ts +0 -4
  42. package/dist/index.js +0 -4
  43. package/dist/index.js.map +1 -1
  44. package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
  45. package/dist/server-sent-events/server-sent-events.manager.js +1 -2
  46. package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
  47. package/dist/types/enum/document-type.enum.d.ts +0 -1
  48. package/dist/types/enum/document-type.enum.js +0 -1
  49. package/dist/types/enum/document-type.enum.js.map +1 -1
  50. package/dist/types/enum/extraction-warning.enum.d.ts +2 -1
  51. package/dist/types/enum/extraction-warning.enum.js +1 -0
  52. package/dist/types/enum/extraction-warning.enum.js.map +1 -1
  53. package/dist/types/enum/rcb-bank.enum.js +252 -36
  54. package/dist/types/enum/rcb-bank.enum.js.map +1 -1
  55. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
  56. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
  57. package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
  58. package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
  59. package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
  60. package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
  61. package/dist/types/interface/models/extraction.dto.d.ts +0 -10
  62. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  63. package/package.json +4 -1
  64. package/src/api/atlas-group.api.ts +4 -1
  65. package/src/api/atlas-page.api.ts +12 -6
  66. package/src/api/atlas.api.ts +12 -7
  67. package/src/api/atlas.public.api.ts +3 -1
  68. package/src/api/board-card.api.ts +6 -3
  69. package/src/api/board-column.api.ts +4 -1
  70. package/src/api/board-label.api.ts +7 -3
  71. package/src/api/board.api.ts +19 -10
  72. package/src/api/draw.api.ts +16 -12
  73. package/src/api/draw.public.api.ts +3 -1
  74. package/src/api/extraction-plan-preset.api.ts +64 -18
  75. package/src/api/extraction-settings.api.ts +2 -8
  76. package/src/api/extraction.api.ts +45 -52
  77. package/src/api/index.ts +0 -1
  78. package/src/api/probe-scan.api.test.ts +26 -0
  79. package/src/api/probe-scan.api.ts +66 -54
  80. package/src/api/probe-scan.application.api.test.ts +14 -0
  81. package/src/api/probe-scan.application.api.ts +5 -5
  82. package/src/api/retrospective.api.ts +8 -5
  83. package/src/api/short-link.admin.api.ts +14 -4
  84. package/src/api/short-link.api.ts +39 -17
  85. package/src/api/short-link.public.api.ts +25 -11
  86. package/src/api/tag.api.ts +3 -1
  87. package/src/index.ts +0 -17
  88. package/src/server-sent-events/server-sent-events.manager.ts +5 -3
  89. package/src/types/enum/document-type.enum.ts +0 -1
  90. package/src/types/enum/extraction-warning.enum.ts +16 -0
  91. package/src/types/enum/rcb-bank.enum.ts +255 -41
  92. package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
  93. package/src/types/interface/api/responses/retrospective.response.ts +2 -1
  94. package/src/types/interface/models/content-share.dto.ts +5 -1
  95. package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
  96. package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
  97. package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
  98. package/src/types/interface/models/extraction.dto.ts +0 -17
  99. package/src/types/interface/models/probe-webhook.dto.ts +3 -4
  100. package/tsconfig.check.json +15 -0
  101. package/dist/api/extraction.application.api.d.ts +0 -4
  102. package/dist/api/extraction.application.api.js +0 -30
  103. package/dist/api/extraction.application.api.js.map +0 -1
  104. package/dist/api/memo.api.d.ts +0 -15
  105. package/dist/api/memo.api.js +0 -49
  106. package/dist/api/memo.api.js.map +0 -1
  107. package/dist/constants/memo.constants.d.ts +0 -3
  108. package/dist/constants/memo.constants.js +0 -7
  109. package/dist/constants/memo.constants.js.map +0 -1
  110. package/dist/types/interface/api/requests/memo.request.d.ts +0 -41
  111. package/dist/types/interface/api/requests/memo.request.js +0 -3
  112. package/dist/types/interface/api/requests/memo.request.js.map +0 -1
  113. package/dist/types/interface/api/responses/memo.response.d.ts +0 -27
  114. package/dist/types/interface/api/responses/memo.response.js +0 -3
  115. package/dist/types/interface/api/responses/memo.response.js.map +0 -1
  116. package/dist/types/interface/models/memo.dto.d.ts +0 -20
  117. package/dist/types/interface/models/memo.dto.js +0 -3
  118. package/dist/types/interface/models/memo.dto.js.map +0 -1
  119. package/src/api/extraction.application.api.ts +0 -74
@@ -21,7 +21,11 @@ export interface IScanOptions {
21
21
  callbackUrl?: string;
22
22
  /** Filename reported to the server (defaults to `'file'`). Cosmetic only. */
23
23
  filename?: string;
24
- /** Content-Type hint used when constructing a Blob from a raw buffer/Uint8Array in a browser context. */
24
+ /**
25
+ * Content-Type stamped on the file part when the caller passes raw bytes
26
+ * (`Buffer`/`Uint8Array`). Ignored when the file is already a `Blob` — a
27
+ * browser `File` and `fs.openAsBlob(path)` carry their own type.
28
+ */
25
29
  mimeType?: string;
26
30
  }
27
31
 
@@ -29,4 +29,5 @@ export interface ICountOrganizationRetrospectiveData {
29
29
  orphan?: number;
30
30
  unshared?: number;
31
31
  }
32
- export type ICountOrganizationRetrospectiveResponse = IResponse<ICountOrganizationRetrospectiveData>;
32
+ export type ICountOrganizationRetrospectiveResponse =
33
+ IResponse<ICountOrganizationRetrospectiveData>;
@@ -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,23 +63,6 @@ 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
-
83
66
  export interface IExtractionFile {
84
67
  id: string;
85
68
  userId: string;
@@ -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
@@ -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
+ }
@@ -1,4 +0,0 @@
1
- import type { IExtractBody } from '../types';
2
- import type { IExtractSyncResponse } from '../types';
3
- import { ExtractCallOptions } from './extraction.api';
4
- export declare const runExtractionApplication: (applicationId: string, body: IExtractBody, options?: ExtractCallOptions, applicationApiKey?: string) => Promise<IExtractSyncResponse>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runExtractionApplication = void 0;
4
- const __1 = require("..");
5
- const extraction_api_1 = require("./extraction.api");
6
- function authHeaderApplication(applicationApiKey) {
7
- return applicationApiKey ? { [__1.API_KEY_APPLICATION_HEADER]: applicationApiKey } : {};
8
- }
9
- const runExtractionApplication = async (applicationId, body, options = {}, applicationApiKey) => {
10
- const extraHeaders = {};
11
- if (options.idempotencyKey) {
12
- extraHeaders['Idempotency-Key'] = options.idempotencyKey;
13
- }
14
- const url = `extract/application/${applicationId}/extract`;
15
- if (body.pdf) {
16
- const { form, formHeaders } = await (0, extraction_api_1.buildExtractMultipart)(body);
17
- return (await __1.AbyssToolsCore.axios.post(url, form, {
18
- headers: { ...formHeaders, ...authHeaderApplication(applicationApiKey), ...extraHeaders },
19
- maxBodyLength: Infinity,
20
- maxContentLength: Infinity,
21
- })).data;
22
- }
23
- const jsonBody = { ...body };
24
- delete jsonBody.pdf;
25
- return (await __1.AbyssToolsCore.axios.post(url, jsonBody, {
26
- headers: { ...authHeaderApplication(applicationApiKey), ...extraHeaders },
27
- })).data;
28
- };
29
- exports.runExtractionApplication = runExtractionApplication;
30
- //# sourceMappingURL=extraction.application.api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extraction.application.api.js","sourceRoot":"","sources":["../../src/api/extraction.application.api.ts"],"names":[],"mappings":";;;AAwBA,0BAAgE;AAGhE,qDAA6E;AAE7E,SAAS,qBAAqB,CAAC,iBAA0B;IACvD,OAAO,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,8BAA0B,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACtF,CAAC;AAWM,MAAM,wBAAwB,GAAG,KAAK,EAC3C,aAAqB,EACrB,IAAkB,EAClB,UAA8B,EAAE,EAChC,iBAA0B,EACK,EAAE;IACjC,MAAM,YAAY,GAA2B,EAAE,CAAC;IAChD,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;QAC3B,YAAY,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAC3D,CAAC;IACD,MAAM,GAAG,GAAG,uBAAuB,aAAa,UAAU,CAAC;IAE3D,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,sCAAqB,EAAC,IAAI,CAAC,CAAC;QAChE,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAAuB,GAAG,EAAE,IAAI,EAAE;YAC/D,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,GAAG,YAAY,EAAE;YACzF,aAAa,EAAE,QAAQ;YACvB,gBAAgB,EAAE,QAAQ;SAC3B,CAAC,CACH,CAAC,IAAI,CAAC;IACT,CAAC;IAGD,MAAM,QAAQ,GAA8B,EAAE,GAAG,IAAI,EAAE,CAAC;IACxD,OAAQ,QAA8B,CAAC,GAAG,CAAC;IAC3C,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAAuB,GAAG,EAAE,QAAQ,EAAE;QACnE,OAAO,EAAE,EAAE,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,GAAG,YAAY,EAAE;KAC1E,CAAC,CACH,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AA/BW,QAAA,wBAAwB,4BA+BnC"}
@@ -1,15 +0,0 @@
1
- import { ICreateMemoBody, ICreateMemoResponse, ICreateForOrganizationMemoParams, IDeleteMemoParams, IDeleteMemoResponse, IGetMemoParams, IGetMemoResponse, IPaginateMemoQuery, IPaginateMemoResponse, IPaginateProjectMemoParams, IPaginateOrganizationMemoParams, IUpdateMemoBody, IUpdateMemoParams, IUpdateMemoResponse, ITransferContentBody, ITransferMemoResponse, ICountOrganizationResponse } from '../types';
2
- export declare const paginateMemo: (query: IPaginateMemoQuery) => Promise<IPaginateMemoResponse>;
3
- export declare const paginateProjectMemo: (params: IPaginateProjectMemoParams, query: IPaginateMemoQuery) => Promise<IPaginateMemoResponse>;
4
- export declare const getMemo: (params: IGetMemoParams) => Promise<IGetMemoResponse>;
5
- export declare const deleteMemo: (params: IDeleteMemoParams) => Promise<IDeleteMemoResponse>;
6
- export declare const updateMemo: (params: IUpdateMemoParams, body: IUpdateMemoBody) => Promise<IUpdateMemoResponse>;
7
- export declare const createMemo: (body: ICreateMemoBody) => Promise<ICreateMemoResponse>;
8
- export declare const paginateOrganizationMemo: (params: IPaginateOrganizationMemoParams, query: IPaginateMemoQuery) => Promise<IPaginateMemoResponse>;
9
- export declare const createForOrganizationMemo: (params: ICreateForOrganizationMemoParams, body: ICreateMemoBody) => Promise<ICreateMemoResponse>;
10
- export declare const transferMemo: (params: {
11
- memoId: string;
12
- }, body: ITransferContentBody) => Promise<ITransferMemoResponse>;
13
- export declare const countOrganizationMemo: (params: {
14
- organizationId: string;
15
- }) => Promise<ICountOrganizationResponse>;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.countOrganizationMemo = exports.transferMemo = exports.createForOrganizationMemo = exports.paginateOrganizationMemo = exports.createMemo = exports.updateMemo = exports.deleteMemo = exports.getMemo = exports.paginateProjectMemo = exports.paginateMemo = void 0;
4
- const __1 = require("..");
5
- const paginateMemo = async (query) => {
6
- return (await __1.AbyssToolsCore.axios.get(`memo/paginate`, { params: query }))
7
- .data;
8
- };
9
- exports.paginateMemo = paginateMemo;
10
- const paginateProjectMemo = async (params, query) => {
11
- return (await __1.AbyssToolsCore.axios.get(`project/${params.projectId}/memo/paginate`, {
12
- params: query,
13
- })).data;
14
- };
15
- exports.paginateProjectMemo = paginateProjectMemo;
16
- const getMemo = async (params) => {
17
- return (await __1.AbyssToolsCore.axios.get(`memo/${params.memoId}`)).data;
18
- };
19
- exports.getMemo = getMemo;
20
- const deleteMemo = async (params) => {
21
- return (await __1.AbyssToolsCore.axios.delete(`memo/${params.memoId}`)).data;
22
- };
23
- exports.deleteMemo = deleteMemo;
24
- const updateMemo = async (params, body) => {
25
- return (await __1.AbyssToolsCore.axios.put(`memo/${params.memoId}`, body)).data;
26
- };
27
- exports.updateMemo = updateMemo;
28
- const createMemo = async (body) => {
29
- return (await __1.AbyssToolsCore.axios.post(`memo`, body)).data;
30
- };
31
- exports.createMemo = createMemo;
32
- const paginateOrganizationMemo = async (params, query) => {
33
- return (await __1.AbyssToolsCore.axios.get(`organization/${params.organizationId}/memo/paginate`, { params: query })).data;
34
- };
35
- exports.paginateOrganizationMemo = paginateOrganizationMemo;
36
- const createForOrganizationMemo = async (params, body) => {
37
- return (await __1.AbyssToolsCore.axios.post(`memo/organization/${params.organizationId}`, body))
38
- .data;
39
- };
40
- exports.createForOrganizationMemo = createForOrganizationMemo;
41
- const transferMemo = async (params, body) => {
42
- return (await __1.AbyssToolsCore.axios.post(`memo/${params.memoId}/transfer`, body)).data;
43
- };
44
- exports.transferMemo = transferMemo;
45
- const countOrganizationMemo = async (params) => {
46
- return (await __1.AbyssToolsCore.axios.get(`memo/organization/${params.organizationId}/count`)).data;
47
- };
48
- exports.countOrganizationMemo = countOrganizationMemo;
49
- //# sourceMappingURL=memo.api.js.map
@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IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,qBAAqB,yBAQhC"}
@@ -1,3 +0,0 @@
1
- export declare const MIN_MEMO_TITLE_LENGTH = 3;
2
- export declare const MAX_MEMO_TITLE_LENGTH = 100;
3
- export declare const MAX_MEMO_CONTENT_LENGTH = 10000;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAX_MEMO_CONTENT_LENGTH = exports.MAX_MEMO_TITLE_LENGTH = exports.MIN_MEMO_TITLE_LENGTH = void 0;
4
- exports.MIN_MEMO_TITLE_LENGTH = 3;
5
- exports.MAX_MEMO_TITLE_LENGTH = 100;
6
- exports.MAX_MEMO_CONTENT_LENGTH = 10000;
7
- //# sourceMappingURL=memo.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memo.constants.js","sourceRoot":"","sources":["../../src/constants/memo.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAC5B,QAAA,uBAAuB,GAAG,KAAK,CAAC"}
@@ -1,41 +0,0 @@
1
- import { ContentShareScope } from '../../../enum';
2
- import { QueryPaginate } from '../type-message/base-paginate';
3
- export type ICreateForOrganizationMemoParams = {
4
- organizationId: string;
5
- };
6
- export type ICreateMemoBody = {
7
- title: string;
8
- content: string;
9
- };
10
- export type IUpdateMemoParams = {
11
- memoId: string;
12
- };
13
- export type IUpdateMemoBody = {
14
- title?: string;
15
- content?: string;
16
- archived?: boolean;
17
- };
18
- export type IGetMemoParams = {
19
- memoId: string;
20
- };
21
- export type IDeleteMemoParams = {
22
- memoId: string;
23
- };
24
- export type IPaginateMemoQuery = {
25
- title?: string;
26
- archived?: boolean;
27
- scope?: ContentShareScope;
28
- teamId?: string;
29
- projectId?: string;
30
- adminView?: boolean;
31
- sharedWithMe?: boolean;
32
- } & QueryPaginate;
33
- export type IPaginateProjectMemoParams = {
34
- projectId: string;
35
- };
36
- export type IPaginateOrganizationMemoParams = {
37
- organizationId: string;
38
- };
39
- export type ICountOrganizationMemoParams = {
40
- organizationId: string;
41
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=memo.request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memo.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/memo.request.ts"],"names":[],"mappings":""}
@@ -1,27 +0,0 @@
1
- import { BasePaginate } from '../type-message/base-paginate';
2
- import { IResponse } from '../type-message/response';
3
- import { IMemo } from '../../models/memo.dto';
4
- import { SharePermission } from '../../../enum/content-share.enum';
5
- export interface IGetMemoData {
6
- memo: IMemo;
7
- sharePermission?: SharePermission | null;
8
- }
9
- export type IGetMemoResponse = IResponse<IGetMemoData>;
10
- export interface IUpdateMemoData {
11
- memo: IMemo;
12
- }
13
- export type IUpdateMemoResponse = IResponse<IUpdateMemoData>;
14
- export interface ICreateMemoData {
15
- memo: IMemo;
16
- }
17
- export type ICreateMemoResponse = IResponse<ICreateMemoData>;
18
- export interface IDeleteMemoData {
19
- }
20
- export type IDeleteMemoResponse = IResponse<IDeleteMemoData>;
21
- export type IPaginateMemoResponse = IResponse<BasePaginate<IMemo>>;
22
- export interface ICountOrganizationMemoData {
23
- total: number;
24
- orphan?: number;
25
- unshared?: number;
26
- }
27
- export type ICountOrganizationMemoResponse = IResponse<ICountOrganizationMemoData>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=memo.response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memo.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/memo.response.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
1
- import { IOrganization } from './organization.dto';
2
- import { IProject } from './project.dto';
3
- import { IEntityTag } from './tag.dto';
4
- import { IUser } from './user.dto';
5
- export interface IMemo {
6
- id: string;
7
- title: string;
8
- content: string;
9
- userId: string | null;
10
- projectId: string | null;
11
- organizationId: string | null;
12
- createdByUserId: string | null;
13
- archivedAt?: Date | null;
14
- updatedAt?: Date;
15
- createdAt?: Date;
16
- user?: IUser | null;
17
- project?: IProject | null;
18
- organization?: IOrganization | null;
19
- entityTags?: IEntityTag[];
20
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=memo.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memo.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/memo.dto.ts"],"names":[],"mappings":""}
@@ -1,74 +0,0 @@
1
- // ──────────────────────────────────────────────
2
- // AbyssExtract APPLICATION extract API — POST
3
- // /extract/application/:applicationId/extract. Mirrors
4
- // apps/api/src/api/controllers/extraction-extract-application.controller.ts
5
- // EXACTLY — the application counterpart of extraction.api.ts's `extractSync`,
6
- // for inter-service callers (e.g. AbyssBanking) authenticating with a project
7
- // API key instead of a personal/org session.
8
- //
9
- // Reuses extraction.api.ts's `buildExtractMultipart` (the same dual-environment
10
- // multipart handling — browser `FormData`/`Blob` vs Node `Buffer` +
11
- // lazy-required `form-data`) and every request/response TYPE verbatim
12
- // (`IExtractBody`, `IExtractSyncResponse`) — never redefined here. There is NO
13
- // scope query param: unlike the personal/org route's `?organization_id=`, an
14
- // application caller's scope is entirely its `:applicationId` URL segment,
15
- // resolved server-side by ApplicationMiddleware (round-trips to abyss-main).
16
- //
17
- // `authHeaderApplication` is kept LOCAL and unexported, same convention as the
18
- // personal client's own `authHeader` — it sends `API_KEY_APPLICATION_HEADER`
19
- // (`abyss-api-key-application`) instead of the personal `abyss-api-key`.
20
- //
21
- // The endpoint is SYNCHRONOUS (the machine caller gets the extraction inline —
22
- // no queue), so the return is always the `IExtractSyncResponse` shape.
23
- // ──────────────────────────────────────────────
24
-
25
- import { AbyssToolsCore, API_KEY_APPLICATION_HEADER } from '..';
26
- import type { IExtractBody } from '../types';
27
- import type { IExtractSyncResponse } from '../types';
28
- import { buildExtractMultipart, ExtractCallOptions } from './extraction.api';
29
-
30
- function authHeaderApplication(applicationApiKey?: string): Record<string, string> {
31
- return applicationApiKey ? { [API_KEY_APPLICATION_HEADER]: applicationApiKey } : {};
32
- }
33
-
34
- /**
35
- * `POST /extract/application/:applicationId/extract` — run one synchronous
36
- * extraction OWNED by `applicationId` and BILLED to its resolved owning
37
- * organization. Same body contract as the personal {@link
38
- * ../extraction.api.extractSync | extractSync}: an inline PDF (`body.pdf`,
39
- * multipart) OR a `body.storage_file_id` reference (JSON), `body.mode`
40
- * (auto|hint|template), optional hint/template/plan/preset. `options`
41
- * forwards a Stripe-style `Idempotency-Key` header (24h replay window) when set.
42
- */
43
- export const runExtractionApplication = async (
44
- applicationId: string,
45
- body: IExtractBody,
46
- options: ExtractCallOptions = {},
47
- applicationApiKey?: string,
48
- ): Promise<IExtractSyncResponse> => {
49
- const extraHeaders: Record<string, string> = {};
50
- if (options.idempotencyKey) {
51
- extraHeaders['Idempotency-Key'] = options.idempotencyKey;
52
- }
53
- const url = `extract/application/${applicationId}/extract`;
54
-
55
- if (body.pdf) {
56
- const { form, formHeaders } = await buildExtractMultipart(body);
57
- return (
58
- await AbyssToolsCore.axios.post<IExtractSyncResponse>(url, form, {
59
- headers: { ...formHeaders, ...authHeaderApplication(applicationApiKey), ...extraHeaders },
60
- maxBodyLength: Infinity,
61
- maxContentLength: Infinity,
62
- })
63
- ).data;
64
- }
65
-
66
- // Strip `pdf` from the JSON body (only used for the multipart upload above).
67
- const jsonBody: Omit<IExtractBody, 'pdf'> = { ...body };
68
- delete (jsonBody as { pdf?: unknown }).pdf;
69
- return (
70
- await AbyssToolsCore.axios.post<IExtractSyncResponse>(url, jsonBody, {
71
- headers: { ...authHeaderApplication(applicationApiKey), ...extraHeaders },
72
- })
73
- ).data;
74
- };