"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetadataFields = void 0;
const metadataFieldsCreateMetadataField_js_1 = require("../funcs/metadataFieldsCreateMetadataField.js");
const metadataFieldsDeleteMetadataField_js_1 = require("../funcs/metadataFieldsDeleteMetadataField.js");
const metadataFieldsDeleteMetadataFieldDatasource_js_1 = require("../funcs/metadataFieldsDeleteMetadataFieldDatasource.js");
const metadataFieldsGetMetadataField_js_1 = require("../funcs/metadataFieldsGetMetadataField.js");
const metadataFieldsListMetadataFields_js_1 = require("../funcs/metadataFieldsListMetadataFields.js");
const metadataFieldsReorderMetadataField_js_1 = require("../funcs/metadataFieldsReorderMetadataField.js");
const metadataFieldsReorderMetadataFields_js_1 = require("../funcs/metadataFieldsReorderMetadataFields.js");
const metadataFieldsRestoreMetadataFieldDatasource_js_1 = require("../funcs/metadataFieldsRestoreMetadataFieldDatasource.js");
const metadataFieldsSearchDatasourceInMDField_js_1 = require("../funcs/metadataFieldsSearchDatasourceInMDField.js");
const metadataFieldsSearchMetadataFieldDatasource_js_1 = require("../funcs/metadataFieldsSearchMetadataFieldDatasource.js");
const metadataFieldsUpdateMetadataField_js_1 = require("../funcs/metadataFieldsUpdateMetadataField.js");
const metadataFieldsUpdateMetadataFieldDatasource_js_1 = require("../funcs/metadataFieldsUpdateMetadataFieldDatasource.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class MetadataFields extends sdks_js_1.ClientSDK {
    /**
     * Creates a new structured metadata field in your account
     *
     * @remarks
     * Creates a new metadata field with the specified properties and configuration.
     */
    async createMetadataField(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsCreateMetadataField_js_1.metadataFieldsCreateMetadataField)(this, request, options));
    }
    /**
     * Lists all structured metadata fields defined in your Cloudinary product environment
     *
     * @remarks
     * Retrieves a list of all metadata fields in the product environment based on the provided filters.
     */
    async listMetadataFields(externalIds, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsListMetadataFields_js_1.metadataFieldsListMetadataFields)(this, externalIds, options));
    }
    /**
     * Retrieves the definition of a specific structured metadata field by its identifier (external_id)
     *
     * @remarks
     * Retrieves detailed information about the specified metadata field.
     */
    async getMetadataField(externalId, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsGetMetadataField_js_1.metadataFieldsGetMetadataField)(this, externalId, options));
    }
    /**
     * Updates the configuration of an existing metadata field
     *
     * @remarks
     * Updates the properties and configuration of the specified metadata field.
     */
    async updateMetadataField(externalId, metadataField, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsUpdateMetadataField_js_1.metadataFieldsUpdateMetadataField)(this, externalId, metadataField, options));
    }
    /**
     * Deletes a structured metadata field definition from your account
     *
     * @remarks
     * Permanently deletes the specified metadata field and all its associated data.
     */
    async deleteMetadataField(externalId, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsDeleteMetadataField_js_1.metadataFieldsDeleteMetadataField)(this, externalId, options));
    }
    /**
     * Search across all metadata field datasources
     *
     * @remarks
     * Performs a search across all metadata field datasources to find matching values.
     */
    async searchMetadataFieldDatasource(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsSearchMetadataFieldDatasource_js_1.metadataFieldsSearchMetadataFieldDatasource)(this, request, options));
    }
    /**
     * Reorder all metadata fields
     *
     * @remarks
     * Changes the display order of all metadata fields based on specified criteria.
     */
    async reorderMetadataFields(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsReorderMetadataFields_js_1.metadataFieldsReorderMetadataFields)(this, request, options));
    }
    /**
     * Change position of metadata field
     *
     * @remarks
     * Changes the display position of a specific metadata field within the list.
     */
    async reorderMetadataField(externalId, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsReorderMetadataField_js_1.metadataFieldsReorderMetadataField)(this, externalId, requestBody, options));
    }
    /**
     * Updates the allowed values (the datasource) for a specified metadata field
     *
     * @remarks
     * Updates the values in a metadata field's datasource, including adding, modifying, or changing the order of values.
     */
    async updateMetadataFieldDatasource(externalId, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsUpdateMetadataFieldDatasource_js_1.metadataFieldsUpdateMetadataFieldDatasource)(this, externalId, requestBody, options));
    }
    /**
     * Removes one or more allowed values from a metadata field's datasource
     *
     * @remarks
     * Removes specific values from a metadata field's datasource by their external IDs.
     */
    async deleteMetadataFieldDatasource(externalId, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsDeleteMetadataFieldDatasource_js_1.metadataFieldsDeleteMetadataFieldDatasource)(this, externalId, requestBody, options));
    }
    /**
     * Search datasource values in a metadata field
     *
     * @remarks
     * Performs a search within a specific metadata field's datasource to find matching values, with support for exact or partial matches.
     */
    async searchDatasourceInMDField(externalId, requestBody, maxResults, term, exactMatch, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsSearchDatasourceInMDField_js_1.metadataFieldsSearchDatasourceInMDField)(this, externalId, requestBody, maxResults, term, exactMatch, options));
    }
    /**
     * Restore datasource values
     *
     * @remarks
     * Restores datasource values that have been deleted.
     */
    async restoreMetadataFieldDatasource(externalId, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, metadataFieldsRestoreMetadataFieldDatasource_js_1.metadataFieldsRestoreMetadataFieldDatasource)(this, externalId, requestBody, options));
    }
}
exports.MetadataFields = MetadataFields;
//# sourceMappingURL=metadatafields.js.map