import { DaffProductFacadeInterface } from '@daffodil/product/state'
A facade for getting state about a particular product.
interface DaffProductFacadeInterface<T extends DaffProduct = DaffProduct> {
getProduct(id: T["id"]): any
getPrice(id: T["id"]): any
hasDiscount(id: T["id"]): any
getDiscountAmount(id: T["id"]): any
getDiscountedPrice(id: T["id"]): any
getDiscountPercent(id: T["id"]): any
isOutOfStock(id: T["id"]): any
}
anyGet a product.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyGet the original price for a product.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyWhether a particular product has a discount.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyGet the discount amount of a product.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyGet the discounted price for a product.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyGet the discount percent of a product.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |
anyWhether a product is out of stock.
| Parameter | id: T["id"] |
|---|---|
| Description | a product id |