@abyss-project/tools 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- 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-settings.api.js.map +1 -1
- package/dist/api/extraction.api.d.ts +2 -1
- package/dist/api/extraction.api.js +43 -82
- 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 +59 -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 +2 -9
- package/dist/api/probe-scan.api.js +16 -26
- package/dist/api/probe-scan.api.js.map +1 -1
- package/dist/api/probe-scan.api.test.js +10 -0
- package/dist/api/probe-scan.api.test.js.map +1 -1
- 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 +4 -0
- package/dist/api/probe-scan.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 +5 -0
- 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 +252 -36
- 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 -0
- 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/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/package.json +12 -14
- 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 +22 -0
- package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
- package/src/types/interface/api/responses/atlas-document.response.ts +11 -4
- package/src/types/interface/api/responses/board-card-document.response.ts +5 -4
- package/src/types/interface/api/responses/retrospective.response.ts +2 -1
- 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/tsconfig.check.json +15 -0
|
@@ -19,11 +19,13 @@ export class ServerSentEventsManager<
|
|
|
19
19
|
T extends ServerSentEventBaseContext,
|
|
20
20
|
P extends { type: string; payload: unknown },
|
|
21
21
|
> {
|
|
22
|
-
private channel: string;
|
|
23
22
|
private contexts: Map<string, Set<T>>;
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Le nom du canal est accepte pour ne rien casser chez les appelants, mais il
|
|
25
|
+
// n'est pas conserve : l'aiguillage se fait par la CLE de la table des
|
|
26
|
+
// gestionnaires (`AppConfig.sse[SSEChannels.X]`), jamais par un champ porte par
|
|
27
|
+
// le gestionnaire lui-meme. Le champ qui le stockait n'etait lu nulle part.
|
|
28
|
+
constructor(_channelName: string) {
|
|
27
29
|
this.contexts = new Map();
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// ExtractFieldFormat — the shape of a published field value, so a client can
|
|
3
|
+
// display it without knowing each key.
|
|
4
|
+
// ──────────────────────────────────────────────
|
|
5
|
+
|
|
6
|
+
export enum ExtractFieldFormat {
|
|
7
|
+
/** Integer amount in cents; the currency is the `currency` field. */
|
|
8
|
+
AMOUNT = 'amount',
|
|
9
|
+
/** ISO 8601 date (`YYYY-MM-DD`). */
|
|
10
|
+
DATE = 'date',
|
|
11
|
+
/** The percent itself: `9` for 9 %. */
|
|
12
|
+
PERCENT = 'percent',
|
|
13
|
+
BOOLEAN = 'boolean',
|
|
14
|
+
/** Free text or identifier (IBAN, SIRET, VAT number…), to display as is. */
|
|
15
|
+
TEXT = 'text',
|
|
16
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// ExtractFieldKey — every field key AbyssExtract can publish for a known
|
|
3
|
+
// document type (`generic` excluded: its fields are defined by the client).
|
|
4
|
+
// The value is the key found in `fields` of an extraction result. Which type
|
|
5
|
+
// publishes which key, and in which format: `EXTRACT_PUBLISHABLE_FIELDS`.
|
|
6
|
+
// A valid machine-readable zone publishes its fields and `mrzValid` whatever
|
|
7
|
+
// the document type.
|
|
8
|
+
// ──────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
export enum ExtractFieldKey {
|
|
11
|
+
// Amounts
|
|
12
|
+
TOTAL_TTC = 'totalTtc',
|
|
13
|
+
TOTAL_HT = 'totalHt',
|
|
14
|
+
TOTAL_VAT = 'totalVat',
|
|
15
|
+
TOTAL = 'total',
|
|
16
|
+
VAT = 'vat',
|
|
17
|
+
OPENING_BALANCE = 'openingBalance',
|
|
18
|
+
CLOSING_BALANCE = 'closingBalance',
|
|
19
|
+
TOTAL_ACTIF = 'totalActif',
|
|
20
|
+
TOTAL_PASSIF = 'totalPassif',
|
|
21
|
+
FIXED_ASSETS = 'fixedAssets',
|
|
22
|
+
CURRENT_ASSETS = 'currentAssets',
|
|
23
|
+
CREDITORS_WITHIN_ONE_YEAR = 'creditorsWithinOneYear',
|
|
24
|
+
NET_CURRENT_LIABILITIES = 'netCurrentLiabilities',
|
|
25
|
+
TOTAL_ASSETS_LESS_CURRENT_LIABILITIES = 'totalAssetsLessCurrentLiabilities',
|
|
26
|
+
NET_ASSETS = 'netAssets',
|
|
27
|
+
CALLED_UP_SHARE_CAPITAL = 'calledUpShareCapital',
|
|
28
|
+
PROFIT_AND_LOSS_ACCOUNT = 'profitAndLossAccount',
|
|
29
|
+
TOTAL_SHAREHOLDERS_FUNDS = 'totalShareholdersFunds',
|
|
30
|
+
NET_CENTS = 'netCents',
|
|
31
|
+
GROSS_CENTS = 'grossCents',
|
|
32
|
+
NET_TAXABLE_CENTS = 'netTaxableCents',
|
|
33
|
+
PAS_AMOUNT_CENTS = 'pasAmountCents',
|
|
34
|
+
// Dates
|
|
35
|
+
INVOICE_DATE = 'invoiceDate',
|
|
36
|
+
DUE_DATE = 'dueDate',
|
|
37
|
+
DATE = 'date',
|
|
38
|
+
PERIOD_START = 'periodStart',
|
|
39
|
+
PERIOD_END = 'periodEnd',
|
|
40
|
+
FISCAL_YEAR_END = 'fiscalYearEnd',
|
|
41
|
+
BIRTH_DATE = 'birthDate',
|
|
42
|
+
EXPIRY_DATE = 'expiryDate',
|
|
43
|
+
ISSUE_DATE = 'issueDate',
|
|
44
|
+
// Percentages
|
|
45
|
+
PAS_RATE_PCT = 'pasRatePct',
|
|
46
|
+
// Identifiers
|
|
47
|
+
IBAN = 'iban',
|
|
48
|
+
BIC = 'bic',
|
|
49
|
+
SIRET = 'siret',
|
|
50
|
+
SIREN = 'siren',
|
|
51
|
+
VAT_NUMBER = 'vatNumber',
|
|
52
|
+
INVOICE_NUMBER = 'invoiceNumber',
|
|
53
|
+
DOCUMENT_NUMBER = 'documentNumber',
|
|
54
|
+
REGISTRATION_NUMBER = 'registrationNumber',
|
|
55
|
+
// Names and labels
|
|
56
|
+
SUPPLIER = 'supplier',
|
|
57
|
+
SUPPLIER_LEGAL_NAME = 'supplierLegalName',
|
|
58
|
+
MARKETPLACE = 'marketplace',
|
|
59
|
+
MERCHANT = 'merchant',
|
|
60
|
+
HOLDER_NAME = 'holderName',
|
|
61
|
+
BANK_NAME = 'bankName',
|
|
62
|
+
COMPANY = 'company',
|
|
63
|
+
EMPLOYER = 'employer',
|
|
64
|
+
LAST_NAME = 'lastName',
|
|
65
|
+
FIRST_NAMES = 'firstNames',
|
|
66
|
+
NATIONALITY = 'nationality',
|
|
67
|
+
/** ISO 4217 code of the published amounts. */
|
|
68
|
+
CURRENCY = 'currency',
|
|
69
|
+
/** Payslip period label: an ISO month (`2026-06`) or a day range (`2026-06-01..2026-06-30`). */
|
|
70
|
+
PERIOD = 'period',
|
|
71
|
+
// Machine-readable zone of an identity document
|
|
72
|
+
SEX = 'sex',
|
|
73
|
+
ISSUING_COUNTRY = 'issuingCountry',
|
|
74
|
+
DOCUMENT_KIND = 'documentKind',
|
|
75
|
+
/** Whether the check digits of the machine-readable zone are correct. */
|
|
76
|
+
MRZ_VALID = 'mrzValid',
|
|
77
|
+
}
|
|
@@ -18,4 +18,61 @@ export enum ExtractionWarningCode {
|
|
|
18
18
|
* enum for each domain-specific rule.
|
|
19
19
|
*/
|
|
20
20
|
ADAPTER_VALIDATION_ERROR = 'adapter_validation_error',
|
|
21
|
+
/**
|
|
22
|
+
* A field was extracted but NOT published, because its calibrated confidence
|
|
23
|
+
* fell below the publish floor for its (documentType, fieldKey).
|
|
24
|
+
*
|
|
25
|
+
* This is deliberately its own code rather than an `ADAPTER_VALIDATION_ERROR`
|
|
26
|
+
* carrying a `data.type`. Suppression is a first-class product behaviour a
|
|
27
|
+
* client must be able to detect reliably — «did the engine find nothing, or
|
|
28
|
+
* did it find something it judged not worth sending?» are two different
|
|
29
|
+
* questions, and a client should not have to parse a free-text field to tell
|
|
30
|
+
* them apart.
|
|
31
|
+
*
|
|
32
|
+
* `data.fieldKey` names the field, `data.confidence` its calibrated value and
|
|
33
|
+
* `data.floor` the threshold it missed. The value itself is never in the
|
|
34
|
+
* warning: it stays in `provenance`, flagged `suppressed`.
|
|
35
|
+
*/
|
|
36
|
+
FIELD_BELOW_PUBLISH_FLOOR = 'field_below_publish_floor',
|
|
37
|
+
/**
|
|
38
|
+
* A date field was extracted but NOT published, because nothing besides its
|
|
39
|
+
* format supported it: no label next to it, and it did not sit in the page
|
|
40
|
+
* band the document type expects for that field (#575).
|
|
41
|
+
*
|
|
42
|
+
* This is deliberately its own code rather than folded into
|
|
43
|
+
* `FIELD_BELOW_PUBLISH_FLOOR`: the confidence can sit ABOVE the field's
|
|
44
|
+
* publish floor (corroboration alone can carry a format-only date from 0.42
|
|
45
|
+
* to 0.565) and still not be published — a client checking only the floor
|
|
46
|
+
* would see no reason for the field's absence. Suppression is a first-class
|
|
47
|
+
* product behaviour a client must be able to detect reliably, here as much
|
|
48
|
+
* as for a below-floor drop.
|
|
49
|
+
*
|
|
50
|
+
* `data.fieldKey` names the field, `data.confidence` its calibrated value.
|
|
51
|
+
* The value itself is never in the warning: it stays in internal
|
|
52
|
+
* traceability only (`suppressedFields`, reason `format_only_date`), which
|
|
53
|
+
* is neither persisted nor returned to the client — only this warning is.
|
|
54
|
+
*/
|
|
55
|
+
FIELD_FORMAT_ONLY_DATE = 'field_format_only_date',
|
|
56
|
+
/**
|
|
57
|
+
* A field of an identity document's machine-readable zone was read but NOT
|
|
58
|
+
* published, because its value lies outside the domain the zone allows
|
|
59
|
+
* (#614): a sex other than `M`, `F` or `X`, or a nationality or issuing
|
|
60
|
+
* state that is neither an ISO 3166-1 alpha-3 code nor one of the special
|
|
61
|
+
* codes of ICAO Doc 9303 part 3 (`D`, `UNO`, `XXA`, `RKS`…).
|
|
62
|
+
*
|
|
63
|
+
* These three fields are covered by no check digit, not even the composite
|
|
64
|
+
* one: a misread letter there leaves every key closing. The domain is the
|
|
65
|
+
* only check the zone itself offers for them, and a value that fails it is
|
|
66
|
+
* withheld rather than published at full confidence.
|
|
67
|
+
*
|
|
68
|
+
* This is deliberately its own code: the zone is valid and its other fields
|
|
69
|
+
* are published, so neither `FIELD_BELOW_PUBLISH_FLOOR` nor an
|
|
70
|
+
* `ADAPTER_VALIDATION_ERROR` of type `MRZ_INVALID` would tell the client why
|
|
71
|
+
* this one field is missing.
|
|
72
|
+
*
|
|
73
|
+
* `data.fieldKey` names the field. The value itself is never in the warning:
|
|
74
|
+
* it stays in internal traceability only (`suppressedFields`, reason
|
|
75
|
+
* `mrz_out_of_domain`), which is neither persisted nor returned to the client.
|
|
76
|
+
*/
|
|
77
|
+
FIELD_MRZ_OUT_OF_DOMAIN = 'field_mrz_out_of_domain',
|
|
21
78
|
}
|
package/src/types/enum/index.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from './document-type.enum';
|
|
|
7
7
|
export * from './pdf-operation.enum';
|
|
8
8
|
export * from './rcb-bank.enum';
|
|
9
9
|
export * from './extraction-warning.enum';
|
|
10
|
+
export * from './extract-field-key.enum';
|
|
11
|
+
export * from './extract-field-format.enum';
|
|
10
12
|
export * from './extraction-feedback-issue-type.enum';
|
|
11
13
|
export * from './provider-kind.enum';
|
|
12
14
|
export * from './interpreter-kind.enum';
|
|
@@ -68,57 +68,271 @@ export interface RcbBankCatalogueEntry {
|
|
|
68
68
|
|
|
69
69
|
export const RCB_BANK_CATALOGUE: ReadonlyArray<RcbBankCatalogueEntry> = [
|
|
70
70
|
// ─── French retail / business ─────────────
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
{
|
|
72
|
+
id: RcbBankVersionId.BNP_CONNEXIS_DEFAULT,
|
|
73
|
+
bank: 'BNP Connexis',
|
|
74
|
+
version: 'default',
|
|
75
|
+
country: 'FR',
|
|
76
|
+
type: 'business',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: RcbBankVersionId.BNP_PARIBAS_DEFAULT,
|
|
80
|
+
bank: 'BNP Paribas',
|
|
81
|
+
version: 'default',
|
|
82
|
+
country: 'FR',
|
|
83
|
+
type: 'retail',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: RcbBankVersionId.SOCIETE_GENERALE_DEFAULT,
|
|
87
|
+
bank: 'Société Générale',
|
|
88
|
+
version: 'default',
|
|
89
|
+
country: 'FR',
|
|
90
|
+
type: 'retail',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: RcbBankVersionId.CREDIT_AGRICOLE_DEFAULT,
|
|
94
|
+
bank: 'Crédit Agricole',
|
|
95
|
+
version: 'default',
|
|
96
|
+
country: 'FR',
|
|
97
|
+
type: 'retail',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: RcbBankVersionId.LCL_DEFAULT,
|
|
101
|
+
bank: 'LCL',
|
|
102
|
+
version: 'default',
|
|
103
|
+
country: 'FR',
|
|
104
|
+
type: 'retail',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: RcbBankVersionId.BOURSORAMA_DEFAULT,
|
|
108
|
+
bank: 'Boursorama',
|
|
109
|
+
version: 'default',
|
|
110
|
+
country: 'FR',
|
|
111
|
+
type: 'retail',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: RcbBankVersionId.LA_BANQUE_POSTALE_DEFAULT,
|
|
115
|
+
bank: 'La Banque Postale',
|
|
116
|
+
version: 'default',
|
|
117
|
+
country: 'FR',
|
|
118
|
+
type: 'retail',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: RcbBankVersionId.CAISSE_EPARGNE_DEFAULT,
|
|
122
|
+
bank: "Caisse d'Épargne",
|
|
123
|
+
version: 'default',
|
|
124
|
+
country: 'FR',
|
|
125
|
+
type: 'retail',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: RcbBankVersionId.CIC_EBICS_DEFAULT,
|
|
129
|
+
bank: 'CIC',
|
|
130
|
+
version: 'ebics',
|
|
131
|
+
country: 'FR',
|
|
132
|
+
type: 'business',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: RcbBankVersionId.CIC_DEFAULT,
|
|
136
|
+
bank: 'CIC',
|
|
137
|
+
version: 'default',
|
|
138
|
+
country: 'FR',
|
|
139
|
+
type: 'retail',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: RcbBankVersionId.CREDIT_MUTUEL_DEFAULT,
|
|
143
|
+
bank: 'Crédit Mutuel',
|
|
144
|
+
version: 'default',
|
|
145
|
+
country: 'FR',
|
|
146
|
+
type: 'retail',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: RcbBankVersionId.BRED_DEFAULT,
|
|
150
|
+
bank: 'BRED',
|
|
151
|
+
version: 'default',
|
|
152
|
+
country: 'FR',
|
|
153
|
+
type: 'retail',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: RcbBankVersionId.CREDIT_DU_NORD_DEFAULT,
|
|
157
|
+
bank: 'Crédit du Nord',
|
|
158
|
+
version: 'default',
|
|
159
|
+
country: 'FR',
|
|
160
|
+
type: 'retail',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: RcbBankVersionId.CDE_NET_DEFAULT,
|
|
164
|
+
bank: 'CDE Net',
|
|
165
|
+
version: 'default',
|
|
166
|
+
country: 'FR',
|
|
167
|
+
type: 'business',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: RcbBankVersionId.DELUBAC_DEFAULT,
|
|
171
|
+
bank: 'Delubac',
|
|
172
|
+
version: 'default',
|
|
173
|
+
country: 'FR',
|
|
174
|
+
type: 'business',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: RcbBankVersionId.PALATINE_DEFAULT,
|
|
178
|
+
bank: 'Palatine',
|
|
179
|
+
version: 'default',
|
|
180
|
+
country: 'FR',
|
|
181
|
+
type: 'business',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: RcbBankVersionId.NATIXIS_DEFAULT,
|
|
185
|
+
bank: 'Natixis',
|
|
186
|
+
version: 'default',
|
|
187
|
+
country: 'FR',
|
|
188
|
+
type: 'corporate',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: RcbBankVersionId.THEMIS_DEFAULT,
|
|
192
|
+
bank: 'Themis Banque',
|
|
193
|
+
version: 'default',
|
|
194
|
+
country: 'FR',
|
|
195
|
+
type: 'business',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: RcbBankVersionId.ROTHSCHILD_DEFAULT,
|
|
199
|
+
bank: 'Rothschild Martin Maurel',
|
|
200
|
+
version: 'default',
|
|
201
|
+
country: 'FR',
|
|
202
|
+
type: 'corporate',
|
|
203
|
+
},
|
|
204
|
+
{ id: RcbBankVersionId.LA_NEF_V1, bank: 'La Nef', version: 'v1', country: 'FR', type: 'retail' },
|
|
205
|
+
{ id: RcbBankVersionId.LA_NEF_V2, bank: 'La Nef', version: 'v2', country: 'FR', type: 'retail' },
|
|
92
206
|
|
|
93
207
|
// ─── Neobanks / fintech ───────────────────
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
208
|
+
{
|
|
209
|
+
id: RcbBankVersionId.QONTO_DEFAULT,
|
|
210
|
+
bank: 'Qonto',
|
|
211
|
+
version: 'default',
|
|
212
|
+
country: 'FR',
|
|
213
|
+
type: 'neobank',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: RcbBankVersionId.SHINE_DEFAULT,
|
|
217
|
+
bank: 'Shine',
|
|
218
|
+
version: 'default',
|
|
219
|
+
country: 'FR',
|
|
220
|
+
type: 'neobank',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: RcbBankVersionId.FINOM_DEFAULT,
|
|
224
|
+
bank: 'Finom',
|
|
225
|
+
version: 'default',
|
|
226
|
+
country: 'EU',
|
|
227
|
+
type: 'neobank',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
id: RcbBankVersionId.TIIME_DEFAULT,
|
|
231
|
+
bank: 'Tiime',
|
|
232
|
+
version: 'default',
|
|
233
|
+
country: 'FR',
|
|
234
|
+
type: 'neobank',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: RcbBankVersionId.SPENDESK_DEFAULT,
|
|
238
|
+
bank: 'Spendesk',
|
|
239
|
+
version: 'default',
|
|
240
|
+
country: 'FR',
|
|
241
|
+
type: 'fintech',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: RcbBankVersionId.SWAN_DEFAULT,
|
|
245
|
+
bank: 'Swan',
|
|
246
|
+
version: 'default',
|
|
247
|
+
country: 'FR',
|
|
248
|
+
type: 'fintech',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: RcbBankVersionId.N26_DEFAULT,
|
|
252
|
+
bank: 'N26',
|
|
253
|
+
version: 'default',
|
|
254
|
+
country: 'EU',
|
|
255
|
+
type: 'neobank',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
id: RcbBankVersionId.REVOLUT_DEFAULT,
|
|
259
|
+
bank: 'Revolut',
|
|
260
|
+
version: 'default',
|
|
261
|
+
country: 'EU',
|
|
262
|
+
type: 'neobank',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: RcbBankVersionId.WISE_DEFAULT,
|
|
266
|
+
bank: 'Wise',
|
|
267
|
+
version: 'default',
|
|
268
|
+
country: 'INTL',
|
|
269
|
+
type: 'fintech',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: RcbBankVersionId.PAYPAL_DEFAULT,
|
|
273
|
+
bank: 'PayPal',
|
|
274
|
+
version: 'default',
|
|
275
|
+
country: 'INTL',
|
|
276
|
+
type: 'fintech',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
id: RcbBankVersionId.AIRWALLEX_DEFAULT,
|
|
280
|
+
bank: 'Airwallex',
|
|
281
|
+
version: 'default',
|
|
282
|
+
country: 'INTL',
|
|
283
|
+
type: 'fintech',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: RcbBankVersionId.VIVA_WALLET_DEFAULT,
|
|
287
|
+
bank: 'Viva Wallet',
|
|
288
|
+
version: 'default',
|
|
289
|
+
country: 'EU',
|
|
290
|
+
type: 'fintech',
|
|
291
|
+
},
|
|
106
292
|
|
|
107
293
|
// ─── International retail / corporate ─────
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
294
|
+
{
|
|
295
|
+
id: RcbBankVersionId.HSBC_DEFAULT,
|
|
296
|
+
bank: 'HSBC',
|
|
297
|
+
version: 'default',
|
|
298
|
+
country: 'FR',
|
|
299
|
+
type: 'retail',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: RcbBankVersionId.HSBC_UK_DEFAULT,
|
|
303
|
+
bank: 'HSBC UK',
|
|
304
|
+
version: 'default',
|
|
305
|
+
country: 'UK',
|
|
306
|
+
type: 'retail',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: RcbBankVersionId.UBS_DEFAULT,
|
|
310
|
+
bank: 'UBS',
|
|
311
|
+
version: 'default',
|
|
312
|
+
country: 'CH',
|
|
313
|
+
type: 'corporate',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: RcbBankVersionId.CAIXA_DEFAULT,
|
|
317
|
+
bank: 'Caixa',
|
|
318
|
+
version: 'default',
|
|
319
|
+
country: 'PT',
|
|
320
|
+
type: 'retail',
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: RcbBankVersionId.JPMORGAN_DEFAULT,
|
|
324
|
+
bank: 'JPMorgan',
|
|
325
|
+
version: 'default',
|
|
326
|
+
country: 'US',
|
|
327
|
+
type: 'corporate',
|
|
328
|
+
},
|
|
113
329
|
];
|
|
114
330
|
|
|
115
331
|
/**
|
|
116
332
|
* Lookup by id (typed). Returns undefined for unknown ids — callers should
|
|
117
333
|
* treat that as "use auto mode" rather than crash.
|
|
118
334
|
*/
|
|
119
|
-
export function getRcbBankCatalogueEntry(
|
|
120
|
-
id: string,
|
|
121
|
-
): RcbBankCatalogueEntry | undefined {
|
|
335
|
+
export function getRcbBankCatalogueEntry(id: string): RcbBankCatalogueEntry | undefined {
|
|
122
336
|
return RCB_BANK_CATALOGUE.find((e) => e.id === id);
|
|
123
337
|
}
|
|
124
338
|
|
|
@@ -11,7 +11,8 @@ export interface ISyncOrganizationAbyssAdminBody {
|
|
|
11
11
|
export interface ISyncProjectAbyssAdminBody {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
|
|
14
|
+
/** null when the author's account was deleted: the project outlives it (#199). */
|
|
15
|
+
createdByUserId: string | null;
|
|
15
16
|
organizationId: string;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -6,6 +6,11 @@ export type IGetUploadPreSignedUrlAtlasDocumentParams = {
|
|
|
6
6
|
};
|
|
7
7
|
export type IGetUploadPreSignedUrlAtlasDocumentBody = {
|
|
8
8
|
name: string;
|
|
9
|
+
// SP3 — transparent multipart: the DECLARED size (the front hasn't
|
|
10
|
+
// necessarily read the file into memory yet, only `file.size`), needed by
|
|
11
|
+
// `initiateUpload` to pick single-shot vs multipart and to seed the storage
|
|
12
|
+
// cap check.
|
|
13
|
+
sizeOctet: number;
|
|
9
14
|
};
|
|
10
15
|
|
|
11
16
|
export type IGetAtlasDocumentParams = {
|
|
@@ -30,3 +35,12 @@ export type IListAtlasDocumentParams = {
|
|
|
30
35
|
atlasId: string;
|
|
31
36
|
atlasPageId: string;
|
|
32
37
|
};
|
|
38
|
+
|
|
39
|
+
// IDOR fix — resolves an AtlasDocument's storage `publicAccessId` server-side
|
|
40
|
+
// (scoped to the caller's AtlasMiddleware-verified atlasId), so the front
|
|
41
|
+
// never needs an unscoped `applicationFile.get` call against storage.
|
|
42
|
+
export type IGetPublicAccessIdAtlasDocumentParams = {
|
|
43
|
+
atlasId: string;
|
|
44
|
+
atlasPageId: string;
|
|
45
|
+
storageFileId: string;
|
|
46
|
+
};
|
|
@@ -4,6 +4,11 @@ export type IGetUploadPreSignedUrlBoardCardDocumentParams = {
|
|
|
4
4
|
};
|
|
5
5
|
export type IGetUploadPreSignedUrlBoardCardDocumentBody = {
|
|
6
6
|
name: string;
|
|
7
|
+
// SP3 — transparent multipart: the DECLARED size (the front hasn't
|
|
8
|
+
// necessarily read the file into memory yet, only `file.size`), needed by
|
|
9
|
+
// `initiateUpload` to pick single-shot vs multipart and to seed the storage
|
|
10
|
+
// cap check.
|
|
11
|
+
sizeOctet: number;
|
|
7
12
|
};
|
|
8
13
|
|
|
9
14
|
export type IGetBoardCardDocumentParams = {
|
|
@@ -71,6 +71,28 @@ export interface IExtractBody {
|
|
|
71
71
|
plan_preset_id?: string;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Body of `POST /extract/application/:applicationId/extract` — exactly what
|
|
76
|
+
* that route accepts (extraction-extract-application.controller.ts): a
|
|
77
|
+
* multipart PDF, mode `auto` or `hint`, and the optional fields below. The
|
|
78
|
+
* route refuses storage_file_id, template_id, template, mode `template`,
|
|
79
|
+
* plan_preset_id and any body without a PDF (4xx), and is synchronous only,
|
|
80
|
+
* so none of those are expressible here (#581).
|
|
81
|
+
*/
|
|
82
|
+
export interface IExtractApplicationBody {
|
|
83
|
+
pdf: Buffer | Uint8Array;
|
|
84
|
+
mode: Exclude<ExtractionMode, 'template'>;
|
|
85
|
+
hint?: IExtractionBankHint;
|
|
86
|
+
pdf_filename?: string;
|
|
87
|
+
user_external_id?: string;
|
|
88
|
+
user_metadata?: Record<string, unknown>;
|
|
89
|
+
archive?: boolean;
|
|
90
|
+
force?: boolean;
|
|
91
|
+
improvementConsent?: boolean;
|
|
92
|
+
/** Inline plan: single pass, no OCR provider, no template pass (checked server-side). */
|
|
93
|
+
plan?: IExtractionPlan;
|
|
94
|
+
}
|
|
95
|
+
|
|
74
96
|
export interface IExtractBulkBody {
|
|
75
97
|
items: Array<{
|
|
76
98
|
storage_file_id?: string;
|
|
@@ -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
|
-
/**
|
|
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
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { IResponse } from '../type-message/response';
|
|
2
2
|
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
-
import { IAtlasDocument } from '../..';
|
|
3
|
+
import { IAtlasDocument, IUploadSession } from '../..';
|
|
4
4
|
|
|
5
5
|
export interface IGetAtlasDocumentData {
|
|
6
6
|
atlasDocument: IAtlasDocument;
|
|
7
7
|
}
|
|
8
8
|
export type IGetAtlasDocumentResponse = IResponse<IGetAtlasDocumentData>;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
// SP3 — transparent multipart upload: proxies atlasDocumentService
|
|
11
|
+
// .getUploadUrl's `UploadSession` result as-is (see
|
|
12
|
+
// models/upload-session.dto.ts for the mirroring rationale).
|
|
13
|
+
export type IGetUploadPreSignedUrlAtlasDocumentData = IUploadSession;
|
|
13
14
|
export type IGetUploadPreSignedUrlAtlasDocumentResponse =
|
|
14
15
|
IResponse<IGetUploadPreSignedUrlAtlasDocumentData>;
|
|
15
16
|
|
|
@@ -22,3 +23,9 @@ export interface IListAtlasDocumentData {
|
|
|
22
23
|
atlasDocuments: IAtlasDocument[];
|
|
23
24
|
}
|
|
24
25
|
export type IListAtlasDocumentResponse = IResponse<IListAtlasDocumentData>;
|
|
26
|
+
|
|
27
|
+
export interface IGetPublicAccessIdAtlasDocumentData {
|
|
28
|
+
publicAccessId: string;
|
|
29
|
+
}
|
|
30
|
+
export type IGetPublicAccessIdAtlasDocumentResponse =
|
|
31
|
+
IResponse<IGetPublicAccessIdAtlasDocumentData>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { IResponse } from '../type-message/response';
|
|
2
|
-
import { IBoardCardDocument } from '../..';
|
|
2
|
+
import { IBoardCardDocument, IUploadSession } from '../..';
|
|
3
3
|
|
|
4
4
|
export interface IGetBoardCardDocumentData {
|
|
5
5
|
boardCardDocument: IBoardCardDocument;
|
|
6
6
|
}
|
|
7
7
|
export type IGetBoardCardDocumentResponse = IResponse<IGetBoardCardDocumentData>;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// SP3 — transparent multipart upload: proxies boardCardDocumentService
|
|
10
|
+
// .getUploadUrl's `UploadSession` result as-is (see
|
|
11
|
+
// models/upload-session.dto.ts for the mirroring rationale).
|
|
12
|
+
export type IGetUploadPreSignedUrlBoardCardDocumentData = IUploadSession;
|
|
12
13
|
export type IGetUploadPreSignedUrlBoardCardDocumentResponse =
|
|
13
14
|
IResponse<IGetUploadPreSignedUrlBoardCardDocumentData>;
|
|
14
15
|
|
|
@@ -29,4 +29,5 @@ export interface ICountOrganizationRetrospectiveData {
|
|
|
29
29
|
orphan?: number;
|
|
30
30
|
unshared?: number;
|
|
31
31
|
}
|
|
32
|
-
export type ICountOrganizationRetrospectiveResponse =
|
|
32
|
+
export type ICountOrganizationRetrospectiveResponse =
|
|
33
|
+
IResponse<ICountOrganizationRetrospectiveData>;
|