/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { uploadDestroyAsset } from "../funcs/uploadDestroyAsset.js";
import { uploadText } from "../funcs/uploadText.js";
import { uploadUpload } from "../funcs/uploadUpload.js";
import { uploadUploadChunk, } from "../funcs/uploadUploadChunk.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export { UploadAcceptEnum } from "../funcs/uploadUpload.js";
export { UploadChunkAcceptEnum } from "../funcs/uploadUploadChunk.js";
export class Upload extends ClientSDK {
    /**
     * Uploads media assets (images, videos, raw files) to your Cloudinary product environment
     *
     * @remarks
     * Uploads media assets (images, videos, raw files) to your Cloudinary product environment. The file is securely stored
     * in the cloud with backup and revision history. Cloudinary automatically analyzes and saves important data about each
     * asset, such as format, size, resolution, and prominent colors, which is indexed to enable searching on those attributes.
     *
     * Supports uploading from:
     * - Local file paths (SDKs/MCP server only). For MCP server path MUST start with file://
     * - Remote HTTP/HTTPS URLs
     * - Base64 Data URIs (max ~60 MB)
     * - Private storage buckets (S3 or Google Storage)
     * - FTP addresses
     *
     * The uploaded asset is immediately available for transformation and delivery upon successful upload.
     */
    async upload(resourceType, uploadRequest, options) {
        return unwrapAsync(uploadUpload(this, resourceType, uploadRequest, options));
    }
    /**
     * Upload a single chunk of a large file
     *
     * @remarks
     * Uploads a single chunk of a large file as part of a chunked upload process. This enables efficient upload of
     * large files with the ability to resume interrupted uploads. Each request uploads one chunk of the file.
     * It is required for any files that are larger than 100 MB. This is often relevant for video files, as they
     * tend to have larger file sizes. Minimum chunk size is 5 MB.
     */
    async uploadChunk(resourceType, contentRange, xUniqueUploadId, uploadRequest, options) {
        return unwrapAsync(uploadUploadChunk(this, resourceType, contentRange, xUniqueUploadId, uploadRequest, options));
    }
    /**
     * Destroys an asset/resource
     */
    async destroyAsset(resourceType, publicId, invalidate, options) {
        return unwrapAsync(uploadDestroyAsset(this, resourceType, publicId, invalidate, options));
    }
    /**
     * Create image from text
     *
     * @remarks
     * Dynamically generates an image from a specified text string.
     */
    async text(resourceType, requestBody, options) {
        return unwrapAsync(uploadText(this, resourceType, requestBody, options));
    }
}
//# sourceMappingURL=upload.js.map