import { ICartItem, ICartItemPrices, IIndexedDeclination, IProductUpsell } from '../Interfaces/Cart'; import { ICustomPriceItem } from '../Interfaces/G2'; import IIndexedProduct from '../Interfaces/Indexed/Product'; import { ProductRecommendationType } from '../Interfaces/Product'; import Space from '../lib/Space'; import { IFilledDimensionUnits } from '../Interfaces/Declination'; export declare enum unitTypeEnum { PERCENT = "percent", AMOUNT = "amount" } export declare enum priceTypeEnum { REGULAR = "regular", DISCOUNT = "discount", PROMO = "promotion", TIER_PRICING = "tierpricing" } export declare const POS_CUSTOM_UNIT_PRICE_TYPE: string; export declare const POS_CUSTOM_EXTRA_PROMO_TYPE: string; /** * Check if product is discounted (excluding manual discounts) * @param i - The cart item to check * @returns {boolean} */ export declare const isDiscountedItemForPromoExclusion: (i: ICartItem) => boolean; export declare const getDiscountedAmount: (previousAmount: number, amountToRemove: number, unit: unitTypeEnum) => number; export declare const getPriceWithMin2Digits: (price: number) => string | number; export declare const getLowestPrice: (item: ICartItem | IIndexedDeclination) => { price: ICartItemPrices; promo: boolean; }; export declare const updateProductWithInfo: (prod: IIndexedProduct, userEmail: string, spaceObj: Space, spaceID: string, customerGroupCode?: string) => Promise; export declare const getUpsellsForProduct: (slugs: string[], spaceObj: Space, customPriceList?: ICustomPriceItem[], returnAll?: boolean, returnOnly?: ProductRecommendationType[]) => Promise<{ upsell: IProductUpsell; prod: IIndexedProduct; }[]>; /** * Get the correct display unit corresponding to sell unit * @param other_units the other units array of the product * @param locale the locale to use * @param options.returnPlural Optionnal. If the plural version should be returned * @param returnShortByDefault Optionnal. If the short version for unit label should be returned */ export declare const getDisplayUnit: (other_units: IFilledDimensionUnits[] | undefined, locale: string | undefined, options?: { returnPlural?: boolean; returnShortByDefault?: boolean; useInventoryUnit?: boolean; }) => string;