import ICart, { ICartItem, IIndexedDeclination, IProductUpsell } from '../../../Interfaces/Cart'; import IIndexedProduct from '../../../Interfaces/Indexed/Product'; import { IProductRecommendation } from '../../../Interfaces/Product'; export declare const calculateUpsellQte: (upsell: IProductUpsell, qte: number, defaultToOne?: boolean, roundTotal?: boolean) => number; /** * Function getUpsellsToQuantify * @description - checks all upsells in product and returns those where associated quantities are found. * @param upsellProducts - All upsells in product * @param cartItems - All current cart items * @param checkQte - If all upsells should be checked for quantity * @param alwaysShow - If upsell should be considered even if it already exists in cart as item */ export declare const getUpsellsToQuantify: (upsellProducts: IProductUpsell[], cartItems: ICartItem[] | undefined, checkQte: boolean, alwaysShow?: boolean) => IProductUpsell[]; /** * Function getUpsellQteText * @description - Returns upsell equivalence text * @param upsellsToQuantify - All upsells to show in text * @param qte - Associated product quantity * @param specificProduct - If upsell shown is a specific products * @param isMulti - If upsell if shared by more than one item in cart * @param locale - locale of string to return */ export declare const getGeneralUpsellQteText: (upsellsToQuantify: IProductUpsell[], qte?: number, specificProduct?: boolean, isMulti?: boolean, locale?: string) => string; /** * Function getSpecificUpsellQteText * @description - Returns quantity stinrg and upsell name to show in Upsell Quantity indicator * @param upsell - Upsell to show qyantity for * @param productQte - Quantity of associated product for ratio calculation * @param locale - locale of string to return */ export declare const getSpecificUpsellQteText: (upsell: IProductUpsell, productQte: number, locale: string, roundTotal?: boolean) => { quantityStr: string; upsellName: string; }; export declare const checkIfIsUpsellOfCartItem: (decli: IIndexedDeclination, cartData: ICart | undefined, parent_slug?: string) => (number | { show_recommendation_msg?: boolean | undefined; is_recommendation?: boolean | undefined; recommended_qte: number; recommended_sku: string; matching_qte: boolean | undefined; actual_qte: number; use_parent: boolean | undefined; id?: string | undefined; sku: string; supplier_code?: string | undefined; slug?: string | undefined; upc?: string | undefined; name: import("../../../Interfaces/Translation").default[]; description: import("../../../Interfaces/Translation").default[]; images_path: import("../../../utils/file").IImageInfo[]; tax_exemption?: boolean | undefined; regular_price: import("../../../Interfaces/Cart").ICartItemPrices; booking_price?: import("../../../Interfaces/Cart").ICartItemPrices | null | undefined; discount_price?: import("../../../Interfaces/Cart").ICartItemCustomPrices | null | undefined; promo_price?: import("../../../Interfaces/Cart").ICartItemCustomPrices | null | undefined; cost_price?: import("../../../Interfaces/Cart").ICartItemPrices | null | undefined; exclude_from_cost_calculations?: boolean | undefined; prices_list?: import("../../../Interfaces/Declination").IPriceListOption[] | undefined; tax_family_id: string; attributes: { readonly [key: string]: string[]; }; overriden_attributes?: { readonly slug: string; readonly id: string; readonly overriden_values: string; }[] | undefined; parent_product_id: string; parent_slug?: string | undefined; category_name?: import("../../../Interfaces/Translation").default[] | undefined; brand_name?: import("../../../Interfaces/Translation").default[] | undefined; parent_name?: import("../../../Interfaces/Translation").default[] | undefined; disabled?: boolean | undefined; tier_pricing?: import("../../../Interfaces/Cart").IIndexedTierPrincing[] | undefined; shipping_info: import("../../../Interfaces/Declination").IShippingInfo; restrict_sale?: { readonly restrict_values: string[]; readonly restrict_message: string; } | undefined; restrict_shipping?: { readonly restrict_values: string[]; readonly restrict_message: string; } | undefined; exclude_from_free_shipping?: boolean | undefined; stock_level?: { readonly store_warehouse_availability: import("../../../Interfaces/Inventory").IWarehouseAvailability[]; readonly to_be_receptioned: number; readonly is_infinite_stock?: boolean | undefined; } | undefined; other_units?: import("../../../Interfaces/Declination").IFilledDimensionUnits[] | undefined; is_sample?: boolean | undefined; sample_sku?: string | undefined; is_service?: boolean | undefined; is_other_type?: string | undefined; hide_inventory?: boolean | undefined; external_values?: import("../../../Interfaces/G2").IG2ProductExternalValues | undefined; promise_to_purchase_association_ids?: string[] | undefined; created_from_external_service?: import("../../../Interfaces/Space/IExternalService").ExternalServiceSlugEnum | undefined; })[] | undefined; export declare const getUpsellsFromCartItems: (cartItems: ICartItem[], decliToCompare: IIndexedDeclination, parent_slug: string) => ICartItem[]; export declare const removeExceptionAutoAddUpsells: (items: ICartItem[]) => ICartItem[]; export declare const checkIfCartContainsException: (upsellToCheck: IProductRecommendation, skus: string[]) => boolean; /** * Function getCartItemsFromProdUpsells * @param qte {number} - Quantity of product to which upsell is associated * @param currentSku {string} - Sku of the declination selected by user for the product to which upsell is associated * @param prodUpsell {IProductRecommendation[]} - Array of upsells found in product * @param getProduct Callback function to fetch product from DB * @param locale {string} - locale for product fetch (defaults to 'fr') */ export declare const getCartItemsFromProdUpsells: (qte: number, currentSku: string, prodUpsell: IProductRecommendation[], getProduct: (_upsellParentSlug: string, locale: string | undefined, useFeeArray?: boolean, noDrafts?: boolean) => Promise, locale: string | undefined) => Promise;