@amityco/ts-sdk
Version:
Amity Social Cloud Typescript SDK
25 lines • 977 B
TypeScript
/**
* ```js
* import { ProductRepository } from '@amityco/ts-sdk'
*
* let products = []
* const unsub = ProductRepository.searchProducts({
* keyword: string,
* }, response => merge(products, response.data))
* ```
*
* Observe all mutations on a list of {@link Amity.Product}
*
* @param params.keyword the search keyword
* @param params.isActive filter by active status
* @param params.isDeleted filter by deleted status
* @param params.sortBy sort option
* @param params.sortOrder order option
* @param callback the function to call when new data are available
* @param config
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the products
*
* @category Products Live Collection
*/
export declare const searchProducts: (params: Amity.ProductLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Product>, config?: Amity.LiveCollectionConfig) => Amity.Unsubscriber;
//# sourceMappingURL=searchProducts.d.ts.map