actual-mcp-server 0.6.49 → 0.6.50
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
CHANGED
package/dist/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Shared recurrence-config schema for Actual schedules. Used by both actual_schedules_create
|
|
3
|
+
// and actual_schedules_update so the two tools agree on the same shape and publish a typed
|
|
4
|
+
// `date` branch in tools/list (#225). This mirrors the config Actual's `@actual-app/api`
|
|
5
|
+
// accepts for a recurring schedule; it is a closed object so a malformed config gets an
|
|
6
|
+
// actionable validation error rather than being forwarded unshaped.
|
|
7
|
+
export const RecurConfigSchema = z.object({
|
|
8
|
+
frequency: z.enum(['daily', 'weekly', 'monthly', 'yearly'])
|
|
9
|
+
.describe('How often the schedule repeats'),
|
|
10
|
+
start: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
11
|
+
.describe('Start date in YYYY-MM-DD format'),
|
|
12
|
+
endMode: z.enum(['never', 'after_n_occurrences', 'on_date'])
|
|
13
|
+
.describe('When the schedule stops: never, after N occurrences, or on a specific date'),
|
|
14
|
+
interval: z.number().int().positive().optional()
|
|
15
|
+
.describe('Every N periods. Default: 1 (every period)'),
|
|
16
|
+
skipWeekend: z.boolean().optional()
|
|
17
|
+
.describe('If true, occurrence is moved when it falls on a weekend'),
|
|
18
|
+
weekendSolveMode: z.enum(['before', 'after']).optional()
|
|
19
|
+
.describe('Move to Friday before or Monday after the weekend. Requires skipWeekend: true'),
|
|
20
|
+
endOccurrences: z.number().int().positive().optional()
|
|
21
|
+
.describe('Number of occurrences before stopping. Required when endMode is after_n_occurrences'),
|
|
22
|
+
endDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
23
|
+
.describe('Date (YYYY-MM-DD) after which the schedule stops. Required when endMode is on_date'),
|
|
24
|
+
});
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import adapter from '../lib/actual-adapter.js';
|
|
3
3
|
import { UUID_PATTERN } from '../lib/constants.js';
|
|
4
|
-
|
|
5
|
-
frequency: z.enum(['daily', 'weekly', 'monthly', 'yearly'])
|
|
6
|
-
.describe('How often the schedule repeats'),
|
|
7
|
-
start: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
8
|
-
.describe('Start date in YYYY-MM-DD format'),
|
|
9
|
-
endMode: z.enum(['never', 'after_n_occurrences', 'on_date'])
|
|
10
|
-
.describe('When the schedule stops: never, after N occurrences, or on a specific date'),
|
|
11
|
-
interval: z.number().int().positive().optional()
|
|
12
|
-
.describe('Every N periods. Default: 1 (every period)'),
|
|
13
|
-
skipWeekend: z.boolean().optional()
|
|
14
|
-
.describe('If true, occurrence is moved when it falls on a weekend'),
|
|
15
|
-
weekendSolveMode: z.enum(['before', 'after']).optional()
|
|
16
|
-
.describe('Move to Friday before or Monday after the weekend. Requires skipWeekend: true'),
|
|
17
|
-
endOccurrences: z.number().int().positive().optional()
|
|
18
|
-
.describe('Number of occurrences before stopping. Required when endMode is after_n_occurrences'),
|
|
19
|
-
endDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
20
|
-
.describe('Date (YYYY-MM-DD) after which the schedule stops. Required when endMode is on_date'),
|
|
21
|
-
});
|
|
4
|
+
import { RecurConfigSchema } from '../lib/schemas/recur.js';
|
|
22
5
|
const InputSchema = z.object({
|
|
23
6
|
name: z.string().optional()
|
|
24
7
|
.describe('Unique display name for the schedule'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import adapter from '../lib/actual-adapter.js';
|
|
3
3
|
import { UUID_PATTERN } from '../lib/constants.js';
|
|
4
|
+
import { RecurConfigSchema } from '../lib/schemas/recur.js';
|
|
4
5
|
const InputSchema = z.object({
|
|
5
6
|
id: z.string().regex(UUID_PATTERN, 'Invalid UUID format')
|
|
6
7
|
.describe('UUID of the schedule to update (from actual_schedules_get)'),
|
|
@@ -15,10 +16,12 @@ const InputSchema = z.object({
|
|
|
15
16
|
amountOp: z.enum(['is', 'isapprox', 'isbetween']).optional()
|
|
16
17
|
.describe('How to match the amount'),
|
|
17
18
|
date: z.union([
|
|
18
|
-
z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
19
|
-
|
|
19
|
+
z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
20
|
+
.describe('YYYY-MM-DD: one-off schedule on this specific date'),
|
|
21
|
+
RecurConfigSchema
|
|
22
|
+
.describe('RecurConfig object (frequency, start, endMode, ...): recurring schedule'),
|
|
20
23
|
]).optional()
|
|
21
|
-
.describe('New date string (YYYY-MM-DD) or RecurConfig object'),
|
|
24
|
+
.describe('New date string (YYYY-MM-DD) or RecurConfig object. Set resetNextDate: true when changing this.'),
|
|
22
25
|
posts_transaction: z.boolean().optional()
|
|
23
26
|
.describe('Whether Actual auto-posts a transaction on each occurrence'),
|
|
24
27
|
completed: z.boolean().optional()
|