@raytio/mcp-server 9.1.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/authorization.d.ts.map +1 -1
- package/dist/authorization.js +2 -0
- package/dist/authorization.js.map +1 -1
- package/dist/generated-reads/guardrails.d.ts.map +1 -1
- package/dist/generated-reads/guardrails.js +9 -0
- package/dist/generated-reads/guardrails.js.map +1 -1
- package/dist/tools/_shared/side-effect.d.ts +4 -3
- package/dist/tools/_shared/side-effect.d.ts.map +1 -1
- package/dist/tools/_shared/side-effect.js +6 -5
- package/dist/tools/_shared/side-effect.js.map +1 -1
- package/dist/tools/_shared/soft-deactivate.d.ts +43 -0
- package/dist/tools/_shared/soft-deactivate.d.ts.map +1 -0
- package/dist/tools/_shared/soft-deactivate.js +53 -0
- package/dist/tools/_shared/soft-deactivate.js.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-deactivate.d.ts +14 -0
- package/dist/tools/cmm/cmm-bank-account-deactivate.d.ts.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-deactivate.js +50 -0
- package/dist/tools/cmm/cmm-bank-account-deactivate.js.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-register.d.ts +15 -0
- package/dist/tools/cmm/cmm-bank-account-register.d.ts.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-register.js +104 -0
- package/dist/tools/cmm/cmm-bank-account-register.js.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-use-register.d.ts +13 -0
- package/dist/tools/cmm/cmm-bank-account-use-register.d.ts.map +1 -0
- package/dist/tools/cmm/cmm-bank-account-use-register.js +72 -0
- package/dist/tools/cmm/cmm-bank-account-use-register.js.map +1 -0
- package/dist/tools/cmm/generated-reads.d.ts +5 -0
- package/dist/tools/cmm/generated-reads.d.ts.map +1 -0
- package/dist/tools/cmm/generated-reads.js +26 -0
- package/dist/tools/cmm/generated-reads.js.map +1 -0
- package/dist/tools/cmm/index.d.ts +5 -0
- package/dist/tools/cmm/index.d.ts.map +1 -0
- package/dist/tools/cmm/index.js +13 -0
- package/dist/tools/cmm/index.js.map +1 -0
- package/dist/tools/domains.d.ts.map +1 -1
- package/dist/tools/domains.js +22 -0
- package/dist/tools/domains.js.map +1 -1
- package/dist/tools/fxm/fxm-funds-account-consent-grant.d.ts +16 -0
- package/dist/tools/fxm/fxm-funds-account-consent-grant.d.ts.map +1 -0
- package/dist/tools/fxm/fxm-funds-account-consent-grant.js +88 -0
- package/dist/tools/fxm/fxm-funds-account-consent-grant.js.map +1 -0
- package/dist/tools/fxm/fxm-funds-account-consent-revoke.d.ts +13 -0
- package/dist/tools/fxm/fxm-funds-account-consent-revoke.d.ts.map +1 -0
- package/dist/tools/fxm/fxm-funds-account-consent-revoke.js +60 -0
- package/dist/tools/fxm/fxm-funds-account-consent-revoke.js.map +1 -0
- package/dist/tools/fxm/fxm-payment-method-deactivate.d.ts +13 -0
- package/dist/tools/fxm/fxm-payment-method-deactivate.d.ts.map +1 -0
- package/dist/tools/fxm/fxm-payment-method-deactivate.js +52 -0
- package/dist/tools/fxm/fxm-payment-method-deactivate.js.map +1 -0
- package/dist/tools/fxm/fxm-payment-method-register.d.ts +18 -0
- package/dist/tools/fxm/fxm-payment-method-register.d.ts.map +1 -0
- package/dist/tools/fxm/fxm-payment-method-register.js +102 -0
- package/dist/tools/fxm/fxm-payment-method-register.js.map +1 -0
- package/dist/tools/fxm/generated-reads.d.ts +5 -0
- package/dist/tools/fxm/generated-reads.d.ts.map +1 -0
- package/dist/tools/fxm/generated-reads.js +27 -0
- package/dist/tools/fxm/generated-reads.js.map +1 -0
- package/dist/tools/fxm/index.d.ts +5 -0
- package/dist/tools/fxm/index.d.ts.map +1 -0
- package/dist/tools/fxm/index.js +15 -0
- package/dist/tools/fxm/index.js.map +1 -0
- package/dist/tools/role-mapping.d.ts.map +1 -1
- package/dist/tools/role-mapping.js +12 -0
- package/dist/tools/role-mapping.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/cmm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAYtC,eAAO,MAAM,QAAQ,EAAE,IAAI,EAAiD,CAAC;AAE7E,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,IAAI,EAA0B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cmmGeneratedReadTools } from './generated-reads.js';
|
|
2
|
+
import { cmmBankAccountRegisterTool } from './cmm-bank-account-register.js';
|
|
3
|
+
import { cmmBankAccountDeactivateTool } from './cmm-bank-account-deactivate.js';
|
|
4
|
+
import { cmmBankAccountUseRegisterTool } from './cmm-bank-account-use-register.js';
|
|
5
|
+
const cmmWriteTools = [
|
|
6
|
+
cmmBankAccountRegisterTool,
|
|
7
|
+
cmmBankAccountDeactivateTool,
|
|
8
|
+
cmmBankAccountUseRegisterTool,
|
|
9
|
+
];
|
|
10
|
+
export const cmmTools = [...cmmGeneratedReadTools, ...cmmWriteTools];
|
|
11
|
+
/** Read-only slice used by the `cmm-readonly` selectable sub-domain. */
|
|
12
|
+
export const cmmReadOnlyTools = cmmGeneratedReadTools;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/cmm/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,MAAM,aAAa,GAAW;IAC5B,0BAA0B;IAC1B,4BAA4B;IAC5B,6BAA6B;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAW,CAAC,GAAG,qBAAqB,EAAE,GAAG,aAAa,CAAC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,CAAC,MAAM,gBAAgB,GAAW,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAarC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,aAAa,EAkFzC,CAAC;AAwDF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAsB9C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,CAepD"}
|
package/dist/tools/domains.js
CHANGED
|
@@ -6,6 +6,8 @@ import { wrmTools } from './wrm/index.js';
|
|
|
6
6
|
import { fndReadOnlyTools, fndTools } from './fnd/index.js';
|
|
7
7
|
import { hrmReadOnlyTools, hrmTools } from './hrm/index.js';
|
|
8
8
|
import { secReadOnlyTools, secTools } from './sec/index.js';
|
|
9
|
+
import { cmmTools, cmmReadOnlyTools } from './cmm/index.js';
|
|
10
|
+
import { fxmTools, fxmReadOnlyTools } from './fxm/index.js';
|
|
9
11
|
import { fglReadOnlyTools, fglTools } from './fgl/index.js';
|
|
10
12
|
export const primaryDomains = [
|
|
11
13
|
{
|
|
@@ -56,6 +58,22 @@ export const primaryDomains = [
|
|
|
56
58
|
summary: 'Dedicated semantic tools for the QR pairing session lifecycle (start / join / complete / cancel), plus bounded reads with secret redaction. Every write requires confirm=true; cancellation additionally requires a reason.',
|
|
57
59
|
tools: secTools,
|
|
58
60
|
},
|
|
61
|
+
{
|
|
62
|
+
id: 'fxm',
|
|
63
|
+
title: 'FXM — Funds Transfer Management',
|
|
64
|
+
summary: 'Bounded reads over funds accounts, balances, transactions, statuses, parties, and access consents; ' +
|
|
65
|
+
'dedicated tools for registering / deactivating external-payer payment methods and granting / revoking ' +
|
|
66
|
+
'funds-account access consents. Card, IBAN, and bank-account-number columns are redacted; ' +
|
|
67
|
+
'payment-processor credentials remain hard-excluded upstream.',
|
|
68
|
+
tools: fxmTools,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'cmm',
|
|
72
|
+
title: 'CMM — Cash Management Module',
|
|
73
|
+
summary: 'Bounded reads over bank accounts and their operating-unit uses (bank-account-number / IBAN redacted); ' +
|
|
74
|
+
'dedicated tools for registering / deactivating bank accounts and enabling AR/AP/payroll/treasury uses.',
|
|
75
|
+
tools: cmmTools,
|
|
76
|
+
},
|
|
59
77
|
{
|
|
60
78
|
id: 'fgl',
|
|
61
79
|
title: 'FGL — Financial General Ledger',
|
|
@@ -132,6 +150,10 @@ export const domainIndex = {
|
|
|
132
150
|
'hrm-readonly': hrmReadOnlyTools,
|
|
133
151
|
sec: secTools,
|
|
134
152
|
'sec-readonly': secReadOnlyTools,
|
|
153
|
+
fxm: fxmTools,
|
|
154
|
+
'fxm-readonly': fxmReadOnlyTools,
|
|
155
|
+
cmm: cmmTools,
|
|
156
|
+
'cmm-readonly': cmmReadOnlyTools,
|
|
135
157
|
fgl: fglTools,
|
|
136
158
|
'fgl-readonly': fglReadOnlyTools,
|
|
137
159
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../../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AC,MAAM,EAAE,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tool } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Grant a funds-account access consent
|
|
4
|
+
* (`fxm_funds_accounts_access_consents`).
|
|
5
|
+
*
|
|
6
|
+
* Provisioning: authorises a servicing party to read a funds account's
|
|
7
|
+
* balances / transactions on the owner's behalf. This is the AISP
|
|
8
|
+
* consent record, so it MUST require an explicit `confirm: true`. Persist
|
|
9
|
+
* does not deduplicate consents yet (it ignores the `Idempotency-Key`
|
|
10
|
+
* header; WI-0008817), so a retry can create a second consent.
|
|
11
|
+
* The consent scope is expressed via `consent_permissions` (JSON object)
|
|
12
|
+
* — the caller declares exactly what is granted; the server does not
|
|
13
|
+
* expand a shorthand.
|
|
14
|
+
*/
|
|
15
|
+
export declare const fxmFundsAccountConsentGrantTool: Tool;
|
|
16
|
+
//# sourceMappingURL=fxm-funds-account-consent-grant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-funds-account-consent-grant.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-funds-account-consent-grant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAStC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,EAAE,IAmF7C,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { API_ERROR, errorResponse, successResponse } from '../types.js';
|
|
3
|
+
import { cap } from '../../capabilities/tool-capability.js';
|
|
4
|
+
import { confirmFlagSchema, idempotencyKeySchema, writeHeadersWithIdempotency, } from '../_shared/side-effect.js';
|
|
5
|
+
/**
|
|
6
|
+
* Grant a funds-account access consent
|
|
7
|
+
* (`fxm_funds_accounts_access_consents`).
|
|
8
|
+
*
|
|
9
|
+
* Provisioning: authorises a servicing party to read a funds account's
|
|
10
|
+
* balances / transactions on the owner's behalf. This is the AISP
|
|
11
|
+
* consent record, so it MUST require an explicit `confirm: true`. Persist
|
|
12
|
+
* does not deduplicate consents yet (it ignores the `Idempotency-Key`
|
|
13
|
+
* header; WI-0008817), so a retry can create a second consent.
|
|
14
|
+
* The consent scope is expressed via `consent_permissions` (JSON object)
|
|
15
|
+
* — the caller declares exactly what is granted; the server does not
|
|
16
|
+
* expand a shorthand.
|
|
17
|
+
*/
|
|
18
|
+
export const fxmFundsAccountConsentGrantTool = {
|
|
19
|
+
name: 'fxm_funds_accounts_access_consent_grant',
|
|
20
|
+
description: 'Grant a funds-account access consent (fxm_funds_accounts_access_consents). ' +
|
|
21
|
+
'Authorises a servicing party to read the funds account on the owner\'s behalf. ' +
|
|
22
|
+
'Requires confirm=true. Not deduplicated: calling it again creates another consent, so ' +
|
|
23
|
+
'check fxm_funds_accounts_access_consents_list before retrying.',
|
|
24
|
+
inputSchema: z
|
|
25
|
+
.object({
|
|
26
|
+
account_servicing_party_id: z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.describe('UUID of the party servicing the account (data source)'),
|
|
30
|
+
consent_servicing_party_id: z
|
|
31
|
+
.string()
|
|
32
|
+
.min(1)
|
|
33
|
+
.describe('UUID of the party receiving the consent (data consumer)'),
|
|
34
|
+
consent_permissions: z
|
|
35
|
+
.record(z.any())
|
|
36
|
+
.describe('JSON object describing what is granted (e.g. {"read_balances": true, "read_transactions": true}). ' +
|
|
37
|
+
'The server stores this verbatim — no shorthand expansion.'),
|
|
38
|
+
consent_status: z
|
|
39
|
+
.string()
|
|
40
|
+
.max(32)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Initial status (e.g. AUTHORISED, PENDING). Defaults per backend policy.'),
|
|
43
|
+
account_access_start_date: z
|
|
44
|
+
.string()
|
|
45
|
+
.min(1)
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('ISO 8601 date when access starts'),
|
|
48
|
+
account_access_end_date: z
|
|
49
|
+
.string()
|
|
50
|
+
.min(1)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('ISO 8601 date when access ends (must be after start)'),
|
|
53
|
+
confirm: confirmFlagSchema,
|
|
54
|
+
idempotency_key: idempotencyKeySchema.describe('Optional. Forwarded as an Idempotency-Key header, but Persist does not enforce it ' +
|
|
55
|
+
'yet, so a retry can still create a duplicate.'),
|
|
56
|
+
})
|
|
57
|
+
.refine((v) => !v.account_access_start_date ||
|
|
58
|
+
!v.account_access_end_date ||
|
|
59
|
+
v.account_access_start_date <= v.account_access_end_date, { message: 'account_access_end_date must be on or after account_access_start_date' }),
|
|
60
|
+
capabilities: [cap('fxm_funds_accounts_access_consents', 'INSERT')],
|
|
61
|
+
sideEffect: 'provisioning',
|
|
62
|
+
confirmation: 'caller_confirms',
|
|
63
|
+
idempotency: 'not_idempotent',
|
|
64
|
+
handler: async (args, ctx) => {
|
|
65
|
+
const input = args;
|
|
66
|
+
const body = {
|
|
67
|
+
account_servicing_party_id: input.account_servicing_party_id,
|
|
68
|
+
consent_servicing_party_id: input.consent_servicing_party_id,
|
|
69
|
+
consent_permissions: input.consent_permissions,
|
|
70
|
+
};
|
|
71
|
+
for (const field of [
|
|
72
|
+
'consent_status',
|
|
73
|
+
'account_access_start_date',
|
|
74
|
+
'account_access_end_date',
|
|
75
|
+
]) {
|
|
76
|
+
if (input[field] !== undefined)
|
|
77
|
+
body[field] = input[field];
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
const rows = await ctx.apiClient.post(`${ctx.apiClient.dbBasePath}/fxm_funds_accounts_access_consents?select=*`, body, { headers: writeHeadersWithIdempotency(input.idempotency_key) });
|
|
81
|
+
return successResponse(rows[0]);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
return errorResponse(API_ERROR, `Failed to grant FXM funds account consent: ${error.message}`);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=fxm-funds-account-consent-grant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-funds-account-consent-grant.js","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-funds-account-consent-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAS;IACnD,IAAI,EAAE,yCAAyC;IAC/C,WAAW,EACT,6EAA6E;QAC7E,iFAAiF;QACjF,wFAAwF;QACxF,gEAAgE;IAClE,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,0BAA0B,EAAE,CAAC;aAC1B,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,uDAAuD,CAAC;QACpE,0BAA0B,EAAE,CAAC;aAC1B,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,yDAAyD,CAAC;QACtE,mBAAmB,EAAE,CAAC;aACnB,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;aACf,QAAQ,CACP,oGAAoG;YAClG,2DAA2D,CAC9D;QACH,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,EAAE,CAAC;aACP,QAAQ,EAAE;aACV,QAAQ,CAAC,yEAAyE,CAAC;QACtF,yBAAyB,EAAE,CAAC;aACzB,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,kCAAkC,CAAC;QAC/C,uBAAuB,EAAE,CAAC;aACvB,MAAM,EAAE;aACR,GAAG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ChE,CAAC;YACF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,aAAa,CAClB,SAAS,EACT,8CAA8C,KAAK,CAAC,OAAO,EAAE,CAC9D,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Tool } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Revoke a funds-account access consent
|
|
4
|
+
* (`fxm_funds_accounts_access_consents`).
|
|
5
|
+
*
|
|
6
|
+
* Sets `consent_status = 'REVOKED'` and `active = false`, closes the
|
|
7
|
+
* access window (`account_access_end_date`) if it is still open, and
|
|
8
|
+
* merges the caller reason into the consent's `metadata` audit trail.
|
|
9
|
+
* Requires `confirm: true` and a `reason`. A consent that is already
|
|
10
|
+
* revoked is returned unchanged, so retries keep the original reason.
|
|
11
|
+
*/
|
|
12
|
+
export declare const fxmFundsAccountConsentRevokeTool: Tool;
|
|
13
|
+
//# sourceMappingURL=fxm-funds-account-consent-revoke.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-funds-account-consent-revoke.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-funds-account-consent-revoke.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAStC;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,EAAE,IAqD9C,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cap } from '../../capabilities/tool-capability.js';
|
|
3
|
+
import { confirmFlagSchema, idempotencyKeySchema, reasonSchema, } from '../_shared/side-effect.js';
|
|
4
|
+
import { softDeactivate, softDeactivateEndDateSchema } from '../_shared/soft-deactivate.js';
|
|
5
|
+
/**
|
|
6
|
+
* Revoke a funds-account access consent
|
|
7
|
+
* (`fxm_funds_accounts_access_consents`).
|
|
8
|
+
*
|
|
9
|
+
* Sets `consent_status = 'REVOKED'` and `active = false`, closes the
|
|
10
|
+
* access window (`account_access_end_date`) if it is still open, and
|
|
11
|
+
* merges the caller reason into the consent's `metadata` audit trail.
|
|
12
|
+
* Requires `confirm: true` and a `reason`. A consent that is already
|
|
13
|
+
* revoked is returned unchanged, so retries keep the original reason.
|
|
14
|
+
*/
|
|
15
|
+
export const fxmFundsAccountConsentRevokeTool = {
|
|
16
|
+
name: 'fxm_funds_accounts_access_consent_revoke',
|
|
17
|
+
description: 'Revoke a funds-account access consent (fxm_funds_accounts_access_consents). ' +
|
|
18
|
+
'Sets consent_status=REVOKED and active=false, and ends the access window now if it is ' +
|
|
19
|
+
'still open. Requires confirm=true and a `reason`. Retry-safe: an already revoked consent ' +
|
|
20
|
+
'is returned unchanged.',
|
|
21
|
+
inputSchema: z.object({
|
|
22
|
+
id: z.string().min(1).describe('UUID of the fxm_funds_accounts_access_consents row'),
|
|
23
|
+
reason: reasonSchema.describe('Human-readable justification recorded on the audit trail'),
|
|
24
|
+
end_date: softDeactivateEndDateSchema,
|
|
25
|
+
confirm: confirmFlagSchema,
|
|
26
|
+
idempotency_key: idempotencyKeySchema,
|
|
27
|
+
}),
|
|
28
|
+
capabilities: [cap('fxm_funds_accounts_access_consents', 'UPDATE')],
|
|
29
|
+
sideEffect: 'state_change',
|
|
30
|
+
confirmation: 'caller_confirms',
|
|
31
|
+
idempotency: 'natural_key',
|
|
32
|
+
handler: async (args, ctx) => {
|
|
33
|
+
const input = args;
|
|
34
|
+
return softDeactivate(ctx, {
|
|
35
|
+
table: 'fxm_funds_accounts_access_consents',
|
|
36
|
+
id: input.id,
|
|
37
|
+
label: 'FXM funds account consent',
|
|
38
|
+
verb: 'revoke',
|
|
39
|
+
isDone: (row) => row.consent_status === 'REVOKED' && row.active === false,
|
|
40
|
+
changes: (row) => {
|
|
41
|
+
const now = new Date();
|
|
42
|
+
const accessEnd = row.account_access_end_date
|
|
43
|
+
? Date.parse(row.account_access_end_date)
|
|
44
|
+
: NaN;
|
|
45
|
+
return {
|
|
46
|
+
consent_status: 'REVOKED',
|
|
47
|
+
active: false,
|
|
48
|
+
...(Number.isNaN(accessEnd) || accessEnd > now.getTime()
|
|
49
|
+
? { account_access_end_date: now.toISOString() }
|
|
50
|
+
: {}),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
reasonKey: 'revocation_reason',
|
|
54
|
+
reason: input.reason,
|
|
55
|
+
endDate: input.end_date,
|
|
56
|
+
idempotencyKey: input.idempotency_key,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=fxm-funds-account-consent-revoke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-funds-account-consent-revoke.js","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-funds-account-consent-revoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,GACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5F;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAS;IACpD,IAAI,EAAE,0CAA0C;IAChD,WAAW,EACT,8EAA8E;QAC9E,wFAAwF;QACxF,2FAA2F;QAC3F,wBAAwB;IAC1B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QACpF,MAAM,EAAE,YAAY,CAAC,QAAQ,CAC3B,0DAA0D,CAC3D;QACD,QAAQ,EAAE,2BAA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e;SACtC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Tool } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deactivate an external-payer payment method
|
|
4
|
+
* (`fxm_external_payer_payment_methods`).
|
|
5
|
+
*
|
|
6
|
+
* Soft-delete via `active=false`; the caller `reason` is merged into the
|
|
7
|
+
* row's `metadata` audit trail. Requires `confirm: true`. An already
|
|
8
|
+
* inactive method is returned unchanged, so retries keep the original
|
|
9
|
+
* reason. Callers receive a redacted row (card secrets stripped by the
|
|
10
|
+
* guardrail).
|
|
11
|
+
*/
|
|
12
|
+
export declare const fxmPaymentMethodDeactivateTool: Tool;
|
|
13
|
+
//# sourceMappingURL=fxm-payment-method-deactivate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-payment-method-deactivate.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-payment-method-deactivate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAUtC;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,EAAE,IA4C5C,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cap } from '../../capabilities/tool-capability.js';
|
|
3
|
+
import { redactRow } from '../../generated-reads/guardrails.js';
|
|
4
|
+
import { confirmFlagSchema, idempotencyKeySchema, reasonSchema, } from '../_shared/side-effect.js';
|
|
5
|
+
import { softDeactivate, softDeactivateEndDateSchema } from '../_shared/soft-deactivate.js';
|
|
6
|
+
/**
|
|
7
|
+
* Deactivate an external-payer payment method
|
|
8
|
+
* (`fxm_external_payer_payment_methods`).
|
|
9
|
+
*
|
|
10
|
+
* Soft-delete via `active=false`; the caller `reason` is merged into the
|
|
11
|
+
* row's `metadata` audit trail. Requires `confirm: true`. An already
|
|
12
|
+
* inactive method is returned unchanged, so retries keep the original
|
|
13
|
+
* reason. Callers receive a redacted row (card secrets stripped by the
|
|
14
|
+
* guardrail).
|
|
15
|
+
*/
|
|
16
|
+
export const fxmPaymentMethodDeactivateTool = {
|
|
17
|
+
name: 'fxm_external_payer_payment_method_deactivate',
|
|
18
|
+
description: 'Deactivate an FXM external-payer payment method (fxm_external_payer_payment_methods). ' +
|
|
19
|
+
'Sets active=false and records the reason on the audit trail. Requires confirm=true ' +
|
|
20
|
+
'and a `reason`. Retry-safe: an already inactive method is returned unchanged.',
|
|
21
|
+
inputSchema: z.object({
|
|
22
|
+
id: z
|
|
23
|
+
.string()
|
|
24
|
+
.min(1)
|
|
25
|
+
.describe('UUID of the fxm_external_payer_payment_methods row to deactivate'),
|
|
26
|
+
reason: reasonSchema.describe('Human-readable justification recorded on the audit trail'),
|
|
27
|
+
end_date: softDeactivateEndDateSchema,
|
|
28
|
+
confirm: confirmFlagSchema,
|
|
29
|
+
idempotency_key: idempotencyKeySchema,
|
|
30
|
+
}),
|
|
31
|
+
capabilities: [cap('fxm_external_payer_payment_methods', 'UPDATE')],
|
|
32
|
+
sideEffect: 'state_change',
|
|
33
|
+
confirmation: 'caller_confirms',
|
|
34
|
+
idempotency: 'natural_key',
|
|
35
|
+
handler: async (args, ctx) => {
|
|
36
|
+
const input = args;
|
|
37
|
+
return softDeactivate(ctx, {
|
|
38
|
+
table: 'fxm_external_payer_payment_methods',
|
|
39
|
+
id: input.id,
|
|
40
|
+
label: 'FXM payment method',
|
|
41
|
+
verb: 'deactivate',
|
|
42
|
+
isDone: (row) => row.active === false,
|
|
43
|
+
changes: () => ({ active: false }),
|
|
44
|
+
reasonKey: 'deactivation_reason',
|
|
45
|
+
reason: input.reason,
|
|
46
|
+
endDate: input.end_date,
|
|
47
|
+
idempotencyKey: input.idempotency_key,
|
|
48
|
+
present: redactRow,
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=fxm-payment-method-deactivate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-payment-method-deactivate.js","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-payment-method-deactivate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,GACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5F;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAS;IAClD,IAAI,EAAE,8CAA8C;IACpD,WAAW,EACT,wFAAwF;QACxF,qFAAqF;QACrF,+EAA+E;IACjF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,EAAE,EAAE,CAAC;aACF,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,kEAAkE,CAAC;QAC/E,MAAM,EAAE,YAAY,CAAC,QAAQ,CAC3B,0DAA0D,CAC3D;QACD,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE,iBAAiB;QAC1B,eAAe,EAAE,oBAAoB;KACtC,CAAC;IACF,YAAY,EAAE,CAAC,GAAG,CAAC,oCAAoC,EAAE,QAAQ,CAAC,CAAC;IACnE,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,iBAAiB;IAC/B,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,IAMb,CAAC;QACF,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,KAAK,EAAE,oCAAoC;YAC3C,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,KAAK,EAAE,oBAAoB;YAC3B,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,KAAK;YACrC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YAClC,SAAS,EAAE,qBAAqB;YAChC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,QAAQ;YACvB,cAAc,EAAE,KAAK,CAAC,eAAe;YACrC,OAAO,EAAE,SAAS;SACnB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tool } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Register an external-payer payment method (`fxm_external_payer_payment_methods`).
|
|
4
|
+
*
|
|
5
|
+
* Provisioning: creates a durable pointer to an instrument the payment
|
|
6
|
+
* processor already holds. The MCP server never receives the raw
|
|
7
|
+
* PAN/CVV — callers pass the processor's `payment_processor_payment_method_id`
|
|
8
|
+
* (Stripe pm_..., Braintree token, etc.) and the safe display fields
|
|
9
|
+
* (`card_last_4_digits`, `card_expiry_month`, `card_expiry_year`). Full
|
|
10
|
+
* card numbers, IBAN, and fingerprints are refused by the schema and
|
|
11
|
+
* would be redacted from the response even if the backend surfaced them.
|
|
12
|
+
*
|
|
13
|
+
* Persist only enforces one active primary method per customer, so
|
|
14
|
+
* registering the same non-primary instrument twice creates two rows,
|
|
15
|
+
* and it ignores the `Idempotency-Key` header (WI-0008817).
|
|
16
|
+
*/
|
|
17
|
+
export declare const fxmPaymentMethodRegisterTool: Tool;
|
|
18
|
+
//# sourceMappingURL=fxm-payment-method-register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-payment-method-register.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-payment-method-register.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAUtC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,EAAE,IA4F1C,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { API_ERROR, errorResponse, successResponse } from '../types.js';
|
|
3
|
+
import { cap } from '../../capabilities/tool-capability.js';
|
|
4
|
+
import { redactRow } from '../../generated-reads/guardrails.js';
|
|
5
|
+
import { confirmFlagSchema, idempotencyKeySchema, writeHeadersWithIdempotency, } from '../_shared/side-effect.js';
|
|
6
|
+
/**
|
|
7
|
+
* Register an external-payer payment method (`fxm_external_payer_payment_methods`).
|
|
8
|
+
*
|
|
9
|
+
* Provisioning: creates a durable pointer to an instrument the payment
|
|
10
|
+
* processor already holds. The MCP server never receives the raw
|
|
11
|
+
* PAN/CVV — callers pass the processor's `payment_processor_payment_method_id`
|
|
12
|
+
* (Stripe pm_..., Braintree token, etc.) and the safe display fields
|
|
13
|
+
* (`card_last_4_digits`, `card_expiry_month`, `card_expiry_year`). Full
|
|
14
|
+
* card numbers, IBAN, and fingerprints are refused by the schema and
|
|
15
|
+
* would be redacted from the response even if the backend surfaced them.
|
|
16
|
+
*
|
|
17
|
+
* Persist only enforces one active primary method per customer, so
|
|
18
|
+
* registering the same non-primary instrument twice creates two rows,
|
|
19
|
+
* and it ignores the `Idempotency-Key` header (WI-0008817).
|
|
20
|
+
*/
|
|
21
|
+
export const fxmPaymentMethodRegisterTool = {
|
|
22
|
+
name: 'fxm_external_payer_payment_method_register',
|
|
23
|
+
description: 'Register an external-payer payment method (fxm_external_payer_payment_methods). ' +
|
|
24
|
+
'Stores a pointer to the processor-held instrument; the raw PAN never touches this ' +
|
|
25
|
+
'server. Requires confirm=true. Not deduplicated: calling it again creates another ' +
|
|
26
|
+
'payment method, so check fxm_external_payer_payment_methods_list before retrying.',
|
|
27
|
+
inputSchema: z.object({
|
|
28
|
+
customer_id: z.string().min(1).describe('UUID of the FAR customer'),
|
|
29
|
+
payer_payment_method_type: z
|
|
30
|
+
.string()
|
|
31
|
+
.min(1)
|
|
32
|
+
.max(32)
|
|
33
|
+
.describe('Payment method type, validated against the ' +
|
|
34
|
+
'FXM_PAYMENT_METHODS_PAYER_PAYMENT_METHOD_TYPE lookup and the customer\'s ' +
|
|
35
|
+
'billing profile (e.g. CARD)'),
|
|
36
|
+
payment_processor_id: z
|
|
37
|
+
.string()
|
|
38
|
+
.min(1)
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('UUID of the fxm_external_payment_processors row'),
|
|
41
|
+
payment_processor_payment_method_id: z
|
|
42
|
+
.string()
|
|
43
|
+
.min(1)
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Processor-owned instrument id (e.g. Stripe pm_..., Braintree token). ' +
|
|
46
|
+
'Combined with customer_id + payment_processor_id identifies the instrument.'),
|
|
47
|
+
card_last_4_digits: z
|
|
48
|
+
.string()
|
|
49
|
+
.regex(/^[0-9]{4}$/, 'card_last_4_digits must be exactly 4 digits')
|
|
50
|
+
.optional(),
|
|
51
|
+
card_expiry_month: z.number().int().min(1).max(12).optional(),
|
|
52
|
+
card_expiry_year: z.number().int().min(2000).max(2100).optional(),
|
|
53
|
+
card_funding_method: z.string().max(64).optional(),
|
|
54
|
+
payment_method_scheme: z.string().max(64).optional(),
|
|
55
|
+
payment_method_country_code: z
|
|
56
|
+
.string()
|
|
57
|
+
.regex(/^[A-Z]{2}$/, 'country_code must be a 2-letter uppercase ISO 3166-1 alpha-2 code')
|
|
58
|
+
.optional(),
|
|
59
|
+
primary_payment_method: z.boolean().optional(),
|
|
60
|
+
start_date: z.string().min(1).optional().describe('ISO 8601 effective start'),
|
|
61
|
+
end_date: z.string().min(1).optional().describe('ISO 8601 planned end date'),
|
|
62
|
+
confirm: confirmFlagSchema,
|
|
63
|
+
idempotency_key: idempotencyKeySchema.describe('Optional. Forwarded as an Idempotency-Key header, but Persist does not enforce it ' +
|
|
64
|
+
'yet, so a retry can still create a duplicate.'),
|
|
65
|
+
}),
|
|
66
|
+
capabilities: [cap('fxm_external_payer_payment_methods', 'INSERT')],
|
|
67
|
+
sideEffect: 'provisioning',
|
|
68
|
+
confirmation: 'caller_confirms',
|
|
69
|
+
idempotency: 'not_idempotent',
|
|
70
|
+
handler: async (args, ctx) => {
|
|
71
|
+
const input = args;
|
|
72
|
+
const body = {
|
|
73
|
+
customer_id: input.customer_id,
|
|
74
|
+
payer_payment_method_type: input.payer_payment_method_type,
|
|
75
|
+
};
|
|
76
|
+
const optional = [
|
|
77
|
+
'payment_processor_id',
|
|
78
|
+
'payment_processor_payment_method_id',
|
|
79
|
+
'card_last_4_digits',
|
|
80
|
+
'card_expiry_month',
|
|
81
|
+
'card_expiry_year',
|
|
82
|
+
'card_funding_method',
|
|
83
|
+
'payment_method_scheme',
|
|
84
|
+
'payment_method_country_code',
|
|
85
|
+
'primary_payment_method',
|
|
86
|
+
'start_date',
|
|
87
|
+
'end_date',
|
|
88
|
+
];
|
|
89
|
+
for (const field of optional) {
|
|
90
|
+
if (input[field] !== undefined)
|
|
91
|
+
body[field] = input[field];
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const rows = await ctx.apiClient.post(`${ctx.apiClient.dbBasePath}/fxm_external_payer_payment_methods?select=*`, body, { headers: writeHeadersWithIdempotency(input.idempotency_key) });
|
|
95
|
+
return successResponse(redactRow(rows[0]));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
return errorResponse(API_ERROR, `Failed to register FXM payment method: ${error.message}`);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=fxm-payment-method-register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fxm-payment-method-register.js","sourceRoot":"","sources":["../../../src/tools/fxm/fxm-payment-method-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,aAAa,EA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,sBAAsB;YACtB,qCAAqC;YACrC,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,qBAAqB;YACrB,uBAAuB;YACvB,6BAA6B;YAC7B,wBAAwB;YACxB,YAAY;YACZ,UAAU;SACX,CAAC;QACF,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC7B,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CACnC,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,8CAA8C,EACzE,IAAI,EACJ,EAAE,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,aAAa,CAClB,SAAS,EACT,0CAA0C,KAAK,CAAC,OAAO,EAAE,CAC1D,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Tool } from '../registry.js';
|
|
2
|
+
import { CatalogueReport } from '../../generated-reads/index.js';
|
|
3
|
+
export declare const fxmGeneratedReadReport: CatalogueReport;
|
|
4
|
+
export declare const fxmGeneratedReadTools: Tool[];
|
|
5
|
+
//# sourceMappingURL=generated-reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-reads.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/generated-reads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAGL,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAwBxC,eAAO,MAAM,sBAAsB,EAAE,eAIjC,CAAC;AAEL,eAAO,MAAM,qBAAqB,EAAE,IAAI,EAGvC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { buildGeneratedReadCatalogue, buildGeneratedReadCatalogueReport, } from '../../generated-reads/index.js';
|
|
2
|
+
import { loadPersistResourceContract } from '../../contracts/persist-resource-contract.js';
|
|
3
|
+
/**
|
|
4
|
+
* Bounded read tools for the FXM (Funds Transfer Management) module
|
|
5
|
+
* (WI-0003505).
|
|
6
|
+
*
|
|
7
|
+
* The schema-driven catalogue (WI-0003500) emits describe/list/get for
|
|
8
|
+
* every FXM resource declaring a read operation. The pinned contract
|
|
9
|
+
* already hard-excludes `fxm_payment_processor_credentials` on the
|
|
10
|
+
* `credentials` rule, and the sensitive-field guardrail redacts every
|
|
11
|
+
* bank-account / card / IBAN / fingerprint column from any response
|
|
12
|
+
* (see WI-0003505 extension to `SENSITIVE_FIELD_PATTERNS`).
|
|
13
|
+
*
|
|
14
|
+
* `fxm_external_payer_payment_methods` and `fxm_external_payment_processors`
|
|
15
|
+
* are `sensitive` — opted-in explicitly here so callers can list them
|
|
16
|
+
* with the sensitive-field guardrail active. Every write on either goes
|
|
17
|
+
* through a dedicated tool (`fxm_external_payer_payment_method_register` /
|
|
18
|
+
* `_deactivate`); the generator refuses to emit CRUD on sensitive
|
|
19
|
+
* side-effecting surfaces.
|
|
20
|
+
*/
|
|
21
|
+
const contract = loadPersistResourceContract();
|
|
22
|
+
export const fxmGeneratedReadReport = buildGeneratedReadCatalogueReport(contract, {
|
|
23
|
+
modules: ['fxm'],
|
|
24
|
+
includeSensitive: true,
|
|
25
|
+
});
|
|
26
|
+
export const fxmGeneratedReadTools = buildGeneratedReadCatalogue(contract, { modules: ['fxm'], includeSensitive: true });
|
|
27
|
+
//# sourceMappingURL=generated-reads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-reads.js","sourceRoot":"","sources":["../../../src/tools/fxm/generated-reads.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAElC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,QAAQ,GAAG,2BAA2B,EAAE,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GACjC,iCAAiC,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,gBAAgB,EAAE,IAAI;CACvB,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,qBAAqB,GAAW,2BAA2B,CACtE,QAAQ,EACR,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/fxm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AActC,eAAO,MAAM,QAAQ,EAAE,IAAI,EAAiD,CAAC;AAE7E,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,IAAI,EAA0B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { fxmGeneratedReadTools } from './generated-reads.js';
|
|
2
|
+
import { fxmPaymentMethodRegisterTool } from './fxm-payment-method-register.js';
|
|
3
|
+
import { fxmPaymentMethodDeactivateTool } from './fxm-payment-method-deactivate.js';
|
|
4
|
+
import { fxmFundsAccountConsentGrantTool } from './fxm-funds-account-consent-grant.js';
|
|
5
|
+
import { fxmFundsAccountConsentRevokeTool } from './fxm-funds-account-consent-revoke.js';
|
|
6
|
+
const fxmWriteTools = [
|
|
7
|
+
fxmPaymentMethodRegisterTool,
|
|
8
|
+
fxmPaymentMethodDeactivateTool,
|
|
9
|
+
fxmFundsAccountConsentGrantTool,
|
|
10
|
+
fxmFundsAccountConsentRevokeTool,
|
|
11
|
+
];
|
|
12
|
+
export const fxmTools = [...fxmGeneratedReadTools, ...fxmWriteTools];
|
|
13
|
+
/** Read-only slice used by the `fxm-readonly` selectable sub-domain. */
|
|
14
|
+
export const fxmReadOnlyTools = fxmGeneratedReadTools;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/fxm/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,MAAM,aAAa,GAAW;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,+BAA+B;IAC/B,gCAAgC;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAW,CAAC,GAAG,qBAAqB,EAAE,GAAG,aAAa,CAAC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,CAAC,MAAM,gBAAgB,GAAW,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-mapping.d.ts","sourceRoot":"","sources":["../../src/tools/role-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"role-mapping.d.ts","sourceRoot":"","sources":["../../src/tools/role-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAiCD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CA2BhE;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,eAAe,GACzB,OAAO,CAAC,SAAS,EAAE,CAAC,CAEtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,eAAe,GACzB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO7B"}
|
|
@@ -21,6 +21,12 @@ const ROLE_TO_DOMAINS = {
|
|
|
21
21
|
// FND conversion rates and COA/daily-rate imports are administrator-only.
|
|
22
22
|
'Finance administrator': ['fgl', 'fnd'],
|
|
23
23
|
'Accountant': ['fgl'],
|
|
24
|
+
'Funds administrator': ['fxm'],
|
|
25
|
+
'Funds user': ['fxm'],
|
|
26
|
+
'Funds viewer': ['fxm-readonly'],
|
|
27
|
+
'Bank account administrator': ['cmm'],
|
|
28
|
+
'Bank account user': ['cmm'],
|
|
29
|
+
'Bank account viewer': ['cmm-readonly'],
|
|
24
30
|
};
|
|
25
31
|
/**
|
|
26
32
|
* Given a list of user group names, resolve the set of tool domain IDs
|
|
@@ -48,6 +54,12 @@ export function mapRolesToDomains(groupNames) {
|
|
|
48
54
|
if (domains.has('sfa') && domains.has('sfa-readonly')) {
|
|
49
55
|
domains.delete('sfa-readonly');
|
|
50
56
|
}
|
|
57
|
+
if (domains.has('fxm') && domains.has('fxm-readonly')) {
|
|
58
|
+
domains.delete('fxm-readonly');
|
|
59
|
+
}
|
|
60
|
+
if (domains.has('cmm') && domains.has('cmm-readonly')) {
|
|
61
|
+
domains.delete('cmm-readonly');
|
|
62
|
+
}
|
|
51
63
|
return [...domains];
|
|
52
64
|
}
|
|
53
65
|
/**
|