"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Assets = exports.DownloadBackupAssetAcceptEnum = exports.GenerateArchiveAcceptEnum = exports.DownloadAssetAcceptEnum = void 0;
const assetsDeleteBackupVersions_js_1 = require("../funcs/assetsDeleteBackupVersions.js");
const assetsDeleteResourcesByPublicId_js_1 = require("../funcs/assetsDeleteResourcesByPublicId.js");
const assetsDerivedDestroy_js_1 = require("../funcs/assetsDerivedDestroy.js");
const assetsDestroyByAssetId_js_1 = require("../funcs/assetsDestroyByAssetId.js");
const assetsDownloadAsset_js_1 = require("../funcs/assetsDownloadAsset.js");
const assetsDownloadBackupAsset_js_1 = require("../funcs/assetsDownloadBackupAsset.js");
const assetsExplicitAsset_js_1 = require("../funcs/assetsExplicitAsset.js");
const assetsGenerateArchive_js_1 = require("../funcs/assetsGenerateArchive.js");
const assetsGetResourceByAssetId_js_1 = require("../funcs/assetsGetResourceByAssetId.js");
const assetsGetResourceByPublicId_js_1 = require("../funcs/assetsGetResourceByPublicId.js");
const assetsListImages_js_1 = require("../funcs/assetsListImages.js");
const assetsListRawFiles_js_1 = require("../funcs/assetsListRawFiles.js");
const assetsListResourcesByAssetFolder_js_1 = require("../funcs/assetsListResourcesByAssetFolder.js");
const assetsListResourcesByAssetIDs_js_1 = require("../funcs/assetsListResourcesByAssetIDs.js");
const assetsListResourcesByContext_js_1 = require("../funcs/assetsListResourcesByContext.js");
const assetsListResourcesByModerationKindAndStatus_js_1 = require("../funcs/assetsListResourcesByModerationKindAndStatus.js");
const assetsListResourceTags_js_1 = require("../funcs/assetsListResourceTags.js");
const assetsListResourceTypes_js_1 = require("../funcs/assetsListResourceTypes.js");
const assetsListVideos_js_1 = require("../funcs/assetsListVideos.js");
const assetsRenameAsset_js_1 = require("../funcs/assetsRenameAsset.js");
const assetsRestoreResourcesByAssetIDs_js_1 = require("../funcs/assetsRestoreResourcesByAssetIDs.js");
const assetsUpdateResourceByAssetId_js_1 = require("../funcs/assetsUpdateResourceByAssetId.js");
const assetsUpdateResourceByPublicId_js_1 = require("../funcs/assetsUpdateResourceByPublicId.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
var assetsDownloadAsset_js_2 = require("../funcs/assetsDownloadAsset.js");
Object.defineProperty(exports, "DownloadAssetAcceptEnum", { enumerable: true, get: function () { return assetsDownloadAsset_js_2.DownloadAssetAcceptEnum; } });
var assetsGenerateArchive_js_2 = require("../funcs/assetsGenerateArchive.js");
Object.defineProperty(exports, "GenerateArchiveAcceptEnum", { enumerable: true, get: function () { return assetsGenerateArchive_js_2.GenerateArchiveAcceptEnum; } });
var assetsDownloadBackupAsset_js_2 = require("../funcs/assetsDownloadBackupAsset.js");
Object.defineProperty(exports, "DownloadBackupAssetAcceptEnum", { enumerable: true, get: function () { return assetsDownloadBackupAsset_js_2.DownloadBackupAssetAcceptEnum; } });
class Assets extends sdks_js_1.ClientSDK {
    /**
     * Updates an existing asset's identifier and optionally other metadata in your Cloudinary account
     */
    async renameAsset(resourceType, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsRenameAsset_js_1.assetsRenameAsset)(this, resourceType, requestBody, options));
    }
    /**
     * Generates a download link for a specific asset (image)
     */
    async downloadAsset(resourceType, publicId, apiKey, signature, timestamp, format, type, expiresAt, attachment, targetFilename, transformation, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDownloadAsset_js_1.assetsDownloadAsset)(this, resourceType, publicId, apiKey, signature, timestamp, format, type, expiresAt, attachment, targetFilename, transformation, options));
    }
    /**
     * Apply operations on an existing asset
     *
     * @remarks
     * Applies actions such as transformations, tags, or metadata updates to an existing asset without re-uploading it.
     * This is useful for applying new transformations, adding tags, or updating metadata on assets that are already in your cloud.
     */
    async explicitAsset(resourceType, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsExplicitAsset_js_1.assetsExplicitAsset)(this, resourceType, requestBody, options));
    }
    /**
     * Creates an archive (ZIP or TGZ file) that contains a set of assets from
     *
     * @remarks
     * Creates a downloadable ZIP or other archive format containing the specified resources.
     */
    async generateArchive(resourceType, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsGenerateArchive_js_1.assetsGenerateArchive)(this, resourceType, requestBody, options));
    }
    /**
     * Download a backup copy of an asset
     */
    async downloadBackupAsset(assetId, versionId, apiKey, signature, timestamp, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDownloadBackupAsset_js_1.assetsDownloadBackupAsset)(this, assetId, versionId, apiKey, signature, timestamp, options));
    }
    /**
     * Delete asset by asset-id
     *
     * @remarks
     * Deletes an asset using its asset ID. This endpoint replaces the legacy /resources/by_asset_id endpoint.
     * Returns the deletion status and asset folder information when folder decoupling is enabled.
     */
    async destroyByAssetId(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDestroyByAssetId_js_1.assetsDestroyByAssetId)(this, request, options));
    }
    /**
     * Get resource types
     *
     * @remarks
     * Returns a list of all resource types that correspond to assets currently in your product environment.
     */
    async listResourceTypes(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourceTypes_js_1.assetsListResourceTypes)(this, request, options));
    }
    /**
     * Get image assets
     *
     * @remarks
     * Retrieves a list of image assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
     */
    async listImages(type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListImages_js_1.assetsListImages)(this, type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options));
    }
    /**
     * Get video assets
     *
     * @remarks
     * Retrieves a list of video assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
     */
    async listVideos(type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListVideos_js_1.assetsListVideos)(this, type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options));
    }
    /**
     * Get raw assets
     *
     * @remarks
     * Retrieves a list of raw assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
     */
    async listRawFiles(type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListRawFiles_js_1.assetsListRawFiles)(this, type, prefix, publicIds, tags, nextCursor, maxResults, direction, startAt, fields, options));
    }
    /**
     * Get resources by asset folder
     *
     * @remarks
     * Retrieves a list of resources within a specific asset folder. Requires folder decoupling to be enabled.
     */
    async listResourcesByAssetFolder(assetFolder, resourceType, nextCursor, maxResults, direction, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourcesByAssetFolder_js_1.assetsListResourcesByAssetFolder)(this, assetFolder, resourceType, nextCursor, maxResults, direction, fields, options));
    }
    /**
     * Get resources by asset IDs
     *
     * @remarks
     * Retrieves details for specific resources using their asset IDs (or external IDs).
     */
    async listResourcesByAssetIDs(assetIds, resourceType, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourcesByAssetIDs_js_1.assetsListResourcesByAssetIDs)(this, assetIds, resourceType, fields, options));
    }
    /**
     * Get resources by context
     *
     * @remarks
     * Retrieves resources matching specific context key/value pairs.
     */
    async listResourcesByContext(resourceType, key, value, nextCursor, maxResults, direction, fields, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourcesByContext_js_1.assetsListResourcesByContext)(this, resourceType, key, value, nextCursor, maxResults, direction, fields, options));
    }
    /**
     * Get resources by moderation kind and status
     *
     * @remarks
     * Retrieves resources matching specific moderation kind and status.
     */
    async listResourcesByModerationKindAndStatus(resourceType, moderationKind, moderationStatus, fields, nextCursor, maxResults, direction, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourcesByModerationKindAndStatus_js_1.assetsListResourcesByModerationKindAndStatus)(this, resourceType, moderationKind, moderationStatus, fields, nextCursor, maxResults, direction, options));
    }
    /**
     * Restore assets
     *
     * @remarks
     * Restores one or more resources from backup using their asset IDs. Can optionally specify versions to restore.
     */
    async restoreResourcesByAssetIDs(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsRestoreResourcesByAssetIDs_js_1.assetsRestoreResourcesByAssetIDs)(this, request, options));
    }
    /**
     * Delete resources by public ID
     *
     * @remarks
     * Deletes assets uploaded to your product environment, identified by their public IDs.
     */
    async deleteResourcesByPublicId(resourceType, type, deleteResourceByPublicIdsRequest, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDeleteResourcesByPublicId_js_1.assetsDeleteResourcesByPublicId)(this, resourceType, type, deleteResourceByPublicIdsRequest, options));
    }
    /**
     * Get resource by public ID
     *
     * @remarks
     * Returns the details of a single resource specified by its public ID.
     */
    async getResourceByPublicId(resourceType, type, publicId, colors, mediaMetadata, faces, qualityAnalysis, accessibilityAnalysis, pages, phash, coordinates, versions, maxResults, derivedNextCursor, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsGetResourceByPublicId_js_1.assetsGetResourceByPublicId)(this, resourceType, type, publicId, colors, mediaMetadata, faces, qualityAnalysis, accessibilityAnalysis, pages, phash, coordinates, versions, maxResults, derivedNextCursor, options));
    }
    /**
     * Update asset by public ID
     *
     * @remarks
     * Updates one or more attributes of a specified resource (asset) identified by its public ID. Note that you can also update many attributes of an existing asset using the explicit method, which is not rate limited.
     */
    async updateResourceByPublicId(resourceType, type, publicId, resourceUpdateRequest, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsUpdateResourceByPublicId_js_1.assetsUpdateResourceByPublicId)(this, resourceType, type, publicId, resourceUpdateRequest, options));
    }
    /**
     * Get resource by asset ID
     *
     * @remarks
     * Returns the details of a single resource specified by its asset ID.
     */
    async getResourceByAssetId(assetId, colors, mediaMetadata, faces, qualityAnalysis, accessibilityAnalysis, pages, phash, coordinates, versions, maxResults, derivedNextCursor, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsGetResourceByAssetId_js_1.assetsGetResourceByAssetId)(this, assetId, colors, mediaMetadata, faces, qualityAnalysis, accessibilityAnalysis, pages, phash, coordinates, versions, maxResults, derivedNextCursor, options));
    }
    /**
     * Updates an existing asset's metadata, tags, and other attributes using its asset ID
     *
     * @remarks
     * Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. Note that you can also update many attributes of an existing asset using the explicit method, which is not rate-limited.
     */
    async updateResourceByAssetId(assetId, resourceUpdateRequest, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsUpdateResourceByAssetId_js_1.assetsUpdateResourceByAssetId)(this, assetId, resourceUpdateRequest, options));
    }
    /**
     * Retrieves a list of tags currently applied to assets in your Cloudinary account
     *
     * @remarks
     * Retrieves a comprehensive list of all tags that exist in your product environment for assets of the specified type.
     *
     * [Cloudinary Admin API documentation](https://cloudinary.com/documentation/admin_api)
     */
    async listResourceTags(resourceType, prefix, nextCursor, maxResults, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsListResourceTags_js_1.assetsListResourceTags)(this, resourceType, prefix, nextCursor, maxResults, options));
    }
    /**
     * Delete backed up versions
     *
     * @remarks
     * Deletes specific backed up versions of an asset identified by asset ID.
     * This operation is irreversible and deleted versions cannot be recovered.
     */
    async deleteBackupVersions(assetId, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDeleteBackupVersions_js_1.assetsDeleteBackupVersions)(this, assetId, requestBody, options));
    }
    /**
     * Delete derived resources
     *
     * @remarks
     * Deletes derived resources by derived resource ID
     */
    async derivedDestroy(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, assetsDerivedDestroy_js_1.assetsDerivedDestroy)(this, request, options));
    }
}
exports.Assets = Assets;
//# sourceMappingURL=assets.js.map