UNPKG

pocketsmith-mcp

Version:

MCP server for managing budgets via PocketSmith API

121 lines (120 loc) 4.49 kB
/** * @fileoverview Create an attachment and assign it to a transaction in PocketSmith * This tool handles the two-step process: creating a user attachment then assigning it to a transaction */ import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestContext } from "../../../utils/index.js"; export declare const CreateTransactionAttachmentInputSchema: z.ZodObject<{ apiKey: z.ZodOptional<z.ZodString>; accessToken: z.ZodOptional<z.ZodString>; transactionId: z.ZodNumber; title: z.ZodOptional<z.ZodString>; fileName: z.ZodOptional<z.ZodString>; fileData: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { transactionId: number; apiKey?: string | undefined; title?: string | undefined; accessToken?: string | undefined; userId?: number | undefined; fileName?: string | undefined; fileData?: string | undefined; }, { transactionId: number; apiKey?: string | undefined; title?: string | undefined; accessToken?: string | undefined; userId?: number | undefined; fileName?: string | undefined; fileData?: string | undefined; }>; export type CreateTransactionAttachmentInput = z.infer<typeof CreateTransactionAttachmentInputSchema>; export declare const CreateTransactionAttachmentResponseSchema: z.ZodObject<{ attachment: z.ZodObject<{ id: z.ZodNumber; title: z.ZodString; file_name: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; content_type: z.ZodOptional<z.ZodString>; original_url: z.ZodOptional<z.ZodString>; variants: z.ZodOptional<z.ZodObject<{ large_url: z.ZodOptional<z.ZodString>; thumb_url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { large_url?: string | undefined; thumb_url?: string | undefined; }, { large_url?: string | undefined; thumb_url?: string | undefined; }>>; created_at: z.ZodOptional<z.ZodString>; updated_at: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { title: string; id: number; type?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; file_name?: string | undefined; content_type?: string | undefined; original_url?: string | undefined; variants?: { large_url?: string | undefined; thumb_url?: string | undefined; } | undefined; }, { title: string; id: number; type?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; file_name?: string | undefined; content_type?: string | undefined; original_url?: string | undefined; variants?: { large_url?: string | undefined; thumb_url?: string | undefined; } | undefined; }>; transactionId: z.ZodNumber; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { transactionId: number; attachment: { title: string; id: number; type?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; file_name?: string | undefined; content_type?: string | undefined; original_url?: string | undefined; variants?: { large_url?: string | undefined; thumb_url?: string | undefined; } | undefined; }; success: boolean; }, { transactionId: number; attachment: { title: string; id: number; type?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; file_name?: string | undefined; content_type?: string | undefined; original_url?: string | undefined; variants?: { large_url?: string | undefined; thumb_url?: string | undefined; } | undefined; }; success: boolean; }>; export type CreateTransactionAttachmentResponse = z.infer<typeof CreateTransactionAttachmentResponseSchema>; export declare function createTransactionAttachmentLogic(params: CreateTransactionAttachmentInput, context: RequestContext): Promise<CreateTransactionAttachmentResponse>; export declare const registerCreateTransactionAttachmentTool: (server: McpServer) => Promise<void>;