UNPKG

pocketsmith-mcp

Version:

MCP server for managing budgets via PocketSmith API

163 lines (162 loc) 4.62 kB
/** * @fileoverview Get transactions from PocketSmith with search and filter options */ import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestContext } from "../../../utils/index.js"; export declare const GetTransactionsInputSchema: z.ZodObject<{ apiKey: z.ZodOptional<z.ZodString>; accessToken: z.ZodOptional<z.ZodString>; startDate: z.ZodOptional<z.ZodString>; endDate: z.ZodOptional<z.ZodString>; search: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodEnum<["credit", "debit"]>>; limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { limit: number; search?: string | undefined; type?: "credit" | "debit" | undefined; apiKey?: string | undefined; accessToken?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; }, { search?: string | undefined; type?: "credit" | "debit" | undefined; limit?: number | undefined; apiKey?: string | undefined; accessToken?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; }>; export type GetTransactionsInput = z.infer<typeof GetTransactionsInputSchema>; export declare const GetTransactionsResponseSchema: z.ZodObject<{ 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; }>>; account: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; id: number; }, { name: 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; account: { name: string; id: number; }; category?: { title: string; id: number; } | undefined; }, { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; account: { name: string; id: number; }; category?: { title: string; id: number; } | undefined; }>, "many">; summary: z.ZodObject<{ totalCount: z.ZodNumber; totalCredit: z.ZodNumber; totalDebit: z.ZodNumber; netAmount: z.ZodNumber; }, "strip", z.ZodTypeAny, { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; }, { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; }>; }, "strip", z.ZodTypeAny, { transactions: { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; account: { name: string; id: number; }; category?: { title: string; id: number; } | undefined; }[]; summary: { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; }; }, { transactions: { type: string; id: number; date: string; currency_code: string; payee: string; amount: number; note: string | null; account: { name: string; id: number; }; category?: { title: string; id: number; } | undefined; }[]; summary: { totalCount: number; totalCredit: number; totalDebit: number; netAmount: number; }; }>; export type GetTransactionsResponse = z.infer<typeof GetTransactionsResponseSchema>; export declare function getTransactionsLogic(params: GetTransactionsInput, context: RequestContext): Promise<GetTransactionsResponse>; export declare const registerGetTransactionsTool: (server: McpServer) => Promise<void>;