@dizzlkheinz/ynab-mcpb 0.18.4 → 0.19.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/CLAUDE.md +87 -8
- package/bin/ynab-mcp-server.cjs +2 -2
- package/bin/ynab-mcp-server.js +3 -3
- package/biome.json +39 -0
- package/dist/bundle/index.cjs +67 -67
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -27
- package/dist/server/YNABMCPServer.d.ts +3 -4
- package/dist/server/YNABMCPServer.js +111 -116
- package/dist/server/budgetResolver.d.ts +6 -5
- package/dist/server/budgetResolver.js +46 -36
- package/dist/server/cacheKeys.js +6 -6
- package/dist/server/cacheManager.js +14 -11
- package/dist/server/completions.d.ts +2 -2
- package/dist/server/completions.js +20 -15
- package/dist/server/config.d.ts +10 -5
- package/dist/server/config.js +24 -7
- package/dist/server/deltaCache.d.ts +2 -2
- package/dist/server/deltaCache.js +22 -16
- package/dist/server/deltaCache.merge.d.ts +2 -2
- package/dist/server/diagnostics.d.ts +4 -4
- package/dist/server/diagnostics.js +38 -32
- package/dist/server/errorHandler.d.ts +5 -12
- package/dist/server/errorHandler.js +219 -217
- package/dist/server/prompts.d.ts +2 -2
- package/dist/server/prompts.js +45 -45
- package/dist/server/rateLimiter.js +4 -4
- package/dist/server/requestLogger.d.ts +1 -1
- package/dist/server/requestLogger.js +40 -35
- package/dist/server/resources.d.ts +3 -3
- package/dist/server/resources.js +55 -52
- package/dist/server/responseFormatter.js +6 -6
- package/dist/server/securityMiddleware.d.ts +2 -2
- package/dist/server/securityMiddleware.js +22 -20
- package/dist/server/serverKnowledgeStore.js +1 -1
- package/dist/server/toolRegistry.d.ts +3 -3
- package/dist/server/toolRegistry.js +47 -40
- package/dist/tools/__tests__/deltaTestUtils.d.ts +3 -3
- package/dist/tools/__tests__/deltaTestUtils.js +2 -2
- package/dist/tools/accountTools.d.ts +9 -8
- package/dist/tools/accountTools.js +47 -47
- package/dist/tools/adapters.d.ts +13 -8
- package/dist/tools/adapters.js +21 -11
- package/dist/tools/budgetTools.d.ts +8 -7
- package/dist/tools/budgetTools.js +22 -22
- package/dist/tools/categoryTools.d.ts +9 -8
- package/dist/tools/categoryTools.js +68 -59
- package/dist/tools/compareTransactions/formatter.d.ts +3 -3
- package/dist/tools/compareTransactions/formatter.js +9 -9
- package/dist/tools/compareTransactions/index.d.ts +6 -6
- package/dist/tools/compareTransactions/index.js +58 -43
- package/dist/tools/compareTransactions/matcher.d.ts +1 -1
- package/dist/tools/compareTransactions/matcher.js +28 -15
- package/dist/tools/compareTransactions/parser.d.ts +2 -2
- package/dist/tools/compareTransactions/parser.js +144 -138
- package/dist/tools/compareTransactions/types.d.ts +4 -4
- package/dist/tools/compareTransactions.d.ts +1 -1
- package/dist/tools/compareTransactions.js +1 -1
- package/dist/tools/deltaFetcher.d.ts +2 -2
- package/dist/tools/deltaFetcher.js +16 -15
- package/dist/tools/deltaSupport.d.ts +4 -4
- package/dist/tools/deltaSupport.js +35 -41
- package/dist/tools/exportTransactions.d.ts +5 -4
- package/dist/tools/exportTransactions.js +61 -59
- package/dist/tools/monthTools.d.ts +7 -6
- package/dist/tools/monthTools.js +31 -29
- package/dist/tools/payeeTools.d.ts +7 -6
- package/dist/tools/payeeTools.js +28 -28
- package/dist/tools/reconcileAdapter.d.ts +2 -2
- package/dist/tools/reconcileAdapter.js +19 -12
- package/dist/tools/reconciliation/analyzer.d.ts +4 -4
- package/dist/tools/reconciliation/analyzer.js +73 -59
- package/dist/tools/reconciliation/csvParser.d.ts +3 -3
- package/dist/tools/reconciliation/csvParser.js +128 -104
- package/dist/tools/reconciliation/executor.d.ts +4 -4
- package/dist/tools/reconciliation/executor.js +148 -109
- package/dist/tools/reconciliation/index.d.ts +10 -10
- package/dist/tools/reconciliation/index.js +96 -83
- package/dist/tools/reconciliation/matcher.d.ts +3 -3
- package/dist/tools/reconciliation/matcher.js +17 -16
- package/dist/tools/reconciliation/payeeNormalizer.js +19 -8
- package/dist/tools/reconciliation/recommendationEngine.d.ts +1 -1
- package/dist/tools/reconciliation/recommendationEngine.js +40 -40
- package/dist/tools/reconciliation/reportFormatter.d.ts +2 -2
- package/dist/tools/reconciliation/reportFormatter.js +59 -58
- package/dist/tools/reconciliation/signDetector.d.ts +1 -1
- package/dist/tools/reconciliation/types.d.ts +16 -16
- package/dist/tools/reconciliation/ynabAdapter.d.ts +2 -2
- package/dist/tools/schemas/common.d.ts +1 -1
- package/dist/tools/schemas/common.js +1 -1
- package/dist/tools/schemas/outputs/accountOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/accountOutputs.js +24 -18
- package/dist/tools/schemas/outputs/budgetOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/budgetOutputs.js +14 -11
- package/dist/tools/schemas/outputs/categoryOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/categoryOutputs.js +49 -29
- package/dist/tools/schemas/outputs/comparisonOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/comparisonOutputs.js +12 -12
- package/dist/tools/schemas/outputs/index.d.ts +14 -14
- package/dist/tools/schemas/outputs/index.js +14 -14
- package/dist/tools/schemas/outputs/monthOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/monthOutputs.js +56 -41
- package/dist/tools/schemas/outputs/payeeOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/payeeOutputs.js +10 -10
- package/dist/tools/schemas/outputs/reconciliationOutputs.d.ts +2 -2
- package/dist/tools/schemas/outputs/reconciliationOutputs.js +45 -45
- package/dist/tools/schemas/outputs/transactionMutationOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/transactionMutationOutputs.js +28 -22
- package/dist/tools/schemas/outputs/transactionOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/transactionOutputs.js +43 -35
- package/dist/tools/schemas/outputs/utilityOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/utilityOutputs.js +5 -3
- package/dist/tools/schemas/shared/commonOutputs.d.ts +1 -1
- package/dist/tools/schemas/shared/commonOutputs.js +15 -9
- package/dist/tools/transactionReadTools.d.ts +11 -0
- package/dist/tools/transactionReadTools.js +202 -0
- package/dist/tools/transactionSchemas.d.ts +7 -7
- package/dist/tools/transactionSchemas.js +77 -57
- package/dist/tools/transactionTools.d.ts +6 -24
- package/dist/tools/transactionTools.js +7 -1499
- package/dist/tools/transactionUtils.d.ts +6 -6
- package/dist/tools/transactionUtils.js +78 -63
- package/dist/tools/transactionWriteTools.d.ts +20 -0
- package/dist/tools/transactionWriteTools.js +1342 -0
- package/dist/tools/utilityTools.d.ts +5 -4
- package/dist/tools/utilityTools.js +11 -11
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +6 -6
- package/dist/types/reconciliation.d.ts +1 -1
- package/dist/types/toolRegistration.d.ts +14 -12
- package/dist/utils/amountUtils.js +1 -1
- package/dist/utils/dateUtils.js +4 -4
- package/dist/utils/errors.d.ts +3 -3
- package/dist/utils/errors.js +4 -4
- package/dist/utils/money.d.ts +2 -2
- package/dist/utils/money.js +8 -8
- package/dist/utils/validationError.d.ts +1 -1
- package/dist/utils/validationError.js +1 -1
- package/docs/assets/examples/reconciliation-with-recommendations.json +66 -66
- package/docs/assets/schemas/reconciliation-v2.json +360 -336
- package/esbuild.config.mjs +53 -50
- package/meta.json +12548 -12548
- package/package.json +98 -111
- package/scripts/analyze-bundle.mjs +33 -30
- package/scripts/create-pr-description.js +169 -120
- package/scripts/run-all-tests.js +178 -169
- package/scripts/run-domain-integration-tests.js +28 -18
- package/scripts/run-generate-mcpb.js +19 -17
- package/scripts/run-throttled-integration-tests.js +92 -83
- package/scripts/test-delta-params.mjs +149 -120
- package/scripts/test-recommendations.ts +36 -32
- package/scripts/tmpTransaction.ts +80 -43
- package/scripts/validate-env.js +98 -91
- package/scripts/verify-build.js +78 -76
- package/src/__tests__/comprehensive.integration.test.ts +1281 -1154
- package/src/__tests__/performance.test.ts +723 -671
- package/src/__tests__/setup.ts +442 -395
- package/src/__tests__/smoke.e2e.test.ts +41 -39
- package/src/__tests__/testRunner.ts +314 -295
- package/src/__tests__/testUtils.ts +456 -364
- package/src/__tests__/tools/reconciliation/csvParser.integration.test.ts +109 -107
- package/src/__tests__/tools/reconciliation/real-world.integration.test.ts +41 -41
- package/src/index.ts +68 -59
- package/src/server/CLAUDE.md +480 -0
- package/src/server/YNABMCPServer.ts +821 -794
- package/src/server/__tests__/YNABMCPServer.integration.test.ts +929 -893
- package/src/server/__tests__/YNABMCPServer.test.ts +903 -899
- package/src/server/__tests__/budgetResolver.test.ts +466 -423
- package/src/server/__tests__/cacheManager.test.ts +891 -874
- package/src/server/__tests__/completions.integration.test.ts +115 -106
- package/src/server/__tests__/completions.test.ts +334 -313
- package/src/server/__tests__/config.test.ts +98 -86
- package/src/server/__tests__/deltaCache.merge.test.ts +774 -703
- package/src/server/__tests__/deltaCache.swr.test.ts +198 -153
- package/src/server/__tests__/deltaCache.test.ts +946 -759
- package/src/server/__tests__/diagnostics.test.ts +825 -792
- package/src/server/__tests__/errorHandler.integration.test.ts +512 -462
- package/src/server/__tests__/errorHandler.test.ts +402 -397
- package/src/server/__tests__/prompts.test.ts +424 -347
- package/src/server/__tests__/rateLimiter.test.ts +313 -309
- package/src/server/__tests__/requestLogger.test.ts +443 -403
- package/src/server/__tests__/resources.template.test.ts +196 -185
- package/src/server/__tests__/resources.test.ts +294 -288
- package/src/server/__tests__/security.integration.test.ts +487 -421
- package/src/server/__tests__/securityMiddleware.test.ts +519 -444
- package/src/server/__tests__/server-startup.integration.test.ts +509 -490
- package/src/server/__tests__/serverKnowledgeStore.test.ts +174 -173
- package/src/server/__tests__/toolRegistration.test.ts +239 -210
- package/src/server/__tests__/toolRegistry.test.ts +907 -845
- package/src/server/budgetResolver.ts +221 -181
- package/src/server/cacheKeys.ts +6 -6
- package/src/server/cacheManager.ts +498 -484
- package/src/server/completions.ts +267 -243
- package/src/server/config.ts +35 -14
- package/src/server/deltaCache.merge.ts +146 -128
- package/src/server/deltaCache.ts +352 -309
- package/src/server/diagnostics.ts +257 -242
- package/src/server/errorHandler.ts +747 -744
- package/src/server/prompts.ts +181 -176
- package/src/server/rateLimiter.ts +131 -129
- package/src/server/requestLogger.ts +350 -322
- package/src/server/resources.ts +442 -374
- package/src/server/responseFormatter.ts +41 -37
- package/src/server/securityMiddleware.ts +223 -205
- package/src/server/serverKnowledgeStore.ts +67 -67
- package/src/server/toolRegistry.ts +508 -474
- package/src/tools/CLAUDE.md +604 -0
- package/src/tools/__tests__/accountTools.delta.integration.test.ts +128 -111
- package/src/tools/__tests__/accountTools.integration.test.ts +129 -111
- package/src/tools/__tests__/accountTools.test.ts +685 -638
- package/src/tools/__tests__/adapters.test.ts +142 -108
- package/src/tools/__tests__/budgetTools.delta.integration.test.ts +73 -73
- package/src/tools/__tests__/budgetTools.integration.test.ts +132 -124
- package/src/tools/__tests__/budgetTools.test.ts +442 -413
- package/src/tools/__tests__/categoryTools.delta.integration.test.ts +76 -68
- package/src/tools/__tests__/categoryTools.integration.test.ts +314 -288
- package/src/tools/__tests__/categoryTools.test.ts +656 -625
- package/src/tools/__tests__/compareTransactions/formatter.test.ts +535 -462
- package/src/tools/__tests__/compareTransactions/index.test.ts +378 -358
- package/src/tools/__tests__/compareTransactions/matcher.test.ts +497 -398
- package/src/tools/__tests__/compareTransactions/parser.test.ts +765 -747
- package/src/tools/__tests__/compareTransactions.test.ts +352 -332
- package/src/tools/__tests__/compareTransactions.window.test.ts +150 -146
- package/src/tools/__tests__/deltaFetcher.scheduled.integration.test.ts +69 -65
- package/src/tools/__tests__/deltaFetcher.test.ts +325 -265
- package/src/tools/__tests__/deltaSupport.test.ts +211 -184
- package/src/tools/__tests__/deltaTestUtils.ts +37 -33
- package/src/tools/__tests__/exportTransactions.test.ts +205 -200
- package/src/tools/__tests__/monthTools.delta.integration.test.ts +68 -68
- package/src/tools/__tests__/monthTools.integration.test.ts +178 -166
- package/src/tools/__tests__/monthTools.test.ts +561 -512
- package/src/tools/__tests__/payeeTools.delta.integration.test.ts +68 -68
- package/src/tools/__tests__/payeeTools.integration.test.ts +158 -142
- package/src/tools/__tests__/payeeTools.test.ts +486 -434
- package/src/tools/__tests__/transactionSchemas.test.ts +1202 -1186
- package/src/tools/__tests__/transactionTools.integration.test.ts +875 -825
- package/src/tools/__tests__/transactionTools.test.ts +4923 -4366
- package/src/tools/__tests__/transactionUtils.test.ts +1004 -977
- package/src/tools/__tests__/utilityTools.integration.test.ts +32 -32
- package/src/tools/__tests__/utilityTools.test.ts +68 -58
- package/src/tools/accountTools.ts +293 -271
- package/src/tools/adapters.ts +120 -63
- package/src/tools/budgetTools.ts +121 -116
- package/src/tools/categoryTools.ts +379 -339
- package/src/tools/compareTransactions/formatter.ts +131 -119
- package/src/tools/compareTransactions/index.ts +249 -214
- package/src/tools/compareTransactions/matcher.ts +259 -209
- package/src/tools/compareTransactions/parser.ts +517 -487
- package/src/tools/compareTransactions/types.ts +38 -38
- package/src/tools/compareTransactions.ts +1 -1
- package/src/tools/deltaFetcher.ts +281 -260
- package/src/tools/deltaSupport.ts +264 -259
- package/src/tools/exportTransactions.ts +230 -218
- package/src/tools/monthTools.ts +180 -165
- package/src/tools/payeeTools.ts +152 -140
- package/src/tools/reconcileAdapter.ts +297 -252
- package/src/tools/reconciliation/CLAUDE.md +506 -0
- package/src/tools/reconciliation/__tests__/adapter.causes.test.ts +133 -124
- package/src/tools/reconciliation/__tests__/adapter.test.ts +249 -230
- package/src/tools/reconciliation/__tests__/analyzer.test.ts +408 -400
- package/src/tools/reconciliation/__tests__/csvParser.test.ts +71 -69
- package/src/tools/reconciliation/__tests__/executor.integration.test.ts +348 -323
- package/src/tools/reconciliation/__tests__/executor.progress.test.ts +503 -457
- package/src/tools/reconciliation/__tests__/executor.test.ts +898 -831
- package/src/tools/reconciliation/__tests__/matcher.test.ts +667 -663
- package/src/tools/reconciliation/__tests__/payeeNormalizer.test.ts +296 -276
- package/src/tools/reconciliation/__tests__/recommendationEngine.integration.test.ts +692 -624
- package/src/tools/reconciliation/__tests__/recommendationEngine.test.ts +1008 -989
- package/src/tools/reconciliation/__tests__/reconciliation.delta.integration.test.ts +187 -146
- package/src/tools/reconciliation/__tests__/reportFormatter.test.ts +583 -533
- package/src/tools/reconciliation/__tests__/scenarios/adapterCurrency.scenario.test.ts +75 -74
- package/src/tools/reconciliation/__tests__/scenarios/extremes.scenario.test.ts +70 -62
- package/src/tools/reconciliation/__tests__/scenarios/repeatAmount.scenario.test.ts +102 -88
- package/src/tools/reconciliation/__tests__/schemaUrl.test.ts +56 -55
- package/src/tools/reconciliation/__tests__/signDetector.test.ts +209 -206
- package/src/tools/reconciliation/__tests__/ynabAdapter.test.ts +66 -60
- package/src/tools/reconciliation/analyzer.ts +564 -504
- package/src/tools/reconciliation/csvParser.ts +656 -609
- package/src/tools/reconciliation/executor.ts +1290 -1128
- package/src/tools/reconciliation/index.ts +580 -528
- package/src/tools/reconciliation/matcher.ts +256 -240
- package/src/tools/reconciliation/payeeNormalizer.ts +92 -78
- package/src/tools/reconciliation/recommendationEngine.ts +357 -345
- package/src/tools/reconciliation/reportFormatter.ts +343 -307
- package/src/tools/reconciliation/signDetector.ts +89 -83
- package/src/tools/reconciliation/types.ts +164 -159
- package/src/tools/reconciliation/ynabAdapter.ts +17 -15
- package/src/tools/schemas/CLAUDE.md +546 -0
- package/src/tools/schemas/common.ts +1 -1
- package/src/tools/schemas/outputs/__tests__/accountOutputs.test.ts +410 -409
- package/src/tools/schemas/outputs/__tests__/budgetOutputs.test.ts +305 -299
- package/src/tools/schemas/outputs/__tests__/categoryOutputs.test.ts +431 -430
- package/src/tools/schemas/outputs/__tests__/comparisonOutputs.test.ts +510 -495
- package/src/tools/schemas/outputs/__tests__/dateValidation.test.ts +179 -153
- package/src/tools/schemas/outputs/__tests__/discrepancyDirection.test.ts +293 -254
- package/src/tools/schemas/outputs/__tests__/monthOutputs.test.ts +457 -457
- package/src/tools/schemas/outputs/__tests__/payeeOutputs.test.ts +362 -356
- package/src/tools/schemas/outputs/__tests__/reconciliationOutputs.test.ts +402 -399
- package/src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts +225 -211
- package/src/tools/schemas/outputs/__tests__/transactionOutputs.test.ts +457 -454
- package/src/tools/schemas/outputs/__tests__/utilityOutputs.test.ts +316 -315
- package/src/tools/schemas/outputs/accountOutputs.ts +40 -34
- package/src/tools/schemas/outputs/budgetOutputs.ts +24 -19
- package/src/tools/schemas/outputs/categoryOutputs.ts +76 -56
- package/src/tools/schemas/outputs/comparisonOutputs.ts +192 -169
- package/src/tools/schemas/outputs/index.ts +163 -163
- package/src/tools/schemas/outputs/monthOutputs.ts +95 -80
- package/src/tools/schemas/outputs/payeeOutputs.ts +18 -18
- package/src/tools/schemas/outputs/reconciliationOutputs.ts +386 -373
- package/src/tools/schemas/outputs/transactionMutationOutputs.ts +259 -231
- package/src/tools/schemas/outputs/transactionOutputs.ts +81 -71
- package/src/tools/schemas/outputs/utilityOutputs.ts +90 -84
- package/src/tools/schemas/shared/commonOutputs.ts +27 -19
- package/src/tools/toolCategories.ts +114 -114
- package/src/tools/transactionReadTools.ts +327 -0
- package/src/tools/transactionSchemas.ts +322 -291
- package/src/tools/transactionTools.ts +84 -2246
- package/src/tools/transactionUtils.ts +507 -422
- package/src/tools/transactionWriteTools.ts +2110 -0
- package/src/tools/utilityTools.ts +46 -41
- package/src/types/CLAUDE.md +477 -0
- package/src/types/__tests__/index.test.ts +51 -51
- package/src/types/index.ts +43 -39
- package/src/types/integration-tests.d.ts +26 -26
- package/src/types/reconciliation.ts +29 -29
- package/src/types/toolAnnotations.ts +30 -30
- package/src/types/toolRegistration.ts +43 -32
- package/src/utils/CLAUDE.md +508 -0
- package/src/utils/__tests__/dateUtils.test.ts +174 -168
- package/src/utils/__tests__/money.test.ts +193 -187
- package/src/utils/amountUtils.ts +5 -5
- package/src/utils/baseError.ts +5 -5
- package/src/utils/dateUtils.ts +29 -26
- package/src/utils/errors.ts +14 -14
- package/src/utils/money.ts +66 -52
- package/src/utils/validationError.ts +1 -1
- package/tsconfig.json +29 -29
- package/tsconfig.prod.json +16 -16
- package/vitest-reporters/split-json-reporter.ts +247 -204
- package/vitest.config.ts +99 -95
- package/.prettierignore +0 -10
- package/.prettierrc.json +0 -10
- package/eslint.config.js +0 -49
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { CacheMetadataSchema } from
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { CacheMetadataSchema } from "../shared/commonOutputs.js";
|
|
3
3
|
export const AccountSchema = z.object({
|
|
4
|
-
id: z.string().describe(
|
|
5
|
-
name: z.string().describe(
|
|
6
|
-
type: z.string().describe(
|
|
7
|
-
on_budget: z.boolean().describe(
|
|
8
|
-
closed: z.boolean().describe(
|
|
9
|
-
note: z.string().optional().describe(
|
|
10
|
-
balance: z.number().describe(
|
|
11
|
-
cleared_balance: z.number().describe(
|
|
12
|
-
uncleared_balance: z.number().describe(
|
|
13
|
-
transfer_payee_id: z.string().describe(
|
|
14
|
-
direct_import_linked: z
|
|
15
|
-
|
|
4
|
+
id: z.string().describe("Account ID"),
|
|
5
|
+
name: z.string().describe("Account name"),
|
|
6
|
+
type: z.string().describe("Account type"),
|
|
7
|
+
on_budget: z.boolean().describe("On-budget flag"),
|
|
8
|
+
closed: z.boolean().describe("Closed flag"),
|
|
9
|
+
note: z.string().optional().describe("Account note"),
|
|
10
|
+
balance: z.number().describe("Account balance in dollars"),
|
|
11
|
+
cleared_balance: z.number().describe("Cleared balance in dollars"),
|
|
12
|
+
uncleared_balance: z.number().describe("Uncleared balance in dollars"),
|
|
13
|
+
transfer_payee_id: z.string().describe("Transfer payee ID"),
|
|
14
|
+
direct_import_linked: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Direct import linked flag"),
|
|
18
|
+
direct_import_in_error: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Direct import error flag"),
|
|
16
22
|
});
|
|
17
23
|
export const ListAccountsOutputSchema = CacheMetadataSchema.extend({
|
|
18
|
-
accounts: z.array(AccountSchema).describe(
|
|
19
|
-
total_count: z.number().int().describe(
|
|
20
|
-
returned_count: z.number().int().describe(
|
|
24
|
+
accounts: z.array(AccountSchema).describe("List of accounts"),
|
|
25
|
+
total_count: z.number().int().describe("Total account count"),
|
|
26
|
+
returned_count: z.number().int().describe("Returned account count"),
|
|
21
27
|
});
|
|
22
28
|
export const GetAccountOutputSchema = CacheMetadataSchema.extend({
|
|
23
|
-
account: AccountSchema.describe(
|
|
29
|
+
account: AccountSchema.describe("Account details"),
|
|
24
30
|
});
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { CacheMetadataSchema } from
|
|
3
|
-
import {
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { CacheMetadataSchema } from "../shared/commonOutputs.js";
|
|
3
|
+
import { CurrencyFormatSchema, DateFormatSchema } from "./utilityOutputs.js";
|
|
4
4
|
export const BudgetSummarySchema = z.object({
|
|
5
|
-
id: z.string().describe(
|
|
6
|
-
name: z.string().describe(
|
|
7
|
-
last_modified_on: z
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
id: z.string().describe("Budget ID"),
|
|
6
|
+
name: z.string().describe("Budget name"),
|
|
7
|
+
last_modified_on: z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("Last modification timestamp"),
|
|
11
|
+
first_month: z.string().optional().describe("First month in budget"),
|
|
12
|
+
last_month: z.string().optional().describe("Last month in budget"),
|
|
13
|
+
date_format: DateFormatSchema.optional().describe("Date format settings"),
|
|
14
|
+
currency_format: CurrencyFormatSchema.optional().describe("Currency format settings"),
|
|
12
15
|
});
|
|
13
16
|
export const ListBudgetsOutputSchema = CacheMetadataSchema.extend({
|
|
14
|
-
budgets: z.array(BudgetSummarySchema).describe(
|
|
17
|
+
budgets: z.array(BudgetSummarySchema).describe("List of budgets"),
|
|
15
18
|
});
|
|
@@ -1,37 +1,57 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { CacheMetadataSchema } from
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { CacheMetadataSchema } from "../shared/commonOutputs.js";
|
|
3
3
|
export const CategorySchema = z.object({
|
|
4
|
-
id: z.string().describe(
|
|
5
|
-
category_group_id: z.string().describe(
|
|
6
|
-
category_group_name: z.string().optional().describe(
|
|
7
|
-
name: z.string().describe(
|
|
8
|
-
hidden: z.boolean().describe(
|
|
9
|
-
original_category_group_id: z
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
id: z.string().describe("Category ID"),
|
|
5
|
+
category_group_id: z.string().describe("Category group ID"),
|
|
6
|
+
category_group_name: z.string().optional().describe("Category group name"),
|
|
7
|
+
name: z.string().describe("Category name"),
|
|
8
|
+
hidden: z.boolean().describe("Hidden flag"),
|
|
9
|
+
original_category_group_id: z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("Original category group ID"),
|
|
13
|
+
note: z.string().optional().describe("Category note"),
|
|
14
|
+
budgeted: z.number().describe("Budgeted amount in dollars"),
|
|
15
|
+
activity: z.number().describe("Activity in dollars"),
|
|
16
|
+
balance: z.number().describe("Balance in dollars"),
|
|
17
|
+
goal_type: z.string().optional().describe("Goal type"),
|
|
18
|
+
goal_creation_month: z.string().optional().describe("Goal creation month"),
|
|
19
|
+
goal_target: z.number().optional().describe("Goal target amount in dollars"),
|
|
20
|
+
goal_target_month: z.string().optional().describe("Goal target month"),
|
|
21
|
+
goal_percentage_complete: z
|
|
22
|
+
.number()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Goal percentage complete"),
|
|
25
|
+
goal_months_to_budget: z
|
|
26
|
+
.number()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe("Goal months to budget"),
|
|
29
|
+
goal_under_funded: z
|
|
30
|
+
.number()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("Goal underfunded amount in dollars"),
|
|
33
|
+
goal_overall_funded: z
|
|
34
|
+
.number()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("Goal overall funded amount in dollars"),
|
|
37
|
+
goal_overall_left: z
|
|
38
|
+
.number()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Goal overall left amount in dollars"),
|
|
41
|
+
deleted: z.boolean().optional().describe("Deleted flag"),
|
|
24
42
|
});
|
|
25
43
|
export const CategoryGroupSchema = z.object({
|
|
26
|
-
id: z.string().describe(
|
|
27
|
-
name: z.string().describe(
|
|
28
|
-
hidden: z.boolean().describe(
|
|
29
|
-
deleted: z.boolean().describe(
|
|
44
|
+
id: z.string().describe("Category group ID"),
|
|
45
|
+
name: z.string().describe("Category group name"),
|
|
46
|
+
hidden: z.boolean().describe("Hidden flag"),
|
|
47
|
+
deleted: z.boolean().describe("Deleted flag"),
|
|
30
48
|
});
|
|
31
49
|
export const ListCategoriesOutputSchema = CacheMetadataSchema.extend({
|
|
32
|
-
categories: z.array(CategorySchema).describe(
|
|
33
|
-
category_groups: z
|
|
50
|
+
categories: z.array(CategorySchema).describe("List of categories"),
|
|
51
|
+
category_groups: z
|
|
52
|
+
.array(CategoryGroupSchema)
|
|
53
|
+
.describe("List of category groups"),
|
|
34
54
|
});
|
|
35
55
|
export const GetCategoryOutputSchema = CacheMetadataSchema.extend({
|
|
36
|
-
category: CategorySchema.describe(
|
|
56
|
+
category: CategorySchema.describe("Category details"),
|
|
37
57
|
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
function isValidISODate(dateStr) {
|
|
3
3
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
6
|
const parsed = Date.parse(dateStr);
|
|
7
|
-
if (isNaN(parsed)) {
|
|
7
|
+
if (Number.isNaN(parsed)) {
|
|
8
8
|
return false;
|
|
9
9
|
}
|
|
10
10
|
const date = new Date(parsed);
|
|
11
11
|
const year = date.getUTCFullYear();
|
|
12
|
-
const month = String(date.getUTCMonth() + 1).padStart(2,
|
|
13
|
-
const day = String(date.getUTCDate()).padStart(2,
|
|
12
|
+
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
|
|
13
|
+
const day = String(date.getUTCDate()).padStart(2, "0");
|
|
14
14
|
const reconstructed = `${year}-${month}-${day}`;
|
|
15
15
|
return reconstructed === dateStr;
|
|
16
16
|
}
|
|
17
17
|
export const ISODateStringSchema = z
|
|
18
18
|
.string()
|
|
19
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/,
|
|
19
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be in YYYY-MM-DD format")
|
|
20
20
|
.refine(isValidISODate, {
|
|
21
|
-
message:
|
|
21
|
+
message: "Invalid calendar date (e.g., month must be 01-12, day must be valid for the month)",
|
|
22
22
|
});
|
|
23
23
|
export const MissingInYNABItemSchema = z.object({
|
|
24
24
|
date: ISODateStringSchema,
|
|
25
25
|
amount: z
|
|
26
26
|
.string()
|
|
27
|
-
.regex(/^-?\d+\.\d{2}$/,
|
|
27
|
+
.regex(/^-?\d+\.\d{2}$/, "Amount must be a decimal string with exactly 2 decimal places"),
|
|
28
28
|
description: z.string(),
|
|
29
29
|
row_number: z.number(),
|
|
30
30
|
suggested_payee_id: z.string().optional(),
|
|
@@ -36,7 +36,7 @@ export const MissingInBankItemSchema = z.object({
|
|
|
36
36
|
date: ISODateStringSchema,
|
|
37
37
|
amount: z
|
|
38
38
|
.string()
|
|
39
|
-
.regex(/^-?\d+\.\d{2}$/,
|
|
39
|
+
.regex(/^-?\d+\.\d{2}$/, "Amount must be a decimal string with exactly 2 decimal places"),
|
|
40
40
|
payee_name: z.string().nullable(),
|
|
41
41
|
memo: z.string().nullable(),
|
|
42
42
|
cleared: z.string(),
|
|
@@ -45,12 +45,12 @@ export const MatchItemSchema = z.object({
|
|
|
45
45
|
bank_date: ISODateStringSchema,
|
|
46
46
|
bank_amount: z
|
|
47
47
|
.string()
|
|
48
|
-
.regex(/^-?\d+\.\d{2}$/,
|
|
48
|
+
.regex(/^-?\d+\.\d{2}$/, "Amount must be a decimal string with exactly 2 decimal places"),
|
|
49
49
|
bank_description: z.string(),
|
|
50
50
|
ynab_date: ISODateStringSchema,
|
|
51
51
|
ynab_amount: z
|
|
52
52
|
.string()
|
|
53
|
-
.regex(/^-?\d+\.\d{2}$/,
|
|
53
|
+
.regex(/^-?\d+\.\d{2}$/, "Amount must be a decimal string with exactly 2 decimal places"),
|
|
54
54
|
ynab_payee: z.string().nullable(),
|
|
55
55
|
ynab_transaction: z.object({
|
|
56
56
|
id: z.string(),
|
|
@@ -97,7 +97,7 @@ export const DateRangeSchema = z
|
|
|
97
97
|
const endDate = Date.parse(data.end);
|
|
98
98
|
return startDate <= endDate;
|
|
99
99
|
}, {
|
|
100
|
-
message:
|
|
100
|
+
message: "Start date must be before or equal to end date",
|
|
101
101
|
});
|
|
102
102
|
export const ExportInfoSchema = z.object({
|
|
103
103
|
exported_at: z.string(),
|
|
@@ -165,7 +165,7 @@ export const ExportTransactionsOutputSchema = z.object({
|
|
|
165
165
|
filename: z.string(),
|
|
166
166
|
full_path: z.string(),
|
|
167
167
|
export_directory: z.string(),
|
|
168
|
-
export_mode: z.enum([
|
|
168
|
+
export_mode: z.enum(["minimal", "full"]),
|
|
169
169
|
minimal_fields: z.string().nullable(),
|
|
170
170
|
filename_explanation: z.string(),
|
|
171
171
|
preview_count: z.number(),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { GetUserOutputSchema, type GetUserOutput, GetDefaultBudgetOutputSchema, type GetDefaultBudgetOutput, SetDefaultBudgetOutputSchema, type SetDefaultBudgetOutput, ClearCacheOutputSchema, type ClearCacheOutput, SetOutputFormatOutputSchema, type SetOutputFormatOutput, DiagnosticInfoOutputSchema, type DiagnosticInfoOutput, GetBudgetOutputSchema, type GetBudgetOutput, } from
|
|
2
|
-
export { UserSchema, DateFormatSchema, CurrencyFormatSchema, BudgetDetailSchema, ServerInfoSchema, MemoryInfoSchema, EnvironmentInfoSchema, CacheInfoSchema, DeltaInfoSchema, } from
|
|
3
|
-
export { ListBudgetsOutputSchema, type ListBudgetsOutput, BudgetSummarySchema, type BudgetSummary, } from
|
|
4
|
-
export { ListAccountsOutputSchema, type ListAccountsOutput, GetAccountOutputSchema, type GetAccountOutput, AccountSchema, type Account, } from
|
|
5
|
-
export { ListTransactionsOutputSchema, type ListTransactionsOutput, GetTransactionOutputSchema, type GetTransactionOutput, TransactionSchema, type Transaction, TransactionPreviewSchema, type TransactionPreview, } from
|
|
6
|
-
export { ListCategoriesOutputSchema, type ListCategoriesOutput, GetCategoryOutputSchema, type GetCategoryOutput, CategorySchema, type Category, CategoryGroupSchema, type CategoryGroup, } from
|
|
7
|
-
export { ListPayeesOutputSchema, type ListPayeesOutput, GetPayeeOutputSchema, type GetPayeeOutput, PayeeSchema, type Payee, } from
|
|
8
|
-
export { GetMonthOutputSchema, type GetMonthOutput, ListMonthsOutputSchema, type ListMonthsOutput, MonthDetailSchema, type MonthDetail, MonthSummarySchema, type MonthSummary, MonthCategorySchema, type MonthCategory, } from
|
|
9
|
-
export { CreateTransactionOutputSchema, type CreateTransactionOutput, CreateTransactionsOutputSchema, type CreateTransactionsOutput, UpdateTransactionOutputSchema, type UpdateTransactionOutput, UpdateTransactionsOutputSchema, type UpdateTransactionsOutput, DeleteTransactionOutputSchema, type DeleteTransactionOutput, CreateReceiptSplitTransactionOutputSchema, type CreateReceiptSplitTransactionOutput, CreateAccountOutputSchema, type CreateAccountOutput, UpdateCategoryOutputSchema, type UpdateCategoryOutput, } from
|
|
10
|
-
export { SubtransactionSchema, type Subtransaction, SubtransactionPreviewSchema, type SubtransactionPreview, TransactionWithBalanceSchema, type TransactionWithBalance, TransactionDryRunPreviewSchema, type TransactionDryRunPreview, ReceiptItemSchema, type ReceiptItem, ReceiptCategoryBreakdownSchema, type ReceiptCategoryBreakdown, ReceiptSummarySchema, type ReceiptSummary, BulkOperationSummarySchema, type BulkOperationSummary, BulkResultSchema, type BulkResult, DryRunPreviewItemSchema, type DryRunPreviewItem, DryRunWarningSchema, type DryRunWarning, } from
|
|
11
|
-
export { ReconcileAccountOutputSchema, type ReconcileAccountOutput, } from
|
|
12
|
-
export { MoneyValueSchema, type MoneyValue, BankTransactionSchema, type BankTransaction, YNABTransactionSimpleSchema, type YNABTransactionSimple, MatchCandidateSchema, type MatchCandidate, TransactionMatchSchema, type TransactionMatch, BalanceInfoSchema, type BalanceInfo, ReconciliationSummarySchema, type ReconciliationSummary, ReconciliationInsightSchema, type ReconciliationInsight, ActionableRecommendationSchema, type ActionableRecommendation, ExecutionResultSchema, type ExecutionResult, AuditMetadataSchema, type AuditMetadata, } from
|
|
13
|
-
export { CompareTransactionsOutputSchema, type CompareTransactionsOutput, ExportTransactionsOutputSchema, type ExportTransactionsOutput, } from
|
|
14
|
-
export { BankTransactionComparisonSchema, type BankTransactionComparison, YNABTransactionComparisonSchema, type YNABTransactionComparison, TransactionMatchComparisonSchema, type TransactionMatchComparison, ComparisonParametersSchema, type ComparisonParameters, DateRangeSchema, type DateRange, ExportInfoSchema, type ExportInfo, ExportedTransactionSchema, type ExportedTransaction, } from
|
|
1
|
+
export { GetUserOutputSchema, type GetUserOutput, GetDefaultBudgetOutputSchema, type GetDefaultBudgetOutput, SetDefaultBudgetOutputSchema, type SetDefaultBudgetOutput, ClearCacheOutputSchema, type ClearCacheOutput, SetOutputFormatOutputSchema, type SetOutputFormatOutput, DiagnosticInfoOutputSchema, type DiagnosticInfoOutput, GetBudgetOutputSchema, type GetBudgetOutput, } from "./utilityOutputs.js";
|
|
2
|
+
export { UserSchema, DateFormatSchema, CurrencyFormatSchema, BudgetDetailSchema, ServerInfoSchema, MemoryInfoSchema, EnvironmentInfoSchema, CacheInfoSchema, DeltaInfoSchema, } from "./utilityOutputs.js";
|
|
3
|
+
export { ListBudgetsOutputSchema, type ListBudgetsOutput, BudgetSummarySchema, type BudgetSummary, } from "./budgetOutputs.js";
|
|
4
|
+
export { ListAccountsOutputSchema, type ListAccountsOutput, GetAccountOutputSchema, type GetAccountOutput, AccountSchema, type Account, } from "./accountOutputs.js";
|
|
5
|
+
export { ListTransactionsOutputSchema, type ListTransactionsOutput, GetTransactionOutputSchema, type GetTransactionOutput, TransactionSchema, type Transaction, TransactionPreviewSchema, type TransactionPreview, } from "./transactionOutputs.js";
|
|
6
|
+
export { ListCategoriesOutputSchema, type ListCategoriesOutput, GetCategoryOutputSchema, type GetCategoryOutput, CategorySchema, type Category, CategoryGroupSchema, type CategoryGroup, } from "./categoryOutputs.js";
|
|
7
|
+
export { ListPayeesOutputSchema, type ListPayeesOutput, GetPayeeOutputSchema, type GetPayeeOutput, PayeeSchema, type Payee, } from "./payeeOutputs.js";
|
|
8
|
+
export { GetMonthOutputSchema, type GetMonthOutput, ListMonthsOutputSchema, type ListMonthsOutput, MonthDetailSchema, type MonthDetail, MonthSummarySchema, type MonthSummary, MonthCategorySchema, type MonthCategory, } from "./monthOutputs.js";
|
|
9
|
+
export { CreateTransactionOutputSchema, type CreateTransactionOutput, CreateTransactionsOutputSchema, type CreateTransactionsOutput, UpdateTransactionOutputSchema, type UpdateTransactionOutput, UpdateTransactionsOutputSchema, type UpdateTransactionsOutput, DeleteTransactionOutputSchema, type DeleteTransactionOutput, CreateReceiptSplitTransactionOutputSchema, type CreateReceiptSplitTransactionOutput, CreateAccountOutputSchema, type CreateAccountOutput, UpdateCategoryOutputSchema, type UpdateCategoryOutput, } from "./transactionMutationOutputs.js";
|
|
10
|
+
export { SubtransactionSchema, type Subtransaction, SubtransactionPreviewSchema, type SubtransactionPreview, TransactionWithBalanceSchema, type TransactionWithBalance, TransactionDryRunPreviewSchema, type TransactionDryRunPreview, ReceiptItemSchema, type ReceiptItem, ReceiptCategoryBreakdownSchema, type ReceiptCategoryBreakdown, ReceiptSummarySchema, type ReceiptSummary, BulkOperationSummarySchema, type BulkOperationSummary, BulkResultSchema, type BulkResult, DryRunPreviewItemSchema, type DryRunPreviewItem, DryRunWarningSchema, type DryRunWarning, } from "./transactionMutationOutputs.js";
|
|
11
|
+
export { ReconcileAccountOutputSchema, type ReconcileAccountOutput, } from "./reconciliationOutputs.js";
|
|
12
|
+
export { MoneyValueSchema, type MoneyValue, BankTransactionSchema, type BankTransaction, YNABTransactionSimpleSchema, type YNABTransactionSimple, MatchCandidateSchema, type MatchCandidate, TransactionMatchSchema, type TransactionMatch, BalanceInfoSchema, type BalanceInfo, ReconciliationSummarySchema, type ReconciliationSummary, ReconciliationInsightSchema, type ReconciliationInsight, ActionableRecommendationSchema, type ActionableRecommendation, ExecutionResultSchema, type ExecutionResult, AuditMetadataSchema, type AuditMetadata, } from "./reconciliationOutputs.js";
|
|
13
|
+
export { CompareTransactionsOutputSchema, type CompareTransactionsOutput, ExportTransactionsOutputSchema, type ExportTransactionsOutput, } from "./comparisonOutputs.js";
|
|
14
|
+
export { BankTransactionComparisonSchema, type BankTransactionComparison, YNABTransactionComparisonSchema, type YNABTransactionComparison, TransactionMatchComparisonSchema, type TransactionMatchComparison, ComparisonParametersSchema, type ComparisonParameters, DateRangeSchema, type DateRange, ExportInfoSchema, type ExportInfo, ExportedTransactionSchema, type ExportedTransaction, } from "./comparisonOutputs.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { GetUserOutputSchema, GetDefaultBudgetOutputSchema, SetDefaultBudgetOutputSchema, ClearCacheOutputSchema, SetOutputFormatOutputSchema, DiagnosticInfoOutputSchema, GetBudgetOutputSchema, } from
|
|
2
|
-
export { UserSchema, DateFormatSchema, CurrencyFormatSchema, BudgetDetailSchema, ServerInfoSchema, MemoryInfoSchema, EnvironmentInfoSchema, CacheInfoSchema, DeltaInfoSchema, } from
|
|
3
|
-
export { ListBudgetsOutputSchema, BudgetSummarySchema, } from
|
|
4
|
-
export { ListAccountsOutputSchema, GetAccountOutputSchema, AccountSchema, } from
|
|
5
|
-
export { ListTransactionsOutputSchema, GetTransactionOutputSchema, TransactionSchema, TransactionPreviewSchema, } from
|
|
6
|
-
export { ListCategoriesOutputSchema, GetCategoryOutputSchema, CategorySchema, CategoryGroupSchema, } from
|
|
7
|
-
export { ListPayeesOutputSchema, GetPayeeOutputSchema, PayeeSchema, } from
|
|
8
|
-
export { GetMonthOutputSchema, ListMonthsOutputSchema, MonthDetailSchema, MonthSummarySchema, MonthCategorySchema, } from
|
|
9
|
-
export { CreateTransactionOutputSchema, CreateTransactionsOutputSchema, UpdateTransactionOutputSchema, UpdateTransactionsOutputSchema, DeleteTransactionOutputSchema, CreateReceiptSplitTransactionOutputSchema, CreateAccountOutputSchema, UpdateCategoryOutputSchema, } from
|
|
10
|
-
export { SubtransactionSchema, SubtransactionPreviewSchema, TransactionWithBalanceSchema, TransactionDryRunPreviewSchema, ReceiptItemSchema, ReceiptCategoryBreakdownSchema, ReceiptSummarySchema, BulkOperationSummarySchema, BulkResultSchema, DryRunPreviewItemSchema, DryRunWarningSchema, } from
|
|
11
|
-
export { ReconcileAccountOutputSchema, } from
|
|
12
|
-
export { MoneyValueSchema, BankTransactionSchema, YNABTransactionSimpleSchema, MatchCandidateSchema, TransactionMatchSchema, BalanceInfoSchema, ReconciliationSummarySchema, ReconciliationInsightSchema, ActionableRecommendationSchema, ExecutionResultSchema, AuditMetadataSchema, } from
|
|
13
|
-
export { CompareTransactionsOutputSchema, ExportTransactionsOutputSchema, } from
|
|
14
|
-
export { BankTransactionComparisonSchema, YNABTransactionComparisonSchema, TransactionMatchComparisonSchema, ComparisonParametersSchema, DateRangeSchema, ExportInfoSchema, ExportedTransactionSchema, } from
|
|
1
|
+
export { GetUserOutputSchema, GetDefaultBudgetOutputSchema, SetDefaultBudgetOutputSchema, ClearCacheOutputSchema, SetOutputFormatOutputSchema, DiagnosticInfoOutputSchema, GetBudgetOutputSchema, } from "./utilityOutputs.js";
|
|
2
|
+
export { UserSchema, DateFormatSchema, CurrencyFormatSchema, BudgetDetailSchema, ServerInfoSchema, MemoryInfoSchema, EnvironmentInfoSchema, CacheInfoSchema, DeltaInfoSchema, } from "./utilityOutputs.js";
|
|
3
|
+
export { ListBudgetsOutputSchema, BudgetSummarySchema, } from "./budgetOutputs.js";
|
|
4
|
+
export { ListAccountsOutputSchema, GetAccountOutputSchema, AccountSchema, } from "./accountOutputs.js";
|
|
5
|
+
export { ListTransactionsOutputSchema, GetTransactionOutputSchema, TransactionSchema, TransactionPreviewSchema, } from "./transactionOutputs.js";
|
|
6
|
+
export { ListCategoriesOutputSchema, GetCategoryOutputSchema, CategorySchema, CategoryGroupSchema, } from "./categoryOutputs.js";
|
|
7
|
+
export { ListPayeesOutputSchema, GetPayeeOutputSchema, PayeeSchema, } from "./payeeOutputs.js";
|
|
8
|
+
export { GetMonthOutputSchema, ListMonthsOutputSchema, MonthDetailSchema, MonthSummarySchema, MonthCategorySchema, } from "./monthOutputs.js";
|
|
9
|
+
export { CreateTransactionOutputSchema, CreateTransactionsOutputSchema, UpdateTransactionOutputSchema, UpdateTransactionsOutputSchema, DeleteTransactionOutputSchema, CreateReceiptSplitTransactionOutputSchema, CreateAccountOutputSchema, UpdateCategoryOutputSchema, } from "./transactionMutationOutputs.js";
|
|
10
|
+
export { SubtransactionSchema, SubtransactionPreviewSchema, TransactionWithBalanceSchema, TransactionDryRunPreviewSchema, ReceiptItemSchema, ReceiptCategoryBreakdownSchema, ReceiptSummarySchema, BulkOperationSummarySchema, BulkResultSchema, DryRunPreviewItemSchema, DryRunWarningSchema, } from "./transactionMutationOutputs.js";
|
|
11
|
+
export { ReconcileAccountOutputSchema, } from "./reconciliationOutputs.js";
|
|
12
|
+
export { MoneyValueSchema, BankTransactionSchema, YNABTransactionSimpleSchema, MatchCandidateSchema, TransactionMatchSchema, BalanceInfoSchema, ReconciliationSummarySchema, ReconciliationInsightSchema, ActionableRecommendationSchema, ExecutionResultSchema, AuditMetadataSchema, } from "./reconciliationOutputs.js";
|
|
13
|
+
export { CompareTransactionsOutputSchema, ExportTransactionsOutputSchema, } from "./comparisonOutputs.js";
|
|
14
|
+
export { BankTransactionComparisonSchema, YNABTransactionComparisonSchema, TransactionMatchComparisonSchema, ComparisonParametersSchema, DateRangeSchema, ExportInfoSchema, ExportedTransactionSchema, } from "./comparisonOutputs.js";
|
|
@@ -1,51 +1,66 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { CacheMetadataSchema } from
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { CacheMetadataSchema } from "../shared/commonOutputs.js";
|
|
3
3
|
export const MonthCategorySchema = z.object({
|
|
4
|
-
id: z.string().describe(
|
|
5
|
-
category_group_id: z.string().describe(
|
|
6
|
-
category_group_name: z.string().optional().describe(
|
|
7
|
-
name: z.string().describe(
|
|
8
|
-
hidden: z.boolean().describe(
|
|
9
|
-
original_category_group_id: z
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
id: z.string().describe("Category ID"),
|
|
5
|
+
category_group_id: z.string().describe("Category group ID"),
|
|
6
|
+
category_group_name: z.string().optional().describe("Category group name"),
|
|
7
|
+
name: z.string().describe("Category name"),
|
|
8
|
+
hidden: z.boolean().describe("Hidden flag"),
|
|
9
|
+
original_category_group_id: z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("Original category group ID"),
|
|
13
|
+
note: z.string().optional().describe("Category note"),
|
|
14
|
+
budgeted: z.number().describe("Budgeted amount in dollars"),
|
|
15
|
+
activity: z.number().describe("Activity in dollars"),
|
|
16
|
+
balance: z.number().describe("Balance in dollars"),
|
|
17
|
+
goal_type: z.string().optional().describe("Goal type"),
|
|
18
|
+
goal_creation_month: z.string().optional().describe("Goal creation month"),
|
|
19
|
+
goal_target: z.number().optional().describe("Goal target in milliunits"),
|
|
20
|
+
goal_target_month: z.string().optional().describe("Goal target month"),
|
|
21
|
+
goal_percentage_complete: z
|
|
22
|
+
.number()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Goal percentage complete"),
|
|
25
|
+
goal_months_to_budget: z
|
|
26
|
+
.number()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe("Goal months to budget"),
|
|
29
|
+
goal_under_funded: z.number().optional().describe("Goal under funded amount"),
|
|
30
|
+
goal_overall_funded: z
|
|
31
|
+
.number()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Goal overall funded amount"),
|
|
34
|
+
goal_overall_left: z.number().optional().describe("Goal overall left amount"),
|
|
35
|
+
deleted: z.boolean().describe("Deleted flag"),
|
|
24
36
|
});
|
|
25
37
|
export const MonthDetailSchema = z.object({
|
|
26
|
-
month: z.string().describe(
|
|
27
|
-
note: z.string().optional().describe(
|
|
28
|
-
income: z.number().describe(
|
|
29
|
-
budgeted: z.number().describe(
|
|
30
|
-
activity: z.number().describe(
|
|
31
|
-
to_be_budgeted: z.number().describe(
|
|
32
|
-
age_of_money: z.number().nullish().describe(
|
|
33
|
-
deleted: z.boolean().describe(
|
|
34
|
-
categories: z
|
|
38
|
+
month: z.string().describe("Month identifier"),
|
|
39
|
+
note: z.string().optional().describe("Month note"),
|
|
40
|
+
income: z.number().describe("Income in dollars"),
|
|
41
|
+
budgeted: z.number().describe("Budgeted amount in dollars"),
|
|
42
|
+
activity: z.number().describe("Activity in dollars"),
|
|
43
|
+
to_be_budgeted: z.number().describe("To be budgeted in dollars"),
|
|
44
|
+
age_of_money: z.number().nullish().describe("Age of money in days"),
|
|
45
|
+
deleted: z.boolean().describe("Deleted flag"),
|
|
46
|
+
categories: z
|
|
47
|
+
.array(MonthCategorySchema)
|
|
48
|
+
.optional()
|
|
49
|
+
.describe("Categories for this month"),
|
|
35
50
|
});
|
|
36
51
|
export const MonthSummarySchema = z.object({
|
|
37
|
-
month: z.string().describe(
|
|
38
|
-
note: z.string().optional().describe(
|
|
39
|
-
income: z.number().describe(
|
|
40
|
-
budgeted: z.number().describe(
|
|
41
|
-
activity: z.number().describe(
|
|
42
|
-
to_be_budgeted: z.number().describe(
|
|
43
|
-
age_of_money: z.number().nullish().describe(
|
|
44
|
-
deleted: z.boolean().describe(
|
|
52
|
+
month: z.string().describe("Month identifier"),
|
|
53
|
+
note: z.string().optional().describe("Month note"),
|
|
54
|
+
income: z.number().describe("Income in dollars"),
|
|
55
|
+
budgeted: z.number().describe("Budgeted amount in dollars"),
|
|
56
|
+
activity: z.number().describe("Activity in dollars"),
|
|
57
|
+
to_be_budgeted: z.number().describe("To be budgeted in dollars"),
|
|
58
|
+
age_of_money: z.number().nullish().describe("Age of money in days"),
|
|
59
|
+
deleted: z.boolean().describe("Deleted flag"),
|
|
45
60
|
});
|
|
46
61
|
export const GetMonthOutputSchema = CacheMetadataSchema.extend({
|
|
47
|
-
month: MonthDetailSchema.describe(
|
|
62
|
+
month: MonthDetailSchema.describe("Month details"),
|
|
48
63
|
});
|
|
49
64
|
export const ListMonthsOutputSchema = CacheMetadataSchema.extend({
|
|
50
|
-
months: z.array(MonthSummarySchema).describe(
|
|
65
|
+
months: z.array(MonthSummarySchema).describe("List of months"),
|
|
51
66
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { CacheMetadataSchema } from
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { CacheMetadataSchema } from "../shared/commonOutputs.js";
|
|
3
3
|
export const PayeeSchema = z.object({
|
|
4
|
-
id: z.string().describe(
|
|
5
|
-
name: z.string().describe(
|
|
6
|
-
transfer_account_id: z.string().optional().describe(
|
|
7
|
-
deleted: z.boolean().describe(
|
|
4
|
+
id: z.string().describe("Payee ID"),
|
|
5
|
+
name: z.string().describe("Payee name"),
|
|
6
|
+
transfer_account_id: z.string().optional().describe("Transfer account ID"),
|
|
7
|
+
deleted: z.boolean().describe("Deleted flag"),
|
|
8
8
|
});
|
|
9
9
|
export const ListPayeesOutputSchema = CacheMetadataSchema.extend({
|
|
10
|
-
payees: z.array(PayeeSchema).describe(
|
|
11
|
-
total_count: z.number().int().describe(
|
|
12
|
-
returned_count: z.number().int().describe(
|
|
10
|
+
payees: z.array(PayeeSchema).describe("List of payees"),
|
|
11
|
+
total_count: z.number().int().describe("Total payee count"),
|
|
12
|
+
returned_count: z.number().int().describe("Returned payee count"),
|
|
13
13
|
});
|
|
14
14
|
export const GetPayeeOutputSchema = CacheMetadataSchema.extend({
|
|
15
|
-
payee: PayeeSchema.describe(
|
|
15
|
+
payee: PayeeSchema.describe("Payee details"),
|
|
16
16
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const MoneyValueSchema: z.ZodObject<{
|
|
3
3
|
amount: z.ZodNumber;
|
|
4
4
|
currency: z.ZodString;
|
|
@@ -69,7 +69,7 @@ export declare const MatchCandidateSchema: z.ZodObject<{
|
|
|
69
69
|
explanation: z.ZodString;
|
|
70
70
|
}, z.core.$strip>;
|
|
71
71
|
export type MatchCandidate = z.infer<typeof MatchCandidateSchema>;
|
|
72
|
-
export declare function deriveConfidenceFromScore(score: number):
|
|
72
|
+
export declare function deriveConfidenceFromScore(score: number): "high" | "medium" | "low" | "none";
|
|
73
73
|
export declare const TransactionMatchSchema: z.ZodObject<{
|
|
74
74
|
bank_transaction: z.ZodObject<{
|
|
75
75
|
id: z.ZodString;
|