@opentabs-dev/opentabs-plugin-ynab 0.0.74
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 +159 -0
- package/dist/adapter.iife.js +15312 -0
- package/dist/adapter.iife.js.map +7 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/create-transaction.d.ts +46 -0
- package/dist/tools/create-transaction.d.ts.map +1 -0
- package/dist/tools/create-transaction.js +57 -0
- package/dist/tools/create-transaction.js.map +1 -0
- package/dist/tools/delete-transaction.d.ts +8 -0
- package/dist/tools/delete-transaction.d.ts.map +1 -0
- package/dist/tools/delete-transaction.js +32 -0
- package/dist/tools/delete-transaction.js.map +1 -0
- package/dist/tools/get-account.d.ts +18 -0
- package/dist/tools/get-account.d.ts.map +1 -0
- package/dist/tools/get-account.js +34 -0
- package/dist/tools/get-account.js.map +1 -0
- package/dist/tools/get-current-user.d.ts +9 -0
- package/dist/tools/get-current-user.d.ts.map +1 -0
- package/dist/tools/get-current-user.js +19 -0
- package/dist/tools/get-current-user.js.map +1 -0
- package/dist/tools/get-month.d.ts +33 -0
- package/dist/tools/get-month.d.ts.map +1 -0
- package/dist/tools/get-month.js +70 -0
- package/dist/tools/get-month.js.map +1 -0
- package/dist/tools/get-plan.d.ts +12 -0
- package/dist/tools/get-plan.d.ts.map +1 -0
- package/dist/tools/get-plan.js +22 -0
- package/dist/tools/get-plan.js.map +1 -0
- package/dist/tools/get-transaction.d.ts +39 -0
- package/dist/tools/get-transaction.d.ts.map +1 -0
- package/dist/tools/get-transaction.js +43 -0
- package/dist/tools/get-transaction.js.map +1 -0
- package/dist/tools/list-accounts.d.ts +18 -0
- package/dist/tools/list-accounts.d.ts.map +1 -0
- package/dist/tools/list-accounts.js +34 -0
- package/dist/tools/list-accounts.js.map +1 -0
- package/dist/tools/list-categories.d.ts +26 -0
- package/dist/tools/list-categories.d.ts.map +1 -0
- package/dist/tools/list-categories.js +62 -0
- package/dist/tools/list-categories.js.map +1 -0
- package/dist/tools/list-months.d.ts +16 -0
- package/dist/tools/list-months.d.ts.map +1 -0
- package/dist/tools/list-months.js +43 -0
- package/dist/tools/list-months.js.map +1 -0
- package/dist/tools/list-payees.d.ts +9 -0
- package/dist/tools/list-payees.d.ts.map +1 -0
- package/dist/tools/list-payees.js +29 -0
- package/dist/tools/list-payees.js.map +1 -0
- package/dist/tools/list-scheduled-transactions.d.ts +21 -0
- package/dist/tools/list-scheduled-transactions.d.ts.map +1 -0
- package/dist/tools/list-scheduled-transactions.js +32 -0
- package/dist/tools/list-scheduled-transactions.js.map +1 -0
- package/dist/tools/list-transactions.d.ts +27 -0
- package/dist/tools/list-transactions.d.ts.map +1 -0
- package/dist/tools/list-transactions.js +44 -0
- package/dist/tools/list-transactions.js.map +1 -0
- package/dist/tools/schemas.d.ts +347 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +266 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/update-category-budget.d.ts +23 -0
- package/dist/tools/update-category-budget.d.ts.map +1 -0
- package/dist/tools/update-category-budget.js +50 -0
- package/dist/tools/update-category-budget.js.map +1 -0
- package/dist/tools/update-transaction.d.ts +47 -0
- package/dist/tools/update-transaction.d.ts.map +1 -0
- package/dist/tools/update-transaction.js +62 -0
- package/dist/tools/update-transaction.js.map +1 -0
- package/dist/tools.json +1684 -0
- package/dist/ynab-api.d.ts +19 -0
- package/dist/ynab-api.d.ts.map +1 -0
- package/dist/ynab-api.js +168 -0
- package/dist/ynab-api.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { accountSchema, mapAccount } from './schemas.js';
|
|
5
|
+
export const listAccounts = defineTool({
|
|
6
|
+
name: 'list_accounts',
|
|
7
|
+
displayName: 'List Accounts',
|
|
8
|
+
description: 'List all accounts in the active YNAB plan. Returns account name, type, balances, and on-budget status. Includes checking, savings, credit cards, and tracking accounts.',
|
|
9
|
+
summary: 'List all budget accounts',
|
|
10
|
+
icon: 'landmark',
|
|
11
|
+
group: 'Accounts',
|
|
12
|
+
input: z.object({
|
|
13
|
+
include_closed: z.boolean().optional().describe('Include closed accounts (default false)'),
|
|
14
|
+
}),
|
|
15
|
+
output: z.object({
|
|
16
|
+
accounts: z.array(accountSchema).describe('List of accounts'),
|
|
17
|
+
}),
|
|
18
|
+
handle: async (params) => {
|
|
19
|
+
const planId = getPlanId();
|
|
20
|
+
const result = await catalog('syncBudgetData', {
|
|
21
|
+
budget_version_id: planId,
|
|
22
|
+
starting_device_knowledge: 0,
|
|
23
|
+
ending_device_knowledge: 0,
|
|
24
|
+
device_knowledge_of_server: 0,
|
|
25
|
+
});
|
|
26
|
+
const raw = result.changed_entities?.be_accounts ?? [];
|
|
27
|
+
let accounts = raw.filter(a => !a.is_tombstone).map(mapAccount);
|
|
28
|
+
if (!params.include_closed) {
|
|
29
|
+
accounts = accounts.filter(a => !a.closed);
|
|
30
|
+
}
|
|
31
|
+
return { accounts };
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=list-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-accounts.js","sourceRoot":"","sources":["../../src/tools/list-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAMzD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CA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+
export declare const listCategories: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
include_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
hidden: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
category_group_id: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
hidden: z.ZodBoolean;
|
|
15
|
+
budgeted: z.ZodString;
|
|
16
|
+
activity: z.ZodString;
|
|
17
|
+
balance: z.ZodString;
|
|
18
|
+
budgeted_milliunits: z.ZodNumber;
|
|
19
|
+
activity_milliunits: z.ZodNumber;
|
|
20
|
+
balance_milliunits: z.ZodNumber;
|
|
21
|
+
goal_type: z.ZodString;
|
|
22
|
+
goal_target: z.ZodString;
|
|
23
|
+
goal_percentage_complete: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
//# sourceMappingURL=list-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-categories.d.ts","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;kBA+DzB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { categoryGroupSchema, categorySchema, mapCategory, mapCategoryGroup } from './schemas.js';
|
|
5
|
+
export const listCategories = defineTool({
|
|
6
|
+
name: 'list_categories',
|
|
7
|
+
displayName: 'List Categories',
|
|
8
|
+
description: 'List all category groups and categories in the active YNAB plan. Returns budgeted amounts, activity, and available balances for the current month. Excludes hidden and deleted categories by default.',
|
|
9
|
+
summary: 'List budget categories with balances',
|
|
10
|
+
icon: 'tags',
|
|
11
|
+
group: 'Categories',
|
|
12
|
+
input: z.object({
|
|
13
|
+
include_hidden: z.boolean().optional().describe('Include hidden categories (default false)'),
|
|
14
|
+
}),
|
|
15
|
+
output: z.object({
|
|
16
|
+
groups: z.array(categoryGroupSchema).describe('Category groups'),
|
|
17
|
+
categories: z.array(categorySchema).describe('Categories with budget data'),
|
|
18
|
+
}),
|
|
19
|
+
handle: async (params) => {
|
|
20
|
+
const planId = getPlanId();
|
|
21
|
+
const result = await catalog('syncBudgetData', {
|
|
22
|
+
budget_version_id: planId,
|
|
23
|
+
starting_device_knowledge: 0,
|
|
24
|
+
ending_device_knowledge: 0,
|
|
25
|
+
device_knowledge_of_server: 0,
|
|
26
|
+
});
|
|
27
|
+
const entities = result.changed_entities;
|
|
28
|
+
const rawGroups = (entities?.be_master_categories ?? []).filter(g => !g.is_tombstone);
|
|
29
|
+
const rawCategories = (entities?.be_subcategories ?? []).filter(c => !c.is_tombstone);
|
|
30
|
+
// Merge monthly subcategory budget calculations into categories
|
|
31
|
+
// entity_id format: mcbc/YYYY-MM/category-id — extract category-id suffix
|
|
32
|
+
const calcs = entities?.be_monthly_subcategory_budget_calculations ?? [];
|
|
33
|
+
const calcMap = new Map();
|
|
34
|
+
for (const calc of calcs) {
|
|
35
|
+
const entityId = calc.entities_monthly_subcategory_budget_id;
|
|
36
|
+
if (entityId) {
|
|
37
|
+
const parts = entityId.split('/');
|
|
38
|
+
const categoryId = parts.length >= 3 ? parts.slice(2).join('/') : entityId;
|
|
39
|
+
calcMap.set(categoryId, calc);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
let groups = rawGroups.map(mapCategoryGroup);
|
|
43
|
+
let categories = rawCategories.map(c => {
|
|
44
|
+
const calc = calcMap.get(c.id ?? '');
|
|
45
|
+
return mapCategory({
|
|
46
|
+
...c,
|
|
47
|
+
budgeted: calc?.budgeted ?? c.budgeted,
|
|
48
|
+
activity: calc?.activity ?? c.activity,
|
|
49
|
+
balance: calc?.balance ?? c.balance,
|
|
50
|
+
goal_type: calc?.goal_type ?? c.goal_type,
|
|
51
|
+
goal_target: calc?.goal_target ?? c.goal_target,
|
|
52
|
+
goal_percentage_complete: calc?.goal_percentage_complete ?? c.goal_percentage_complete,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
if (!params.include_hidden) {
|
|
56
|
+
groups = groups.filter(g => !g.hidden);
|
|
57
|
+
categories = categories.filter(c => !c.hidden);
|
|
58
|
+
}
|
|
59
|
+
return { groups, categories };
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=list-categories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-categories.js","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQlG,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EACT,uMAAuM;IACzM,OAAO,EAAE,sCAAsC;IAC/C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CA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C;QACjD,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listMonths: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
months: z.ZodArray<z.ZodObject<{
|
|
4
|
+
month: z.ZodString;
|
|
5
|
+
income: z.ZodString;
|
|
6
|
+
budgeted: z.ZodString;
|
|
7
|
+
activity: z.ZodString;
|
|
8
|
+
to_be_budgeted: z.ZodString;
|
|
9
|
+
income_milliunits: z.ZodNumber;
|
|
10
|
+
budgeted_milliunits: z.ZodNumber;
|
|
11
|
+
activity_milliunits: z.ZodNumber;
|
|
12
|
+
to_be_budgeted_milliunits: z.ZodNumber;
|
|
13
|
+
age_of_money: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
//# sourceMappingURL=list-months.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-months.d.ts","sourceRoot":"","sources":["../../src/tools/list-months.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;kBA0CrB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { mapMonth, monthSchema } from './schemas.js';
|
|
5
|
+
export const listMonths = defineTool({
|
|
6
|
+
name: 'list_months',
|
|
7
|
+
displayName: 'List Months',
|
|
8
|
+
description: 'List all budget months in the active YNAB plan. Returns income, budgeted, activity, and Ready to Assign amounts for each month. Sorted from most recent to oldest.',
|
|
9
|
+
summary: 'List budget months with summaries',
|
|
10
|
+
icon: 'calendar',
|
|
11
|
+
group: 'Months',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({
|
|
14
|
+
months: z.array(monthSchema).describe('List of budget months'),
|
|
15
|
+
}),
|
|
16
|
+
handle: async () => {
|
|
17
|
+
const planId = getPlanId();
|
|
18
|
+
const result = await catalog('syncBudgetData', {
|
|
19
|
+
budget_version_id: planId,
|
|
20
|
+
starting_device_knowledge: 0,
|
|
21
|
+
ending_device_knowledge: 0,
|
|
22
|
+
device_knowledge_of_server: 0,
|
|
23
|
+
});
|
|
24
|
+
const entities = result.changed_entities;
|
|
25
|
+
const rawMonths = entities?.be_monthly_budgets ?? [];
|
|
26
|
+
const rawCalcs = entities?.be_monthly_budget_calculations ?? [];
|
|
27
|
+
// Map calculation data by month (entities_monthly_budget_id format: mb/YYYY-MM-DD)
|
|
28
|
+
const calcMap = new Map();
|
|
29
|
+
for (const calc of rawCalcs) {
|
|
30
|
+
const budgetId = calc.entities_monthly_budget_id;
|
|
31
|
+
if (budgetId) {
|
|
32
|
+
const month = budgetId.replace('mb/', '');
|
|
33
|
+
calcMap.set(month, calc);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const months = rawMonths
|
|
37
|
+
.filter(m => !m.is_tombstone)
|
|
38
|
+
.map(m => mapMonth(m, calcMap.get(m.month ?? '')))
|
|
39
|
+
.sort((a, b) => b.month.localeCompare(a.month));
|
|
40
|
+
return { months };
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=list-months.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-months.js","sourceRoot":"","sources":["../../src/tools/list-months.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM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AK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,SAAS;aACrB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;aACjD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAElD,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listPayees: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
payees: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
transfer_account_id: z.ZodString;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
//# sourceMappingURL=list-payees.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-payees.d.ts","sourceRoot":"","sources":["../../src/tools/list-payees.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,UAAU;;;;;;kBA0BrB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { mapPayee, payeeSchema } from './schemas.js';
|
|
5
|
+
export const listPayees = defineTool({
|
|
6
|
+
name: 'list_payees',
|
|
7
|
+
displayName: 'List Payees',
|
|
8
|
+
description: 'List all payees in the active YNAB plan. Payees represent merchants, employers, or transfer targets. Excludes deleted payees.',
|
|
9
|
+
summary: 'List all payees',
|
|
10
|
+
icon: 'store',
|
|
11
|
+
group: 'Payees',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({
|
|
14
|
+
payees: z.array(payeeSchema).describe('List of payees'),
|
|
15
|
+
}),
|
|
16
|
+
handle: async () => {
|
|
17
|
+
const planId = getPlanId();
|
|
18
|
+
const result = await catalog('syncBudgetData', {
|
|
19
|
+
budget_version_id: planId,
|
|
20
|
+
starting_device_knowledge: 0,
|
|
21
|
+
ending_device_knowledge: 0,
|
|
22
|
+
device_knowledge_of_server: 0,
|
|
23
|
+
});
|
|
24
|
+
const raw = result.changed_entities?.be_payees ?? [];
|
|
25
|
+
const payees = raw.filter(p => !p.is_tombstone).map(mapPayee);
|
|
26
|
+
return { payees };
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=list-payees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-payees.js","sourceRoot":"","sources":["../../src/tools/list-payees.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMrD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EACT,+HAA+H;IACjI,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;KACxD,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,OAAO,CAAa,gBAAgB,EAAE;YACzD,iBAAiB,EAAE,MAAM;YACzB,yBAAyB,EAAE,CAAC;YAC5B,uBAAuB,EAAE,CAAC;YAC1B,0BAA0B,EAAE,CAAC;SAC9B,CAAC,CAAC;QAEH,MAAM,GAAG,GAAI,MAAuD,CAAC,gBAAgB,EAAE,SAAS,IAAI,EAAE,CAAC;QACvG,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE9D,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listScheduledTransactions: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
scheduled_transactions: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
date_first: z.ZodString;
|
|
6
|
+
date_next: z.ZodString;
|
|
7
|
+
frequency: z.ZodString;
|
|
8
|
+
amount: z.ZodString;
|
|
9
|
+
amount_milliunits: z.ZodNumber;
|
|
10
|
+
memo: z.ZodString;
|
|
11
|
+
flag_color: z.ZodString;
|
|
12
|
+
account_id: z.ZodString;
|
|
13
|
+
account_name: z.ZodString;
|
|
14
|
+
payee_id: z.ZodString;
|
|
15
|
+
payee_name: z.ZodString;
|
|
16
|
+
category_id: z.ZodString;
|
|
17
|
+
category_name: z.ZodString;
|
|
18
|
+
deleted: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
//# sourceMappingURL=list-scheduled-transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-scheduled-transactions.d.ts","sourceRoot":"","sources":["../../src/tools/list-scheduled-transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;kBA+BpC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { mapScheduledTransaction, scheduledTransactionSchema } from './schemas.js';
|
|
5
|
+
export const listScheduledTransactions = defineTool({
|
|
6
|
+
name: 'list_scheduled_transactions',
|
|
7
|
+
displayName: 'List Scheduled Transactions',
|
|
8
|
+
description: 'List all scheduled (recurring) transactions in the active YNAB plan. Returns frequency, next occurrence date, amount, payee, and category for each.',
|
|
9
|
+
summary: 'List scheduled/recurring transactions',
|
|
10
|
+
icon: 'clock',
|
|
11
|
+
group: 'Transactions',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({
|
|
14
|
+
scheduled_transactions: z.array(scheduledTransactionSchema).describe('List of scheduled transactions'),
|
|
15
|
+
}),
|
|
16
|
+
handle: async () => {
|
|
17
|
+
const planId = getPlanId();
|
|
18
|
+
const result = await catalog('syncBudgetData', {
|
|
19
|
+
budget_version_id: planId,
|
|
20
|
+
starting_device_knowledge: 0,
|
|
21
|
+
ending_device_knowledge: 0,
|
|
22
|
+
device_knowledge_of_server: 0,
|
|
23
|
+
});
|
|
24
|
+
const raw = result.changed_entities?.be_scheduled_transactions ?? [];
|
|
25
|
+
const scheduledTransactions = raw
|
|
26
|
+
.filter(s => !s.is_tombstone)
|
|
27
|
+
.map(mapScheduledTransaction)
|
|
28
|
+
.sort((a, b) => a.date_next.localeCompare(b.date_next));
|
|
29
|
+
return { scheduled_transactions: scheduledTransactions };
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list-scheduled-transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-scheduled-transactions.js","sourceRoot":"","sources":["../../src/tools/list-scheduled-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAMnF,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EACT,qJAAqJ;IACvJ,OAAO,EAAE,uCAAuC;IAChD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;KACvG,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,OAAO,CAAa,gBAAgB,EAAE;YACzD,iBAAiB,EAAE,MAAM;YACzB,yBAAyB,EAAE,CAAC;YAC5B,uBAAuB,EAAE,CAAC;YAC1B,0BAA0B,EAAE,CAAC;SAC9B,CAAC,CAAC;QAEH,MAAM,GAAG,GACN,MAAuD,CAAC,gBAAgB,EAAE,yBAAyB,IAAI,EAAE,CAAC;QAE7G,MAAM,qBAAqB,GAAG,GAAG;aAC9B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;aAC5B,GAAG,CAAC,uBAAuB,CAAC;aAC5B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QAE1D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listTransactions: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
since_date: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
date: z.ZodString;
|
|
9
|
+
amount: z.ZodString;
|
|
10
|
+
amount_milliunits: z.ZodNumber;
|
|
11
|
+
memo: z.ZodString;
|
|
12
|
+
cleared: z.ZodString;
|
|
13
|
+
approved: z.ZodBoolean;
|
|
14
|
+
flag_color: z.ZodString;
|
|
15
|
+
flag_name: z.ZodString;
|
|
16
|
+
account_id: z.ZodString;
|
|
17
|
+
account_name: z.ZodString;
|
|
18
|
+
payee_id: z.ZodString;
|
|
19
|
+
payee_name: z.ZodString;
|
|
20
|
+
category_id: z.ZodString;
|
|
21
|
+
category_name: z.ZodString;
|
|
22
|
+
transfer_account_id: z.ZodString;
|
|
23
|
+
import_id: z.ZodString;
|
|
24
|
+
deleted: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
//# sourceMappingURL=list-transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-transactions.d.ts","sourceRoot":"","sources":["../../src/tools/list-transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;kBA6C3B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { catalog, getPlanId } from '../ynab-api.js';
|
|
4
|
+
import { mapTransaction, transactionSchema } from './schemas.js';
|
|
5
|
+
export const listTransactions = defineTool({
|
|
6
|
+
name: 'list_transactions',
|
|
7
|
+
displayName: 'List Transactions',
|
|
8
|
+
description: 'List transactions in the active YNAB plan. Returns all transactions sorted by date (newest first). Optionally filter by account ID. Results include amount, payee, category, cleared status, and memo.',
|
|
9
|
+
summary: 'List budget transactions',
|
|
10
|
+
icon: 'receipt',
|
|
11
|
+
group: 'Transactions',
|
|
12
|
+
input: z.object({
|
|
13
|
+
account_id: z.string().optional().describe('Filter by account ID. Omit to list all transactions.'),
|
|
14
|
+
since_date: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Only return transactions on or after this date (YYYY-MM-DD). Omit for all transactions.'),
|
|
18
|
+
}),
|
|
19
|
+
output: z.object({
|
|
20
|
+
transactions: z.array(transactionSchema).describe('List of transactions'),
|
|
21
|
+
}),
|
|
22
|
+
handle: async (params) => {
|
|
23
|
+
const planId = getPlanId();
|
|
24
|
+
const result = await catalog('syncBudgetData', {
|
|
25
|
+
budget_version_id: planId,
|
|
26
|
+
starting_device_knowledge: 0,
|
|
27
|
+
ending_device_knowledge: 0,
|
|
28
|
+
device_knowledge_of_server: 0,
|
|
29
|
+
});
|
|
30
|
+
const raw = result.changed_entities?.be_transactions ?? [];
|
|
31
|
+
let transactions = raw.filter(t => !t.is_tombstone).map(mapTransaction);
|
|
32
|
+
if (params.account_id) {
|
|
33
|
+
transactions = transactions.filter(t => t.account_id === params.account_id);
|
|
34
|
+
}
|
|
35
|
+
if (params.since_date) {
|
|
36
|
+
const sinceDate = params.since_date;
|
|
37
|
+
transactions = transactions.filter(t => t.date >= sinceDate);
|
|
38
|
+
}
|
|
39
|
+
// Sort by date descending
|
|
40
|
+
transactions.sort((a, b) => b.date.localeCompare(a.date));
|
|
41
|
+
return { transactions };
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=list-transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-transactions.js","sourceRoot":"","sources":["../../src/tools/list-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EACT,wMAAwM;IAC1M,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;QAClG,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CA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