UNPKG

pocketsmith-mcp

Version:

MCP server for managing budgets via PocketSmith API

79 lines (78 loc) 2.94 kB
/** * @fileoverview Create a new automatic categorization rule in PocketSmith * Creates rules to automatically categorize transactions based on payee name patterns. * Supports pattern matching against payee names for flexible transaction categorization. * Rules can optionally be applied retroactively to existing transactions. */ import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestContext } from "../../../utils/index.js"; export declare const CreateCategoryRuleInputSchema: z.ZodObject<{ apiKey: z.ZodOptional<z.ZodString>; accessToken: z.ZodOptional<z.ZodString>; categoryId: z.ZodNumber; payeeMatches: z.ZodString; applyToUncategorised: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; applyToAll: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { categoryId: number; payeeMatches: string; applyToUncategorised: boolean; applyToAll: boolean; apiKey?: string | undefined; accessToken?: string | undefined; }, { categoryId: number; payeeMatches: string; apiKey?: string | undefined; accessToken?: string | undefined; applyToUncategorised?: boolean | undefined; applyToAll?: boolean | undefined; }>; export type CreateCategoryRuleInput = z.infer<typeof CreateCategoryRuleInputSchema>; export declare const CreateCategoryRuleResponseSchema: z.ZodObject<{ rule: z.ZodObject<{ id: z.ZodNumber; category_id: z.ZodNumber; category_title: z.ZodOptional<z.ZodString>; payee_matches: z.ZodOptional<z.ZodString>; created_at: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: number; category_id: number; created_at?: string | undefined; category_title?: string | undefined; payee_matches?: string | undefined; }, { id: number; category_id: number; created_at?: string | undefined; category_title?: string | undefined; payee_matches?: string | undefined; }>; success: z.ZodBoolean; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; rule: { id: number; category_id: number; created_at?: string | undefined; category_title?: string | undefined; payee_matches?: string | undefined; }; success: boolean; }, { message: string; rule: { id: number; category_id: number; created_at?: string | undefined; category_title?: string | undefined; payee_matches?: string | undefined; }; success: boolean; }>; export type CreateCategoryRuleResponse = z.infer<typeof CreateCategoryRuleResponseSchema>; export declare function createCategoryRuleLogic(params: CreateCategoryRuleInput, context: RequestContext): Promise<CreateCategoryRuleResponse>; export declare const registerCreateCategoryRuleTool: (server: McpServer) => Promise<void>;