/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { transactionsGetById } from "../../funcs/transactionsGetById.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { transactionId: z.string(), }; export const tool$transactionsGetById: ToolDefinition = { name: "transactions-get-by-id", description: `Get a transaction by ID Retrieve a single transaction by ID. View payment details, status, and associated order information.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await transactionsGetById( client, args.transactionId, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };