"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.tool$uploadPresetsGetUploadPreset = void 0;
const z = __importStar(require("zod"));
const uploadPresetsGetUploadPreset_js_1 = require("../../funcs/uploadPresetsGetUploadPreset.js");
const tools_js_1 = require("../tools.js");
const args = {
    name: z.string(),
};
exports.tool$uploadPresetsGetUploadPreset = {
    name: "get-upload-preset-details",
    description: `Purpose: Retrieves the configuration details of a specific upload preset (such as its allowed parameters and settings). 
Usage: Use this when you need to inspect or utilize a preset's settings (for example, to verify if unsigned uploading is enabled or what transformations are applied on upload by default). 
When Not to Use: Not required if you only need a list of preset names (use list-upload-presets for that). Also not useful if the preset name is unknown. 
Output: Returns a JSON object containing information on the upload preset profile. Some returned parameters examples: presets(array of preset objects), name(preset name), unsigned(allows unsigned uploads), settings(preset configuration object), external_id(unique preset identifier), transformation(default transformation string), tags(auto-applied tags), allowed_formats(permitted file formats), eager(transformations generated on upload), overwrite(overwrite existing files), use_filename(use original filename), unique_filename(ensure unique filenames), use_filename_as_display_name(filename as display name), use_asset_folder_as_public_id_prefix(folder prefix for public ID), type(upload type), moderation(content moderation settings), auto_transcription(automatic transcription settings), asset_folder(default upload folder), access_control(access permissions)
`,
    scopes: ["builder"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await (0, uploadPresetsGetUploadPreset_js_1.uploadPresetsGetUploadPreset)(client, args.name, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return (0, tools_js_1.formatResult)(value, apiCall);
    },
};
//# sourceMappingURL=uploadPresetsGetUploadPreset.js.map