import { IBuybackLogic, IBuybackPrice, ICardFinishTag, ICardPricesResult, ILangOption, ITcgAttributes, ITcgExternalServiceParams, ItemNameVariantEnum } from '../Interfaces/TCG'; import { TCGCardFinishEnum } from '../Interfaces/TCG'; import { IIndexedDeclinationAlgolia } from '../Interfaces/Algolia'; import IInventoryItem from '../Interfaces/Product/IInventoryItem'; import { ICartItem, IIndexedDeclination } from '../Interfaces/Cart'; import IAttribute from '../Interfaces/Attribute'; import ITranslation from '../Interfaces/Translation'; export declare const getDefaultTcgExternalServiceParams: () => ITcgExternalServiceParams; /** * Get show order for a given value * @param finishAttrValue */ export declare const getTcgFinishAttrOrder: (finishAttrValue?: TCGCardFinishEnum) => number; export declare const getGradientForFinish: (finish: TCGCardFinishEnum) => "normal" | "other" | "multi" | "cold" | "gold"; /** * Get currently available declinations, ordered by finish attribute (TCG), and by current POS space lang (language attribute TCG) * @param declinationData - Array of data used to order entries + full entry to return * @param locale * @param allInventories */ export declare const filterAndOrderDeclinations: (declinationData: { sku: string; attributes: { [key: string]: string[]; }; fullDecli: T; }[] | undefined, locale: string | undefined, allInventories: IInventoryItem[], skipInventoryCheck?: boolean) => T[]; /** * Construct all options for Language attribute (TCG), based on available declinations * @param declinations * @param allTcgAttrLabels All constructed labels based on expected TCG attributes * @param locale Current POS locale * @param defaultLangToReturn Optionnal. If a default value should be returned, even if declination array is empty. Corresponds to the value for the specific language attribute (ex. tcg_lang_en) */ export declare const constructAllLangOptions: (declinations: IIndexedDeclinationAlgolia[] | IIndexedDeclination[], allTcgAttrLabels: ITcgAttributes | undefined, locale: string | undefined, defaultLangToReturn?: string) => ILangOption[]; /** * Construct all unique finish and condition attribute combinations (TCG), based on available declinations * @param declinations * @param allTcgAttrLabels */ export declare const constructAllFinishOptions: (declinations: IIndexedDeclinationAlgolia[] | IIndexedDeclination[], allTcgAttrLabels: ITcgAttributes | undefined, locale: string | undefined) => ICardFinishTag[]; /** * Get set label for a given card attributes in specified locale * @param prodAttributes * @param allAttributes * @param locale */ export declare const getProductSetLabel: (prodAttributes: { [key: string]: string[]; } | undefined, allAttributes: IAttribute[], locale: string | undefined) => string; /** * Get set label ITranslation array for a given card attributes * @param prodAttributes Indexed product attributes to check * @param allAttributes Full IAttribute array * @param spaceSupportedLocales Optionnal. Defaults to ['fr', 'en'] */ export declare const getProductSetLabelTranslationObj: (prodAttributes: { [key: string]: string[]; } | undefined, allAttributes: IAttribute[], spaceSupportedLocales?: string[]) => ITranslation[]; /** * Get first found declination from list where passed attribute values found in decli * @param decliList * @param attributesToCheck Values of chosen TCG attributes to check for in decli. */ export declare const findCorrespondingDecliByAttributes: (decliList: T[], attributesToCheck: { [attrSlug: string]: string | undefined; }) => T | undefined; /** * Get the available inventory for the currently selected store (found in local storage) * @param inventoryItem */ export declare const getAvailableInventoryForCurrentStore: (inventoryItem: IInventoryItem) => number; /** * Construct product or decli name to show (mostly for cart item retroactions) * @param item - The cart item * @param locale * @param type - Which name(s) to use (either parent name, decli name, or both) */ export declare const getProductNameToUse: (item: ICartItem, locale: string | undefined, type?: ItemNameVariantEnum) => string; /** * Construct labels for TCG Service attributes from full array of space attributes * @param allAttributes */ export declare const constructTcgAttributeLabels: (allAttributes: IAttribute[]) => ITcgAttributes; /** * Construct and return attribute string for cart item based on TCG attribute values * @param itemAttributes Current item attributes * @param allTcgAttributes All potential TCG attribute values * @returns {string} Pertinent attribute values seperated by '-'. Attributes options returned are : FINISH - CONDITION - LANG */ export declare const getTcgAttributesToShow: (itemAttributes: ICartItem['attributes'], allTcgAttributes: ITcgAttributes | undefined) => string; /** * Calculate buyback prices for a list of tcg card price data * @param cards The tcg card prices to check */ export declare function getBuybackPricesForTcgCards(logicReferenceObj: IBuybackLogic, cards: ICardPricesResult): { [slug: string]: IBuybackPrice[]; };