@amityco/ts-sdk
Version:
Amity Social Cloud Typescript SDK
21 lines • 718 B
TypeScript
/**
* ```js
* import { ProductRepository } from '@amityco/ts-sdk';
*
* let product;
*
* const unsub = ProductRepository.getProduct(productId, response => {
* product = response.data;
* });
* ```
*
* Observe all mutation on a given {@link Amity.Product}
*
* @param productId the ID of the product to observe
* @param callback the function to call when new data are available
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the product
*
* @category Product Live Object
*/
export declare const getProduct: (productId: Amity.Product['productId'], callback: Amity.LiveObjectCallback<Amity.Product>) => Amity.Unsubscriber;
//# sourceMappingURL=getProduct.d.ts.map