UNPKG

pocketsmith-mcp

Version:

MCP server for managing budgets via PocketSmith API

175 lines (174 loc) 5.03 kB
/** * @fileoverview Get transactions for a specific account from PocketSmith */ import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestContext } from "../../../utils/index.js"; export declare const GetAccountTransactionsInputSchema: z.ZodObject<{ apiKey: z.ZodOptional<z.ZodString>; accessToken: z.ZodOptional<z.ZodString>; accountId: z.ZodNumber; startDate: z.ZodOptional<z.ZodString>; endDate: z.ZodOptional<z.ZodString>; search: z.ZodOptional<z.ZodString>; limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { limit: number; accountId: number; search?: string | undefined; apiKey?: string | undefined; accessToken?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; }, { accountId: number; search?: string | undefined; limit?: number | undefined; apiKey?: string | undefined; accessToken?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; }>; export type GetAccountTransactionsInput = z.infer<typeof GetAccountTransactionsInputSchema>; export declare const GetAccountTransactionsResponseSchema: z.ZodObject<{ account: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; type: z.ZodString; currency_code: z.ZodString; current_balance: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: string; name: string; id: number; currency_code: string; current_balance: number; }, { type: string; name: string; id: number; currency_code: string; current_balance: number; }>; transactions: z.ZodArray<z.ZodObject<{ id: z.ZodNumber; payee: z.ZodString; amount: z.ZodNumber; date: z.ZodString; note: 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; }>>; currency_code: z.ZodString; type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; category?: { title: string; id: number; } | undefined; }, { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; category?: { title: string; id: number; } | undefined; }>, "many">; summary: z.ZodObject<{ totalCount: z.ZodNumber; totalCredit: z.ZodNumber; totalDebit: z.ZodNumber; netAmount: z.ZodNumber; dateRange: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; dateRange?: string | undefined; }, { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; dateRange?: string | undefined; }>; }, "strip", z.ZodTypeAny, { account: { type: string; name: string; id: number; currency_code: string; current_balance: number; }; transactions: { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; category?: { title: string; id: number; } | undefined; }[]; summary: { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; dateRange?: string | undefined; }; }, { account: { type: string; name: string; id: number; currency_code: string; current_balance: number; }; transactions: { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; category?: { title: string; id: number; } | undefined; }[]; summary: { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; dateRange?: string | undefined; }; }>; export type GetAccountTransactionsResponse = z.infer<typeof GetAccountTransactionsResponseSchema>; export declare function getAccountTransactionsLogic(params: GetAccountTransactionsInput, context: RequestContext): Promise<GetAccountTransactionsResponse>; export declare const registerGetAccountTransactionsTool: (server: McpServer) => Promise<void>;