/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 4410baf67905
 */
import { assetsGenerateArchive } from "../../funcs/assetsGenerateArchive.js";
import { ArchiveResourceType$zodSchema } from "../../models/archiveresourcetype.js";
import { GenerateArchiveRequestBody$zodSchema } from "../../models/generatearchiveop.js";
import { formatResult } from "../tools.js";
const args = {
    resource_type: ArchiveResourceType$zodSchema.describe(`The type of resource for archive generation (image, video, or raw).`),
    RequestBody: GenerateArchiveRequestBody$zodSchema.describe(`The archive generation parameters.`),
};
export const tool$assetsGenerateArchive = {
    name: "generate-archive",
    description: `Creates an archive (ZIP or TGZ file) that contains a set of assets from your product environment.

Creates a downloadable ZIP or other archive format containing the specified resources.`,
    scopes: ["librarian"],
    annotations: {
        "title": "Generate Archive",
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsGenerateArchive(client, args.resource_type, args.RequestBody, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsGenerateArchive.js.map