/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { transformationsDeleteTransformation } from "../../funcs/transformationsDeleteTransformation.js";
import { formatResult } from "../tools.js";
const args = {
    transformation: z.string(),
    invalidate: z.boolean().optional(),
};
export const tool$transformationsDeleteTransformation = {
    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"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = 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,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=transformationsDeleteTransformation.js.map