acquia-dam-sdk
Version:
Interact with the Acquia DAM API
117 lines (114 loc) • 5.8 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.
*/
constructor(client: ApiClient);
/**
* Create a new product
* @param params Information about the request
* @returns Promise containing the new Product ID
* @see {@link https://widenv2.docs.apiary.io/#reference/products/products/create-a-new-product}
*/
createProduct(params: CreateProductParams): Promise<CreateProductResult>;
/**
* Delete a product
* @param id Product ID
* @returns Promise containing no information
* @see {@link https://widenv2.docs.apiary.io/#reference/products/products/delete}
*/
deleteProduct(id: string): Promise<void>;
/**
* Retrieve information about a product
* @param id Product ID
* @returns Promise containing information about a product
* @see {@link https://widenv2.docs.apiary.io/#reference/products/products/retrieve-by-id}
*/
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://widenv2.docs.apiary.io/#reference/channels/channels/list-channels}
*/
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://widenv2.docs.apiary.io/#reference/products/products-for-channel/list-products-for-channel}
*/
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://widenv2.docs.apiary.io/#reference/categories/product-categories/list-product-categories}
*/
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://widenv2.docs.apiary.io/#reference/product-types/product-types/list-product-types}
*/
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://widenv2.docs.apiary.io/#reference/products/products/rename}
*/
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://widenv2.docs.apiary.io/#reference/products/products/list-products-by-search-query}
*/
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://widenv2.docs.apiary.io/#reference/products/products/update-attribute-values}
*/
updateAttributes(params: UpdateAttributesParams): Promise<void>;
/**
* Update a product's categories
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://widenv2.docs.apiary.io/#reference/products/products/update-product-category}
*/
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://widenv2.docs.apiary.io/#reference/products/products/update-featured-image}
*/
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://widenv2.docs.apiary.io/#reference/products/products/update-parent-product}
*/
updateParentProduct(params: UpdateParentProductParams): Promise<void>;
/**
* Update a product's type
* @param params Information about the request
* @returns Promise containing no information
* @see {@link https://widenv2.docs.apiary.io/#reference/products/products/update-product-type}
*/
updateProductType(params: UpdateProductTypeParams): Promise<void>;
}
export { ProductsApi };