/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { destinationsUpdate } from "../../funcs/destinationsUpdate.js"; import * as components from "../../models/components/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { tenantId: z.string(), destinationId: z.string(), body: components.DestinationUpdate$inboundSchema, }; export const tool$destinationsUpdate: ToolDefinition = { name: "destinations-update", description: `Update Destination Updates the configuration of an existing destination. The request body structure depends on the destination's \`type\`. Type itself cannot be updated. May return an OAuth redirect URL for certain types.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await destinationsUpdate( client, args.tenantId, args.destinationId, args.body, { 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); }, };