/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 3c089fceea5e */ import * as z from "zod"; import { transformationsDeleteTransformation } from "../../funcs/transformationsDeleteTransformation.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { transformation: z.string().describe( "The transformation identifier. Can be either a named transformation (e.g., 'small_profile_thumbnail') or a transformation string (e.g., 'w_100,h_150,c_fill,g_auto').\n", ), invalidate: z.boolean().describe( "Invalidate derived resources generated using the deleted transformation from CDN.", ).optional(), }; export const tool$transformationsDeleteTransformation: ToolDefinition< typeof args > = { name: "delete-transformation", description: `Deletes a named transformation from your account Delete a named or unnamed transformation. Optionally invalidate derived resources generated using the named transformation. `, scopes: ["admin"], annotations: { "title": "Delete Transformation", "destructiveHint": true, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await transformationsDeleteTransformation( client, args.transformation, args.invalidate, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };