/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 907bdae927cc */ import * as z from "zod"; import { assetRelationsDeleteAssetRelationsByAssetId } from "../../funcs/assetRelationsDeleteAssetRelationsByAssetId.js"; import { UnrelateAssetsByAssetIdRequest$zodSchema } from "../../models/unrelateassetsbyassetidrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { asset_id: z.string().describe( "The asset ID of the resource. Must be a 32-character hexadecimal string.", ), unrelate_assets_by_asset_id_request: UnrelateAssetsByAssetIdRequest$zodSchema .describe(`The asset IDs to unrelate.`), }; export const tool$assetRelationsDeleteAssetRelationsByAssetId: ToolDefinition< typeof args > = { name: "delete-asset-relations", description: `Delete asset relations by asset ID Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.`, scopes: ["librarian"], annotations: { "title": "Delete Asset Relations", "destructiveHint": true, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await assetRelationsDeleteAssetRelationsByAssetId( client, args.asset_id, args.unrelate_assets_by_asset_id_request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };