UNPKG

acquia-dam-sdk

Version:
60 lines (57 loc) 2.89 kB
import { ApiClient } from '../../client/index.js'; import { AddRemoveAssetsParams, CreateCategoryParams, EditCategoryParams } from './requests.js'; import { CreateEditCategoryResult, CategoryTreeResult, ListCategoriesResult } from './responses.js'; declare class CategoriesApi { private _client; /** * Create an instance of the CategoriesApi class * * Provides information about Categories and the Assets contained in them * * @param client Provide an instance of ApiClient. * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Categories} * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Categories} */ constructor(client: ApiClient); /** * Add or remove multiple assets from multiple categories * @param params Information about the request * @returns Promise containing no information * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Categories/operation/updateCategoryAssets} */ addOrRemoveAsets(params: AddRemoveAssetsParams): Promise<void>; /** * Create a new category * @param params Information about the request * @returns Promise containing information about the new category * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Categories/operation/createCategory} */ createCategory(params: CreateCategoryParams): Promise<CreateEditCategoryResult>; /** * Update a category's information * @param params Information about the request * @returns Promise containing information about the modified category * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Categories/operation/editCategory} */ editCategory(params: EditCategoryParams): Promise<CreateEditCategoryResult>; /** * Gets the category tree sctructure for the entire site * @param includeEmpty `true` if the response should include categories with no assets. * @returns Promise containing the category tree structure * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Categories/operation/getCategoryTree} */ getCategoryTree(includeEmpty?: boolean): Promise<CategoryTreeResult>; /** * Retrieve a list of child categories. * @param categoryPath Optional parent category path. Slashes in category names must be escaped with a backslash. If omitted, the top-level categories will be returned. * @returns Promise containing a list of asset categories * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Categories/operation/listAssetCategories} */ listCategories(categoryPath?: string): Promise<ListCategoriesResult>; /** * URL-encodes symbols in the path. Escaped slashes are treated as part of the category's name. * @param path The category path */ encodeCategoryPath(path: string): string; } export { CategoriesApi };