@warmio/contracts 3.0.4 → 3.0.5
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/dist/api/endpoints.d.ts +2 -0
- package/dist/api/endpoints.d.ts.map +1 -1
- package/dist/api/endpoints.js +5 -0
- package/dist/api/endpoints.js.map +1 -1
- package/dist/financial-context-artifact-protocol.d.ts +21 -11
- package/dist/financial-context-artifact-protocol.d.ts.map +1 -1
- package/dist/financial-context-artifact-protocol.js +37 -12
- package/dist/financial-context-artifact-protocol.js.map +1 -1
- package/dist/generated/private-mcp-tool-descriptors.d.ts +4 -1
- package/dist/generated/private-mcp-tool-descriptors.d.ts.map +1 -1
- package/dist/generated/private-mcp-tool-descriptors.js +5 -1
- package/dist/generated/private-mcp-tool-descriptors.js.map +1 -1
- package/dist/generated/warm-app-api-manifest.d.ts +6 -3
- package/dist/generated/warm-app-api-manifest.d.ts.map +1 -1
- package/dist/generated/warm-app-api-manifest.js +7 -3
- package/dist/generated/warm-app-api-manifest.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/public-output.d.ts +705 -0
- package/dist/mcp/public-output.d.ts.map +1 -0
- package/dist/mcp/public-output.js +47 -0
- package/dist/mcp/public-output.js.map +1 -0
- package/dist/mcp/public-tools.d.ts +690 -0
- package/dist/mcp/public-tools.d.ts.map +1 -0
- package/dist/mcp/public-tools.js +44 -0
- package/dist/mcp/public-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +12 -7
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/schemas/financial-context.d.ts +25 -16
- package/dist/schemas/financial-context.d.ts.map +1 -1
- package/dist/schemas/financial-context.js +9 -2
- package/dist/schemas/financial-context.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-output.d.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1
|
+
import { z } from 'zod';
|
|
2
|
+
import { financialContextSchema, financialContextStatusSchema, financialContextTransactionSchema, latestTransactionsSchema, transactionMonthSchema, } from '../schemas/index.js';
|
|
3
|
+
export const publicMcpTransactionSchema = financialContextTransactionSchema.pick({
|
|
4
|
+
date: true,
|
|
5
|
+
amount: true,
|
|
6
|
+
category: true,
|
|
7
|
+
subcategory: true,
|
|
8
|
+
pending: true,
|
|
9
|
+
currency: true,
|
|
10
|
+
});
|
|
11
|
+
export const publicMcpFinancialContextSchema = financialContextSchema
|
|
12
|
+
.pick({ version: true, updated_at: true, currency: true, transactions: true })
|
|
13
|
+
.extend({ status: financialContextStatusSchema.pick({ position: true }) });
|
|
14
|
+
export const publicMcpTransactionMonthSchema = transactionMonthSchema.extend({
|
|
15
|
+
items: z.array(publicMcpTransactionSchema),
|
|
16
|
+
});
|
|
17
|
+
export const publicMcpLatestTransactionsSchema = latestTransactionsSchema.extend({
|
|
18
|
+
items: z.array(publicMcpTransactionSchema),
|
|
19
|
+
});
|
|
20
|
+
function projectTransaction(transaction) {
|
|
21
|
+
return publicMcpTransactionSchema.parse({
|
|
22
|
+
date: transaction.date,
|
|
23
|
+
amount: transaction.amount,
|
|
24
|
+
category: transaction.category,
|
|
25
|
+
subcategory: transaction.subcategory,
|
|
26
|
+
pending: transaction.pending,
|
|
27
|
+
currency: transaction.currency,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function projectPublicMcpFinancialContext(input) {
|
|
31
|
+
const context = financialContextSchema.parse(input);
|
|
32
|
+
return publicMcpFinancialContextSchema.parse({
|
|
33
|
+
version: context.version,
|
|
34
|
+
updated_at: context.updated_at,
|
|
35
|
+
currency: context.currency,
|
|
36
|
+
status: { position: context.status.position },
|
|
37
|
+
transactions: context.transactions,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function projectPublicMcpTransactions(input) {
|
|
41
|
+
const transactions = z.union([transactionMonthSchema, latestTransactionsSchema]).parse(input);
|
|
42
|
+
const items = transactions.items.map(projectTransaction);
|
|
43
|
+
return 'month' in transactions
|
|
44
|
+
? publicMcpTransactionMonthSchema.parse({ ...transactions, items })
|
|
45
|
+
: publicMcpLatestTransactionsSchema.parse({ ...transactions, items });
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=public-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-output.js","sourceRoot":"","sources":["../../src/mcp/public-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,iCAAiC,EACjC,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,iCAAiC,CAAC,IAAI,CAAC;IAC/E,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB;KAClE,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;KAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,4BAA4B,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAC3E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,wBAAwB,CAAC,MAAM,CAAC;IAC/E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,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