UNPKG

acquia-dam-sdk

Version:
70 lines (67 loc) 3.94 kB
import { ApiClient } from '../../client/index.js'; import { AddMetadataValueParams, ListViewableMetadataFieldsParams, UpdateMetadataFieldValueParams } from './requests.js'; import { ListFieldValuesResult, GetMetadataFieldValueResult, ListMetadataTypesResult, ListViewableMetadataFieldsResult } from './responses.js'; declare class MetadataApi { private _client; /** * Create an instance of the MetadataApi class. * * These endpoints allow you to retrieve or modify information about existing metadata fields. If you want to retrieve or modify metadata applied to a specific asset, use the AssetsApi * * @param client Provide an instance of ApiClient. * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata} * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Metadata} */ constructor(client: ApiClient); /** * Add a value to a controlled metadata field's vocabulary * @param params Information about the request * @returns Promise containing no data * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/addControlledVocabularyValue} */ addValue(params: AddMetadataValueParams): Promise<void>; /** * Remove a value from a controlled metadata field's vocabulary * @param displayKey Display key of the controlled vocabulary metadata field * @param value The controlled vocabulary value you wish to remove * @returns Promise containing no data * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/deleteControlledVocabularyValue} */ deleteValue(displayKey: string, value: string): Promise<void>; /** * Retrieve a list of controlled vocabulary metadata values * @param displayKey Display key of the controlled vocabulary metadata field * @returns Promise containing the vocabulary for the given field * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/listControlledVocabularyValues} */ listFieldValues(displayKey: string): Promise<ListFieldValuesResult>; /** * Get details for a single controlled vocabulary value * @param displayKey Display key of the controlled vocabulary metadata field * @param value The controlled vocabulary value * @returns Promise containing information for the metadata field value * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/getControlledVocabularyValue} */ getValue(displayKey: string, value: string): Promise<GetMetadataFieldValueResult>; /** * Retrieves the list of all MetadataTypes in the system. In addition to the Type's name and use, a listing of all that Type's MetadataFields is provided. For MetadataFields with a controlled list of options, each value is also provided. * @returns Promise containing a list of metadata types * @see {@link https://docs.acquia.com/acquia-dam/api-v1#tag/Metadata/operation/getMetadataTypes} */ listMetadataTypes(): Promise<ListMetadataTypesResult>; /** * Query for a list of metadata fields that you have permission to see * @param params Information about the request * @returns Promise containing information for the desired metadata fields * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/listMetadataFields} */ listViewableFields(params?: ListViewableMetadataFieldsParams): Promise<ListViewableMetadataFieldsResult>; /** * Update the display value or the index (or both) of a controlled metadata field value * @param params Information about the request * @returns Promise containing no information * @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Metadata/operation/updateControlledVocabularyValue} */ updateValue(params: UpdateMetadataFieldValueParams): Promise<void>; } export { MetadataApi };