UNPKG

pocketsmith-mcp

Version:

MCP server for managing budgets via PocketSmith API

169 lines (168 loc) 4.96 kB
/** * @fileoverview Get recurring events (scheduled transactions) from PocketSmith */ import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestContext } from "../../../utils/index.js"; export declare const GetRecurringEventsInputSchema: z.ZodObject<{ apiKey: z.ZodOptional<z.ZodString>; accessToken: z.ZodOptional<z.ZodString>; startDate: z.ZodString; endDate: z.ZodString; }, "strip", z.ZodTypeAny, { startDate: string; endDate: string; apiKey?: string | undefined; accessToken?: string | undefined; }, { startDate: string; endDate: string; apiKey?: string | undefined; accessToken?: string | undefined; }>; export type GetRecurringEventsInput = z.infer<typeof GetRecurringEventsInputSchema>; export declare const GetRecurringEventsResponseSchema: z.ZodObject<{ events: z.ZodArray<z.ZodObject<{ id: z.ZodString; amount: z.ZodNumber; date: z.ZodString; repeat_type: z.ZodString; repeat_interval: z.ZodNumber; currency_code: z.ZodOptional<z.ZodString>; colour: z.ZodNullable<z.ZodString>; category: z.ZodOptional<z.ZodObject<{ id: z.ZodNumber; title: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; id: number; }, { title: string; id: number; }>>; scenario: z.ZodOptional<z.ZodObject<{ id: z.ZodNumber; title: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; id: number; }, { title: string; id: number; }>>; note: z.ZodNullable<z.ZodString>; is_debit: z.ZodBoolean; }, "strip", z.ZodTypeAny, { id: string; date: string; amount: number; note: string | null; colour: string | null; repeat_type: string; repeat_interval: number; is_debit: boolean; category?: { title: string; id: number; } | undefined; currency_code?: string | undefined; scenario?: { title: string; id: number; } | undefined; }, { id: string; date: string; amount: number; note: string | null; colour: string | null; repeat_type: string; repeat_interval: number; is_debit: boolean; category?: { title: string; id: number; } | undefined; currency_code?: string | undefined; scenario?: { title: string; id: number; } | undefined; }>, "many">; summary: z.ZodObject<{ totalEvents: z.ZodNumber; totalDebitEvents: z.ZodNumber; totalCreditEvents: z.ZodNumber; averageAmount: z.ZodNumber; dateRange: z.ZodString; }, "strip", z.ZodTypeAny, { totalEvents: number; totalDebitEvents: number; totalCreditEvents: number; averageAmount: number; dateRange: string; }, { totalEvents: number; totalDebitEvents: number; totalCreditEvents: number; averageAmount: number; dateRange: string; }>; }, "strip", z.ZodTypeAny, { summary: { totalEvents: number; totalDebitEvents: number; totalCreditEvents: number; averageAmount: number; dateRange: string; }; events: { id: string; date: string; amount: number; note: string | null; colour: string | null; repeat_type: string; repeat_interval: number; is_debit: boolean; category?: { title: string; id: number; } | undefined; currency_code?: string | undefined; scenario?: { title: string; id: number; } | undefined; }[]; }, { summary: { totalEvents: number; totalDebitEvents: number; totalCreditEvents: number; averageAmount: number; dateRange: string; }; events: { id: string; date: string; amount: number; note: string | null; colour: string | null; repeat_type: string; repeat_interval: number; is_debit: boolean; category?: { title: string; id: number; } | undefined; currency_code?: string | undefined; scenario?: { title: string; id: number; } | undefined; }[]; }>; export type GetRecurringEventsResponse = z.infer<typeof GetRecurringEventsResponseSchema>; export declare function getRecurringEventsLogic(params: GetRecurringEventsInput, context: RequestContext): Promise<GetRecurringEventsResponse>; export declare const registerGetRecurringEventsTool: (server: McpServer) => Promise<void>;