@lerianstudio/matcher-mcp 5.0.0-beta.7 → 5.0.0-beta.71
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 +28 -13
- package/dist/auth/request-token.js +11 -69
- package/dist/auth/request-token.js.map +1 -1
- package/dist/config.js +6 -21
- package/dist/config.js.map +1 -1
- package/dist/copilot/agent.js +5 -9
- package/dist/copilot/agent.js.map +1 -1
- package/dist/copilot/provider-anthropic.js +75 -23
- package/dist/copilot/provider-anthropic.js.map +1 -1
- package/dist/copilot/provider-openrouter.js +5 -18
- package/dist/copilot/provider-openrouter.js.map +1 -1
- package/dist/copilot/provider-shared.js +11 -0
- package/dist/copilot/provider-shared.js.map +1 -1
- package/dist/copilot/speech-provider.js +84 -0
- package/dist/copilot/speech-provider.js.map +1 -0
- package/dist/copilot/sse.js +5 -0
- package/dist/copilot/sse.js.map +1 -1
- package/dist/copilot/tools.js +14 -65
- package/dist/copilot/tools.js.map +1 -1
- package/dist/copilot/transcribe-handler.js +8 -93
- package/dist/copilot/transcribe-handler.js.map +1 -1
- package/dist/copilot/turn-request.js +76 -0
- package/dist/copilot/turn-request.js.map +1 -0
- package/dist/copilot/turns-handler.js +11 -102
- package/dist/copilot/turns-handler.js.map +1 -1
- package/dist/matcher/client.js +14 -0
- package/dist/matcher/client.js.map +1 -1
- package/dist/matcher/idempotency.js +94 -0
- package/dist/matcher/idempotency.js.map +1 -0
- package/dist/observability/otel.js +7 -29
- package/dist/observability/otel.js.map +1 -1
- package/dist/server.js +12 -81
- package/dist/server.js.map +1 -1
- package/dist/spec/curated-operations.js +111 -95
- package/dist/spec/curated-operations.js.map +1 -1
- package/dist/spec/enum-policy.js +21 -26
- package/dist/spec/enum-policy.js.map +1 -1
- package/dist/spec/openapi.yaml +841 -56
- package/dist/spec/schema-parity.js +23 -28
- package/dist/spec/schema-parity.js.map +1 -1
- package/dist/tools/context/create.js +3 -2
- package/dist/tools/context/create.js.map +1 -1
- package/dist/tools/context/index.js +137 -17
- package/dist/tools/context/index.js.map +1 -1
- package/dist/tools/context/list.js +9 -35
- package/dist/tools/context/list.js.map +1 -1
- package/dist/tools/context/setup-progress.js +3 -2
- package/dist/tools/context/setup-progress.js.map +1 -1
- package/dist/tools/context/shared.js +7 -48
- package/dist/tools/context/shared.js.map +1 -1
- package/dist/tools/context/update.js +5 -5
- package/dist/tools/context/update.js.map +1 -1
- package/dist/tools/curated-tool.js +39 -0
- package/dist/tools/curated-tool.js.map +1 -0
- package/dist/tools/dashboard/index.js +124 -19
- package/dist/tools/dashboard/index.js.map +1 -1
- package/dist/tools/dashboard/shared.js +9 -68
- package/dist/tools/dashboard/shared.js.map +1 -1
- package/dist/tools/dispute/close.js +5 -5
- package/dist/tools/dispute/close.js.map +1 -1
- package/dist/tools/dispute/index.js +34 -6
- package/dist/tools/dispute/index.js.map +1 -1
- package/dist/tools/dispute/list.js +18 -47
- package/dist/tools/dispute/list.js.map +1 -1
- package/dist/tools/dispute/shared.js +4 -43
- package/dist/tools/dispute/shared.js.map +1 -1
- package/dist/tools/dispute/submit-evidence.js +5 -5
- package/dist/tools/dispute/submit-evidence.js.map +1 -1
- package/dist/tools/exception/add-comment.js +3 -2
- package/dist/tools/exception/add-comment.js.map +1 -1
- package/dist/tools/exception/adjust-entry.js +5 -5
- package/dist/tools/exception/adjust-entry.js.map +1 -1
- package/dist/tools/exception/bulk-assign.js +3 -2
- package/dist/tools/exception/bulk-assign.js.map +1 -1
- package/dist/tools/exception/bulk-dispatch.js +12 -4
- package/dist/tools/exception/bulk-dispatch.js.map +1 -1
- package/dist/tools/exception/bulk-resolve.js +3 -2
- package/dist/tools/exception/bulk-resolve.js.map +1 -1
- package/dist/tools/exception/dispatch.js +13 -5
- package/dist/tools/exception/dispatch.js.map +1 -1
- package/dist/tools/exception/force-match.js +3 -2
- package/dist/tools/exception/force-match.js.map +1 -1
- package/dist/tools/exception/history.js +8 -24
- package/dist/tools/exception/history.js.map +1 -1
- package/dist/tools/exception/index.js +88 -18
- package/dist/tools/exception/index.js.map +1 -1
- package/dist/tools/exception/list.js +14 -57
- package/dist/tools/exception/list.js.map +1 -1
- package/dist/tools/exception/open-dispute.js +3 -2
- package/dist/tools/exception/open-dispute.js.map +1 -1
- package/dist/tools/exception/shared.js +10 -46
- package/dist/tools/exception/shared.js.map +1 -1
- package/dist/tools/fee-rule/create.js +5 -5
- package/dist/tools/fee-rule/create.js.map +1 -1
- package/dist/tools/fee-rule/index.js +50 -8
- package/dist/tools/fee-rule/index.js.map +1 -1
- package/dist/tools/fee-rule/list.js +9 -29
- package/dist/tools/fee-rule/list.js.map +1 -1
- package/dist/tools/fee-rule/shared.js +5 -47
- package/dist/tools/fee-rule/shared.js.map +1 -1
- package/dist/tools/fee-rule/update.js +5 -5
- package/dist/tools/fee-rule/update.js.map +1 -1
- package/dist/tools/fee-schedule/create.js +8 -3
- package/dist/tools/fee-schedule/create.js.map +1 -1
- package/dist/tools/fee-schedule/index.js +62 -11
- package/dist/tools/fee-schedule/index.js.map +1 -1
- package/dist/tools/fee-schedule/list.js +8 -24
- package/dist/tools/fee-schedule/list.js.map +1 -1
- package/dist/tools/fee-schedule/shared.js +5 -44
- package/dist/tools/fee-schedule/shared.js.map +1 -1
- package/dist/tools/fee-schedule/simulate.js +5 -5
- package/dist/tools/fee-schedule/simulate.js.map +1 -1
- package/dist/tools/fee-schedule/update.js +5 -5
- package/dist/tools/fee-schedule/update.js.map +1 -1
- package/dist/tools/field-map/create.js +3 -2
- package/dist/tools/field-map/create.js.map +1 -1
- package/dist/tools/field-map/index.js +65 -11
- package/dist/tools/field-map/index.js.map +1 -1
- package/dist/tools/field-map/list.js +9 -29
- package/dist/tools/field-map/list.js.map +1 -1
- package/dist/tools/field-map/shared.js +6 -42
- package/dist/tools/field-map/shared.js.map +1 -1
- package/dist/tools/field-map/update.js +3 -2
- package/dist/tools/field-map/update.js.map +1 -1
- package/dist/tools/generic/invoke.js +16 -39
- package/dist/tools/generic/invoke.js.map +1 -1
- package/dist/tools/ingestion/index.js +100 -12
- package/dist/tools/ingestion/index.js.map +1 -1
- package/dist/tools/ingestion/job-transactions-list.js +10 -40
- package/dist/tools/ingestion/job-transactions-list.js.map +1 -1
- package/dist/tools/ingestion/jobs-list.js +9 -35
- package/dist/tools/ingestion/jobs-list.js.map +1 -1
- package/dist/tools/ingestion/shared.js +4 -41
- package/dist/tools/ingestion/shared.js.map +1 -1
- package/dist/tools/ingestion/transactions-search.js +9 -44
- package/dist/tools/ingestion/transactions-search.js.map +1 -1
- package/dist/tools/ingestion/upload-begin.js +5 -2
- package/dist/tools/ingestion/upload-begin.js.map +1 -1
- package/dist/tools/ingestion/upload.js +3 -2
- package/dist/tools/ingestion/upload.js.map +1 -1
- package/dist/tools/input-fields.js +51 -0
- package/dist/tools/input-fields.js.map +1 -0
- package/dist/tools/match-rule/index.js +130 -13
- package/dist/tools/match-rule/index.js.map +1 -1
- package/dist/tools/match-rule/list.js +9 -33
- package/dist/tools/match-rule/list.js.map +1 -1
- package/dist/tools/match-rule/shared.js +16 -46
- package/dist/tools/match-rule/shared.js.map +1 -1
- package/dist/tools/match-rule/update.js +7 -11
- package/dist/tools/match-rule/update.js.map +1 -1
- package/dist/tools/matching/get.js +5 -5
- package/dist/tools/matching/get.js.map +1 -1
- package/dist/tools/matching/groups.js +6 -14
- package/dist/tools/matching/groups.js.map +1 -1
- package/dist/tools/matching/index.js +77 -5
- package/dist/tools/matching/index.js.map +1 -1
- package/dist/tools/matching/list.js +9 -32
- package/dist/tools/matching/list.js.map +1 -1
- package/dist/tools/matching/shared.js +5 -46
- package/dist/tools/matching/shared.js.map +1 -1
- package/dist/tools/query-handler.js +9 -0
- package/dist/tools/query-handler.js.map +1 -0
- package/dist/tools/report/index.js +260 -30
- package/dist/tools/report/index.js.map +1 -1
- package/dist/tools/report/shared.js +24 -98
- package/dist/tools/report/shared.js.map +1 -1
- package/dist/tools/request-fields.js +17 -0
- package/dist/tools/request-fields.js.map +1 -0
- package/dist/tools/shared-dispatch.js +38 -0
- package/dist/tools/shared-dispatch.js.map +1 -0
- package/dist/tools/source/create.js +146 -23
- package/dist/tools/source/create.js.map +1 -1
- package/dist/tools/source/index.js +101 -13
- package/dist/tools/source/index.js.map +1 -1
- package/dist/tools/source/list.js +9 -32
- package/dist/tools/source/list.js.map +1 -1
- package/dist/tools/source/shared.js +5 -42
- package/dist/tools/source/shared.js.map +1 -1
- package/dist/tools/source/update.js +16 -33
- package/dist/tools/source/update.js.map +1 -1
- package/dist/tools/workspace/usage.js +12 -40
- package/dist/tools/workspace/usage.js.map +1 -1
- package/package.json +4 -4
- package/dist/tools/context/archive.js +0 -37
- package/dist/tools/context/archive.js.map +0 -1
- package/dist/tools/context/get.js +0 -31
- package/dist/tools/context/get.js.map +0 -1
- package/dist/tools/context/next-step.js +0 -99
- package/dist/tools/context/next-step.js.map +0 -1
- package/dist/tools/context/restore.js +0 -34
- package/dist/tools/context/restore.js.map +0 -1
- package/dist/tools/dashboard/aggregates.js +0 -37
- package/dist/tools/dashboard/aggregates.js.map +0 -1
- package/dist/tools/dashboard/cash-impact.js +0 -37
- package/dist/tools/dashboard/cash-impact.js.map +0 -1
- package/dist/tools/dashboard/match-rate.js +0 -37
- package/dist/tools/dashboard/match-rate.js.map +0 -1
- package/dist/tools/dashboard/metrics.js +0 -37
- package/dist/tools/dashboard/metrics.js.map +0 -1
- package/dist/tools/dashboard/sla.js +0 -34
- package/dist/tools/dashboard/sla.js.map +0 -1
- package/dist/tools/dashboard/source-breakdown.js +0 -37
- package/dist/tools/dashboard/source-breakdown.js.map +0 -1
- package/dist/tools/dashboard/volume.js +0 -37
- package/dist/tools/dashboard/volume.js.map +0 -1
- package/dist/tools/dispute/get.js +0 -27
- package/dist/tools/dispute/get.js.map +0 -1
- package/dist/tools/exception/delete-comment.js +0 -40
- package/dist/tools/exception/delete-comment.js.map +0 -1
- package/dist/tools/exception/get.js +0 -34
- package/dist/tools/exception/get.js.map +0 -1
- package/dist/tools/exception/list-comments.js +0 -35
- package/dist/tools/exception/list-comments.js.map +0 -1
- package/dist/tools/fee-rule/delete.js +0 -27
- package/dist/tools/fee-rule/delete.js.map +0 -1
- package/dist/tools/fee-rule/get.js +0 -27
- package/dist/tools/fee-rule/get.js.map +0 -1
- package/dist/tools/fee-schedule/delete.js +0 -32
- package/dist/tools/fee-schedule/delete.js.map +0 -1
- package/dist/tools/fee-schedule/get.js +0 -30
- package/dist/tools/fee-schedule/get.js.map +0 -1
- package/dist/tools/field-map/delete.js +0 -37
- package/dist/tools/field-map/delete.js.map +0 -1
- package/dist/tools/field-map/get.js +0 -43
- package/dist/tools/field-map/get.js.map +0 -1
- package/dist/tools/ingestion/job-errors-list.js +0 -45
- package/dist/tools/ingestion/job-errors-list.js.map +0 -1
- package/dist/tools/ingestion/job-get.js +0 -42
- package/dist/tools/ingestion/job-get.js.map +0 -1
- package/dist/tools/ingestion/transaction-ignore.js +0 -51
- package/dist/tools/ingestion/transaction-ignore.js.map +0 -1
- package/dist/tools/match-rule/create.js +0 -67
- package/dist/tools/match-rule/create.js.map +0 -1
- package/dist/tools/match-rule/delete.js +0 -35
- package/dist/tools/match-rule/delete.js.map +0 -1
- package/dist/tools/match-rule/get.js +0 -32
- package/dist/tools/match-rule/get.js.map +0 -1
- package/dist/tools/match-rule/reorder.js +0 -45
- package/dist/tools/match-rule/reorder.js.map +0 -1
- package/dist/tools/matching/start.js +0 -81
- package/dist/tools/matching/start.js.map +0 -1
- package/dist/tools/report/count-exceptions.js +0 -46
- package/dist/tools/report/count-exceptions.js.map +0 -1
- package/dist/tools/report/count-matched.js +0 -47
- package/dist/tools/report/count-matched.js.map +0 -1
- package/dist/tools/report/count-transactions.js +0 -45
- package/dist/tools/report/count-transactions.js.map +0 -1
- package/dist/tools/report/count-unmatched.js +0 -45
- package/dist/tools/report/count-unmatched.js.map +0 -1
- package/dist/tools/report/export-exceptions.js +0 -48
- package/dist/tools/report/export-exceptions.js.map +0 -1
- package/dist/tools/report/export-matched.js +0 -49
- package/dist/tools/report/export-matched.js.map +0 -1
- package/dist/tools/report/export-summary.js +0 -49
- package/dist/tools/report/export-summary.js.map +0 -1
- package/dist/tools/report/export-unmatched.js +0 -49
- package/dist/tools/report/export-unmatched.js.map +0 -1
- package/dist/tools/report/export-variance.js +0 -48
- package/dist/tools/report/export-variance.js.map +0 -1
- package/dist/tools/report/matched.js +0 -48
- package/dist/tools/report/matched.js.map +0 -1
- package/dist/tools/report/summary.js +0 -43
- package/dist/tools/report/summary.js.map +0 -1
- package/dist/tools/report/unmatched.js +0 -48
- package/dist/tools/report/unmatched.js.map +0 -1
- package/dist/tools/report/variance.js +0 -48
- package/dist/tools/report/variance.js.map +0 -1
- package/dist/tools/source/archive.js +0 -46
- package/dist/tools/source/archive.js.map +0 -1
- package/dist/tools/source/get.js +0 -57
- package/dist/tools/source/get.js.map +0 -1
- package/dist/tools/source/restore.js +0 -39
- package/dist/tools/source/restore.js.map +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// `report_count_transactions` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/transactions/count.
|
|
3
|
-
//
|
|
4
|
-
// Returns the total count of ALL transactions for the given filters — used to
|
|
5
|
-
// decide between a sync download (<1000 rows) and an async export job. The date
|
|
6
|
-
// filter applies to the transaction date. Takes only the common date filter and
|
|
7
|
-
// returns matcher's ExportCountResponse as-is. The count is implicitly
|
|
8
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
9
|
-
// tenant field, and no tenant field is accepted.
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { buildReportFilterQuery, contextReportPath, dispatchReport, reportFilterInputShape, } from './shared.js';
|
|
12
|
-
/** Zod raw shape for `report_count_transactions` input — contextId path + date filter. */
|
|
13
|
-
export const countTransactionsInputShape = {
|
|
14
|
-
contextId: z
|
|
15
|
-
.string()
|
|
16
|
-
.min(1)
|
|
17
|
-
.describe('The reconciliation context id (UUID) whose transactions to count. ' +
|
|
18
|
-
'Routing path param, not a tenant field.'),
|
|
19
|
-
...reportFilterInputShape,
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Register `report_count_transactions`. Passes the date filter through and
|
|
23
|
-
* returns matcher's count envelope verbatim; a matcher error surfaces via the
|
|
24
|
-
* shared toToolError.
|
|
25
|
-
*/
|
|
26
|
-
export function registerReportCountTransactionsTool(server) {
|
|
27
|
-
server.registerTool('report_count_transactions', {
|
|
28
|
-
description: 'Count all transactions for a context within a date window — use it to ' +
|
|
29
|
-
'decide between a sync download (<1000 rows) and an async export. The ' +
|
|
30
|
-
'date filter applies to the transaction date. Pass contextId (UUID path ' +
|
|
31
|
-
'param — not a tenant field), and optionally date_from/date_to ' +
|
|
32
|
-
'(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
|
|
33
|
-
'days and SILENTLY EXCLUDES older transactions — pass an explicit range ' +
|
|
34
|
-
'for a full picture) and source_id. No tenant field is accepted.',
|
|
35
|
-
inputSchema: countTransactionsInputShape,
|
|
36
|
-
}, async (args, extra) => {
|
|
37
|
-
const query = buildReportFilterQuery(args);
|
|
38
|
-
return dispatchReport({
|
|
39
|
-
method: 'GET',
|
|
40
|
-
path: contextReportPath(args.contextId, 'transactions/count'),
|
|
41
|
-
...(query !== undefined ? { query } : {}),
|
|
42
|
-
}, extra);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=count-transactions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"count-transactions.js","sourceRoot":"","sources":["../../../src/tools/report/count-transactions.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,uDAAuD;AACvD,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,uEAAuE;AACvE,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,0FAA0F;AAC1F,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,oEAAoE;QAClE,yCAAyC,CAC5C;IACH,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,mCAAmC,CAAC,MAAiB;IACnE,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,WAAW,EACT,wEAAwE;YACxE,uEAAuE;YACvE,yEAAyE;YACzE,gEAAgE;YAChE,sEAAsE;YACtE,yEAAyE;YACzE,iEAAiE;QACnE,WAAW,EAAE,2BAA2B;KACzC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC;YAC7D,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// `report_count_unmatched` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/unmatched/count.
|
|
3
|
-
//
|
|
4
|
-
// Returns the total count of unmatched records for the given filters — used to
|
|
5
|
-
// decide between a sync download (<1000 rows) and an async export job. The date
|
|
6
|
-
// filter applies to the transaction date. Takes only the common date filter and
|
|
7
|
-
// returns matcher's ExportCountResponse as-is. The count is implicitly
|
|
8
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
9
|
-
// tenant field, and no tenant field is accepted.
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { buildReportFilterQuery, contextReportPath, dispatchReport, reportFilterInputShape, } from './shared.js';
|
|
12
|
-
/** Zod raw shape for `report_count_unmatched` input — contextId path + date filter. */
|
|
13
|
-
export const countUnmatchedInputShape = {
|
|
14
|
-
contextId: z
|
|
15
|
-
.string()
|
|
16
|
-
.min(1)
|
|
17
|
-
.describe('The reconciliation context id (UUID) whose unmatched records to count. ' +
|
|
18
|
-
'Routing path param, not a tenant field.'),
|
|
19
|
-
...reportFilterInputShape,
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Register `report_count_unmatched`. Passes the date filter through and returns
|
|
23
|
-
* matcher's count envelope verbatim; a matcher error surfaces via the shared
|
|
24
|
-
* toToolError.
|
|
25
|
-
*/
|
|
26
|
-
export function registerReportCountUnmatchedTool(server) {
|
|
27
|
-
server.registerTool('report_count_unmatched', {
|
|
28
|
-
description: 'Count unmatched records for a context within a date window — use it to ' +
|
|
29
|
-
'decide between a sync download (<1000 rows) and an async export. The ' +
|
|
30
|
-
'date filter applies to the transaction date. Pass contextId (UUID path ' +
|
|
31
|
-
'param — not a tenant field), and optionally date_from/date_to ' +
|
|
32
|
-
'(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
|
|
33
|
-
'days and SILENTLY EXCLUDES older unmatched records — pass an explicit ' +
|
|
34
|
-
'range for a full picture) and source_id. No tenant field is accepted.',
|
|
35
|
-
inputSchema: countUnmatchedInputShape,
|
|
36
|
-
}, async (args, extra) => {
|
|
37
|
-
const query = buildReportFilterQuery(args);
|
|
38
|
-
return dispatchReport({
|
|
39
|
-
method: 'GET',
|
|
40
|
-
path: contextReportPath(args.contextId, 'unmatched/count'),
|
|
41
|
-
...(query !== undefined ? { query } : {}),
|
|
42
|
-
}, extra);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=count-unmatched.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"count-unmatched.js","sourceRoot":"","sources":["../../../src/tools/report/count-unmatched.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oDAAoD;AACpD,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,uEAAuE;AACvE,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,yEAAyE;QACvE,yCAAyC,CAC5C;IACH,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,MAAiB;IAChE,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,WAAW,EACT,yEAAyE;YACzE,uEAAuE;YACvE,yEAAyE;YACzE,gEAAgE;YAChE,sEAAsE;YACtE,wEAAwE;YACxE,uEAAuE;QACzE,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;YAC1D,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// `report_export_exceptions` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/exceptions/export.
|
|
3
|
-
//
|
|
4
|
-
// Synchronously exports the exceptions report as a single base64-encoded file
|
|
5
|
-
// (CSV or PDF) for the given date window. This is an HTTP GET — the date filter
|
|
6
|
-
// and the csv|pdf format are query params, not a POST body. matcher returns the
|
|
7
|
-
// file as a base64 STRING inline in the JSON response; the dispatch passes it
|
|
8
|
-
// through verbatim (it is NOT decoded here — the caller decodes it). The export
|
|
9
|
-
// is implicitly tenant-scoped by the relayed token; contextId is a routing path
|
|
10
|
-
// param, not a tenant field, and no tenant field is accepted.
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
import { buildReportExportQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportFormatInputShape, } from './shared.js';
|
|
13
|
-
/** Zod raw shape for `report_export_exceptions` input — contextId path + filter + format. */
|
|
14
|
-
export const exportExceptionsInputShape = {
|
|
15
|
-
contextId: z
|
|
16
|
-
.string()
|
|
17
|
-
.min(1)
|
|
18
|
-
.describe('The reconciliation context id (UUID) whose exceptions to export. ' +
|
|
19
|
-
'Routing path param, not a tenant field.'),
|
|
20
|
-
...reportFilterInputShape,
|
|
21
|
-
...reportFormatInputShape,
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Register `report_export_exceptions`. Passes the date filter + format through
|
|
25
|
-
* and returns matcher's base64 file string verbatim (the caller decodes it); a
|
|
26
|
-
* matcher error surfaces via the shared toToolError.
|
|
27
|
-
*/
|
|
28
|
-
export function registerReportExportExceptionsTool(server) {
|
|
29
|
-
server.registerTool('report_export_exceptions', {
|
|
30
|
-
description: 'Export the exceptions report for a context within a date window as a ' +
|
|
31
|
-
'CSV or PDF file. Pass contextId (UUID path param — not a tenant field), ' +
|
|
32
|
-
'and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 days; if ' +
|
|
33
|
-
'omitted, defaults to the last ~30 days and SILENTLY EXCLUDES older ' +
|
|
34
|
-
'exceptions — pass an explicit range for a full picture), source_id, ' +
|
|
35
|
-
'and format (csv|pdf, default csv). The result is a base64-encoded ' +
|
|
36
|
-
'string — decode it to recover the file bytes. No tenant field is ' +
|
|
37
|
-
'accepted.',
|
|
38
|
-
inputSchema: exportExceptionsInputShape,
|
|
39
|
-
}, async (args, extra) => {
|
|
40
|
-
const query = buildReportExportQuery(args);
|
|
41
|
-
return dispatchReport({
|
|
42
|
-
method: 'GET',
|
|
43
|
-
path: contextReportPath(args.contextId, 'exceptions/export'),
|
|
44
|
-
...(query !== undefined ? { query } : {}),
|
|
45
|
-
}, extra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=export-exceptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-exceptions.js","sourceRoot":"","sources":["../../../src/tools/report/export-exceptions.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,sDAAsD;AACtD,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,8DAA8D;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,6FAA6F;AAC7F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,mEAAmE;QACjE,yCAAyC,CAC5C;IACH,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAAiB;IAClE,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,WAAW,EACT,uEAAuE;YACvE,0EAA0E;YAC1E,qEAAqE;YACrE,qEAAqE;YACrE,sEAAsE;YACtE,oEAAoE;YACpE,mEAAmE;YACnE,WAAW;QACb,WAAW,EAAE,0BAA0B;KACxC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC;YAC5D,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// `report_export_matched` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/matched/export.
|
|
3
|
-
//
|
|
4
|
-
// Synchronously exports the matched-transactions report as a single
|
|
5
|
-
// base64-encoded file (CSV or PDF) for the given date window. This is an HTTP
|
|
6
|
-
// GET — the date filter and the csv|pdf format are query params, not a POST
|
|
7
|
-
// body. matcher returns the file as a base64 STRING inline in the JSON
|
|
8
|
-
// response; the dispatch passes it through verbatim (it is NOT decoded here —
|
|
9
|
-
// the caller decodes it). The export is implicitly tenant-scoped by the relayed
|
|
10
|
-
// token; contextId is a routing path param, not a tenant field, and no tenant
|
|
11
|
-
// field is accepted.
|
|
12
|
-
import { z } from 'zod';
|
|
13
|
-
import { buildReportExportQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportFormatInputShape, } from './shared.js';
|
|
14
|
-
/** Zod raw shape for `report_export_matched` input — contextId path + filter + format. */
|
|
15
|
-
export const exportMatchedInputShape = {
|
|
16
|
-
contextId: z
|
|
17
|
-
.string()
|
|
18
|
-
.min(1)
|
|
19
|
-
.describe('The reconciliation context id (UUID) whose matched transactions to ' +
|
|
20
|
-
'export. Routing path param, not a tenant field.'),
|
|
21
|
-
...reportFilterInputShape,
|
|
22
|
-
...reportFormatInputShape,
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Register `report_export_matched`. Passes the date filter + format through and
|
|
26
|
-
* returns matcher's base64 file string verbatim (the caller decodes it); a
|
|
27
|
-
* matcher error surfaces via the shared toToolError.
|
|
28
|
-
*/
|
|
29
|
-
export function registerReportExportMatchedTool(server) {
|
|
30
|
-
server.registerTool('report_export_matched', {
|
|
31
|
-
description: 'Export the matched-transactions report for a context within a date ' +
|
|
32
|
-
'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
|
|
33
|
-
'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
|
|
34
|
-
'90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
|
|
35
|
-
'EXCLUDES older matches — pass an explicit range for a full picture), ' +
|
|
36
|
-
'source_id, and format (csv|pdf, default csv). The result is a ' +
|
|
37
|
-
'base64-encoded string — decode it to recover the file bytes. No tenant ' +
|
|
38
|
-
'field is accepted.',
|
|
39
|
-
inputSchema: exportMatchedInputShape,
|
|
40
|
-
}, async (args, extra) => {
|
|
41
|
-
const query = buildReportExportQuery(args);
|
|
42
|
-
return dispatchReport({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
path: contextReportPath(args.contextId, 'matched/export'),
|
|
45
|
-
...(query !== undefined ? { query } : {}),
|
|
46
|
-
}, extra);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=export-matched.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-matched.js","sourceRoot":"","sources":["../../../src/tools/report/export-matched.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,mDAAmD;AACnD,EAAE;AACF,oEAAoE;AACpE,8EAA8E;AAC9E,4EAA4E;AAC5E,uEAAuE;AACvE,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,0FAA0F;AAC1F,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,qEAAqE;QACnE,iDAAiD,CACpD;IACH,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAAC,MAAiB;IAC/D,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,WAAW,EACT,qEAAqE;YACrE,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,uEAAuE;YACvE,gEAAgE;YAChE,yEAAyE;YACzE,oBAAoB;QACtB,WAAW,EAAE,uBAAuB;KACrC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC;YACzD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// `report_export_summary` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/summary/export.
|
|
3
|
-
//
|
|
4
|
-
// Synchronously exports the reconciliation summary report as a single
|
|
5
|
-
// base64-encoded file (CSV or PDF) for the given date window. This is an HTTP
|
|
6
|
-
// GET — the date filter and the csv|pdf format are query params, not a POST
|
|
7
|
-
// body. matcher returns the file as a base64 STRING inline in the JSON
|
|
8
|
-
// response; the dispatch passes it through verbatim (it is NOT decoded here —
|
|
9
|
-
// the caller decodes it). The export is implicitly tenant-scoped by the relayed
|
|
10
|
-
// token; contextId is a routing path param, not a tenant field, and no tenant
|
|
11
|
-
// field is accepted.
|
|
12
|
-
import { z } from 'zod';
|
|
13
|
-
import { buildReportExportQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportFormatInputShape, } from './shared.js';
|
|
14
|
-
/** Zod raw shape for `report_export_summary` input — contextId path + filter + format. */
|
|
15
|
-
export const exportSummaryInputShape = {
|
|
16
|
-
contextId: z
|
|
17
|
-
.string()
|
|
18
|
-
.min(1)
|
|
19
|
-
.describe('The reconciliation context id (UUID) to export the summary for. Routing ' +
|
|
20
|
-
'path param, not a tenant field.'),
|
|
21
|
-
...reportFilterInputShape,
|
|
22
|
-
...reportFormatInputShape,
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Register `report_export_summary`. Passes the date filter + format through and
|
|
26
|
-
* returns matcher's base64 file string verbatim (the caller decodes it); a
|
|
27
|
-
* matcher error surfaces via the shared toToolError.
|
|
28
|
-
*/
|
|
29
|
-
export function registerReportExportSummaryTool(server) {
|
|
30
|
-
server.registerTool('report_export_summary', {
|
|
31
|
-
description: 'Export the reconciliation summary report for a context within a date ' +
|
|
32
|
-
'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
|
|
33
|
-
'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
|
|
34
|
-
'90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
|
|
35
|
-
'EXCLUDES older data — pass an explicit range for a full picture), ' +
|
|
36
|
-
'source_id, and format (csv|pdf, default csv). The result is a ' +
|
|
37
|
-
'base64-encoded string — decode it to recover the file bytes. No tenant ' +
|
|
38
|
-
'field is accepted.',
|
|
39
|
-
inputSchema: exportSummaryInputShape,
|
|
40
|
-
}, async (args, extra) => {
|
|
41
|
-
const query = buildReportExportQuery(args);
|
|
42
|
-
return dispatchReport({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
path: contextReportPath(args.contextId, 'summary/export'),
|
|
45
|
-
...(query !== undefined ? { query } : {}),
|
|
46
|
-
}, extra);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=export-summary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-summary.js","sourceRoot":"","sources":["../../../src/tools/report/export-summary.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,mDAAmD;AACnD,EAAE;AACF,sEAAsE;AACtE,8EAA8E;AAC9E,4EAA4E;AAC5E,uEAAuE;AACvE,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,0FAA0F;AAC1F,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,0EAA0E;QACxE,iCAAiC,CACpC;IACH,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAAC,MAAiB;IAC/D,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,WAAW,EACT,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,oEAAoE;YACpE,gEAAgE;YAChE,yEAAyE;YACzE,oBAAoB;QACtB,WAAW,EAAE,uBAAuB;KACrC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC;YACzD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// `report_export_unmatched` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/unmatched/export.
|
|
3
|
-
//
|
|
4
|
-
// Synchronously exports the unmatched-transactions report as a single
|
|
5
|
-
// base64-encoded file (CSV or PDF) for the given date window. This is an HTTP
|
|
6
|
-
// GET — the date filter and the csv|pdf format are query params, not a POST
|
|
7
|
-
// body. matcher returns the file as a base64 STRING inline in the JSON
|
|
8
|
-
// response; the dispatch passes it through verbatim (it is NOT decoded here —
|
|
9
|
-
// the caller decodes it). The export is implicitly tenant-scoped by the relayed
|
|
10
|
-
// token; contextId is a routing path param, not a tenant field, and no tenant
|
|
11
|
-
// field is accepted.
|
|
12
|
-
import { z } from 'zod';
|
|
13
|
-
import { buildReportExportQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportFormatInputShape, } from './shared.js';
|
|
14
|
-
/** Zod raw shape for `report_export_unmatched` input — contextId path + filter + format. */
|
|
15
|
-
export const exportUnmatchedInputShape = {
|
|
16
|
-
contextId: z
|
|
17
|
-
.string()
|
|
18
|
-
.min(1)
|
|
19
|
-
.describe('The reconciliation context id (UUID) whose unmatched transactions to ' +
|
|
20
|
-
'export. Routing path param, not a tenant field.'),
|
|
21
|
-
...reportFilterInputShape,
|
|
22
|
-
...reportFormatInputShape,
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Register `report_export_unmatched`. Passes the date filter + format through
|
|
26
|
-
* and returns matcher's base64 file string verbatim (the caller decodes it); a
|
|
27
|
-
* matcher error surfaces via the shared toToolError.
|
|
28
|
-
*/
|
|
29
|
-
export function registerReportExportUnmatchedTool(server) {
|
|
30
|
-
server.registerTool('report_export_unmatched', {
|
|
31
|
-
description: 'Export the unmatched-transactions report for a context within a date ' +
|
|
32
|
-
'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
|
|
33
|
-
'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
|
|
34
|
-
'90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
|
|
35
|
-
'EXCLUDES older unmatched items — pass an explicit range for a full ' +
|
|
36
|
-
'picture), source_id, and format (csv|pdf, default csv). The result is ' +
|
|
37
|
-
'a base64-encoded string — decode it to recover the file bytes. No ' +
|
|
38
|
-
'tenant field is accepted.',
|
|
39
|
-
inputSchema: exportUnmatchedInputShape,
|
|
40
|
-
}, async (args, extra) => {
|
|
41
|
-
const query = buildReportExportQuery(args);
|
|
42
|
-
return dispatchReport({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
path: contextReportPath(args.contextId, 'unmatched/export'),
|
|
45
|
-
...(query !== undefined ? { query } : {}),
|
|
46
|
-
}, extra);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=export-unmatched.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-unmatched.js","sourceRoot":"","sources":["../../../src/tools/report/export-unmatched.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,qDAAqD;AACrD,EAAE;AACF,sEAAsE;AACtE,8EAA8E;AAC9E,4EAA4E;AAC5E,uEAAuE;AACvE,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,4FAA4F;AAC5F,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,uEAAuE;QACrE,iDAAiD,CACpD;IACH,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,MAAiB;IACjE,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,WAAW,EACT,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,qEAAqE;YACrE,wEAAwE;YACxE,oEAAoE;YACpE,2BAA2B;QAC7B,WAAW,EAAE,yBAAyB;KACvC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC;YAC3D,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// `report_export_variance` — curated GET
|
|
2
|
-
// /v1/reports/contexts/{contextId}/variance/export.
|
|
3
|
-
//
|
|
4
|
-
// Synchronously exports the variance analysis report as a single base64-encoded
|
|
5
|
-
// file (CSV or PDF) for the given date window. This is an HTTP GET — the date
|
|
6
|
-
// filter and the csv|pdf format are query params, not a POST body. matcher
|
|
7
|
-
// returns the file as a base64 STRING inline in the JSON response; the dispatch
|
|
8
|
-
// passes it through verbatim (it is NOT decoded here — the caller decodes it).
|
|
9
|
-
// The export is implicitly tenant-scoped by the relayed token; contextId is a
|
|
10
|
-
// routing path param, not a tenant field, and no tenant field is accepted.
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
import { buildReportExportQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportFormatInputShape, } from './shared.js';
|
|
13
|
-
/** Zod raw shape for `report_export_variance` input — contextId path + filter + format. */
|
|
14
|
-
export const exportVarianceInputShape = {
|
|
15
|
-
contextId: z
|
|
16
|
-
.string()
|
|
17
|
-
.min(1)
|
|
18
|
-
.describe('The reconciliation context id (UUID) whose variance rows to export. ' +
|
|
19
|
-
'Routing path param, not a tenant field.'),
|
|
20
|
-
...reportFilterInputShape,
|
|
21
|
-
...reportFormatInputShape,
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Register `report_export_variance`. Passes the date filter + format through and
|
|
25
|
-
* returns matcher's base64 file string verbatim (the caller decodes it); a
|
|
26
|
-
* matcher error surfaces via the shared toToolError.
|
|
27
|
-
*/
|
|
28
|
-
export function registerReportExportVarianceTool(server) {
|
|
29
|
-
server.registerTool('report_export_variance', {
|
|
30
|
-
description: 'Export the variance analysis report for a context within a date ' +
|
|
31
|
-
'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
|
|
32
|
-
'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
|
|
33
|
-
'90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
|
|
34
|
-
'EXCLUDES older rows — pass an explicit range for a full picture), ' +
|
|
35
|
-
'source_id, and format (csv|pdf, default csv). The result is a ' +
|
|
36
|
-
'base64-encoded string — decode it to recover the file bytes. No tenant ' +
|
|
37
|
-
'field is accepted.',
|
|
38
|
-
inputSchema: exportVarianceInputShape,
|
|
39
|
-
}, async (args, extra) => {
|
|
40
|
-
const query = buildReportExportQuery(args);
|
|
41
|
-
return dispatchReport({
|
|
42
|
-
method: 'GET',
|
|
43
|
-
path: contextReportPath(args.contextId, 'variance/export'),
|
|
44
|
-
...(query !== undefined ? { query } : {}),
|
|
45
|
-
}, extra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=export-variance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-variance.js","sourceRoot":"","sources":["../../../src/tools/report/export-variance.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oDAAoD;AACpD,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAE3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,2FAA2F;AAC3F,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,sEAAsE;QACpE,yCAAyC,CAC5C;IACH,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,MAAiB;IAChE,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,WAAW,EACT,kEAAkE;YAClE,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,oEAAoE;YACpE,gEAAgE;YAChE,yEAAyE;YACzE,oBAAoB;QACtB,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;YAC1D,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// `report_matched` — curated GET /v1/reports/contexts/{contextId}/matched.
|
|
2
|
-
//
|
|
3
|
-
// Cursor-paginated matched transactions for a context within a date window.
|
|
4
|
-
// date_from/date_to/source_id filter and cursor/limit/sort_order page; matcher's
|
|
5
|
-
// { items, pagination: { next, prev } } envelope is returned as-is — no
|
|
6
|
-
// auto-pagination (the model re-calls with the returned cursor). The report is
|
|
7
|
-
// implicitly
|
|
8
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
9
|
-
// tenant field, and no tenant field is accepted.
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { buildReportPaginatedQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportPaginationInputShape, } from './shared.js';
|
|
12
|
-
/** Zod raw shape for `report_matched` input — contextId path + filter + pagination. */
|
|
13
|
-
export const matchedReportInputShape = {
|
|
14
|
-
contextId: z
|
|
15
|
-
.string()
|
|
16
|
-
.min(1)
|
|
17
|
-
.describe('The reconciliation context id (UUID) whose matched transactions to ' +
|
|
18
|
-
'report. Routing path param, not a tenant field.'),
|
|
19
|
-
...reportFilterInputShape,
|
|
20
|
-
...reportPaginationInputShape,
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Register `report_matched`. Passes the date filter + pagination through and
|
|
24
|
-
* returns matcher's pagination envelope verbatim; a matcher error surfaces via
|
|
25
|
-
* the shared toToolError.
|
|
26
|
-
*/
|
|
27
|
-
export function registerReportMatchedTool(server) {
|
|
28
|
-
server.registerTool('report_matched', {
|
|
29
|
-
description: 'List matched transactions for a context within a date window ' +
|
|
30
|
-
'(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
|
|
31
|
-
'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
|
|
32
|
-
'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
|
|
33
|
-
'older matches — pass an explicit range for a full picture), source_id, ' +
|
|
34
|
-
'limit (1–200), sort_order (asc|desc), and/or cursor. The response ' +
|
|
35
|
-
'carries { items, pagination: { next, prev } } — paginate by re-calling ' +
|
|
36
|
-
'with cursor set to the returned pagination.next (empty when exhausted). ' +
|
|
37
|
-
'No tenant field is accepted.',
|
|
38
|
-
inputSchema: matchedReportInputShape,
|
|
39
|
-
}, async (args, extra) => {
|
|
40
|
-
const query = buildReportPaginatedQuery(args);
|
|
41
|
-
return dispatchReport({
|
|
42
|
-
method: 'GET',
|
|
43
|
-
path: contextReportPath(args.contextId, 'matched'),
|
|
44
|
-
...(query !== undefined ? { query } : {}),
|
|
45
|
-
}, extra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=matched.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"matched.js","sourceRoot":"","sources":["../../../src/tools/report/matched.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,wEAAwE;AACxE,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AAEpB,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,qEAAqE;QACnE,iDAAiD,CACpD;IACH,GAAG,sBAAsB;IACzB,GAAG,0BAA0B;CAC9B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,WAAW,EACT,+DAA+D;YAC/D,qEAAqE;YACrE,oEAAoE;YACpE,wEAAwE;YACxE,yEAAyE;YACzE,oEAAoE;YACpE,yEAAyE;YACzE,0EAA0E;YAC1E,8BAA8B;QAChC,WAAW,EAAE,uBAAuB;KACrC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAA;QAC7C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;YAClD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// `report_summary` — curated GET /v1/reports/contexts/{contextId}/summary.
|
|
2
|
-
//
|
|
3
|
-
// Aggregated summary statistics for a context within a date window. Takes only
|
|
4
|
-
// the common date filter (date_from/date_to/source_id) — no pagination — and
|
|
5
|
-
// returns matcher's SummaryReportResponse as-is. The report is implicitly
|
|
6
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
7
|
-
// tenant field, and no tenant field is accepted.
|
|
8
|
-
import { z } from 'zod';
|
|
9
|
-
import { buildReportFilterQuery, contextReportPath, dispatchReport, reportFilterInputShape, } from './shared.js';
|
|
10
|
-
/** Zod raw shape for `report_summary` input — contextId path + date filter. */
|
|
11
|
-
export const summaryReportInputShape = {
|
|
12
|
-
contextId: z
|
|
13
|
-
.string()
|
|
14
|
-
.min(1)
|
|
15
|
-
.describe('The reconciliation context id (UUID) to summarize. Routing path param, ' +
|
|
16
|
-
'not a tenant field.'),
|
|
17
|
-
...reportFilterInputShape,
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Register `report_summary`. Passes the date filter through and returns
|
|
21
|
-
* matcher's aggregated summary verbatim; a matcher error surfaces via the
|
|
22
|
-
* shared toToolError.
|
|
23
|
-
*/
|
|
24
|
-
export function registerReportSummaryTool(server) {
|
|
25
|
-
server.registerTool('report_summary', {
|
|
26
|
-
description: 'Get aggregated reconciliation summary statistics for a context within ' +
|
|
27
|
-
'a date window. Pass contextId (UUID path param — not a tenant field), ' +
|
|
28
|
-
'and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 days; if ' +
|
|
29
|
-
'omitted, defaults to the last ~30 days and SILENTLY EXCLUDES older ' +
|
|
30
|
-
'data — pass an explicit range for a full picture) and source_id. ' +
|
|
31
|
-
'Returns the summary totals, or a structured RFC 9457 error. No tenant ' +
|
|
32
|
-
'field is accepted.',
|
|
33
|
-
inputSchema: summaryReportInputShape,
|
|
34
|
-
}, async (args, extra) => {
|
|
35
|
-
const query = buildReportFilterQuery(args);
|
|
36
|
-
return dispatchReport({
|
|
37
|
-
method: 'GET',
|
|
38
|
-
path: contextReportPath(args.contextId, 'summary'),
|
|
39
|
-
...(query !== undefined ? { query } : {}),
|
|
40
|
-
}, extra);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=summary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../../src/tools/report/summary.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAEpB,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,yEAAyE;QACvE,qBAAqB,CACxB;IACH,GAAG,sBAAsB;CAC1B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,WAAW,EACT,wEAAwE;YACxE,wEAAwE;YACxE,qEAAqE;YACrE,qEAAqE;YACrE,mEAAmE;YACnE,wEAAwE;YACxE,oBAAoB;QACtB,WAAW,EAAE,uBAAuB;KACrC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;YAClD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// `report_unmatched` — curated GET /v1/reports/contexts/{contextId}/unmatched.
|
|
2
|
-
//
|
|
3
|
-
// Cursor-paginated unmatched transactions for a context within a date window.
|
|
4
|
-
// date_from/date_to/source_id filter and cursor/limit/sort_order page; matcher's
|
|
5
|
-
// { items, pagination: { next, prev } } envelope is returned as-is — no
|
|
6
|
-
// auto-pagination (the model re-calls with the returned cursor). The report is
|
|
7
|
-
// implicitly
|
|
8
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
9
|
-
// tenant field, and no tenant field is accepted.
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { buildReportPaginatedQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportPaginationInputShape, } from './shared.js';
|
|
12
|
-
/** Zod raw shape for `report_unmatched` input — contextId path + filter + pagination. */
|
|
13
|
-
export const unmatchedReportInputShape = {
|
|
14
|
-
contextId: z
|
|
15
|
-
.string()
|
|
16
|
-
.min(1)
|
|
17
|
-
.describe('The reconciliation context id (UUID) whose unmatched transactions to ' +
|
|
18
|
-
'report. Routing path param, not a tenant field.'),
|
|
19
|
-
...reportFilterInputShape,
|
|
20
|
-
...reportPaginationInputShape,
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Register `report_unmatched`. Passes the date filter + pagination through and
|
|
24
|
-
* returns matcher's pagination envelope verbatim; a matcher error surfaces via
|
|
25
|
-
* the shared toToolError.
|
|
26
|
-
*/
|
|
27
|
-
export function registerReportUnmatchedTool(server) {
|
|
28
|
-
server.registerTool('report_unmatched', {
|
|
29
|
-
description: 'List unmatched transactions for a context within a date window ' +
|
|
30
|
-
'(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
|
|
31
|
-
'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
|
|
32
|
-
'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
|
|
33
|
-
'older unmatched items — pass an explicit range for a full picture), ' +
|
|
34
|
-
'source_id, limit (1–200), sort_order (asc|desc), and/or cursor. The ' +
|
|
35
|
-
'response carries { items, pagination: { next, prev } } — paginate by ' +
|
|
36
|
-
're-calling with cursor set to the returned pagination.next (empty when ' +
|
|
37
|
-
'exhausted). No tenant field is accepted.',
|
|
38
|
-
inputSchema: unmatchedReportInputShape,
|
|
39
|
-
}, async (args, extra) => {
|
|
40
|
-
const query = buildReportPaginatedQuery(args);
|
|
41
|
-
return dispatchReport({
|
|
42
|
-
method: 'GET',
|
|
43
|
-
path: contextReportPath(args.contextId, 'unmatched'),
|
|
44
|
-
...(query !== undefined ? { query } : {}),
|
|
45
|
-
}, extra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=unmatched.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unmatched.js","sourceRoot":"","sources":["../../../src/tools/report/unmatched.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,EAAE;AACF,8EAA8E;AAC9E,iFAAiF;AACjF,wEAAwE;AACxE,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AAEpB,yFAAyF;AACzF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,uEAAuE;QACrE,iDAAiD,CACpD;IACH,GAAG,sBAAsB;IACzB,GAAG,0BAA0B;CAC9B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAiB;IAC3D,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,WAAW,EACT,iEAAiE;YACjE,qEAAqE;YACrE,oEAAoE;YACpE,wEAAwE;YACxE,sEAAsE;YACtE,sEAAsE;YACtE,uEAAuE;YACvE,yEAAyE;YACzE,0CAA0C;QAC5C,WAAW,EAAE,yBAAyB;KACvC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAA;QAC7C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;YACpD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// `report_variance` — curated GET /v1/reports/contexts/{contextId}/variance.
|
|
2
|
-
//
|
|
3
|
-
// Cursor-paginated variance report rows for a context within a date window.
|
|
4
|
-
// date_from/date_to/source_id filter and cursor/limit/sort_order page; matcher's
|
|
5
|
-
// { items, pagination: { next, prev } } envelope is returned as-is — no
|
|
6
|
-
// auto-pagination (the model re-calls with the returned cursor). The report is
|
|
7
|
-
// implicitly
|
|
8
|
-
// tenant-scoped by the relayed token; contextId is a routing path param, not a
|
|
9
|
-
// tenant field, and no tenant field is accepted.
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { buildReportPaginatedQuery, contextReportPath, dispatchReport, reportFilterInputShape, reportPaginationInputShape, } from './shared.js';
|
|
12
|
-
/** Zod raw shape for `report_variance` input — contextId path + filter + pagination. */
|
|
13
|
-
export const varianceReportInputShape = {
|
|
14
|
-
contextId: z
|
|
15
|
-
.string()
|
|
16
|
-
.min(1)
|
|
17
|
-
.describe('The reconciliation context id (UUID) whose variance rows to report. ' +
|
|
18
|
-
'Routing path param, not a tenant field.'),
|
|
19
|
-
...reportFilterInputShape,
|
|
20
|
-
...reportPaginationInputShape,
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Register `report_variance`. Passes the date filter + pagination through and
|
|
24
|
-
* returns matcher's pagination envelope verbatim; a matcher error surfaces via
|
|
25
|
-
* the shared toToolError.
|
|
26
|
-
*/
|
|
27
|
-
export function registerReportVarianceTool(server) {
|
|
28
|
-
server.registerTool('report_variance', {
|
|
29
|
-
description: 'List variance report rows for a context within a date window ' +
|
|
30
|
-
'(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
|
|
31
|
-
'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
|
|
32
|
-
'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
|
|
33
|
-
'older rows — pass an explicit range for a full picture), source_id, ' +
|
|
34
|
-
'limit (1–200), sort_order (asc|desc), and/or cursor. The response ' +
|
|
35
|
-
'carries { items, pagination: { next, prev } } — paginate by re-calling ' +
|
|
36
|
-
'with cursor set to the returned pagination.next (empty when exhausted). ' +
|
|
37
|
-
'No tenant field is accepted.',
|
|
38
|
-
inputSchema: varianceReportInputShape,
|
|
39
|
-
}, async (args, extra) => {
|
|
40
|
-
const query = buildReportPaginatedQuery(args);
|
|
41
|
-
return dispatchReport({
|
|
42
|
-
method: 'GET',
|
|
43
|
-
path: contextReportPath(args.contextId, 'variance'),
|
|
44
|
-
...(query !== undefined ? { query } : {}),
|
|
45
|
-
}, extra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=variance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variance.js","sourceRoot":"","sources":["../../../src/tools/report/variance.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,wEAAwE;AACxE,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAC/E,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AAEpB,wFAAwF;AACxF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,sEAAsE;QACpE,yCAAyC,CAC5C;IACH,GAAG,sBAAsB;IACzB,GAAG,0BAA0B;CAC9B,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAiB;IAC1D,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,WAAW,EACT,+DAA+D;YAC/D,qEAAqE;YACrE,oEAAoE;YACpE,wEAAwE;YACxE,sEAAsE;YACtE,oEAAoE;YACpE,yEAAyE;YACzE,0EAA0E;YAC1E,8BAA8B;QAChC,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAA;QAC7C,OAAO,cAAc,CACnB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;YACnD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|