@lerianstudio/matcher-mcp 5.0.0-beta.57 → 5.0.0-beta.59
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/README.md +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/spec/enum-policy.js +27 -0
- package/dist/spec/enum-policy.js.map +1 -1
- package/dist/spec/openapi.yaml +435 -5
- package/dist/tools/source/create.js +162 -18
- package/dist/tools/source/create.js.map +1 -1
- package/dist/tools/source/update.js +9 -22
- package/dist/tools/source/update.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -215,7 +215,7 @@ read server-side only, never sent to the browser.
|
|
|
215
215
|
| `OPENROUTER_API_KEY` | _(unset)_ | OpenRouter API key. Required when `COPILOT_PROVIDER=openrouter`. Never logged, never returned. |
|
|
216
216
|
| `COPILOT_MODEL` | _(provider default)_ | Model id passed to the selected provider. Anthropic falls back to its own default when unset; OpenRouter has **no** safe default and requires `COPILOT_MODEL` to be set explicitly (an Anthropic id 404s there), otherwise provider construction raises `CopilotModelRequiredError`. |
|
|
217
217
|
| `COPILOT_MAX_TOOL_ITERATIONS` | `8` | Max read-tool rounds the agent loop runs before forcing a stop. Integer `1..20`. |
|
|
218
|
-
| `COPILOT_MAX_TURN_TOKENS` | `
|
|
218
|
+
| `COPILOT_MAX_TURN_TOKENS` | `400000` | Per-turn ceiling on accumulated input+output; the loop truncates between rounds once crossed. Sized to clear a full 8-round turn at the measured ~39.7k tokens/round (2026-09-08), so `COPILOT_MAX_TOOL_ITERATIONS` is what stops a turn. Not a reservation and not a context-window limit — it is compared against usage already billed, so raising it costs nothing on a turn that ends normally. |
|
|
219
219
|
| `COPILOT_RATE_LIMIT_PER_MIN` | `60` | Per-tenant token-bucket refill rate (turns/min). Per-tenant-overridable. |
|
|
220
220
|
| `COPILOT_RATE_LIMIT_BURST` | `20` | Per-tenant token-bucket burst capacity. Per-tenant-overridable. |
|
|
221
221
|
| `COPILOT_TENANT_CONFIG_PATH` | _(unset)_ | Path to a JSON file mapping `tenantId → { provider, model?, apiKey, maxTurnTokens?, rateLimitPerMin?, rateLimitBurst? }` for per-tenant provider/key overrides. Unset = one global config (BYOC single-tenant). |
|
package/dist/config.js
CHANGED
|
@@ -13,7 +13,7 @@ const DEFAULT_MAX_BODY_BYTES = 1_048_576; // 1 MiB
|
|
|
13
13
|
const DEFAULT_OTEL_SERVICE_NAME = 'matcher-mcp';
|
|
14
14
|
const DEFAULT_COPILOT_PROVIDER = 'anthropic';
|
|
15
15
|
const DEFAULT_COPILOT_MAX_TOOL_ITERATIONS = 8;
|
|
16
|
-
const DEFAULT_COPILOT_MAX_TURN_TOKENS =
|
|
16
|
+
const DEFAULT_COPILOT_MAX_TURN_TOKENS = 400_000;
|
|
17
17
|
const DEFAULT_COPILOT_RATE_LIMIT_PER_MIN = 60;
|
|
18
18
|
const DEFAULT_COPILOT_RATE_LIMIT_BURST = 20;
|
|
19
19
|
const DEFAULT_SPEECH_TRANSCRIPTION_REGION = 'sa-east-1';
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAE5E,OAAO,EAAE,gBAAgB,EAA+B,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAE5E,OAAO,EAAE,gBAAgB,EAA+B,MAAM,4BAA4B,CAAA;AAqK1F,MAAM,YAAY,GAAG,IAAI,CAAA;AACzB,MAAM,uBAAuB,GAAG,uBAAuB,CAAA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I,SAAS;QACnD,eAAe;QACf,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,SAAS;QAC3D,gBAAgB,EAAE,GAAG,CAAC,kBAAkB,EAAE,IAAI,EAAE,IAAI,SAAS;QAC7D,eAAe,EAAE,oBAAoB,CACnC,GAAG,CAAC,gBAAgB,EACpB,wBAAwB,CACzB;QACD,YAAY,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,SAAS;QACpD,wBAAwB,EAAE,sBAAsB,CAC9C,GAAG,CAAC,2BAA2B,EAC/B,mCAAmC,CACpC;QACD,oBAAoB,EAAE,gBAAgB,CACpC,GAAG,CAAC,uBAAuB,EAC3B,+BAA+B,EAC/B,yBAAyB,CAC1B;QACD,sBAAsB,EAAE,gBAAgB,CACtC,GAAG,CAAC,0BAA0B,EAC9B,kCAAkC,EAClC,4BAA4B,CAC7B;QACD,qBAAqB,EAAE,gBAAgB,CACrC,GAAG,CAAC,wBAAwB,EAC5B,gCAAgC,EAChC,0BAA0B,CAC3B;QACD,2BAA2B,EAAE,mBAAmB,CAAC,GAAG,CAAC,6BAA6B,CAAC;QACnF,yBAAyB,EACvB,GAAG,CAAC,2BAA2B,EAAE,IAAI,EAAE,IAAI,mCAAmC;QAChF,yBAAyB,EAAE,GAAG,CAAC,4BAA4B,EAAE,IAAI,EAAE,IAAI,SAAS;QAChF,mBAAmB,EAAE,gBAAgB,CAAC,GAAG,CAAC;KAC3C,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/spec/enum-policy.js
CHANGED
|
@@ -71,6 +71,33 @@ export const INTENTIONALLY_OMITTED_FIELDS = [
|
|
|
71
71
|
{ operationId: 'createContext', fieldPath: 'sources[].side', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
72
72
|
{ operationId: 'createContext', fieldPath: 'sources[].config', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
73
73
|
{ operationId: 'createContext', fieldPath: 'sources[].mapping', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
74
|
+
// The twelve entries below are the SAME decision as `sources[].config` above,
|
|
75
|
+
// restated for paths that did not exist when it was written. A source's config
|
|
76
|
+
// used to be a free-form object in the contract; it now publishes seven reserved
|
|
77
|
+
// keys, and this list matches by EXACT path, so the parent entry does not cover
|
|
78
|
+
// its new children. Nothing was re-decided: inline sources[] is still an opaque
|
|
79
|
+
// record by curation (the tool documents "prefer context_create with no sources
|
|
80
|
+
// then source_create"), and source_create/source_update DO type all seven.
|
|
81
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.dialect', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
82
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.dialect.encoding', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
83
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.dialect.delimiter', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
84
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.dialect.decimal_style', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
85
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.dialect.date_style', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
86
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.duplicate_policy', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
87
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.duplicate_key', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
88
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.blank_external_id', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
89
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.camt053', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
90
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.camt053.date_basis', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
91
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.camt053.external_id_source', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
92
|
+
{ operationId: 'createContext', fieldPath: 'sources[].config.fail_on_error_rate_percent', reason: 'inline sources[] passed through as an opaque record; matcher validates' },
|
|
93
|
+
// NOTHING for duplicate_key_changed_at, deliberately. It used to need three
|
|
94
|
+
// entries here — one per request body that declared it — because the tools chose
|
|
95
|
+
// not to expose a key the server stamps and discards. The REQUEST SCHEMAS no
|
|
96
|
+
// longer declare it at all (dto.SourceConfigRequest removes it; it is published on
|
|
97
|
+
// responses only), so the gate never looks for it and an entry would record the
|
|
98
|
+
// omission of a field that does not exist. The tools now REFUSE the key by name
|
|
99
|
+
// rather than merely not offering it — see SERVER_OWNED_CONFIG_KEY in
|
|
100
|
+
// src/tools/source/create.ts and the two tests pinning both directions.
|
|
74
101
|
];
|
|
75
102
|
/**
|
|
76
103
|
* Spec-required fields the curated tools satisfy by INJECTING the value in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-policy.js","sourceRoot":"","sources":["../../src/spec/enum-policy.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,iFAAiF;AACjF,kCAAkC;AAClC,EAAE;AACF,6DAA6D;AAC7D,wEAAwE;AACxE,iFAAiF;AACjF,+EAA+E;AAC/E,2EAA2E;AAC3E,gFAAgF;AAChF,kFAAkF;AAClF,6EAA6E;AAC7E,8EAA8E;AAC9E,yDAAyD;AACzD,EAAE;AACF,0BAA0B;AAC1B,yEAAyE;AACzE,0EAA0E;AAC1E,wEAAwE;AACxE,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,uEAAuE;AACvE,EAAE;AACF,kFAAkF;AAClF,yEAAyE;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAuC/D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAsC;IAC1E,2EAA2E;IAC3E,8EAA8E;IAC9E,4DAA4D;IAC5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EAAwE,EAAE;IACzJ,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,qCAAqC,EAAE,MAAM,EAAE,wEAAwE,EAAE;IACpK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,6CAA6C,EAAE,MAAM,EAAE,wEAAwE,EAAE;IAC5K,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,6CAA6C,EAAE,MAAM,EAAE,wEAAwE,EAAE;IAC5K,4EAA4E;IAC5E,iFAAiF;IACjF,6EAA6E;IAC7E,mFAAmF;IACnF,gFAAgF;IAChF,gFAAgF;IAChF,sEAAsE;IACtE,wEAAwE;CACzE,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,EAAE,CAAA"}
|
package/dist/spec/openapi.yaml
CHANGED
|
@@ -1920,7 +1920,91 @@ components:
|
|
|
1920
1920
|
properties:
|
|
1921
1921
|
config:
|
|
1922
1922
|
additionalProperties: {}
|
|
1923
|
-
description: "Source-specific configuration object
|
|
1923
|
+
description: "Source-specific configuration object. Cross-key rules the schema cannot express: a duplicate_key component this source's field map does not fill is refused, because a key over an always-empty field makes every row a duplicate of every other; a source bound to an aggregator connection (reserved key connection_config_name) cannot carry a duplicate_key of its own, and a config holding both is refused in either direction; and editing duplicate_key governs later imports only — rows already imported keep the key they were deduplicated under, so a duplicate straddling the change is knowingly not detected."
|
|
1924
|
+
properties:
|
|
1925
|
+
blank_external_id:
|
|
1926
|
+
description: What happens to a row whose mapped external id is blank. REJECT (the default when the key is absent) fails the row. NEEDS_REVIEW imports it under a synthetic reference with status PENDING_REVIEW, so a blank reference becomes a reviewable import instead of an import failure.
|
|
1927
|
+
enum:
|
|
1928
|
+
- REJECT
|
|
1929
|
+
- NEEDS_REVIEW
|
|
1930
|
+
type: string
|
|
1931
|
+
camt053:
|
|
1932
|
+
additionalProperties: false
|
|
1933
|
+
description: How this source's camt.053 files map onto the canonical fields. Every other field is fixed by ISO 20022 itself. An absent object, or an absent sub-key, keeps the ISO defaults (booking, ntry_ref).
|
|
1934
|
+
properties:
|
|
1935
|
+
date_basis:
|
|
1936
|
+
description: "Entry date element: booking is BookgDt/Dt, valuation is ValDt/Dt. Default booking."
|
|
1937
|
+
enum:
|
|
1938
|
+
- booking
|
|
1939
|
+
- valuation
|
|
1940
|
+
type: string
|
|
1941
|
+
external_id_source:
|
|
1942
|
+
description: "Entry reference element: ntry_ref is NtryRef, end_to_end_id is NtryDtls/TxDtls/Refs/EndToEndId, tx_id is NtryDtls/TxDtls/Refs/TxId. Default ntry_ref."
|
|
1943
|
+
enum:
|
|
1944
|
+
- ntry_ref
|
|
1945
|
+
- end_to_end_id
|
|
1946
|
+
- tx_id
|
|
1947
|
+
type: string
|
|
1948
|
+
type: object
|
|
1949
|
+
dialect:
|
|
1950
|
+
additionalProperties: false
|
|
1951
|
+
description: How this source's delimited files are encoded and formatted. Declaration-driven only — there is no auto-detection. An absent object, or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).
|
|
1952
|
+
properties:
|
|
1953
|
+
date_style:
|
|
1954
|
+
enum:
|
|
1955
|
+
- iso
|
|
1956
|
+
- iso_offset
|
|
1957
|
+
- dmy
|
|
1958
|
+
- mdy
|
|
1959
|
+
type: string
|
|
1960
|
+
decimal_style:
|
|
1961
|
+
description: dot is 1234.56, comma is 1.234,56.
|
|
1962
|
+
enum:
|
|
1963
|
+
- dot
|
|
1964
|
+
- comma
|
|
1965
|
+
type: string
|
|
1966
|
+
delimiter:
|
|
1967
|
+
enum:
|
|
1968
|
+
- comma
|
|
1969
|
+
- semicolon
|
|
1970
|
+
- tab
|
|
1971
|
+
- pipe
|
|
1972
|
+
type: string
|
|
1973
|
+
encoding:
|
|
1974
|
+
enum:
|
|
1975
|
+
- utf-8
|
|
1976
|
+
- utf-8-sig
|
|
1977
|
+
- cp1252
|
|
1978
|
+
- iso-8859-1
|
|
1979
|
+
type: string
|
|
1980
|
+
type: object
|
|
1981
|
+
duplicate_key:
|
|
1982
|
+
description: The ordered list of mapped fields that make two rows the same row. Absent means external_id alone. On a source bound to an aggregator connection the aggregator retracts a movement by naming its external id, so that id has to stay the row identity.
|
|
1983
|
+
items:
|
|
1984
|
+
enum:
|
|
1985
|
+
- external_id
|
|
1986
|
+
- amount
|
|
1987
|
+
- currency
|
|
1988
|
+
- date
|
|
1989
|
+
- description
|
|
1990
|
+
- fee_amount
|
|
1991
|
+
- fee_currency
|
|
1992
|
+
type: string
|
|
1993
|
+
minItems: 1
|
|
1994
|
+
type: array
|
|
1995
|
+
uniqueItems: true
|
|
1996
|
+
duplicate_policy:
|
|
1997
|
+
description: What happens to a row that repeats this source's duplicate key. FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat out of the import and raises a duplicate exception on the row it repeated. KEEP_FIRST drops the repeat and raises nothing, so a collision leaves no trace anyone can act on. REJECT counts the repeat as an import error.
|
|
1998
|
+
enum:
|
|
1999
|
+
- FLAG_AS_EXCEPTION
|
|
2000
|
+
- KEEP_FIRST
|
|
2001
|
+
- REJECT
|
|
2002
|
+
type: string
|
|
2003
|
+
fail_on_error_rate_percent:
|
|
2004
|
+
description: "Fail the whole import when the percentage of failed rows exceeds this whole number. Absent means never auto-fail. The ceiling is 99, not 100: the comparison is strict, so 100 could never fire."
|
|
2005
|
+
maximum: 99
|
|
2006
|
+
minimum: 1
|
|
2007
|
+
type: integer
|
|
1924
2008
|
type: object
|
|
1925
2009
|
mapping:
|
|
1926
2010
|
additionalProperties: {}
|
|
@@ -2350,7 +2434,91 @@ components:
|
|
|
2350
2434
|
properties:
|
|
2351
2435
|
config:
|
|
2352
2436
|
additionalProperties: {}
|
|
2353
|
-
description: "Source-specific configuration object
|
|
2437
|
+
description: "Source-specific configuration object. Cross-key rules the schema cannot express: a duplicate_key component this source's field map does not fill is refused, because a key over an always-empty field makes every row a duplicate of every other; a source bound to an aggregator connection (reserved key connection_config_name) cannot carry a duplicate_key of its own, and a config holding both is refused in either direction; and editing duplicate_key governs later imports only — rows already imported keep the key they were deduplicated under, so a duplicate straddling the change is knowingly not detected."
|
|
2438
|
+
properties:
|
|
2439
|
+
blank_external_id:
|
|
2440
|
+
description: What happens to a row whose mapped external id is blank. REJECT (the default when the key is absent) fails the row. NEEDS_REVIEW imports it under a synthetic reference with status PENDING_REVIEW, so a blank reference becomes a reviewable import instead of an import failure.
|
|
2441
|
+
enum:
|
|
2442
|
+
- REJECT
|
|
2443
|
+
- NEEDS_REVIEW
|
|
2444
|
+
type: string
|
|
2445
|
+
camt053:
|
|
2446
|
+
additionalProperties: false
|
|
2447
|
+
description: How this source's camt.053 files map onto the canonical fields. Every other field is fixed by ISO 20022 itself. An absent object, or an absent sub-key, keeps the ISO defaults (booking, ntry_ref).
|
|
2448
|
+
properties:
|
|
2449
|
+
date_basis:
|
|
2450
|
+
description: "Entry date element: booking is BookgDt/Dt, valuation is ValDt/Dt. Default booking."
|
|
2451
|
+
enum:
|
|
2452
|
+
- booking
|
|
2453
|
+
- valuation
|
|
2454
|
+
type: string
|
|
2455
|
+
external_id_source:
|
|
2456
|
+
description: "Entry reference element: ntry_ref is NtryRef, end_to_end_id is NtryDtls/TxDtls/Refs/EndToEndId, tx_id is NtryDtls/TxDtls/Refs/TxId. Default ntry_ref."
|
|
2457
|
+
enum:
|
|
2458
|
+
- ntry_ref
|
|
2459
|
+
- end_to_end_id
|
|
2460
|
+
- tx_id
|
|
2461
|
+
type: string
|
|
2462
|
+
type: object
|
|
2463
|
+
dialect:
|
|
2464
|
+
additionalProperties: false
|
|
2465
|
+
description: How this source's delimited files are encoded and formatted. Declaration-driven only — there is no auto-detection. An absent object, or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).
|
|
2466
|
+
properties:
|
|
2467
|
+
date_style:
|
|
2468
|
+
enum:
|
|
2469
|
+
- iso
|
|
2470
|
+
- iso_offset
|
|
2471
|
+
- dmy
|
|
2472
|
+
- mdy
|
|
2473
|
+
type: string
|
|
2474
|
+
decimal_style:
|
|
2475
|
+
description: dot is 1234.56, comma is 1.234,56.
|
|
2476
|
+
enum:
|
|
2477
|
+
- dot
|
|
2478
|
+
- comma
|
|
2479
|
+
type: string
|
|
2480
|
+
delimiter:
|
|
2481
|
+
enum:
|
|
2482
|
+
- comma
|
|
2483
|
+
- semicolon
|
|
2484
|
+
- tab
|
|
2485
|
+
- pipe
|
|
2486
|
+
type: string
|
|
2487
|
+
encoding:
|
|
2488
|
+
enum:
|
|
2489
|
+
- utf-8
|
|
2490
|
+
- utf-8-sig
|
|
2491
|
+
- cp1252
|
|
2492
|
+
- iso-8859-1
|
|
2493
|
+
type: string
|
|
2494
|
+
type: object
|
|
2495
|
+
duplicate_key:
|
|
2496
|
+
description: The ordered list of mapped fields that make two rows the same row. Absent means external_id alone. On a source bound to an aggregator connection the aggregator retracts a movement by naming its external id, so that id has to stay the row identity.
|
|
2497
|
+
items:
|
|
2498
|
+
enum:
|
|
2499
|
+
- external_id
|
|
2500
|
+
- amount
|
|
2501
|
+
- currency
|
|
2502
|
+
- date
|
|
2503
|
+
- description
|
|
2504
|
+
- fee_amount
|
|
2505
|
+
- fee_currency
|
|
2506
|
+
type: string
|
|
2507
|
+
minItems: 1
|
|
2508
|
+
type: array
|
|
2509
|
+
uniqueItems: true
|
|
2510
|
+
duplicate_policy:
|
|
2511
|
+
description: What happens to a row that repeats this source's duplicate key. FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat out of the import and raises a duplicate exception on the row it repeated. KEEP_FIRST drops the repeat and raises nothing, so a collision leaves no trace anyone can act on. REJECT counts the repeat as an import error.
|
|
2512
|
+
enum:
|
|
2513
|
+
- FLAG_AS_EXCEPTION
|
|
2514
|
+
- KEEP_FIRST
|
|
2515
|
+
- REJECT
|
|
2516
|
+
type: string
|
|
2517
|
+
fail_on_error_rate_percent:
|
|
2518
|
+
description: "Fail the whole import when the percentage of failed rows exceeds this whole number. Absent means never auto-fail. The ceiling is 99, not 100: the comparison is strict, so 100 could never fire."
|
|
2519
|
+
maximum: 99
|
|
2520
|
+
minimum: 1
|
|
2521
|
+
type: integer
|
|
2354
2522
|
type: object
|
|
2355
2523
|
name:
|
|
2356
2524
|
description: Human-readable name of the source.
|
|
@@ -6281,7 +6449,96 @@ components:
|
|
|
6281
6449
|
type: string
|
|
6282
6450
|
config:
|
|
6283
6451
|
additionalProperties: {}
|
|
6284
|
-
description: Source-specific configuration object
|
|
6452
|
+
description: "Source-specific configuration object. Cross-key rules the schema cannot express: a duplicate_key component this source's field map does not fill is refused, because a key over an always-empty field makes every row a duplicate of every other; a source bound to an aggregator connection (reserved key connection_config_name) cannot carry a duplicate_key of its own, and a config holding both is refused in either direction; and editing duplicate_key governs later imports only — rows already imported keep the key they were deduplicated under, so a duplicate straddling the change is knowingly not detected."
|
|
6453
|
+
properties:
|
|
6454
|
+
blank_external_id:
|
|
6455
|
+
description: What happens to a row whose mapped external id is blank. REJECT (the default when the key is absent) fails the row. NEEDS_REVIEW imports it under a synthetic reference with status PENDING_REVIEW, so a blank reference becomes a reviewable import instead of an import failure.
|
|
6456
|
+
enum:
|
|
6457
|
+
- REJECT
|
|
6458
|
+
- NEEDS_REVIEW
|
|
6459
|
+
type: string
|
|
6460
|
+
camt053:
|
|
6461
|
+
additionalProperties: false
|
|
6462
|
+
description: How this source's camt.053 files map onto the canonical fields. Every other field is fixed by ISO 20022 itself. An absent object, or an absent sub-key, keeps the ISO defaults (booking, ntry_ref).
|
|
6463
|
+
properties:
|
|
6464
|
+
date_basis:
|
|
6465
|
+
description: "Entry date element: booking is BookgDt/Dt, valuation is ValDt/Dt. Default booking."
|
|
6466
|
+
enum:
|
|
6467
|
+
- booking
|
|
6468
|
+
- valuation
|
|
6469
|
+
type: string
|
|
6470
|
+
external_id_source:
|
|
6471
|
+
description: "Entry reference element: ntry_ref is NtryRef, end_to_end_id is NtryDtls/TxDtls/Refs/EndToEndId, tx_id is NtryDtls/TxDtls/Refs/TxId. Default ntry_ref."
|
|
6472
|
+
enum:
|
|
6473
|
+
- ntry_ref
|
|
6474
|
+
- end_to_end_id
|
|
6475
|
+
- tx_id
|
|
6476
|
+
type: string
|
|
6477
|
+
type: object
|
|
6478
|
+
dialect:
|
|
6479
|
+
additionalProperties: false
|
|
6480
|
+
description: How this source's delimited files are encoded and formatted. Declaration-driven only — there is no auto-detection. An absent object, or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).
|
|
6481
|
+
properties:
|
|
6482
|
+
date_style:
|
|
6483
|
+
enum:
|
|
6484
|
+
- iso
|
|
6485
|
+
- iso_offset
|
|
6486
|
+
- dmy
|
|
6487
|
+
- mdy
|
|
6488
|
+
type: string
|
|
6489
|
+
decimal_style:
|
|
6490
|
+
description: dot is 1234.56, comma is 1.234,56.
|
|
6491
|
+
enum:
|
|
6492
|
+
- dot
|
|
6493
|
+
- comma
|
|
6494
|
+
type: string
|
|
6495
|
+
delimiter:
|
|
6496
|
+
enum:
|
|
6497
|
+
- comma
|
|
6498
|
+
- semicolon
|
|
6499
|
+
- tab
|
|
6500
|
+
- pipe
|
|
6501
|
+
type: string
|
|
6502
|
+
encoding:
|
|
6503
|
+
enum:
|
|
6504
|
+
- utf-8
|
|
6505
|
+
- utf-8-sig
|
|
6506
|
+
- cp1252
|
|
6507
|
+
- iso-8859-1
|
|
6508
|
+
type: string
|
|
6509
|
+
type: object
|
|
6510
|
+
duplicate_key:
|
|
6511
|
+
description: The ordered list of mapped fields that make two rows the same row. Absent means external_id alone. On a source bound to an aggregator connection the aggregator retracts a movement by naming its external id, so that id has to stay the row identity.
|
|
6512
|
+
items:
|
|
6513
|
+
enum:
|
|
6514
|
+
- external_id
|
|
6515
|
+
- amount
|
|
6516
|
+
- currency
|
|
6517
|
+
- date
|
|
6518
|
+
- description
|
|
6519
|
+
- fee_amount
|
|
6520
|
+
- fee_currency
|
|
6521
|
+
type: string
|
|
6522
|
+
minItems: 1
|
|
6523
|
+
type: array
|
|
6524
|
+
uniqueItems: true
|
|
6525
|
+
duplicate_key_changed_at:
|
|
6526
|
+
description: SERVER-OWNED. The moment duplicate-key detection last changed meaning on this source, either because duplicate_key was edited or because the field map remapped the column a declared component reads. Rows imported before it keep the key they were deduplicated under. A value sent by a client is discarded.
|
|
6527
|
+
format: date-time
|
|
6528
|
+
readOnly: true
|
|
6529
|
+
type: string
|
|
6530
|
+
duplicate_policy:
|
|
6531
|
+
description: What happens to a row that repeats this source's duplicate key. FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat out of the import and raises a duplicate exception on the row it repeated. KEEP_FIRST drops the repeat and raises nothing, so a collision leaves no trace anyone can act on. REJECT counts the repeat as an import error.
|
|
6532
|
+
enum:
|
|
6533
|
+
- FLAG_AS_EXCEPTION
|
|
6534
|
+
- KEEP_FIRST
|
|
6535
|
+
- REJECT
|
|
6536
|
+
type: string
|
|
6537
|
+
fail_on_error_rate_percent:
|
|
6538
|
+
description: "Fail the whole import when the percentage of failed rows exceeds this whole number. Absent means never auto-fail. The ceiling is 99, not 100: the comparison is strict, so 100 could never fire."
|
|
6539
|
+
maximum: 99
|
|
6540
|
+
minimum: 1
|
|
6541
|
+
type: integer
|
|
6285
6542
|
type: object
|
|
6286
6543
|
contextId:
|
|
6287
6544
|
description: Identifier of the context this source belongs to.
|
|
@@ -7629,7 +7886,96 @@ components:
|
|
|
7629
7886
|
type: string
|
|
7630
7887
|
config:
|
|
7631
7888
|
additionalProperties: {}
|
|
7632
|
-
description: Source-specific configuration object
|
|
7889
|
+
description: "Source-specific configuration object. Cross-key rules the schema cannot express: a duplicate_key component this source's field map does not fill is refused, because a key over an always-empty field makes every row a duplicate of every other; a source bound to an aggregator connection (reserved key connection_config_name) cannot carry a duplicate_key of its own, and a config holding both is refused in either direction; and editing duplicate_key governs later imports only — rows already imported keep the key they were deduplicated under, so a duplicate straddling the change is knowingly not detected."
|
|
7890
|
+
properties:
|
|
7891
|
+
blank_external_id:
|
|
7892
|
+
description: What happens to a row whose mapped external id is blank. REJECT (the default when the key is absent) fails the row. NEEDS_REVIEW imports it under a synthetic reference with status PENDING_REVIEW, so a blank reference becomes a reviewable import instead of an import failure.
|
|
7893
|
+
enum:
|
|
7894
|
+
- REJECT
|
|
7895
|
+
- NEEDS_REVIEW
|
|
7896
|
+
type: string
|
|
7897
|
+
camt053:
|
|
7898
|
+
additionalProperties: false
|
|
7899
|
+
description: How this source's camt.053 files map onto the canonical fields. Every other field is fixed by ISO 20022 itself. An absent object, or an absent sub-key, keeps the ISO defaults (booking, ntry_ref).
|
|
7900
|
+
properties:
|
|
7901
|
+
date_basis:
|
|
7902
|
+
description: "Entry date element: booking is BookgDt/Dt, valuation is ValDt/Dt. Default booking."
|
|
7903
|
+
enum:
|
|
7904
|
+
- booking
|
|
7905
|
+
- valuation
|
|
7906
|
+
type: string
|
|
7907
|
+
external_id_source:
|
|
7908
|
+
description: "Entry reference element: ntry_ref is NtryRef, end_to_end_id is NtryDtls/TxDtls/Refs/EndToEndId, tx_id is NtryDtls/TxDtls/Refs/TxId. Default ntry_ref."
|
|
7909
|
+
enum:
|
|
7910
|
+
- ntry_ref
|
|
7911
|
+
- end_to_end_id
|
|
7912
|
+
- tx_id
|
|
7913
|
+
type: string
|
|
7914
|
+
type: object
|
|
7915
|
+
dialect:
|
|
7916
|
+
additionalProperties: false
|
|
7917
|
+
description: How this source's delimited files are encoded and formatted. Declaration-driven only — there is no auto-detection. An absent object, or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).
|
|
7918
|
+
properties:
|
|
7919
|
+
date_style:
|
|
7920
|
+
enum:
|
|
7921
|
+
- iso
|
|
7922
|
+
- iso_offset
|
|
7923
|
+
- dmy
|
|
7924
|
+
- mdy
|
|
7925
|
+
type: string
|
|
7926
|
+
decimal_style:
|
|
7927
|
+
description: dot is 1234.56, comma is 1.234,56.
|
|
7928
|
+
enum:
|
|
7929
|
+
- dot
|
|
7930
|
+
- comma
|
|
7931
|
+
type: string
|
|
7932
|
+
delimiter:
|
|
7933
|
+
enum:
|
|
7934
|
+
- comma
|
|
7935
|
+
- semicolon
|
|
7936
|
+
- tab
|
|
7937
|
+
- pipe
|
|
7938
|
+
type: string
|
|
7939
|
+
encoding:
|
|
7940
|
+
enum:
|
|
7941
|
+
- utf-8
|
|
7942
|
+
- utf-8-sig
|
|
7943
|
+
- cp1252
|
|
7944
|
+
- iso-8859-1
|
|
7945
|
+
type: string
|
|
7946
|
+
type: object
|
|
7947
|
+
duplicate_key:
|
|
7948
|
+
description: The ordered list of mapped fields that make two rows the same row. Absent means external_id alone. On a source bound to an aggregator connection the aggregator retracts a movement by naming its external id, so that id has to stay the row identity.
|
|
7949
|
+
items:
|
|
7950
|
+
enum:
|
|
7951
|
+
- external_id
|
|
7952
|
+
- amount
|
|
7953
|
+
- currency
|
|
7954
|
+
- date
|
|
7955
|
+
- description
|
|
7956
|
+
- fee_amount
|
|
7957
|
+
- fee_currency
|
|
7958
|
+
type: string
|
|
7959
|
+
minItems: 1
|
|
7960
|
+
type: array
|
|
7961
|
+
uniqueItems: true
|
|
7962
|
+
duplicate_key_changed_at:
|
|
7963
|
+
description: SERVER-OWNED. The moment duplicate-key detection last changed meaning on this source, either because duplicate_key was edited or because the field map remapped the column a declared component reads. Rows imported before it keep the key they were deduplicated under. A value sent by a client is discarded.
|
|
7964
|
+
format: date-time
|
|
7965
|
+
readOnly: true
|
|
7966
|
+
type: string
|
|
7967
|
+
duplicate_policy:
|
|
7968
|
+
description: What happens to a row that repeats this source's duplicate key. FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat out of the import and raises a duplicate exception on the row it repeated. KEEP_FIRST drops the repeat and raises nothing, so a collision leaves no trace anyone can act on. REJECT counts the repeat as an import error.
|
|
7969
|
+
enum:
|
|
7970
|
+
- FLAG_AS_EXCEPTION
|
|
7971
|
+
- KEEP_FIRST
|
|
7972
|
+
- REJECT
|
|
7973
|
+
type: string
|
|
7974
|
+
fail_on_error_rate_percent:
|
|
7975
|
+
description: "Fail the whole import when the percentage of failed rows exceeds this whole number. Absent means never auto-fail. The ceiling is 99, not 100: the comparison is strict, so 100 could never fire."
|
|
7976
|
+
maximum: 99
|
|
7977
|
+
minimum: 1
|
|
7978
|
+
type: integer
|
|
7633
7979
|
type: object
|
|
7634
7980
|
contextId:
|
|
7635
7981
|
description: Identifier of the context this source belongs to.
|
|
@@ -8374,7 +8720,91 @@ components:
|
|
|
8374
8720
|
properties:
|
|
8375
8721
|
config:
|
|
8376
8722
|
additionalProperties: {}
|
|
8377
|
-
description: "Source-specific configuration object
|
|
8723
|
+
description: "Source-specific configuration object. Cross-key rules the schema cannot express: a duplicate_key component this source's field map does not fill is refused, because a key over an always-empty field makes every row a duplicate of every other; a source bound to an aggregator connection (reserved key connection_config_name) cannot carry a duplicate_key of its own, and a config holding both is refused in either direction; and editing duplicate_key governs later imports only — rows already imported keep the key they were deduplicated under, so a duplicate straddling the change is knowingly not detected."
|
|
8724
|
+
properties:
|
|
8725
|
+
blank_external_id:
|
|
8726
|
+
description: What happens to a row whose mapped external id is blank. REJECT (the default when the key is absent) fails the row. NEEDS_REVIEW imports it under a synthetic reference with status PENDING_REVIEW, so a blank reference becomes a reviewable import instead of an import failure.
|
|
8727
|
+
enum:
|
|
8728
|
+
- REJECT
|
|
8729
|
+
- NEEDS_REVIEW
|
|
8730
|
+
type: string
|
|
8731
|
+
camt053:
|
|
8732
|
+
additionalProperties: false
|
|
8733
|
+
description: How this source's camt.053 files map onto the canonical fields. Every other field is fixed by ISO 20022 itself. An absent object, or an absent sub-key, keeps the ISO defaults (booking, ntry_ref).
|
|
8734
|
+
properties:
|
|
8735
|
+
date_basis:
|
|
8736
|
+
description: "Entry date element: booking is BookgDt/Dt, valuation is ValDt/Dt. Default booking."
|
|
8737
|
+
enum:
|
|
8738
|
+
- booking
|
|
8739
|
+
- valuation
|
|
8740
|
+
type: string
|
|
8741
|
+
external_id_source:
|
|
8742
|
+
description: "Entry reference element: ntry_ref is NtryRef, end_to_end_id is NtryDtls/TxDtls/Refs/EndToEndId, tx_id is NtryDtls/TxDtls/Refs/TxId. Default ntry_ref."
|
|
8743
|
+
enum:
|
|
8744
|
+
- ntry_ref
|
|
8745
|
+
- end_to_end_id
|
|
8746
|
+
- tx_id
|
|
8747
|
+
type: string
|
|
8748
|
+
type: object
|
|
8749
|
+
dialect:
|
|
8750
|
+
additionalProperties: false
|
|
8751
|
+
description: How this source's delimited files are encoded and formatted. Declaration-driven only — there is no auto-detection. An absent object, or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).
|
|
8752
|
+
properties:
|
|
8753
|
+
date_style:
|
|
8754
|
+
enum:
|
|
8755
|
+
- iso
|
|
8756
|
+
- iso_offset
|
|
8757
|
+
- dmy
|
|
8758
|
+
- mdy
|
|
8759
|
+
type: string
|
|
8760
|
+
decimal_style:
|
|
8761
|
+
description: dot is 1234.56, comma is 1.234,56.
|
|
8762
|
+
enum:
|
|
8763
|
+
- dot
|
|
8764
|
+
- comma
|
|
8765
|
+
type: string
|
|
8766
|
+
delimiter:
|
|
8767
|
+
enum:
|
|
8768
|
+
- comma
|
|
8769
|
+
- semicolon
|
|
8770
|
+
- tab
|
|
8771
|
+
- pipe
|
|
8772
|
+
type: string
|
|
8773
|
+
encoding:
|
|
8774
|
+
enum:
|
|
8775
|
+
- utf-8
|
|
8776
|
+
- utf-8-sig
|
|
8777
|
+
- cp1252
|
|
8778
|
+
- iso-8859-1
|
|
8779
|
+
type: string
|
|
8780
|
+
type: object
|
|
8781
|
+
duplicate_key:
|
|
8782
|
+
description: The ordered list of mapped fields that make two rows the same row. Absent means external_id alone. On a source bound to an aggregator connection the aggregator retracts a movement by naming its external id, so that id has to stay the row identity.
|
|
8783
|
+
items:
|
|
8784
|
+
enum:
|
|
8785
|
+
- external_id
|
|
8786
|
+
- amount
|
|
8787
|
+
- currency
|
|
8788
|
+
- date
|
|
8789
|
+
- description
|
|
8790
|
+
- fee_amount
|
|
8791
|
+
- fee_currency
|
|
8792
|
+
type: string
|
|
8793
|
+
minItems: 1
|
|
8794
|
+
type: array
|
|
8795
|
+
uniqueItems: true
|
|
8796
|
+
duplicate_policy:
|
|
8797
|
+
description: What happens to a row that repeats this source's duplicate key. FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat out of the import and raises a duplicate exception on the row it repeated. KEEP_FIRST drops the repeat and raises nothing, so a collision leaves no trace anyone can act on. REJECT counts the repeat as an import error.
|
|
8798
|
+
enum:
|
|
8799
|
+
- FLAG_AS_EXCEPTION
|
|
8800
|
+
- KEEP_FIRST
|
|
8801
|
+
- REJECT
|
|
8802
|
+
type: string
|
|
8803
|
+
fail_on_error_rate_percent:
|
|
8804
|
+
description: "Fail the whole import when the percentage of failed rows exceeds this whole number. Absent means never auto-fail. The ceiling is 99, not 100: the comparison is strict, so 100 could never fire."
|
|
8805
|
+
maximum: 99
|
|
8806
|
+
minimum: 1
|
|
8807
|
+
type: integer
|
|
8378
8808
|
type: object
|
|
8379
8809
|
name:
|
|
8380
8810
|
description: New human-readable name of the source.
|
|
@@ -22,6 +22,163 @@ export const SOURCE_TYPES = [
|
|
|
22
22
|
];
|
|
23
23
|
/** Matching side this source feeds — the two sides reconciled against each other. */
|
|
24
24
|
export const SOURCE_SIDES = ['LEFT', 'RIGHT'];
|
|
25
|
+
// --- Reserved `config` vocabularies -----------------------------------------
|
|
26
|
+
//
|
|
27
|
+
// CLOSED, SLOW-MOVING ALGEBRAS, so they are modeled as closed Zod enums per the
|
|
28
|
+
// enum policy (docs/enum-policy.md): a file encoding, a CSV delimiter, an ISO
|
|
29
|
+
// 20022 element choice and a duplicate-collision strategy do not grow with the
|
|
30
|
+
// connector roadmap. Each set is the one the OpenAPI contract publishes, which
|
|
31
|
+
// the Go domain builds from its own vocabulary slices — so the parity gate keeps
|
|
32
|
+
// these honest rather than a comment promising it.
|
|
33
|
+
/** File character encoding. Default utf-8. */
|
|
34
|
+
export const DIALECT_ENCODINGS = [
|
|
35
|
+
'utf-8',
|
|
36
|
+
'utf-8-sig',
|
|
37
|
+
'cp1252',
|
|
38
|
+
'iso-8859-1',
|
|
39
|
+
];
|
|
40
|
+
/** CSV field separator. Default comma. */
|
|
41
|
+
export const DIALECT_DELIMITERS = ['comma', 'semicolon', 'tab', 'pipe'];
|
|
42
|
+
/** Amount decimal convention: dot is 1234.56, comma is 1.234,56. Default dot. */
|
|
43
|
+
export const DIALECT_DECIMAL_STYLES = ['dot', 'comma'];
|
|
44
|
+
/** Date convention. Default iso. */
|
|
45
|
+
export const DIALECT_DATE_STYLES = ['iso', 'iso_offset', 'dmy', 'mdy'];
|
|
46
|
+
/**
|
|
47
|
+
* What happens to a row repeating the duplicate key. The default first, and all
|
|
48
|
+
* three offered with EQUAL WEIGHT: the tool adds no confirmation field, no second
|
|
49
|
+
* step and no extra permission around KEEP_FIRST. Describing what each one does
|
|
50
|
+
* is the tool's whole product; the enum's only job is refusing a fourth value
|
|
51
|
+
* before it costs a round trip.
|
|
52
|
+
*/
|
|
53
|
+
export const DUPLICATE_POLICIES = [
|
|
54
|
+
'FLAG_AS_EXCEPTION',
|
|
55
|
+
'KEEP_FIRST',
|
|
56
|
+
'REJECT',
|
|
57
|
+
];
|
|
58
|
+
/** The canonical field-map names a duplicate key may be built from. */
|
|
59
|
+
export const DUPLICATE_KEY_FIELDS = [
|
|
60
|
+
'external_id',
|
|
61
|
+
'amount',
|
|
62
|
+
'currency',
|
|
63
|
+
'date',
|
|
64
|
+
'description',
|
|
65
|
+
'fee_amount',
|
|
66
|
+
'fee_currency',
|
|
67
|
+
];
|
|
68
|
+
/**
|
|
69
|
+
* The one reserved key a WRITE must not carry. Matcher stamps it and discards a
|
|
70
|
+
* client-sent value, and since Epic 8.x the request schemas do not declare it at
|
|
71
|
+
* all — it is published on responses only.
|
|
72
|
+
*/
|
|
73
|
+
export const SERVER_OWNED_CONFIG_KEY = 'duplicate_key_changed_at';
|
|
74
|
+
/** What happens to a row whose mapped external id is blank. Default REJECT. */
|
|
75
|
+
export const BLANK_EXTERNAL_ID_POLICIES = ['REJECT', 'NEEDS_REVIEW'];
|
|
76
|
+
/** camt.053 entry-date element. Default booking. */
|
|
77
|
+
export const CAMT053_DATE_BASES = ['booking', 'valuation'];
|
|
78
|
+
/** camt.053 entry-reference element. Default ntry_ref. */
|
|
79
|
+
export const CAMT053_EXTERNAL_ID_SOURCES = [
|
|
80
|
+
'ntry_ref',
|
|
81
|
+
'end_to_end_id',
|
|
82
|
+
'tx_id',
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* The source `config` object.
|
|
86
|
+
*
|
|
87
|
+
* `.passthrough()` is load-bearing, not laziness: the object stays OPEN because a
|
|
88
|
+
* source pulling from an aggregator or a fetcher carries connector keys nobody
|
|
89
|
+
* enumerates here (connection_config_name above all), and the contract keeps it
|
|
90
|
+
* open too. What the seven reserved keys buy is a local refusal — an operator
|
|
91
|
+
* driving this tool blind is told "DISCARD is not a duplicate policy" here rather
|
|
92
|
+
* than after a round trip.
|
|
93
|
+
*
|
|
94
|
+
* duplicate_key_changed_at is DELIBERATELY ABSENT — and, since it is absent from
|
|
95
|
+
* an OPEN object, absence alone was not a refusal. `.passthrough()` accepted the
|
|
96
|
+
* key and forwarded it verbatim, so the assistant could put a server-owned stamp
|
|
97
|
+
* on the wire and the omission was decorative. The `.refine()` below is what makes
|
|
98
|
+
* it real: the key is refused BY NAME while every key nobody here enumerates keeps
|
|
99
|
+
* passing, which is the whole point of the object staying open.
|
|
100
|
+
*
|
|
101
|
+
* Refusing by name rather than by closing the object is not a nicety. Closing it
|
|
102
|
+
* would reject every connector key matcher accepts and the MCP does not know —
|
|
103
|
+
* connection_config_name above all — turning an open contract into a client-side
|
|
104
|
+
* allow-list that lags the backend.
|
|
105
|
+
*
|
|
106
|
+
* The refinement adds NOTHING to the advertised schema (Zod 4 keeps refinements
|
|
107
|
+
* out of `toJSONSchema`, verified against zod 4.4.3), so the tool still does not
|
|
108
|
+
* announce the key it refuses, and the object is still a ZodObject whose `.shape`
|
|
109
|
+
* callers introspect.
|
|
110
|
+
*/
|
|
111
|
+
export const sourceConfigSchema = z
|
|
112
|
+
.object({
|
|
113
|
+
dialect: z
|
|
114
|
+
.object({
|
|
115
|
+
encoding: z.enum(DIALECT_ENCODINGS).optional(),
|
|
116
|
+
delimiter: z.enum(DIALECT_DELIMITERS).optional(),
|
|
117
|
+
decimal_style: z.enum(DIALECT_DECIMAL_STYLES).optional(),
|
|
118
|
+
date_style: z.enum(DIALECT_DATE_STYLES).optional(),
|
|
119
|
+
})
|
|
120
|
+
.optional()
|
|
121
|
+
.describe("How this source's delimited files are encoded and formatted. " +
|
|
122
|
+
'Declaration-driven only — there is no auto-detection. An absent object, ' +
|
|
123
|
+
'or an absent sub-key, keeps the defaults (utf-8, comma, dot, iso).'),
|
|
124
|
+
duplicate_policy: z
|
|
125
|
+
.enum(DUPLICATE_POLICIES)
|
|
126
|
+
.optional()
|
|
127
|
+
.describe("What happens to a row that repeats this source's duplicate key. " +
|
|
128
|
+
'FLAG_AS_EXCEPTION (the default when the key is absent) keeps the repeat ' +
|
|
129
|
+
'out of the import and raises a duplicate exception on the row it ' +
|
|
130
|
+
'repeated. KEEP_FIRST drops the repeat and raises nothing, so the ' +
|
|
131
|
+
'collision leaves no trace anyone can act on. REJECT counts the repeat ' +
|
|
132
|
+
'as an import error.'),
|
|
133
|
+
duplicate_key: z
|
|
134
|
+
.array(z.enum(DUPLICATE_KEY_FIELDS))
|
|
135
|
+
.min(1)
|
|
136
|
+
.optional()
|
|
137
|
+
.describe('The ordered list of mapped fields that make two rows the same row. Omit ' +
|
|
138
|
+
'it and rows are deduplicated on external_id alone. A component this ' +
|
|
139
|
+
"source's field map does not fill is refused, because a key over an " +
|
|
140
|
+
'always-empty field makes every row a duplicate of every other. A source ' +
|
|
141
|
+
'bound to an aggregator connection (reserved key connection_config_name) ' +
|
|
142
|
+
'cannot carry a key of its own — the aggregator retracts a movement by ' +
|
|
143
|
+
'naming its external id, so that id has to stay the row identity, and a ' +
|
|
144
|
+
'config holding both is refused in either direction. Editing this list ' +
|
|
145
|
+
'governs later imports only: rows already imported keep the key they were ' +
|
|
146
|
+
'deduplicated under.'),
|
|
147
|
+
blank_external_id: z
|
|
148
|
+
.enum(BLANK_EXTERNAL_ID_POLICIES)
|
|
149
|
+
.optional()
|
|
150
|
+
.describe('What happens to a row whose mapped external id is blank. REJECT (the ' +
|
|
151
|
+
'default) fails the row. NEEDS_REVIEW imports it under a synthetic ' +
|
|
152
|
+
'reference with status PENDING_REVIEW, so a blank reference becomes a ' +
|
|
153
|
+
'reviewable import instead of an import failure.'),
|
|
154
|
+
camt053: z
|
|
155
|
+
.object({
|
|
156
|
+
date_basis: z.enum(CAMT053_DATE_BASES).optional(),
|
|
157
|
+
external_id_source: z.enum(CAMT053_EXTERNAL_ID_SOURCES).optional(),
|
|
158
|
+
})
|
|
159
|
+
.optional()
|
|
160
|
+
.describe("How this source's camt.053 files map onto the canonical fields; every " +
|
|
161
|
+
'other field is fixed by ISO 20022 itself. date_basis picks the entry ' +
|
|
162
|
+
'date (booking = BookgDt/Dt, valuation = ValDt/Dt); external_id_source ' +
|
|
163
|
+
'picks the reference (ntry_ref = NtryRef, end_to_end_id and tx_id read ' +
|
|
164
|
+
'NtryDtls/TxDtls/Refs). Absent keeps the ISO defaults (booking, ntry_ref).'),
|
|
165
|
+
fail_on_error_rate_percent: z
|
|
166
|
+
.number()
|
|
167
|
+
.int()
|
|
168
|
+
.min(1)
|
|
169
|
+
.max(99)
|
|
170
|
+
.optional()
|
|
171
|
+
.describe('Fail the whole import when the percentage of failed rows exceeds this ' +
|
|
172
|
+
'whole number. Absent means never auto-fail. The ceiling is 99, not 100: ' +
|
|
173
|
+
'the comparison is strict, so 100 could never fire.'),
|
|
174
|
+
})
|
|
175
|
+
.passthrough()
|
|
176
|
+
.refine((config) => !(SERVER_OWNED_CONFIG_KEY in config), {
|
|
177
|
+
path: [SERVER_OWNED_CONFIG_KEY],
|
|
178
|
+
message: `${SERVER_OWNED_CONFIG_KEY} is server-owned: matcher stamps it when ` +
|
|
179
|
+
'duplicate-key detection changes meaning on the source, and discards a ' +
|
|
180
|
+
'client-sent value. Remove it from config — it is returned on reads, not written.',
|
|
181
|
+
});
|
|
25
182
|
/** Zod raw shape for `source_create` input — mirrors CreateSourceRequest. */
|
|
26
183
|
export const createSourceInputShape = {
|
|
27
184
|
contextId: z
|
|
@@ -44,26 +201,13 @@ export const createSourceInputShape = {
|
|
|
44
201
|
.enum(SOURCE_SIDES)
|
|
45
202
|
.describe('Matching side this source feeds. LEFT and RIGHT are the two sides ' +
|
|
46
203
|
'reconciled against each other.'),
|
|
47
|
-
config:
|
|
48
|
-
.record(z.string(), z.unknown())
|
|
204
|
+
config: sourceConfigSchema
|
|
49
205
|
.optional()
|
|
50
206
|
.describe('Source-specific configuration object (connection and parsing settings). ' +
|
|
51
|
-
'Optional; defaults to an empty object server-side when omitted.
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'date, description, fee_amount, fee_currency); omit it and rows are ' +
|
|
56
|
-
'deduplicated on external_id alone. A field the field map of this ' +
|
|
57
|
-
'source does not fill is refused. A source bound to an aggregator ' +
|
|
58
|
-
'connection (reserved key connection_config_name) cannot carry a ' +
|
|
59
|
-
'duplicate key of its own — the aggregator retracts a movement by ' +
|
|
60
|
-
'naming its external id, so that id has to stay the row identity; a ' +
|
|
61
|
-
'config holding both is refused, so drop duplicate_key or disconnect ' +
|
|
62
|
-
'the aggregator first. Reserved key duplicate_policy: what ' +
|
|
63
|
-
'happens to a row repeating that key — FLAG_AS_EXCEPTION (the default: ' +
|
|
64
|
-
'the repeat is kept out of the import and raised as a duplicate ' +
|
|
65
|
-
'exception on the row it repeated), KEEP_FIRST (dropped, nothing ' +
|
|
66
|
-
'raised) or REJECT (counted as an import error).'),
|
|
207
|
+
'Optional; defaults to an empty object server-side when omitted. The seven ' +
|
|
208
|
+
'reserved keys below are validated here AND server-side; any other key ' +
|
|
209
|
+
'(connector settings, connection_config_name for an aggregator-backed ' +
|
|
210
|
+
'source) is passed through untouched.'),
|
|
67
211
|
};
|
|
68
212
|
/**
|
|
69
213
|
* Build the POST body from the input minus the path-only `contextId`. Only the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/tools/source/create.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,6EAA6E;AAC7E,gFAAgF;AAChF,mBAAmB;AACnB,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAE5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAA;AAEV,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;AAEtD,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/tools/source/create.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,6EAA6E;AAC7E,gFAAgF;AAChF,mBAAmB;AACnB,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAE5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAA;AAEV,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;AAEtD,+EAA+E;AAC/E,EAAE;AACF,gFAAgF;AAChF,8EA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C;CACJ,CAAA;AAOD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAuB;IAEvB,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;IAC/C,KAAK,UAAU,CAAA;IACf,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,WAAW,EACT,oEAAoE;YACpE,4DAA4D;YAC5D,kEAAkE;YAClE,wEAAwE;YACxE,kDAAkD;YAClD,yEAAyE;YACzE,sEAAsE;YACtE,yEAAyE;YACzE,wEAAwE;QAC1E,WAAW,EAAE,sBAAsB;KACpC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC;YACxC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC;SAC5B,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// single-resource ops); no tenant field is accepted (matcher scopes to the
|
|
7
7
|
// relayed token's tenant).
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { SOURCE_SIDES, SOURCE_TYPES } from './create.js';
|
|
9
|
+
import { SOURCE_SIDES, SOURCE_TYPES, sourceConfigSchema } from './create.js';
|
|
10
10
|
import { contextSourcePath, dispatchSource } from './shared.js';
|
|
11
11
|
/** Zod raw shape for `source_update` input — path ids + optional body fields. */
|
|
12
12
|
export const updateSourceInputShape = {
|
|
@@ -33,28 +33,15 @@ export const updateSourceInputShape = {
|
|
|
33
33
|
.enum(SOURCE_SIDES)
|
|
34
34
|
.optional()
|
|
35
35
|
.describe('Matching side this source feeds (LEFT|RIGHT).'),
|
|
36
|
-
config:
|
|
37
|
-
.record(z.string(), z.unknown())
|
|
36
|
+
config: sourceConfigSchema
|
|
38
37
|
.optional()
|
|
39
|
-
.describe('Source-specific configuration object
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'only
|
|
45
|
-
'under, and
|
|
46
|
-
'the moment detection last changed meaning — this list changing, or ' +
|
|
47
|
-
'the field map remapping the column a declared field reads. ' +
|
|
48
|
-
'A source bound to an aggregator connection (reserved key ' +
|
|
49
|
-
'connection_config_name) cannot carry a duplicate key of its own — ' +
|
|
50
|
-
'the aggregator retracts a movement by naming its external id, so ' +
|
|
51
|
-
'that id has to stay the row identity; a config holding both is ' +
|
|
52
|
-
'refused, so drop duplicate_key or disconnect the aggregator first. ' +
|
|
53
|
-
'Reserved key duplicate_policy: what happens ' +
|
|
54
|
-
'to a row repeating that key — FLAG_AS_EXCEPTION (the default: the ' +
|
|
55
|
-
'repeat is kept out of the import and raised as a duplicate exception ' +
|
|
56
|
-
'on the row it repeated), KEEP_FIRST (dropped, nothing raised) or ' +
|
|
57
|
-
'REJECT (counted as an import error).'),
|
|
38
|
+
.describe('Source-specific configuration object. Sent whole: the config you supply ' +
|
|
39
|
+
'REPLACES the stored one, so include the reserved keys you want to keep. ' +
|
|
40
|
+
'The seven reserved keys are validated here AND server-side; any other key ' +
|
|
41
|
+
'(connector settings, connection_config_name for an aggregator-backed ' +
|
|
42
|
+
'source) is passed through untouched. Editing duplicate_key governs later ' +
|
|
43
|
+
'imports only — rows already imported keep the key they were deduplicated ' +
|
|
44
|
+
'under, and the server stamps duplicate_key_changed_at itself.'),
|
|
58
45
|
};
|
|
59
46
|
/**
|
|
60
47
|
* Build the PATCH body from the input minus the path-only ids. Only the fields
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/tools/source/update.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,EAAE;AACF,iFAAiF;AACjF,4E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