acquia-dam-sdk
Version:
Interact with the Acquia DAM API
118 lines (115 loc) • 5.91 kB
TypeScript
import { ApiClient } from '../../client/index.js';
import { CreateProductParams, ListChannelsParams, ListProductsByChannelParams, ListProductsCategoryParams, ListProductTypesParams, SearchProductsParams, UpdateAttributesParams, UpdateProductCategoryParams, UpdateFeaturedImageParams, UpdateParentProductParams, UpdateProductTypeParams } from './requests.js';
import { CreateProductResult, GetProductResult, ListChannelsResult, ListProductsByChannelResult, ListProductCategoriesResult, ListProductTypesResult, SearchProductsResult } from './responses.js';
declare class ProductsApi {
private _client;
/**
* Create an instance of the ProductsApi class.
*
* The Products API provides access to product information stored in Acquia Entries. The API allows you to create, retrieve, delete, and update products.
*
* @param client Provide an instance of ApiClient.
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products}
*/
constructor(client: ApiClient);
/**
* Create a new product
* @param params Information about the request
* @returns Promise containing the new Product ID
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/createProduct}
*/
createProduct(params: CreateProductParams): Promise<CreateProductResult>;
/**
* Delete a product
* @param id Product ID
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/deleteProduct}
*/
deleteProduct(id: string): Promise<void>;
/**
* Retrieve information about a product
* @param id Product ID
* @returns Promise containing information about a product
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/retrieveProductById}
*/
getProduct(id: string): Promise<GetProductResult>;
/**
* Retrieve a list of channels
* @param params Information about the request
* @returns Promise containing a list of channels
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Channels/operation/listChannels}
*/
listChannels(params?: ListChannelsParams): Promise<ListChannelsResult>;
/**
* The Channel Products endpoint returns a list of products associated with a given channel in Entries. Only the products and attributes that are configured for the channel will be included in the response
* @param params Information about the request
* @returns Promise containing a list of products in the channel
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/listProductsForChannel}
*/
listProductsByChannel(params: ListProductsByChannelParams): Promise<ListProductsByChannelResult>;
/**
* Retrieve a list of product categories
* @param params Information about the request
* @returns Promise containing a list of product categories
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Categories/operation/listProductCategories}
*/
listProductCategories(params?: ListProductsCategoryParams): Promise<ListProductCategoriesResult>;
/**
* Retrieve a list of product types
* @param params Information about the request
* @returns Promise containing a list of product types
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Product-Types/operation/listProductTypes}
*/
listProductTypes(params?: ListProductTypesParams): Promise<ListProductTypesResult>;
/**
* Change a product's name
* @param id Product ID
* @param name New product name
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/renameProduct}
*/
renameProduct(id: string, name: string): Promise<void>;
/**
* Search for products
* @param params Information about the request
* @returns Promise containing a list of products
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/listProductsBySearchQuery}
*/
searchProducts(params?: SearchProductsParams): Promise<SearchProductsResult>;
/**
* Update a product's attribute values
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/updateAttributeValues}
*/
updateAttributes(params: UpdateAttributesParams): Promise<void>;
/**
* Update a product's categories
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/updateProductCategory}
*/
updateProductCategory(params: UpdateProductCategoryParams): Promise<void>;
/**
* Update a product's featured image
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/updateFeaturedImage}
*/
updateFeaturedImage(params: UpdateFeaturedImageParams): Promise<void>;
/**
* Update a product's parent product
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/updateParentProduct}
*/
updateParentProduct(params: UpdateParentProductParams): Promise<void>;
/**
* Update a product's type
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://docs.acquia.com/acquia-dam/api-v2#tag/Products/operation/updateProductType}
*/
updateProductType(params: UpdateProductTypeParams): Promise<void>;
}
export { ProductsApi };