Repository URL to install this package:
|
Version:
1.1.5 ▾
|
interface Price {
type?: 'Sale' | 'Reg';
value?: any;
minReg?: string;
maxReg?: string;
reg?: string;
sale?: string;
ismax?: boolean | 'true' | 'false';
ismin?: boolean | 'true' | 'false';
minSale?: boolean | 'true' | 'false';
maxSale?: boolean | 'true' | 'false';
}
interface Pricing {
currencyCode?: string;
prices?: Price[];
}
/**
* @version -1 named "initprice"
*/
declare function transformPrice(pricing: Pricing): Readonly<{}>;
export interface FormattedRegPrice {
minReg?: string;
maxReg?: string;
reg: string;
}
/**
*
* @param priceData
*/
declare function regPrice(priceData: Price): FormattedRegPrice;
export interface FormattedSalePrice {
minSale?: string;
maxSale?: string;
sale: string;
}
/**
* @see catalog/product/index get salePrice()
*/
declare function salePrice(priceData: Price): FormattedSalePrice;
export interface SetPrice {
sale?: string;
reg?: string;
}
declare function setPriceData(salePrices: Price, regPrices: Price, currencyCode: string): SetPrice;
export { transformPrice, regPrice, salePrice, setPriceData };
export default transformPrice;