"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Folders = void 0;
const foldersCreateFolder_js_1 = require("../funcs/foldersCreateFolder.js");
const foldersDestroyFolder_js_1 = require("../funcs/foldersDestroyFolder.js");
const foldersListRootFolders_js_1 = require("../funcs/foldersListRootFolders.js");
const foldersSearchFolders_js_1 = require("../funcs/foldersSearchFolders.js");
const foldersSearchFoldersPost_js_1 = require("../funcs/foldersSearchFoldersPost.js");
const foldersShowFolder_js_1 = require("../funcs/foldersShowFolder.js");
const foldersUpdateFolder_js_1 = require("../funcs/foldersUpdateFolder.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Folders extends sdks_js_1.ClientSDK {
    /**
     * List sub-folders
     *
     * @remarks
     * Returns a list of sub-folders under the specified folder path.
     */
    async showFolder(folder, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersShowFolder_js_1.foldersShowFolder)(this, folder, options));
    }
    /**
     * Renames or moves an entire folder (along with all assets it contains) to a
     *
     * @remarks
     * Updates a folder's properties.
     */
    async updateFolder(folder, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersUpdateFolder_js_1.foldersUpdateFolder)(this, folder, requestBody, options));
    }
    /**
     * Creates a new empty folder in your Cloudinary media library
     *
     * @remarks
     * Creates a new folder at the specified path
     */
    async createFolder(folder, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersCreateFolder_js_1.foldersCreateFolder)(this, folder, options));
    }
    /**
     * Deletes an existing folder from your media library
     *
     * @remarks
     * Deletes a folder and all assets within it.
     */
    async destroyFolder(folder, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersDestroyFolder_js_1.foldersDestroyFolder)(this, folder, options));
    }
    /**
     * Get root folders
     *
     * @remarks
     * Retrieves an array of all root folders in your Cloudinary product environment. Limited to 2000 results.
     */
    async listRootFolders(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersListRootFolders_js_1.foldersListRootFolders)(this, request, options));
    }
    /**
     * Searches for folders whose attributes match a given expression
     *
     * @remarks
     * Lists the folders that match the specified search expression. Limited to 2000 results. If no parameters are passed, returns the 50 most recently created folders in descending order of creation time.
     */
    async searchFolders(expression, sortBy, maxResults, nextCursor, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersSearchFolders_js_1.foldersSearchFolders)(this, expression, sortBy, maxResults, nextCursor, options));
    }
    /**
     * Searches for folders in your product environment
     *
     * @remarks
     * Lists the folders that match the specified search expression. Limited to 2000 results. If no parameters are passed, returns the 50 most recently created folders in descending order of creation time.
     */
    async searchFoldersPost(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, foldersSearchFoldersPost_js_1.foldersSearchFoldersPost)(this, request, options));
    }
}
exports.Folders = Folders;
//# sourceMappingURL=folders.js.map