acquia-dam-sdk
Version:
Interact with the Acquia DAM API
68 lines (65 loc) • 3.73 kB
TypeScript
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.
*/
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://widenv2.docs.apiary.io/#reference/metadata/controlled-vocabulary/add-value}
*/
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://widenv2.docs.apiary.io/#reference/metadata/controlled-vocabulary/delete-value}
*/
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://widenv2.docs.apiary.io/#reference/metadata/controlled-vocabulary/list-values}
*/
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://widenv2.docs.apiary.io/#reference/metadata/controlled-vocabulary/retrieve-single-value}
*/
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://widenv1.docs.apiary.io/#reference/metadata/metadata-types-list/metadata-types-list}
*/
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://widenv2.docs.apiary.io/#reference/metadata/fields/viewable}
*/
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://widenv2.docs.apiary.io/#reference/metadata/controlled-vocabulary/update-value}
*/
updateValue(params: UpdateMetadataFieldValueParams): Promise<void>;
}
export { MetadataApi };