import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Webflow from "../../../index"; export declare namespace Assets { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Assets are files that are uploaded to your Webflow account. */ export declare class Assets { protected readonly _options: Assets.Options; constructor(_options: Assets.Options); /** * List of assets uploaded to a site * * Required scope | `assets:read` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.AssetsListRequest} request * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.list("580e63e98c9a982ac9b8b741", { * offset: 1, * limit: 1 * }) */ list(siteId: string, request?: Webflow.AssetsListRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __list; /** * The first step in uploading an asset to a site. * * * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. * * * Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload. * * * To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets). * * Required scope | `assets:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.AssetsCreateRequest} request * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.create("580e63e98c9a982ac9b8b741", { * fileName: "file.png", * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e" * }) */ create(siteId: string, request: Webflow.AssetsCreateRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __create; /** * Get details about an asset * * Required scope | `assets:read` * * @param {string} assetId - Unique identifier for an Asset on a site * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.get("580e63fc8c9a982ac9b8b745") */ get(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __get; /** * Delete an Asset * * Required Scope: `assets: write` * * @param {string} assetId - Unique identifier for an Asset on a site * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.delete("580e63fc8c9a982ac9b8b745") */ delete(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __delete; /** * Update details of an Asset. * * Required scope | `assets:write` * * @param {string} assetId - Unique identifier for an Asset on a site * @param {Webflow.AssetsUpdateRequest} request * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.update("580e63fc8c9a982ac9b8b745") */ update(assetId: string, request?: Webflow.AssetsUpdateRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __update; /** * List Asset Folders within a given site * * Required scope | `assets:read` * * @param {string} siteId - Unique identifier for a Site * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.listFolders("580e63e98c9a982ac9b8b741") */ listFolders(siteId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __listFolders; /** * Create an Asset Folder within a given site * * Required scope | `assets:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.AssetsCreateFolderRequest} request * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.createFolder("580e63e98c9a982ac9b8b741", { * displayName: "my asset folder" * }) */ createFolder(siteId: string, request: Webflow.AssetsCreateFolderRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __createFolder; /** * Get details about a specific Asset Folder * * Required scope | `assets:read` * * @param {string} assetFolderId - Unique identifier for an Asset Folder * @param {Assets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.assets.getFolder("6390c49774a71f0e3c1a08ee") */ getFolder(assetFolderId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise; private __getFolder; protected _getAuthorizationHeader(): Promise; }