/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { assetRelationsDeleteAssetRelationsByAssetId } from "../../funcs/assetRelationsDeleteAssetRelationsByAssetId.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    assetId: z.string(),
    requestBody: operations.DeleteAssetRelationsByAssetIdRequestBody$inboundSchema,
};
export const tool$assetRelationsDeleteAssetRelationsByAssetId = {
    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 deliver 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"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await assetRelationsDeleteAssetRelationsByAssetId(client, args.assetId, args.requestBody, { 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=assetRelationsDeleteAssetRelationsByAssetId.js.map