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za,OAAO8a,aAAe9a,OAAO8a,cAAgB,GAC7C9a,OAAO8a,aAAaR,QAApB,OACOta,OAAO8a,aAAaR,SAAW,IAC/BD,EAAQC,SAGXta,OAAO8a,aAAaC,mBAAqB,GACzC/a,OAAO8a,aAAaC,mBAApB,eACOV,EAAQE,iCCjevBS,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://mattressfirm/./src/Utilities/cart-utils.ts?6ba1","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/Utilities/select-financing-offer.tsx?5f53","webpack://mattressfirm/./src/actions/BonusItemDataServiceEntities.g.ts?cf80","webpack://mattressfirm/./src/actions/BonusItemDataActionExtension.g.ts?22ff","webpack://mattressfirm/./src/actions/bonus-coupon-details.action.ts?7fb2","webpack://mattressfirm/./src/actions/bonus-item-product.action.ts?0b53","webpack://mattressfirm/./src/actions/checkout-billing-validity.action.ts?484f","webpack://mattressfirm/./src/actions/checkout-disabled-button-state.action.ts?ab08","webpack://mattressfirm/./src/actions/complete-your-bed-pillow.action.ts?db7f","webpack://mattressfirm/./src/actions/complete-your-bed-protector.action.ts?82b2","webpack://mattressfirm/./src/actions/express-order-submit-state.action.ts?3687","webpack://mattressfirm/./src/actions/fetch-choose-your-foundation-database.action.ts?867b","webpack://mattressfirm/./src/actions/fetch-complete-your-bed.action.ts?ea35","webpack://mattressfirm/./src/actions/get-delivery-fee-update.action.ts?8fde","webpack://mattressfirm/./src/actions/get-mattress-foundations-to-add.action.ts?7e5d","webpack://mattressfirm/./src/actions/get-mfrm-products-category-paths.action.ts?dc81","webpack://mattressfirm/./src/actions/get-recycle-fee-checkout.action.ts?9366","webpack://mattressfirm/./src/actions/get-sm-inventory-status.action.ts?cb72","webpack://mattressfirm/./src/actions/get-soci-data.action.ts?ce73","webpack://mattressfirm/./src/actions/TryInStoreDataServiceEntities.g.ts?ea57","webpack://mattressfirm/./src/actions/TryInStoreDataActionExtension.g.ts?c8db","webpack://mattressfirm/./src/actions/get-try-in-store-info.action.ts?dff9","webpack://mattressfirm/./src/actions/get-unbxd-product-recommendations.action.ts?bae6","webpack://mattressfirm/./src/actions/payment-redirect-to-order-confirmation.action.ts?c6dc","webpack://mattressfirm/./src/actions/paypal-express-edit-state.action.ts?34db","webpack://mattressfirm/./src/actions/paypalexpress-tryagain-trigger.action.ts?df08","webpack://mattressfirm/./src/actions/paypalsuccesstrigger.action.ts?ccb0","webpack://mattressfirm/./src/actions/select-your-foundation.action.ts?e743","webpack://mattressfirm/./src/actions/social-icons-state.action.ts?1e1b","webpack://mattressfirm/./src/actions/srp-breadcrumb-page.action.ts?4397","webpack://mattressfirm/./src/actions/trigger-special-synchrony-financing.action.ts?1948","webpack://mattressfirm/./src/actions/update-monthly-payment.action.ts?0e43","webpack://mattressfirm/./src/actions/user-defined-promocode.action.ts?c234","webpack://mattressfirm/./src/actions/wmap-address-state.action.ts?f45e","webpack://mattressfirm/./src/actions/zip-code-state.action.ts?958a","webpack://mattressfirm/./src/actions/zip-code-validation.action.ts?0973","webpack://mattressfirm/./src/data-actions/bonuscoupons-action.action.ts?e535","webpack://mattressfirm/./src/data-actions/brightspot-content-action.action.ts?2792","webpack://mattressfirm/./src/data-actions/financing-offer-state.action.ts?9faa","webpack://mattressfirm/./src/data-actions/get-address-from-zipcode.action.ts?d9c9","webpack://mattressfirm/./src/data-actions/get-card-payment-accept-point.override.action.ts?a2c5","webpack://mattressfirm/./src/data-actions/get-comfort-type.action.ts?e535","webpack://mattressfirm/./src/data-actions/get-dimensions-for-selected-variant.override.action.ts?2573","webpack://mattressfirm/./src/data-actions/get-franchise-data.action.ts?7044","webpack://mattressfirm/./src/data-actions/get-product-benefit-enhanced-content.action.ts?85e9","webpack://mattressfirm/./src/data-actions/get-product-benefits-data.action.ts?1d43","webpack://mattressfirm/./src/data-actions/get-promocode-value.action.ts?e12d","webpack://mattressfirm/./src/data-actions/get-resons-to-buy-data.action.ts?34a7","webpack://mattressfirm/./src/data-actions/get-sales-order-details-action.action.ts?5a8b","webpack://mattressfirm/./src/data-actions/get-seo-data.action.ts?b8ff","webpack://mattressfirm/./src/data-actions/get-sleep-disruptor-icons.action.ts?0ec7","webpack://mattressfirm/./src/data-actions/get-store-location-information.override.action.ts?f6e2","webpack://mattressfirm/./src/data-actions/mfi-atp-inventory.action.ts?2cbf","webpack://mattressfirm/./src/data-actions/mfrm-mfi-bonusitem.action.ts?15d0","webpack://mattressfirm/./src/data-actions/mfrm-notification.action.ts?70c5","webpack://mattressfirm/./src/data-actions/payment-cc-card-types.action.ts?37d5","webpack://mattressfirm/./src/data-actions/payment-error-state.action.ts?5f0f","webpack://mattressfirm/./src/data-actions/products-by-category.override.action.ts?6afc","webpack://mattressfirm/./src/data-actions/products-by-recommendation.override.action.ts?9a45","webpack://mattressfirm/./src/data-actions/products-by-relationship-id.override.action.ts?f0f3","webpack://mattressfirm/./src/data-actions/products-get-by-id.action.ts?0a83","webpack://mattressfirm/./src/data-actions/progressive-leasing-modal-state.action.ts?5447","webpack://mattressfirm/./src/data-actions/promocode-applied-in-progress.action.ts?91e5","webpack://mattressfirm/./src/data-actions/redirect-to-wmap-submit-payment.action.ts?70c9","webpack://mattressfirm/./src/data-actions/search-org-unit-locations.action.ts?6dc5","webpack://mattressfirm/./src/data-actions/toggle-submit-order-button.action.ts?9a11","webpack://mattressfirm/./src/data-actions/update-email-call.action.ts?bac8","webpack://mattressfirm/./src/data-actions/wmap-get-order-details.action.ts?108d","webpack://mattressfirm/./src/data-actions/wmap-submit-payment.action.ts?1746","webpack://mattressfirm/./src/modules/mfrm-autosuggest/actions/get-unbxd-search-autosuggest.action.ts?8fd0","webpack://mattressfirm/./src/modules/mfrm-category-page-summary/mfrm-category-page-summary.action.ts?d22e","webpack://mattressfirm/./src/modules/mfrm-product-page-summary/get-product-recordId.action.ts?a795","webpack://mattressfirm/./src/modules/mfrm-products-compare/get-unbxd-collection-compare-data.action.ts?e1f9","webpack://mattressfirm/./lib/__local__/module-registration.js?8a42","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import MsDyn365 from '@msdyn365-commerce/core';\r\nimport {IProductDetails,IProductBonusItems, IProductBonusWithBrandName } from '../modules/mfrm-cart/mfrm-cart';\r\nimport {IMFIBonusItemsResponse, IMFIGetBonusCouponsDetailsResponse} from '../actions/BonusItemDataServiceEntities.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nexport interface IMFRMDateGroupedProducts {\r\n dateStr: string;\r\n days?: string;\r\n productVariantRecordIds: number[];\r\n productItemIds: string[];\r\n productsType: string;\r\n}\r\n\r\nexport interface IExpressFlow {\r\n paymentEdit: boolean\r\n}\r\n\r\nconst getSetLocalStorage = (key: string, getSet: string, valueToSet?: any, returnType?: any) => {\r\n if (MsDyn365.isBrowser) {\r\n switch (getSet) {\r\n case 'set':\r\n return localStorage.setItem(key, JSON.stringify(valueToSet || returnType));\r\n case 'get':\r\n return JSON.parse(localStorage.getItem(key) || '[]');\r\n default:\r\n return returnType;\r\n }\r\n } else {\r\n return returnType;\r\n }\r\n};\r\n\r\nexport const getSetProductData = (getSet: string, products?: IProductDetails[]) => {\r\n return getSetLocalStorage('product_details', getSet, products, []);\r\n};\r\n\r\nexport const getSetProductSpec = (getSet: string, products?: IProductDetails[]) => {\r\n return getSetLocalStorage('product_specification', getSet, products, []);\r\n};\r\n\r\nexport const getSetPromoCodeApplyList = (getSet: string) => {\r\n return getSetLocalStorage('promo_code_apply_list', getSet, [], []);\r\n};\r\n\r\nexport const getSetPromoCode = (getSet: string) => {\r\n return getSetLocalStorage('promoCode', getSet, [], []);\r\n};\r\n\r\nexport const getSetGrandTotal = (getSet: string, total?: string) => {\r\n return getSetLocalStorage('grand_total', getSet, total, 0);\r\n};\r\n\r\nexport const getSetBonusItemProd = (getSet: string, globalBonusItems?: IMFIBonusItemsResponse[])=>{\r\n return getSetLocalStorage('BonusItemProduct', getSet, globalBonusItems, []);\r\n};\r\n\r\nexport const getSetSelectedBonasItem = (getSet: string, bonusItemArray?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('selectedBonasItems', getSet, bonusItemArray, []);\r\n};\r\n\r\nexport const getSetBonusCouponDetail = (getSet: string, getCoupons?: IMFIGetBonusCouponsDetailsResponse[])=>{\r\n return getSetLocalStorage('bonusCouponsDetail', getSet, getCoupons, []);\r\n};\r\n\r\nexport const getSetPrevBonasModalState = (getSet: string, previousBonasModal?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('previousBonasModalState', getSet, previousBonasModal, []);\r\n};\r\n\r\nexport const getSetBonusItemBrandName = (getSet: string, bonusItemsBrandName?: IProductBonusWithBrandName[]) => {\r\n return getSetLocalStorage('bonusItmesWithBrand', getSet, bonusItemsBrandName, []);\r\n};\r\n\r\nexport const getSetDateGroupedProducts = (getSet: string, products?: IMFRMDateGroupedProducts[]) => {\r\n return getSetLocalStorage('date_grouped_products', getSet, products, []);\r\n};\r\n\r\nexport const getSetExpressFlow = (getSet: string, express?: IExpressFlow) => {\r\n return getSetLocalStorage('express_flow', getSet, express, []);\r\n};\r\nexport const getSetWmapCartLines = (getSet: string, products?: { product: SimpleProduct, count: number }[]) => {\r\n return getSetLocalStorage('wmapCartLines', getSet, products, []);\r\n};","import { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-').replace(/\\&/g, 'and').replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n return new RegExp(pattern, 'gi');\r\n }\r\n};\r\n","import { RichText } from '@msdyn365-commerce/core';\r\n\r\nimport dayjs from 'dayjs';\r\nimport tz from 'dayjs/plugin/timezone';\r\nimport utc from 'dayjs/plugin/utc';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\ndayjs.extend(tz);\r\ndayjs.extend(utc);\r\ndayjs.extend(isBetween);\r\nconst format = 'M/D/YYYY';\r\n\r\nexport interface IFinancingOffer {\r\n offerName?: string;\r\n noInterestFor: number;\r\n minPurchase: number;\r\n everydayFinancingOfferMessage:string,\r\n limitedFinancingOfferMessage:string,\r\n monthlyOfferDetails?: RichText;\r\n financingOfferDescription: RichText;\r\n disclaimer: RichText;\r\n offerValidStartDate?: string;\r\n offerValidEndDate?: string;\r\n specialCampaignOffer?: IFinancingOfferCampaign;\r\n checkoutDisplay?: {heading: string; details: string}\r\n}\r\n\r\nexport interface IFinancingOfferFormatted {\r\n numOfMonths: number;\r\n costPerMonth: number;\r\n startDate?: string;\r\n endDate?: string;\r\n isLTO: boolean;\r\n monthlyOfferDetails?: RichText;\r\n minPurchase: number;\r\n everydayFinancingOfferMessage:string;\r\n limitedFinancingOfferMessage:string;\r\n financingOfferDescription: RichText;\r\n disclaimer: RichText;\r\n specialCampaign?: IFinancingOfferCampaign;\r\n offerName?: string;\r\n checkoutDisplay?: {heading: string; details: string}\r\n}\r\n\r\nexport interface IFinancingOfferCampaign {\r\n initialMonthlyAmount: number;\r\n numOfDiscountedMonths: number;\r\n campaignValidStartDate: string;\r\n campaignValidEndDate: string;\r\n enableCampaign: boolean;\r\n showEverydayFlag: boolean;\r\n}\r\n\r\nexport interface ISelectFinancingOfferData {\r\n limitedTimeFinancingOffers: IFinancingOffer[];\r\n everydayFinancingOffers: IFinancingOffer[];\r\n totalPrice: number | undefined;\r\n specialFinancingOffer?: IFinancingOffer[];\r\n synchronySpecialFinancingCondition?: boolean;\r\n specialFinancingEnable?: boolean;\r\n}\r\n\r\nexport interface ICampaignRemainingCost {\r\n cost: number;\r\n months: number;\r\n}\r\n\r\nexport const getValidSpecialCampaign = (financingOffer: IFinancingOfferFormatted): IFinancingOfferCampaign | undefined => {\r\n if (\r\n financingOffer.specialCampaign &&\r\n financingOffer.specialCampaign.enableCampaign &&\r\n financingOffer.specialCampaign.initialMonthlyAmount &&\r\n financingOffer.specialCampaign.numOfDiscountedMonths &&\r\n isCampaignScheduled(financingOffer)\r\n ) {\r\n return financingOffer.specialCampaign;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getCampaignRemainingCost = (\r\n campaign: IFinancingOfferCampaign,\r\n financingOffer: IFinancingOfferFormatted,\r\n totalPrice: number | undefined\r\n): ICampaignRemainingCost | undefined => {\r\n if (!totalPrice) {\r\n return undefined;\r\n }\r\n\r\n const initialCost = campaign.initialMonthlyAmount * campaign.numOfDiscountedMonths;\r\n const remainingCost = totalPrice - initialCost;\r\n const remainingMonths = financingOffer.numOfMonths - campaign.numOfDiscountedMonths;\r\n const monthlyCost = remainingCost / remainingMonths;\r\n\r\n return {\r\n cost: monthlyCost,\r\n months: remainingMonths\r\n };\r\n};\r\nexport const isValidLimitedTimeOffer = (offer: IFinancingOffer): boolean => {\r\n const startDate = dayjs(offer.offerValidStartDate, format);\r\n const endDate = dayjs(offer.offerValidEndDate, format).add(1, 'd');\r\n\r\n const startDateCentralTime = startDate.isValid() && dayjs(startDate.format(format), format).tz('America/Chicago').local();\r\n const endDateCentralTime = endDate.isValid() && dayjs(endDate.format(format), format).tz('America/Chicago').local();\r\n\r\n const now = dayjs();\r\n return startDateCentralTime && endDateCentralTime && now.isBetween(startDateCentralTime, endDateCentralTime);\r\n};\r\n\r\nexport const isCampaignScheduled = (offer: IFinancingOfferFormatted): boolean => {\r\n const tempOffer = Object.create(offer);\r\n if (tempOffer.specialCampaign?.campaignValidStartDate && tempOffer.specialCampaign?.campaignValidEndDate) {\r\n tempOffer.startDate = tempOffer.specialCampaign?.campaignValidStartDate;\r\n tempOffer.endDate = tempOffer.specialCampaign?.campaignValidEndDate;\r\n\r\n return isScheduled(tempOffer);\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isScheduled = (offer: IFinancingOfferFormatted): boolean => {\r\n const startDate = dayjs(offer.startDate, format);\r\n const endDate = dayjs(offer.endDate, format).add(1, 'd');\r\n\r\n const startDateCentralTime = startDate.isValid() && dayjs(startDate.format(format), format).tz('America/Chicago').local();\r\n const endDateCentralTime = endDate.isValid() && dayjs(endDate.format(format), format).tz('America/Chicago').local();\r\n\r\n const now = dayjs();\r\n\r\n return startDateCentralTime && endDateCentralTime && now.isBetween(startDateCentralTime, endDateCentralTime);\r\n};\r\n\r\nexport const selectFinancingOffer = ({ limitedTimeFinancingOffers = [], everydayFinancingOffers = [], totalPrice = 0, specialFinancingOffer = [], synchronySpecialFinancingCondition = false, specialFinancingEnable = false }: ISelectFinancingOfferData, returnCustomOfferArray?: boolean): IFinancingOfferFormatted | undefined => {\r\n let highestMinimumPurchase: number = 0;\r\n let bestOffer: IFinancingOfferFormatted = {\r\n numOfMonths: 0,\r\n costPerMonth: 0,\r\n isLTO: false,\r\n minPurchase: 0,\r\n everydayFinancingOfferMessage:'',\r\n limitedFinancingOfferMessage:'',\r\n monthlyOfferDetails: '',\r\n financingOfferDescription: '',\r\n disclaimer: ''\r\n };\r\n let offerFound = false;\r\n\r\n let campaignFound: IFinancingOfferFormatted | undefined;\r\n\r\n const everydayOffers: IFinancingOfferFormatted[] | undefined = [];\r\n const specialOffer: IFinancingOfferFormatted[] | undefined = [];\r\n\r\n const validLimitedTimeFinancingOffers = limitedTimeFinancingOffers.filter((offer)=>{\r\n return isValidLimitedTimeOffer(offer) && offer;\r\n });\r\n\r\n if (synchronySpecialFinancingCondition && specialFinancingEnable) {\r\n if (!offerFound || (!isScheduled(bestOffer) && specialFinancingOffer.length)) {\r\n // try default offer\r\n offerFound = false;\r\n highestMinimumPurchase = 0;\r\n specialFinancingOffer.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n let currentOfferAccepted = false;\r\n if (totalPrice >= minPurchase && minPurchase >= highestMinimumPurchase) {\r\n bestOffer = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage:offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage:offer.limitedFinancingOfferMessage,\r\n offerName: offer.offerName,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer\r\n };\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n }\r\n if (returnCustomOfferArray && (totalPrice >= minPurchase)) {\r\n specialOffer?.push({\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage:offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage:offer.limitedFinancingOfferMessage,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n offerName: offer.offerName\r\n });\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n // @ts-ignore\r\n bestOffer = specialOffer;\r\n }\r\n // Do not use default if end date is defined and has expired\r\n if (currentOfferAccepted && offer.offerValidEndDate) {\r\n const endDate = dayjs(offer.offerValidEndDate, format);\r\n const now = dayjs();\r\n if (endDate.isValid() && now.isAfter(endDate)) {\r\n offerFound = false;\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n validLimitedTimeFinancingOffers.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n\r\n if (totalPrice >= minPurchase && minPurchase > highestMinimumPurchase) {\r\n const currentOffer: IFinancingOfferFormatted = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: true,\r\n minPurchase: offer.minPurchase,\r\n everydayFinancingOfferMessage:offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage:offer.limitedFinancingOfferMessage,\r\n monthlyOfferDetails: offer.monthlyOfferDetails,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n specialCampaign: offer.specialCampaignOffer,\r\n checkoutDisplay: offer.checkoutDisplay,\r\n offerName: offer.offerName\r\n };\r\n bestOffer = currentOffer;\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n\r\n // check if campaign schedule is scheduled, otherwise fall back to parent offer\r\n const validCampaign = getValidSpecialCampaign(currentOffer);\r\n if (validCampaign) {\r\n currentOffer.startDate = validCampaign.campaignValidStartDate;\r\n currentOffer.endDate = validCampaign.campaignValidEndDate;\r\n campaignFound = currentOffer;\r\n }\r\n else {\r\n campaignFound = undefined;\r\n }\r\n }\r\n });\r\n\r\n if (!offerFound || (!isScheduled(bestOffer) && everydayFinancingOffers.length)) {\r\n // try default offer\r\n offerFound = false;\r\n highestMinimumPurchase = 0;\r\n\r\n everydayFinancingOffers.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n let currentOfferAccepted = false;\r\n if (totalPrice >= minPurchase && minPurchase >= highestMinimumPurchase) {\r\n bestOffer = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage: offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage:offer.limitedFinancingOfferMessage,\r\n offerName: offer.offerName,\r\n monthlyOfferDetails: offer.monthlyOfferDetails,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer\r\n };\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n }\r\n\r\n if (returnCustomOfferArray && (totalPrice >= minPurchase)) {\r\n everydayOffers?.push({\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage:offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage:offer.limitedFinancingOfferMessage,\r\n monthlyOfferDetails: offer.monthlyOfferDetails,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n offerName: offer.offerName\r\n });\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n // @ts-ignore\r\n bestOffer = everydayOffers;\r\n }\r\n\r\n // Do not use default if end date is defined and has expired\r\n if (currentOfferAccepted && offer.offerValidEndDate) {\r\n const endDate = dayjs(offer.offerValidEndDate, format);\r\n const now = dayjs();\r\n if (endDate.isValid() && now.isAfter(endDate)) {\r\n offerFound = false;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\n if (!offerFound) {\r\n return undefined;\r\n }\r\n if (campaignFound) {\r\n return campaignFound;\r\n }\r\n return bestOffer;\r\n};\r\n","// tslint:disable\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * MFIGetBonusItemsParameters entity interface.\r\n */\r\nexport interface IMFIGetBonusItemsParameters {\r\n CartId?: string;\r\n Coupons?: string[];\r\n // Id: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFIBonusItemsDetailsEntity entity interface.\r\n */\r\nexport interface IMFIBonusItemsDetailsEntity {\r\n Coupon?: string;\r\n IsBonusCoupon?: string;\r\n CouponMessage?: string;\r\n Items?: IMFIQualifyingItemDetails[];\r\n Id: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFIQualifyingItemDetails entity interface.\r\n */\r\nexport interface IMFIQualifyingItemDetails {\r\n QualifyingItemId?: string;\r\n QualifyingProductId?: string;\r\n BonusProductQty: number;\r\n BonusItems?: IMFIBonusItemDetails[];\r\n }\r\n\r\n /**\r\n * MFIBonusItemDetails entity interface.\r\n */\r\n export interface IMFIBonusItemDetails {\r\n QualifyingProductId?: string;\r\n QualifyingItemId?: string;\r\n BonusItemId?: string;\r\n BonusProductId?: string;\r\n Name?: string;\r\n AdditionToCart?: string;\r\n AdjustedPrice: number;\r\n BasePrice: number;\r\n CustomerContextualPrice: number;\r\n DiscountAmount: number;\r\n DiscountTypeValue: number;\r\n DiscountType?: string;\r\n PrimaryImageUrl: string;\r\n ProductTypeValue: number;\r\n DealPriceOrDiscountPercentage: number;\r\n BonusCalculatedDiscountPrice: number;\r\n Coupon?: string;\r\n }\r\n\r\n /**\r\n * MFIGetBonusCouponsDetailsResponse entity interface.\r\n */\r\n export interface IMFIGetBonusCouponsDetailsResponse {\r\n BonusCoupons?: IMFIBonusCouponsDetail[];\r\n}\r\n\r\n/**\r\n * MFIBonusItemsResponse entity interface.\r\n */\r\nexport interface IMFIBonusItemsResponse {\r\n BonusItemsDetails?: IMFIBonusItemsDetailsEntity[];\r\n Message?: string;\r\n}\r\n\r\n/**\r\n * MFIBonusCouponsDetail entity interface.\r\n */\r\nexport interface IMFIBonusCouponsDetail {\r\n BonusCoupon?: string;\r\n BonusCouponMessage?: string;\r\n ChildCoupons?: string[];\r\n}\r\n\r\n/**\r\n * MFIGetBonusItemsParameters entity class.\r\n */\r\nexport class MFIGetBonusItemsParametersExtensionClass implements IMFIGetBonusItemsParameters {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CartId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Coupons: string[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CartId = odataObject.CartId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Coupons = undefined;\r\n if (odataObject.Coupons) {\r\n this.Coupons = [];\r\n for (let i = 0; i < odataObject.Coupons.length; i++) {\r\n if (odataObject.Coupons[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Coupons[i] = odataObject.Coupons[i];\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Coupons[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIBonusItemsDetailsEntity entity class.\r\n */\r\nexport class MFIBonusItemsDetailsEntityExtensionClass implements IMFIBonusItemsDetailsEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Coupon: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsBonusCoupon: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CouponMessage: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Items: IMFIQualifyingItemDetails[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Coupon = odataObject.Coupon;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsBonusCoupon = odataObject.IsBonusCoupon;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CouponMessage = odataObject.CouponMessage;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items = undefined;\r\n if (odataObject.Items) {\r\n this.Items = [];\r\n for (let i = 0; i < odataObject.Items.length; i++) {\r\n if (odataObject.Items[i]) {\r\n if (odataObject.Items[i]['@odata.type']) {\r\n let className: string = odataObject.Items[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.Items[i] = new EntityClasses[className](odataObject.Items[i]);\r\n }\r\n } else {\r\n this.Items[i] = new MFIQualifyingItemDetailsExtensionClass(odataObject.Items[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items[i] = undefined;\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIQualifyingItemDetails entity class.\r\n */\r\nexport class MFIQualifyingItemDetailsExtensionClass implements IMFIQualifyingItemDetails {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public QualifyingItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public QualifyingProductId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusProductQty: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusItems: IMFIBonusItemDetails[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.QualifyingItemId = odataObject.QualifyingItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.QualifyingProductId = odataObject.QualifyingProductId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusProductQty = odataObject.BonusProductQty ? parseFloat(odataObject.BonusProductQty) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusItems = undefined;\r\n if (odataObject.BonusItems) {\r\n this.BonusItems = [];\r\n for (let i = 0; i < odataObject.BonusItems.length; i++) {\r\n if (odataObject.BonusItems[i]) {\r\n if (odataObject.BonusItems[i]['@odata.type']) {\r\n let className: string = odataObject.BonusItems[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.BonusItems[i] = new EntityClasses[className](odataObject.BonusItems[i]);\r\n }\r\n } else {\r\n this.BonusItems[i] = new MFIBonusItemDetailsExtensionClass(odataObject.BonusItems[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusItems[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIBonusItemDetails entity class.\r\n */\r\nexport class MFIBonusItemDetailsExtensionClass implements IMFIBonusItemDetails {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusProductId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Name: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public AdditionToCart: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public AdjustedPrice: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BasePrice: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerContextualPrice: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DiscountAmount: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DiscountTypeValue: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DiscountType: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DealPriceOrDiscountPercentage: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusCalculatedDiscountPrice: number;\r\n\r\n public PrimaryImageUrl: string;\r\n\r\n public ProductTypeValue: number;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusItemId = odataObject.BonusItemId;\r\n\r\n this.PrimaryImageUrl = odataObject.PrimaryImageUrl;\r\n\r\n this.ProductTypeValue = odataObject.ProductTypeValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusProductId = odataObject.BonusProductId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Name = odataObject.Name;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AdditionToCart = odataObject.AdditionToCart;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AdjustedPrice = odataObject.AdjustedPrice ? parseFloat(odataObject.AdjustedPrice) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BasePrice = odataObject.BasePrice ? parseFloat(odataObject.BasePrice) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerContextualPrice = odataObject.CustomerContextualPrice ? parseFloat(odataObject.CustomerContextualPrice) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DiscountAmount = odataObject.DiscountAmount ? parseFloat(odataObject.DiscountAmount) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DiscountTypeValue = odataObject.DiscountTypeValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DiscountType = odataObject.DiscountType;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DealPriceOrDiscountPercentage = odataObject.DealPriceOrDiscountPercentage\r\n ? parseFloat(odataObject.DealPriceOrDiscountPercentage)\r\n : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusCalculatedDiscountPrice = odataObject.BonusCalculatedDiscountPrice\r\n ? parseFloat(odataObject.BonusCalculatedDiscountPrice)\r\n : 0;\r\n }\r\n}\r\n\r\n/**\r\n * MFIGetBonusCouponsDetailsResponse entity class.\r\n */\r\nexport class MFIGetBonusCouponsDetailsResponseExtensionClass implements IMFIGetBonusCouponsDetailsResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusCoupons: IMFIBonusCouponsDetail[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusCoupons = undefined;\r\n if (odataObject.BonusCoupons) {\r\n this.BonusCoupons = [];\r\n for (let i = 0; i < odataObject.BonusCoupons.length; i++) {\r\n if (odataObject.BonusCoupons[i]) {\r\n if (odataObject.BonusCoupons[i]['@odata.type']) {\r\n let className: string = odataObject.BonusCoupons[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.BonusCoupons[i] = new EntityClasses[className](odataObject.BonusCoupons[i]);\r\n }\r\n } else {\r\n this.BonusCoupons[i] = new MFIBonusCouponsDetailExtensionClass(odataObject.BonusCoupons[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusCoupons[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIBonusItemsResponse entity class.\r\n */\r\nexport class MFIBonusItemsResponseExtensionClass implements IMFIBonusItemsResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusItemsDetails: IMFIBonusItemsDetailsEntity[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusItemsDetails = undefined;\r\n if (odataObject.BonusItemsDetails) {\r\n this.BonusItemsDetails = [];\r\n for (let i = 0; i < odataObject.BonusItemsDetails.length; i++) {\r\n if (odataObject.BonusItemsDetails[i]) {\r\n if (odataObject.BonusItemsDetails[i]['@odata.type']) {\r\n let className: string = odataObject.BonusItemsDetails[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.BonusItemsDetails[i] = new EntityClasses[className](odataObject.BonusItemsDetails[i]);\r\n }\r\n } else {\r\n this.BonusItemsDetails[i] = new MFIBonusItemsDetailsEntityExtensionClass(odataObject.BonusItemsDetails[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusItemsDetails[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n }\r\n}\r\n\r\n/**\r\n * MFIBonusCouponsDetail entity class.\r\n */\r\nexport class MFIBonusCouponsDetailExtensionClass implements IMFIBonusCouponsDetail {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusCoupon: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public BonusCouponMessage: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ChildCoupons: string[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusCoupon = odataObject.BonusCoupon;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.BonusCouponMessage = odataObject.BonusCouponMessage;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ChildCoupons = undefined;\r\n if (odataObject.ChildCoupons) {\r\n this.ChildCoupons = [];\r\n for (let i = 0; i < odataObject.ChildCoupons.length; i++) {\r\n if (odataObject.ChildCoupons[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ChildCoupons[i] = odataObject.ChildCoupons[i];\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ChildCoupons[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from '../actions/BonusItemDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction bonusItemsQuery(id?: number): DataServiceQuery {\r\n const key = id ? { Id: id } : null;\r\n return new DataServiceQuery(\r\n 'BonusItems',\r\n 'MFIGetBonusItemsParameters',\r\n DataServiceEntities.MFIGetBonusItemsParametersExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createMFIGetBonusCouponsDetailsInput(bonusCoupons: string): IDataServiceRequest {\r\n const query = bonusItemsQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetBonusCouponsDetails',\r\n true,\r\n DataServiceEntities.MFIGetBonusCouponsDetailsResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIGetBonusCouponsDetailsResponse' },\r\n { bonusCoupons: bonusCoupons }\r\n );\r\n}\r\n\r\nexport function mFIGetBonusCouponsDetailsAsync(\r\n context: IContext,\r\n bonusCoupons: string\r\n): AsyncResult {\r\n const request = createMFIGetBonusCouponsDetailsInput(bonusCoupons);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createMFIGetBonusItemsDetailInput(bonusItemParams: DataServiceEntities.IMFIGetBonusItemsParameters): IDataServiceRequest {\r\n const query = bonusItemsQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetBonusItemsDetail',\r\n true,\r\n DataServiceEntities.MFIBonusItemsResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIBonusItemsResponse' },\r\n { bonusItemParams: bonusItemParams }\r\n );\r\n}\r\n\r\nexport function mFIGetBonusItemsDetailAsync(\r\n context: IContext,\r\n bonusItemParams: DataServiceEntities.IMFIGetBonusItemsParameters\r\n): AsyncResult {\r\n const request = createMFIGetBonusItemsDetailInput(bonusItemParams);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * BonusCouponDetails Input Action\r\n */\r\nexport class BonusCouponDetailsInput implements Msdyn365.IActionInput {\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `bonusCouponDetail`;\r\n public getCacheObjectType = () => 'bonusCouponDetail';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IBonusCouponDetailsData {\r\n bonusCouponDetail: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new BonusCouponDetailsInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: BonusCouponDetailsInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { bonusCouponDetail: '' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'BonusCouponDetails',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * BonusItemProduct Input Action\r\n */\r\nexport class BonusItemProductInput implements Msdyn365.IActionInput {\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `TODO`;\r\n public getCacheObjectType = () => 'TODO';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IBonusItemProductData {\r\n bonusItemProduct: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new BonusItemProductInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: BonusItemProductInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { bonusItemProduct: '' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'BonusItemProduct',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","// sample-state.ts\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nexport interface IBillingState {\r\n isBillingFormValid: boolean;\r\n}\r\n\r\n/**\r\n * BillingState - action input\r\n */\r\nexport class BillingStateInput implements IActionInput {\r\n public getCacheKey = () => `BillingState`;\r\n public getCacheObjectType = () => 'BillingState';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * BillingState - action\r\n */\r\nexport async function BillingStateAction(input: BillingStateInput, ctx: IActionContext): Promise {\r\n return { isBillingFormValid: false};\r\n}\r\n\r\n/**\r\n * BillingState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new BillingStateInput();\r\n};\r\n\r\n/**\r\n * BillingState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >BillingStateAction,\r\n input: createInput\r\n});","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * CheckoutDisabledButtonState Input Action\r\n */\r\nexport class CheckoutDisabledButtonStateInput implements Msdyn365.IActionInput {\r\n // CheckoutDisabledButtonState: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // CheckoutDisabledButtonState: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CheckoutDisabledButtonState`;\r\n public getCacheObjectType = () => 'CheckoutDisabledButtonState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// CheckoutDisabledButtonState: Create a data model here or import one to capture the response of the action\r\nexport interface ICheckoutDisabledButtonStateData {\r\n disabled: boolean;\r\n}\r\n\r\n/**\r\n * CheckoutDisabledButtonState: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new CheckoutDisabledButtonStateInput();\r\n};\r\n\r\n/**\r\n * CheckoutDisabledButtonState: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: CheckoutDisabledButtonStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { disabled: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // CheckoutDisabledButtonState: Give your data action a unique id\r\n id: 'CheckoutDisabledButtonState',\r\n input: createInput\r\n // CheckoutDisabledButtonState: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * CompleteyourBedPillow Input Action\r\n */\r\nexport class CompleteYourBedPillowInput implements Msdyn365.IActionInput {\r\n public pillow: SimpleProduct | undefined | null;\r\n // TODO: Construct the input needed to run the action\r\n constructor(pillow: SimpleProduct | undefined | null) {\r\n this.pillow = pillow;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CompleteyourBedPillow`;\r\n public getCacheObjectType = () => 'CompleteyourBedPillow';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ICompleteYourBedPillowData {\r\n pillow: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new CompleteYourBedPillowInput(args?.config?.pillow);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: CompleteYourBedPillowInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { pillow: input.pillow };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'CompleteyourBedPillow',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * CompleteyourBedProtector Input Action\r\n */\r\nexport class CompleteyourBedProtectorInput implements Msdyn365.IActionInput {\r\n public protector: SimpleProduct | undefined | null;\r\n // TODO: Construct the input needed to run the action\r\n constructor(protector: SimpleProduct | undefined | null) {\r\n this.protector = protector;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CompleteyourBedProtector`;\r\n public getCacheObjectType = () => 'CompleteyourBedProtector';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ICompleteYourBedProtectorData {\r\n protector: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new CompleteyourBedProtectorInput(args?.config?.protector);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: CompleteyourBedProtectorInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { protector: input.protector };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'CompleteyourBedProtector',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * ExpressOrderSubmitStateAction Input Action\r\n */\r\nexport class ExpressOrderSubmitStateActionInput implements Msdyn365.IActionInput {\r\n // ExpressOrderSubmitState: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // ExpressOrderSubmitState: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ExpressOrderSubmitState`;\r\n public getCacheObjectType = () => 'ExpressOrderSubmitState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// ExpressOrderSubmitState: Create a data model here or import one to capture the response of the action\r\nexport interface IExpressOrderSubmitStateActionData {\r\n expressSubmit: boolean;\r\n slotTime: string;\r\n slotDate: string;\r\n selectedService: string;\r\n}\r\n\r\n/**\r\n * ExpressOrderSubmitState - create new input for create action\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new ExpressOrderSubmitStateActionInput();\r\n};\r\n\r\n/**\r\n * ExpressOrderSubmitState - create action\r\n */\r\nasync function action(input: ExpressOrderSubmitStateActionInput, ctx: Msdyn365.IActionContext): Promise {\r\n\r\n return { expressSubmit: true , slotTime: '', slotDate: '', selectedService: ''};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // ExpressOrderSubmitState: Give your data action a unique id\r\n id: 'ExpressOrderSubmitStateAction',\r\n input: createInput\r\n // ExpressOrderSubmitState: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * FetchChooseYourFoundationDatabase Input Action\r\n */\r\nexport class FetchChooseYourFoundationDatabaseInput implements Msdyn365.IActionInput {\r\n public jsonSrc: string;\r\n // TODO: Construct the input needed to run the action\r\n constructor(jsonSrc: string) {\r\n this.jsonSrc = jsonSrc;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ChooseYourFoundationDatabase`;\r\n public getCacheObjectType = () => 'ChooseYourFoundationDatabase';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IFetchChooseYourFoundationDatabaseData {\r\n text: string;\r\n jsonSrc: string;\r\n}\r\n\r\nexport interface IDatabaseRow {\r\n mattressVariantReqId: string;\r\n baseVariantReqIdList: string[];\r\n recommendedBaseVariantReqId: string;\r\n}\r\n\r\nexport interface foo {\r\n database: AsyncResult;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new FetchChooseYourFoundationDatabaseInput(args?.config?.jsonSrc!);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: FetchChooseYourFoundationDatabaseInput, ctx: Msdyn365.IActionContext): Promise {\r\n const res = await Msdyn365.sendRequest(input.jsonSrc, 'get');\r\n const database = res.data;\r\n return database;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'FetchChooseYourFoundationDatabase',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * FetchcompleteYourBedData Input Action\r\n */\r\nexport class FetchCompleteYourBedDataInput implements Msdyn365.IActionInput {\r\n public jsonData: string;\r\n // TODO: Construct the input needed to run the action\r\n constructor(jsonData: string) {\r\n this.jsonData = jsonData;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `completeYourBedData`;\r\n public getCacheObjectType = () => 'completeYourBedDataObject';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IFetchcompleteYourBedData {\r\n text: string;\r\n jsonData: string;\r\n}\r\n\r\nexport interface IDataRow {\r\n mattressVariantReqId: string;\r\n buyAllVariantRecIds:any;\r\n}\r\n\r\nexport interface foo {\r\n data: AsyncResult;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new FetchCompleteYourBedDataInput(args?.config?.jsonData!);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: FetchCompleteYourBedDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n\r\n const res = await Msdyn365.sendRequest(input.jsonData, 'get');\r\n const data = res.data;\r\n return data;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'FetchcompleteYourBedData',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface IGetDeliveryFeeUpdateInput {\r\n deliveryAmount: number;\r\n}\r\n/**\r\n * GetDeliveryFeeUpdate Input Action\r\n */\r\nexport class GetDeliveryFeeUpdateInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CheckoutUpdateDeliveryFee`;\r\n public getCacheObjectType = () => 'CheckoutUpdateDeliveryFee';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetDeliveryFeeUpdateData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetDeliveryFeeUpdateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetDeliveryFeeUpdateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return {deliveryAmount: 0};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetDeliveryFeeUpdate',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetMattressFoundationsToAdd Input Action\r\n */\r\nexport class GetMattressFoundationsToAddInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `TODO`;\r\n public getCacheObjectType = () => 'TODO';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetMattressFoundationsToAddData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetMattressFoundationsToAddInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetMattressFoundationsToAddInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n console.log('input/context',{input, ctx});\r\n return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetMattressFoundationsToAdd',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\n// import { ICategoryPath, ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\nimport { getCategoryPathsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { CategoryPathLookup, CategoryPathResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { hasArray } from '../Utilities/emtpyChecker';\r\n\r\n/**\r\n * Category path input\r\n */\r\nexport class GetCategoryPathsInput implements IActionInput {\r\n public readonly ChannelId: number;\r\n public CatalogId?: number;\r\n public productIds?: number[];\r\n // public readonly categoryPathLooksups: CategoryPathLookup[];\r\n public readonly apiSettings: ICommerceApiSettings;\r\n // @ts-ignore\r\n private constructedCacheKey: string | undefined;\r\n\r\n constructor(context: IRequestContext, catalogId?: number, productIds?: number[]) {\r\n this.ChannelId = context.apiSettings.channelId;\r\n this.CatalogId = catalogId; // context.apiSettings.catalogId || 0;\r\n this.productIds = productIds;\r\n // this.categoryPathLooksups = categoryPathLooksups;\r\n this.apiSettings = context.apiSettings;\r\n this.constructedCacheKey = '';\r\n // categoryPathLooksups.forEach(categoryPath=> {\r\n // this.constructedCacheKey+=`${categoryPath.ProductId && categoryPath.ProductId.toString()}|`;\r\n // });\r\n this.constructedCacheKey = this.productIds?.map(ids => ids).join('-').toString();\r\n this.constructedCacheKey += `${this.ChannelId?.toString()}|`;\r\n this.constructedCacheKey += `${this.CatalogId?.toString()}|`;\r\n }\r\n\r\n public getCacheKey = () => `MFRMProductCategoryPath-${this.constructedCacheKey}`;\r\n public getCacheObjectType = () => 'MFRMProductCategoryPath';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the getCategoryPath retail api call\r\n */\r\nexport const createGetCategoryPathsInput = (\r\n inputData: GetCategoryPathsInput,\r\n context: ICreateActionContext>\r\n): IActionInput => {\r\n const productId = inputData.productIds;\r\n if (productId) {\r\n return new GetCategoryPathsInput(context.requestContext, inputData.CatalogId, inputData.productIds);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the category path for a product\r\n */\r\nexport async function getProductsCategoryPathsAction(input: GetCategoryPathsInput, ctx: IActionContext): Promise {\r\n const catPaths: CategoryPathLookup[] = [];\r\n if (!hasArray(input.productIds)) {\r\n return [];\r\n }\r\n for (let productsIter = 0; productsIter < input.productIds!.length; productsIter++) {\r\n catPaths.push({ ProductId: input.productIds![productsIter] });\r\n }\r\n try {\r\n return await getCategoryPathsAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: input.productIds!.length }, Sorting: {} } }, input.ChannelId, input.CatalogId!, catPaths);\r\n } catch (err) {\r\n console.log(err);\r\n return [];\r\n }\r\n}\r\n\r\nexport const getCategoryPathsActionDataAction = createObservableDataAction({\r\n id: 'GetMFRMProductsCategoryPaths',\r\n action: >getProductsCategoryPathsAction,\r\n input: createGetCategoryPathsInput\r\n});\r\n\r\nexport default getCategoryPathsActionDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface ICheckoutRecycleFeeTaxUpdate {\r\n recycleFee: number | null;\r\n tax: number | null;\r\n}\r\n/**\r\n * GetRecycleFeeCheckout Input Action\r\n */\r\nexport class GetRecycleFeeCheckoutInput implements Msdyn365.IActionInput {\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CheckoutUpdateRecycleFee`;\r\n public getCacheObjectType = () => 'CheckoutUpdateRecycleFee';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetRecycleFeeCheckoutInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetRecycleFeeCheckoutInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n return {recycleFee: null , tax: null};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetRecycleFeeCheckout',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIATPInventoryStatusAsync } from './CoreProductDataActionExtension.g';\r\nimport { IMFIATPInventoryStatusResponse, IMFICLDeliveryScheduleParameters } from './CoreProductDataServiceEntities.g';\r\n\r\n/**\r\n * GetDeliveryMessage Input Action\r\n */\r\n\r\nexport class GetATPInventoryStatusInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public input: IMFICLDeliveryScheduleParameters;\r\n public isCached?: boolean;\r\n constructor(input: IMFICLDeliveryScheduleParameters, isCached: boolean = true) {\r\n this.input = input;\r\n this.isCached = isCached;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => {\r\n const key = Array.prototype.map.call(this.input.ItemLines, (item) => { return item.VariantRecordId; }).sort().join(\",\");\r\n return `Get-Inventory-Status${this.input.ZipCode}-${this.input.ItemLines![0].ItemId}-${key}-${\r\n this.input?.Weeks\r\n }-${this.input?.RequestedDate}`;\r\n };\r\n // public getCacheKey = () => 'do';\r\n public getCacheObjectType = () => 'GetATPInventoryStatusResult';\r\n public dataCacheType = (): Msdyn365.CacheType => (this.isCached ? 'request' : 'none');\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\n// const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n// return new GetDeliveryMessageInput();\r\n// };\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getATPInventoryStatusAction(\r\n request: GetATPInventoryStatusInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIATPInventoryStatusAsync({ callerContext: ctx }, request.input);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getATPInventoryStatusAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetATPInventoryStatus'\r\n // input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import { IGeneric, IAny } from '@msdyn365-commerce/core';\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport axios from 'axios';\r\nimport { getZipCode } from '../Utilities/get-zipcode';\r\n\r\n/**\r\n * GetSociData Input Action\r\n */\r\nexport class GetSociDataInput implements Msdyn365.IActionInput {\r\n public searchradius?: number | undefined;\r\n public searchLimit?: number | undefined;\r\n public zipCode?: string | undefined;\r\n constructor(searchradius?: number | undefined, searchLimit?: number | undefined, zipCode?: string | undefined) {\r\n this.searchradius = searchradius;\r\n this.searchLimit = searchLimit;\r\n this.zipCode = zipCode;\r\n }\r\n\r\n public getCacheKey = () => `SociLocations-${this.zipCode}`;\r\n public getCacheObjectType = () => 'SociLocations';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n return new GetSociDataInput(args?.config?.lookupRadius, args?.config?.maxNoOfFranchise ?? 4);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getSociData(input: GetSociDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n try {\r\n const zipCode = input?.zipCode ? input.zipCode : getZipCode(ctx);\r\n if (!zipCode) {\r\n return null;\r\n }\r\n\r\n const response = await axios.post(`https://api.slippymap.com/rest/locatorsearch`, {\r\n \"request\": {\r\n \"appkey\": \"F147ADC0-8099-11EC-AC1B-273DC403F339\",\r\n \"formdata\": {\r\n \"dataview\": \"store_default\",\r\n \"limit\": input.searchLimit ?? 4,\r\n \"geolocs\": {\r\n \"geoloc\": [\r\n {\r\n \"postalcode\": zipCode\r\n }\r\n\r\n ]\r\n },\r\n \"searchradius\": input.searchradius?.toString() ?? \"50\"\r\n }\r\n }\r\n }\r\n , {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n if (response.data) {\r\n return response.data;\r\n }\r\n else { return null; }\r\n } catch (e) {\r\n // TODO: will be removed after unit test and deployment on lower environment\r\n console.log('error for soci api', e);\r\n return null;\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getSociData,\r\n id: 'GetSociData',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","// tslint:disable\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * MFITryInStore entity interface.\r\n */\r\nexport interface IMFITryInStore {\r\n ZipCode?: string;\r\n StoreId: string;\r\n Products?: string;\r\n Limit: number;\r\n Radius: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFITryInStoreInfoResponse entity interface.\r\n */\r\nexport interface IMFITryInStoreInfoResponse {\r\n Status?: string;\r\n Message?: string;\r\n StoreId?: string;\r\n Inventory?: string[];\r\n}\r\n\r\n/**\r\n * MFITryInStore entity class.\r\n */\r\nexport class MFITryInStoreExtensionClass implements IMFITryInStore {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ZipCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StoreId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Products: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Limit: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Radius: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ZipCode = odataObject.ZipCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StoreId = odataObject.StoreId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Products = odataObject.Products;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Limit = odataObject.Limit;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Radius = odataObject.Radius;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFITryInStoreInfoResponse entity class.\r\n */\r\nexport class MFITryInStoreInfoResponseExtensionClass implements IMFITryInStoreInfoResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StoreId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Inventory: string[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Status = odataObject.Status;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StoreId = odataObject.StoreId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory = undefined;\r\n if (odataObject.Inventory) {\r\n this.Inventory = [];\r\n for (let i = 0; i < odataObject.Inventory.length; i++) {\r\n if (odataObject.Inventory[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory[i] = odataObject.Inventory[i];\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './TryInStoreDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction tryInStoresQuery(storeId?: string): DataServiceQuery {\r\n const key = storeId ? { StoreId: storeId } : null;\r\n return new DataServiceQuery('TryInStores', 'MFITryInStore', DataServiceEntities.MFITryInStoreExtensionClass, key);\r\n}\r\n\r\nexport function createMFIGetTryInStoreInfoInput(tryInStoreProductIDs: DataServiceEntities.IMFITryInStore): IDataServiceRequest {\r\n const query = tryInStoresQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetTryInStoreInfo',\r\n true,\r\n DataServiceEntities.MFITryInStoreInfoResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFITryInStoreInfoResponse' },\r\n { tryInStoreProductIDs: tryInStoreProductIDs }\r\n );\r\n}\r\n\r\nexport function mFIGetTryInStoreInfoAsync(\r\n context: IContext,\r\n tryInStoreProductIDs: DataServiceEntities.IMFITryInStore\r\n): AsyncResult {\r\n const request = createMFIGetTryInStoreInfoInput(tryInStoreProductIDs);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIGetTryInStoreInfoAsync } from './TryInStoreDataActionExtension.g';\r\nimport { IMFITryInStore, IMFITryInStoreInfoResponse } from './TryInStoreDataServiceEntities.g';\r\n\r\n/**\r\n * GetTryInStoreInfo Input Action\r\n */\r\n\r\nexport class GetTryInStoreInfoInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public input: IMFITryInStore;\r\n constructor(input: IMFITryInStore) {\r\n this.input = input;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () =>\r\n `Try-In-Store${this.input.StoreId}-${this.input.ZipCode}-${this.input.Radius}-${this.input.Limit}-${this.input.Products}`;\r\n public getCacheObjectType = () => 'GetTryInStoreInfo';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\n// const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n// return new GetTryInStoreInfoInput();\r\n// };\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getTryInStoreAction(\r\n request: GetTryInStoreInfoInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIGetTryInStoreInfoAsync({ callerContext: ctx }, request.input);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return {};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getTryInStoreAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetTryInStoreInfo'\r\n // input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport Cookies from 'universal-cookie';\r\n\r\nexport interface ICategoryLevelNamesData {\r\n categoryLevelName?: string;\r\n}\r\nexport class GetUnbxdRecommendationsDataInput implements Msdyn365.IActionInput {\r\n public pageType?: string | undefined;\r\n public widgetNumber?: string | undefined;\r\n public productID?: string | undefined;\r\n public catLevels?: ICategoryLevelNamesData[] | undefined;\r\n public cartItemIDs?: (string | undefined)[] | undefined;\r\n\r\n constructor(pageType?: string | undefined, widgetNumber?: string | undefined, productID?: string | undefined, catLevels?: ICategoryLevelNamesData[] | undefined, cartItemIDs?: (string | undefined)[] | undefined) {\r\n this.pageType = pageType;\r\n this.widgetNumber = widgetNumber;\r\n this.productID = productID;\r\n this.catLevels = catLevels;\r\n this.cartItemIDs = cartItemIDs;\r\n }\r\n\r\n public getCacheKey = () => `Unbxd-recommendation-data-${this.pageType}-${this.widgetNumber}`;\r\n public getCacheObjectType = () => 'Unbxd-recommendation-data';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getUnbxdRecommendationData(input: GetUnbxdRecommendationsDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n const cookies = new Cookies();\r\n const unbxdUid = cookies.get('unbxd.userId');\r\n const pageType = input?.pageType ? input.pageType.toUpperCase() : \"\";\r\n const productID = input?.productID ? input.productID : \"\";\r\n const catLevels = input?.catLevels ? input.catLevels : [];\r\n const cartItemIDs = input?.cartItemIDs ? input.cartItemIDs : [];\r\n const unbxdApiKey = ctx.requestContext.app.config.unbxdApiKey;\r\n const unbxdSiteKey = ctx.requestContext.app.config.unbxdSiteKey;\r\n\r\n if (!pageType) {\r\n return null;\r\n }\r\n try {\r\n let unbxdUrl = \"\";\r\n switch (pageType) {\r\n case \"HOME\":\r\n unbxdUrl = `https://recommendations.unbxd.io/v2.0/${unbxdApiKey}/${unbxdSiteKey}/items?pageType=${pageType}&uid=${unbxdUid}`;\r\n break;\r\n case \"CATEGORY\":\r\n const catnames = catLevels.map((catName, index) => {\r\n return `&catlevel${index + 1}Name=${catName ? catName.categoryLevelName : ''}`;\r\n }).join('');\r\n\r\n unbxdUrl = `https://recommendations.unbxd.io/v2.0/${unbxdApiKey}/${unbxdSiteKey}/items?pageType=${pageType}${catnames}&uid=${unbxdUid}`;\r\n break;\r\n case \"PRODUCT\":\r\n unbxdUrl = `https://recommendations.unbxd.io/v2.0/${unbxdApiKey}/${unbxdSiteKey}/items?pageType=${pageType}&id=${productID}&uid=${unbxdUid}`;\r\n break;\r\n case \"CART\":\r\n const productitemIds = cartItemIDs.map((itemId) => {\r\n return `&id=${itemId}`;\r\n }).join('');\r\n\r\n unbxdUrl = `https://recommendations.unbxd.io/v2.0/${unbxdApiKey}/${unbxdSiteKey}/items?pageType=${pageType}${productitemIds}&uid=${unbxdUid}`;\r\n break;\r\n default:\r\n unbxdUrl = '';\r\n }\r\n const response = await Msdyn365.sendRequest(unbxdUrl, 'get');\r\n if (response.data && response.headers) {\r\n const recsData={\r\n \"unbxdRequestId\":response.headers[\"x-request-id\"]? response.headers[\"x-request-id\"]:'',\r\n \"unbxdRecs\":response.data[input.widgetNumber!.toLowerCase()]\r\n };\r\n return recsData;\r\n }\r\n else { return null; }\r\n } catch (e) {\r\n return null;\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getUnbxdRecommendationData,\r\n id: 'getUnbxdRecommendationData'\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaymentRedirectToOrderConfirmation Input Action\r\n */\r\nexport class PaymentRedirectToOrderConfirmationInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `PaymentRedirectToOrderConfirmation`;\r\n public getCacheObjectType = () => 'PaymentRedirectToOrderConfirmation';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPaymentRedirectToOrderConfirmationData {\r\n redirectToOrderConfirmation: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaymentRedirectToOrderConfirmationInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function paymentRedirectAction(input: PaymentRedirectToOrderConfirmationInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { redirectToOrderConfirmation: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >paymentRedirectAction,\r\n // TODO: Give your data action a unique id\r\n id: 'PaymentRedirectToOrderConfirmation',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaypalExpressEditState Input Action\r\n */\r\nexport class PaypalExpressEditStateInput implements Msdyn365.IActionInput {\r\n // PaypalExpressEditStat: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // PaypalExpressEditStat: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `PaypalExpressEditStat`;\r\n public getCacheObjectType = () => 'PaypalExpressEditStat';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// PaypalExpressEditStat: Create a data model here or import one to capture the response of the action\r\nexport interface IPaypalExpressEditStateData {\r\n isDisabled : boolean\r\n}\r\n\r\n/**\r\n * PaypalExpressEditStat: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaypalExpressEditStateInput();\r\n};\r\n\r\n/**\r\n * PaypalExpressEditStat: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaypalExpressEditStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // PaypalExpressEditStat: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { isDisabled : true };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // PaypalExpressEditStat: Give your data action a unique id\r\n id: 'PaypalExpressEditState',\r\n input: createInput\r\n // PaypalExpressEditStat: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaypalexpressTryagainTrigger Input Action\r\n */\r\nexport class PaypalexpressTryagainTriggerInput implements Msdyn365.IActionInput {\r\n // PaypalexpressTryagainTrigger: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // PaypalexpressTryagainTrigger: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `PaypalexpressTryagainTrigger`;\r\n public getCacheObjectType = () => 'PaypalexpressTryagainTrigger';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// PaypalexpressTryagainTrigger: Create a data model here or import one to capture the response of the action\r\nexport interface IPaypalexpressTryagainTriggerData {\r\n buttonClicked: boolean;\r\n orderSubmitClick: boolean;\r\n}\r\n\r\n/**\r\n * PaypalexpressTryagainTrigger: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaypalexpressTryagainTriggerInput();\r\n};\r\n\r\n/**\r\n * PaypalexpressTryagainTrigger: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaypalexpressTryagainTriggerInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // PaypalexpressTryagainTrigger: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { buttonClicked: false, orderSubmitClick: false};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // PaypalexpressTryagainTrigger: Give your data action a unique id\r\n id: 'PaypalexpressTryagainTrigger',\r\n input: createInput\r\n // PaypalexpressTryagainTrigger: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * Paypalsuccesstrigger Input Action\r\n */\r\nexport class PaypalsuccesstriggerInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `PayPalSuccessFlag`;\r\n public getCacheObjectType = () => 'PayPalSuccessFlag';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPaypalsuccesstriggerData {\r\n isPaymentSuccess: boolean;\r\n paymentSuccessEmail: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaypalsuccesstriggerInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaypalsuccesstriggerInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { isPaymentSuccess: false, paymentSuccessEmail: '' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'Paypalsuccesstrigger',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * SelectYourFoundation Input Action\r\n */\r\nexport class SelectYourFoundationInput implements Msdyn365.IActionInput {\r\n public foundation: SimpleProduct | undefined | null;\r\n // TODO: Construct the input needed to run the action\r\n constructor(foundation: SimpleProduct | undefined | null) {\r\n this.foundation = foundation;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SelectYourFoundation`;\r\n public getCacheObjectType = () => 'SelectYourFoundation';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ISelectYourFoundationData {\r\n foundation: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new SelectYourFoundationInput(args?.config?.foundation);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: SelectYourFoundationInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { foundation: input.foundation };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'SelectYourFoundation',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nexport interface ISocialIconState {\r\n copyLinkClick: boolean;\r\n}\r\n\r\n/**\r\n * SocialIconsState Input Action\r\n */\r\nexport class SocialIconsStateInput implements IActionInput {\r\n public getCacheKey = () => `SocialIconsState`;\r\n public getCacheObjectType = () => 'SocialIconsState';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport async function socialIconStateAction(input: SocialIconsStateInput, ctx: IActionContext): Promise {\r\n return { copyLinkClick: false };\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new SocialIconsStateInput();\r\n};\r\n\r\nexport default createObservableDataAction({\r\n action: >socialIconStateAction,\r\n // TODO: Give your data action a unique id\r\n id: 'SocialIconsState',\r\n input: createInput\r\n});\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface ISRPBreadcrumbState {\r\n breadcrumbCheck: boolean;\r\n}\r\n\r\n/**\r\n * SrpBreadcrumbPage Input Action\r\n */\r\nexport class SrpBreadcrumbPageInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `BreadcrumbSrp`;\r\n public getCacheObjectType = () => 'BreadcrumbSrp';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ISrpBreadcrumbPageData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new SrpBreadcrumbPageInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: SrpBreadcrumbPageInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { breadcrumbCheck: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'SrpBreadcrumbPage',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * TriggerSpecialSynchronyFinancing Input Action\r\n */\r\nexport class TriggerSpecialSynchronyFinancingInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `TriggerSpecialSynchronyFinancing`;\r\n public getCacheObjectType = () => 'TriggerSpecialSynchronyFinancing';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ITriggerSpecialSynchronyFinancingData {\r\n triggerSpecialFinancing: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new TriggerSpecialSynchronyFinancingInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: TriggerSpecialSynchronyFinancingInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { triggerSpecialFinancing: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'TriggerSpecialSynchronyFinancing',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n/**\r\n * UpdateMonthlyPayment Input Action\r\n */\r\nexport class UpdateMonthlyPaymentInput implements Msdyn365.IActionInput {\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `updateMonthlyPayment`;\r\n public getCacheObjectType = () => 'updateMonthlyPayment';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IUpdateMonthlyPaymentData {\r\n updateTotal: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new UpdateMonthlyPaymentInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function updateMonthlyPayment(input: UpdateMonthlyPaymentInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { updateTotal: '0' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >updateMonthlyPayment,\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * UserDefinedPromocode Input Action\r\n */\r\nexport class UserDefinedPromocodeInput implements Msdyn365.IActionInput {\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `userDefinedPromoCodes`;\r\n public getCacheObjectType = () => 'userDefinedPromoCodes';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IUserDefinedPromocodeData {\r\n userDefinedPromos: string[];\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new UserDefinedPromocodeInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: UserDefinedPromocodeInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { userDefinedPromos: [] };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'UserDefinedPromocode',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","// WmapAddress-state.ts\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nexport interface IWmapAddressState {\r\n preFilledAddress: any;\r\n isAddressUpdate: boolean;\r\n}\r\n\r\n/**\r\n * WmapAddressState - action input\r\n */\r\nexport class WmapAddressStateInput implements IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `WmapAddressState`;\r\n public getCacheObjectType = () => 'WmapAddressState';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * WmapAddressState - action\r\n */\r\nasync function action(input: WmapAddressStateInput, ctx: IActionContext): Promise {\r\n return { preFilledAddress: {}, isAddressUpdate: false };\r\n}\r\n\r\n/**\r\n * WmapAddressState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new WmapAddressStateInput();\r\n};\r\n\r\n/**\r\n * WmapAddressState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});","// sample-state.ts\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nexport interface IZipCodeState {\r\n isStateValid: boolean;\r\n}\r\n\r\n/**\r\n * ZipCodeState - action input\r\n */\r\nexport class ZipCodeStateInput implements IActionInput {\r\n public getCacheKey = () => `ZipCodeState`;\r\n public getCacheObjectType = () => 'ZipCodeState';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * ZipCodeState - action\r\n */\r\nexport async function ZipCodeStateAction(input: ZipCodeStateInput, ctx: IActionContext): Promise {\r\n return {isStateValid: false };\r\n}\r\n\r\n/**\r\n * ZipCodeState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new ZipCodeStateInput();\r\n};\r\n\r\n/**\r\n * ZipCodeState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >ZipCodeStateAction,\r\n input: createInput\r\n});\r\n","// sample-state.ts\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nexport interface IZipcodeValidation {\r\n isZipcodeValid: boolean;\r\n}\r\n\r\n/**\r\n * ZipCodeState - action input\r\n */\r\nexport class ZipCodeValidationInput implements IActionInput {\r\n public getCacheKey = () => `ZipCodeValidation`;\r\n public getCacheObjectType = () => 'ZipCodeValidation';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * ZipCodeState - action\r\n */\r\nexport async function ZipcodeValidationAction(input: ZipCodeValidationInput, ctx: IActionContext): Promise {\r\n return { isZipcodeValid: false };\r\n}\r\n\r\n/**\r\n * ZipCodeState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new ZipCodeValidationInput();\r\n};\r\n\r\n/**\r\n * ZipCodeState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >ZipcodeValidationAction,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { mFIGetBonusCouponsDetailsAsync } from '../actions/BonusItemDataActionExtension.g';\r\nimport { IMFIGetBonusCouponsDetailsResponse } from '../actions/BonusItemDataServiceEntities.g';\r\n\r\n// tslint:disable-next-line: completed-docs\r\nexport class BonusCouponsInfoInput implements IActionInput {\r\n public bonusCoupon: string;\r\n constructor(bonusCoupon: string) {\r\n this.bonusCoupon = bonusCoupon;\r\n }\r\n public getCacheKey = () => `MFRMBonusCouponsInfoInput-${this.bonusCoupon}`;\r\n public getCacheObjectType = () => 'MFRMBonusCouponsInfoInput';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport interface IMFRMBonusCouponsDetailData {\r\n couponsDetails: IMFIGetBonusCouponsDetailsResponse;\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new BonusCouponsInfoInput('');\r\n};\r\n\r\nexport async function getAllBonusCouponsDetails(\r\n input: BonusCouponsInfoInput,\r\n ctx: IActionContext\r\n): Promise {\r\n try {\r\n const result = await mFIGetBonusCouponsDetailsAsync({ callerContext: ctx }, input.bonusCoupon);\r\n if (result) {\r\n return {couponsDetails: result};\r\n }\r\n } catch (error) {\r\n ctx.telemetry.warning(JSON.stringify(error));\r\n ctx.telemetry.debug('Unable to get Bonus Coupons Details when get all coupons');\r\n }\r\n return {couponsDetails: {}};\r\n}\r\n\r\nexport default createObservableDataAction({\r\n action: >getAllBonusCouponsDetails,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n/**\r\n * GetAuthTokenInput Input Action\r\n */\r\nexport class BrightSpotContentInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n private brightspotUrl: string = '';\r\n constructor(brightspotUrl: string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'bspagecache', cacheKey: 'bspagecache' });\r\n this.brightspotUrl = brightspotUrl;\r\n }\r\n\r\n public getBrightspotUrl = () => this.brightspotUrl;\r\n public getCacheKey = () => `bspagecache`;\r\n public getCacheObjectType = () => 'bspagecache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.brightspotPageUrl) {\r\n return new BrightSpotContentInput(inputData.config.brightspotPageUrl);\r\n }\r\n return new BrightSpotContentInput('');\r\n};\r\n\r\nasync function action(input: BrightSpotContentInput, ctx: Msdyn365.IActionContext): Promise {\r\n const res = await Msdyn365.sendRequest(\r\n input.getBrightspotUrl(),\r\n 'get',\r\n null,\r\n { headers: {'Accept-Encoding': 'gzip'} }\r\n );\r\n\r\n return res.data;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nimport { IFinancingOfferFormatted } from '../Utilities/select-financing-offer';\r\n\r\n/**\r\n * FinancingOfferState Input Action\r\n */\r\n\r\nexport class FinancingOfferStateInput implements Msdyn365.IActionInput {\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `FinancingOfferState`;\r\n public getCacheObjectType = () => 'FinancingOfferState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IFinancingOfferStateData {\r\n isOpen: boolean;\r\n totalPrice?: number;\r\n financingOffer?: IFinancingOfferFormatted;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new FinancingOfferStateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: FinancingOfferStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { isOpen: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'FinancingOfferState',\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n// tslint:disable-next-line: no-duplicate-imports\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CacheType, ZipCodeInfo } from '@msdyn365-commerce/retail-proxy';\r\nimport { getAddressFromZipCodeAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\n/**\r\n * GetEyebrowMessage Input Action\r\n */\r\n\r\nexport class GetAddressByZipcodeInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public country: string;\r\n public zipcode: string;\r\n\r\n constructor(country: string, zipcode: string) {\r\n this.country = country;\r\n this.zipcode = zipcode;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `Get-Address-By-Zipcode-${this.zipcode}`;\r\n public getCacheObjectType = () => 'GetAddressByZipCode';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getAddressByZipcodeAction(input: GetAddressByZipcodeInput, ctx: IActionContext): Promise {\r\n return getAddressFromZipCodeAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: 1 } } }, input.country, input.zipcode);\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getAddressByZipcodeAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetAddressByZipcode'\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput,\r\n ICommerceApiSettings, ICreateActionContext, isEmptyOrNullObject\r\n} from '@msdyn365-commerce/core';\r\nimport { getCheckoutState, ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n getCardPaymentAcceptPointAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n CardPaymentAcceptPoint, CommerceProperty\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport get from 'lodash/get';\r\nimport Cookies from 'universal-cookie';\r\nimport { selectFinancingOffer } from '../Utilities/select-financing-offer';\r\nimport { getSetGrandTotal } from '../Utilities/cart-utils';\r\nimport { hasArray } from '../Utilities/emtpyChecker';\r\nexport interface IGetCardPaymentAcceptPointInput {\r\n showBillingAddress?: boolean;\r\n paymenTenderType?: string;\r\n apiSettings: ICommerceApiSettings;\r\n selectedOfferName?: string;\r\n isReload?: boolean;\r\n amountDue?: number;\r\n synchronySpecialFinancingCondition?: boolean;\r\n}\r\n\r\n/**\r\n * GetCardPaymentAcceptPointInput - Input for create GetCardPaymentAcceptPoint\r\n */\r\nexport class GetCardPaymentAcceptPointInput implements IActionInput {\r\n public showBillingAddress?: boolean;\r\n public paymenTenderType?: string;\r\n public selectedOfferName?: string;\r\n public amountDue?: number;\r\n public synchronySpecialFinancingCondition?: boolean;\r\n private apiSettings: ICommerceApiSettings;\r\n public isReload?: boolean;\r\n\r\n constructor(input: IGetCardPaymentAcceptPointInput) {\r\n this.showBillingAddress = input.showBillingAddress;\r\n this.paymenTenderType = input.paymenTenderType;\r\n this.apiSettings = input.apiSettings;\r\n this.selectedOfferName = input.selectedOfferName;\r\n this.isReload = input.isReload;\r\n this.amountDue = input.amountDue;\r\n this.synchronySpecialFinancingCondition = input.synchronySpecialFinancingCondition;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey(`CardPaymentAcceptPoint${this.paymenTenderType ? `-${this.paymenTenderType}` : ''}`, this.apiSettings);\r\n public getCacheObjectType = () => `CardPaymentAcceptPoint`;\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nexport const createCheckoutPaymentInstrumentInput = (inputData: ICreateActionContext) => {\r\n // @ts-ignore\r\n const { showBillingAddress, paymenTenderType, amountDue, synchronySpecialFinancingCondition } = inputData.config;\r\n const getCardPaymentAcceptPointInput = {\r\n showBillingAddres: showBillingAddress,\r\n paymenTenderType: paymenTenderType,\r\n apiSettings: inputData.requestContext.apiSettings,\r\n amountDue,\r\n synchronySpecialFinancingCondition\r\n };\r\n\r\n return new GetCardPaymentAcceptPointInput(getCardPaymentAcceptPointInput);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns a cart object based on the passed GetCartInput\r\n */\r\nexport async function getCardPaymentAcceptPointAction(\r\n input: GetCardPaymentAcceptPointInput,\r\n ctx: IActionContext\r\n): Promise {\r\n // If no cart ID is provided in input, we need to create a cart object\r\n if (!input) {\r\n ctx.telemetry.exception(new Error('[getCardPaymentAcceptPointAction] No valid Input was provided, failing'));\r\n throw new Error('[getCardPaymentAcceptPointAction] No valid Input was provided, failing');\r\n }\r\n\r\n const { showBillingAddress, paymenTenderType, amountDue = 0, synchronySpecialFinancingCondition } = input;\r\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\r\n ctx.telemetry.exception(error);\r\n throw error;\r\n });\r\n\r\n if (\r\n isEmptyOrNullObject(checkoutState) ||\r\n isEmptyOrNullObject(checkoutState.checkoutCart) ||\r\n isEmptyOrNullObject(checkoutState.checkoutCart.cart)\r\n ) {\r\n ctx.telemetry.exception(new Error('[getCardPaymentAcceptPointAction] Unable to get cart'));\r\n throw new Error('[getCardPaymentAcceptPointAction] Unable to get cart');\r\n }\r\n\r\n if (!checkoutState.checkoutCart.cart.CartLines || !checkoutState.checkoutCart.cart.CartLines.length) {\r\n ctx.telemetry.exception(new Error('[getCardPaymentAcceptPointAction] Cart is empty'));\r\n throw new Error('[getCardPaymentAcceptPointAction] Cart is empty');\r\n }\r\n\r\n const requestUrl =\r\n typeof ctx.requestContext.url.requestUrl === 'string'\r\n ? new URL(ctx.requestContext.url.requestUrl)\r\n : ctx.requestContext.url.requestUrl;\r\n const origin = get(window, 'location.origin') || requestUrl.origin;\r\n const zeroAmount = 0;\r\n\r\n const cardPaymentAcceptSettings = {\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CardPaymentAcceptSettings',\r\n HostPageOrigin: origin,\r\n AdaptorPath: `${origin}/Connectors/` || origin,\r\n CardPaymentEnabled: false,\r\n CardTokenizationEnabled: true,\r\n ...(!showBillingAddress && { HideBillingAddress: true }),\r\n ...(paymenTenderType && { TenderTypeId: paymenTenderType }),\r\n PaymentAmount: amountDue || zeroAmount\r\n };\r\n\r\n const { everydayFinancingOffers, addPaymentMethodName, extensionKeyPlanId, limitedTimeFinancingOffers, specialFinancingOffer, specialFinancingEnable } = ctx.requestContext.app.config;\r\n const getOffer = selectFinancingOffer({\r\n limitedTimeFinancingOffers,\r\n everydayFinancingOffers,\r\n totalPrice: getSetGrandTotal('get'),\r\n specialFinancingOffer,\r\n synchronySpecialFinancingCondition,\r\n specialFinancingEnable\r\n });\r\n const allOffers = [...(hasArray(limitedTimeFinancingOffers) || []), ...(hasArray(everydayFinancingOffers) || []), ...(hasArray(specialFinancingOffer) || [])];\r\n const offerName = synchronySpecialFinancingCondition && specialFinancingEnable? getOffer?.offerName : getOffer?.isLTO ? getOffer?.offerName : (input.selectedOfferName || getOffer?.offerName);\r\n const isReload = input.isReload;\r\n const defaultVal =\r\n allOffers?.find((item: { offerName: string }) => item.offerName?.toLowerCase() === offerName?.toLowerCase());\r\n const isSynchrony = paymenTenderType?.toLowerCase() === addPaymentMethodName?.toLowerCase();\r\n if(isSynchrony){\r\n (new Cookies()).set('Ecom_FinanceOption', defaultVal?.offerName);\r\n (new Cookies()).set('Ecom_FinancePlanId', defaultVal?.planID);\r\n }\r\n const ep: CommerceProperty[] = isSynchrony ? [{Key: extensionKeyPlanId, Value: { StringValue: defaultVal?.planID}}] : [];\r\n if (isReload) {\r\n return getCardPaymentAcceptPointAsync(\r\n { callerContext: ctx, bypassCache: 'get' },\r\n checkoutState.checkoutCart.cart.Id,\r\n cardPaymentAcceptSettings,\r\n ep\r\n ).then(cardPaymentAcceptPoint => {\r\n if (!cardPaymentAcceptPoint.AcceptPageUrl && !cardPaymentAcceptPoint.AcceptPageContent) {\r\n throw new Error(\r\n '[getCardPaymentAcceptPointAction] Payment Accept Page has neither return AcceptPageUrl nor AcceptPageContent in updatePaymentAcceptPageData'\r\n );\r\n }\r\n return cardPaymentAcceptPoint;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug('Unable to get Card Payment Accept Point');\r\n throw error;\r\n });\r\n }\r\n return {};\r\n}\r\n\r\nexport const getCardPaymentAcceptPointActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce/checkout-payment-instrument/get-card-payment-accept-point',\r\n action: >getCardPaymentAcceptPointAction,\r\n input: createCheckoutPaymentInstrumentInput\r\n});\r\n\r\nexport default getCardPaymentAcceptPointActionDataAction;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport class GetComfortTypesData extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n private comfortTypesDataUrl: string = '';\r\n constructor(comfortTypesDataUrl: string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'comfortTypesDataCache', cacheKey: 'comfortTypesDataCache' });\r\n this.comfortTypesDataUrl = comfortTypesDataUrl;\r\n }\r\n public getComfortTypesDataUrl = () => this.comfortTypesDataUrl;\r\n public getCacheKey = () => `comfortTypesDataCache`;\r\n public getCacheObjectType = () => 'comfortTypesDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.comfortTypesDataUrl) {\r\n return new GetComfortTypesData(inputData.config.comfortTypesDataUrl);\r\n }\r\n return new GetComfortTypesData('');\r\n};\r\nasync function action(input: GetComfortTypesData, ctx: Msdyn365.IActionContext): Promise {\r\n const comfortTypesDataJsonUrl = ctx.requestContext.app.config.comfortTypesDataJsonUrl;\r\n const jsonUrl = comfortTypesDataJsonUrl || '';\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const comfortTypesData = res.data && res.data;\r\n return comfortTypesData;\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IProductDimensionsWithAvailabilitiesFull, ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365, {\r\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput,\r\n IAny, ICreateActionContext, IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport {\r\n ProductDimension, ProductDimensionAvailabilitySearchCriteria,\r\n ProductDimensionValue, ProductDimensionValueInventoryAvailability, ProductsDataActions\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { createInventoryAvailabilitySearchCriteria, getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getDimensionValuesFromQuery, getQueryParamsFromQueryByName } from './utilities/utils';\r\nimport { variantQueryStringName } from '../Utilities/constants';\r\n\r\n/**\r\n * Defines the dimension value type for get dimensions for selected variant data action.\r\n * Includes old API format for backward compatibility and new API info for availabilities for new logic.\r\n */\r\nexport interface IDimensionValueForSelectedVariant extends ProductDimensionValueInventoryAvailability, ProductDimensionValue {}\r\n\r\n/**\r\n * Defines the returned type for get dimensions for selected variant data action.\r\n * Includes old API format for backward compatibility and new API info for availabilities for new logic.\r\n */\r\nexport interface IDimensionForSelectedVariant extends ProductDimensionFull, IProductDimensionsWithAvailabilitiesFull {}\r\n\r\n/**\r\n * Input class for the getDimensionsForSelectedVariant data action.\r\n */\r\nexport class GetDimensionsForSelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public matchingDimensionValues: ProductDimension[];\r\n\r\n public constructor(productId: number, channelId: number, matchingDimensionValues?: ProductDimension[]) {\r\n this.productId = productId;\r\n this.channelId = channelId;\r\n this.matchingDimensionValues = matchingDimensionValues || [];\r\n }\r\n\r\n /**\r\n * Cache key.\r\n * @returns String.\r\n */\r\n public getCacheKey: () => string = () => `DimensionsForSelectedVariantInput-${this.productId}-${this.channelId}`;\r\n\r\n /**\r\n * Cache object type.\r\n * @returns String.\r\n */\r\n public getCacheObjectType: () => string = () => 'DimensionsForSelectedVariantInput';\r\n\r\n /**\r\n * Cache type.\r\n * @returns String.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * Create input method for the getDimensionsForSelectedVariant data action.\r\n * @param inputData - The input data passed to the createInput method.\r\n * @returns - The input for the data action.\r\n */\r\nconst createDimensionsForSelectedVariantInput = (inputData: ICreateActionContext>): GetDimensionsForSelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n if (productId) {\r\n return new GetDimensionsForSelectedVariantInput(\r\n +productId,\r\n +inputData.requestContext.apiSettings.channelId,\r\n getDimensionValuesFromQuery(inputData.requestContext.url.requestUrl));\r\n }\r\n throw new Error('Unable to create DimensionsForSelectedVariantInput, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * Converts new API type with availabilities to old API type to preserve backward compatibility.\r\n * @param dimensions - Dimensions to convert.\r\n * @returns Dimensions in old API format.\r\n */\r\nconst prepareDimensionsDataResult = (dimensions: IProductDimensionsWithAvailabilitiesFull[]): IDimensionForSelectedVariant[] => {\r\n return dimensions.map(newDimension => {\r\n const oldDimension: IDimensionForSelectedVariant = { ...newDimension };\r\n oldDimension.DimensionValues = ArrayExtensions.validValues(newDimension.dimensionValuesWithInventory?.map(value => value.DimensionValue));\r\n return oldDimension;\r\n });\r\n};\r\n\r\n/**\r\n * Action Method for the getDimensionsForSelectedVariant Data Action.\r\n * @param input - Input for the data action.\r\n * @param context - Action context.\r\n * @returns Product dimensions with availability.\r\n */\r\nexport async function getDimensionsForSelectedVariantAction(\r\n input: GetDimensionsForSelectedVariantInput,\r\n context: IActionContext\r\n): Promise {\r\n const variantId = context.requestContext.app.config.queryBasedVariantSelection ? getQueryParamsFromQueryByName(MsDyn365.isBrowser ? new URL(window.location.href.toString()) : context.requestContext.url.requestUrl, variantQueryStringName) : undefined;\r\n let activeProduct = await ProductsDataActions.getByIdAsync({ callerContext: context }, variantId && !Number.isNaN(Number(variantId)) ? Number(variantId) : input.productId, input.channelId);\r\n if (!activeProduct && variantId) {\r\n activeProduct = await ProductsDataActions.getByIdAsync({ callerContext: context }, Number(input.productId), input.channelId);\r\n }\r\n if (!ArrayExtensions.hasElements(activeProduct.Dimensions)) {\r\n return [];\r\n }\r\n\r\n const promises = activeProduct.Dimensions.map(dimension => {\r\n const shippingInventoryConfiguration = createInventoryAvailabilitySearchCriteria(context, [], true, undefined, undefined);\r\n\r\n const searchCriteria: ProductDimensionAvailabilitySearchCriteria =\r\n {\r\n RequestedDimensionTypeValue: dimension.DimensionTypeValue,\r\n MatchingDimensionValues: input.matchingDimensionValues.filter(item => item.DimensionTypeValue !== dimension.DimensionTypeValue),\r\n DefaultWarehouseOnly: shippingInventoryConfiguration.DefaultWarehouseOnly,\r\n FilterByChannelFulfillmentGroup: shippingInventoryConfiguration.FilterByChannelFulfillmentGroup,\r\n DeliveryModeTypeFilterValue: shippingInventoryConfiguration.DeliveryModeTypeFilterValue\r\n };\r\n\r\n const dimensionValuesPromise = ProductsDataActions.getDimensionValuesWithEstimatedAvailabilitiesAsync(\r\n { callerContext: context, queryResultSettings: {} },\r\n activeProduct.MasterProductId ? activeProduct.MasterProductId : activeProduct.RecordId,\r\n searchCriteria\r\n );\r\n const fullDimensionPromise = dimensionValuesPromise.then(dimensionValues => {\r\n const fullDimension: IProductDimensionsWithAvailabilitiesFull = {\r\n ...dimension,\r\n dimensionValuesWithInventory: dimensionValues\r\n };\r\n return fullDimension;\r\n });\r\n\r\n return fullDimensionPromise;\r\n });\r\n\r\n const dimensionValuesResults = await Promise.all(promises);\r\n\r\n return prepareDimensionsDataResult(dimensionValuesResults);\r\n}\r\n\r\n/**\r\n * The GetDimensionsForSelectedVariantDataAction\r\n * Get the currently selected Variant via the getSelectedVariant data action, and the gets the\r\n * available product dimensions for the variant via the getDimensionValues RetailServer API.\r\n */\r\nexport const getDimensionsForSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-dimensions/for-selected-variant',\r\n action: getDimensionsForSelectedVariantAction as IAction,\r\n input: createDimensionsForSelectedVariantInput\r\n});\r\n\r\nexport default getDimensionsForSelectedVariantActionDataAction;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport class GetFranchiseData extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public Latitude?: number;\r\n public Longitude?: number;\r\n public Radius?: number;\r\n\r\n constructor(_Latitude?: number, _Longitude?: number, _Radius?: number) {\r\n super({\r\n shouldCacheOutput: true,\r\n cacheObjectType: 'FranchiseDataCache',\r\n cacheKey: 'FranchiseDataCache'\r\n });\r\n this.Latitude = _Latitude;\r\n this.Longitude = _Longitude;\r\n this.Radius = _Radius;\r\n }\r\n public getCacheKey = () => `FranchiseDataCache`;\r\n public getCacheObjectType = () => 'FranchiseDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\nexport interface IFranchise {\r\n \"id\": string;\r\n \"name\": string;\r\n \"address_line_1\": string;\r\n \"address_line_2\": string;\r\n \"city\": string;\r\n \"state_province\": string;\r\n \"postal_code\": string;\r\n \"country\": string;\r\n \"lat\": string;\r\n \"long\": string;\r\n \"distance\": number;\r\n \"website_url\": string;\r\n \"miles\"?: number;\r\n}\r\n\r\nconst _calculateDistance = (latitude1: any, longitude1: any, latitude2: any, longitude2: any) => {\r\n\r\n // The math module contains a function\r\n // named toRadians which converts from\r\n // degrees to radians.\r\n const long1 = longitude1 * Math.PI / 180;\r\n const long2 = longitude2 * Math.PI / 180;\r\n const lat1 = latitude1 * Math.PI / 180;\r\n const lat2 = latitude2 * Math.PI / 180;\r\n\r\n // Haversine formula\r\n const dlon = long2 - long1;\r\n const dlat = lat2 - lat1;\r\n const a = Math.pow(Math.sin(dlat / 2), 2)\r\n + Math.cos(lat1) * Math.cos(lat2)\r\n * Math.pow(Math.sin(dlon / 2), 2);\r\n const c = 2 * Math.asin(Math.sqrt(a));\r\n\r\n // Radius of earth\r\n // for kilometers=6371\r\n // for miles = 3956\r\n const r = 3956;\r\n\r\n // calculate the result\r\n return (c * r);\r\n};\r\n\r\nexport const getFranchiseInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n return new GetFranchiseData();\r\n};\r\n\r\n\r\nexport async function getFranchise(input: GetFranchiseData, ctx: Msdyn365.IActionContext): Promise {\r\n const jsonUrl = ctx.requestContext.app.config.sociFranchiseDataUrl || 'https://files-us-prod.cms.commerce.dynamics.com/cms/api/fknscsckgq/binary/MAcq1X!!';\r\n const franchiseDataJson = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const franchiseStores: IFranchise[] = [];\r\n franchiseDataJson.data.map((franchise: IFranchise) => {\r\n const miles = _calculateDistance(input.Latitude, input.Longitude, franchise.lat, franchise.long);\r\n if (miles <= (input.Radius || 50)) {\r\n franchise.miles = miles;\r\n franchiseStores.push(franchise);\r\n }\r\n });\r\n\r\n return franchiseStores;\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getFranchise,\r\n input: getFranchiseInput\r\n});","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport class GetProductBenefitsEnhancedContentInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public masterProductID: string = '';\r\n constructor( masterProductID:string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'productBenefitsEnhancedContentCache', cacheKey: 'productBenefitsEnhancedContentCache' });\r\n this.masterProductID = masterProductID;\r\n }\r\n public getCacheKey = () => `productBenefitsEnhancedContentCache`;\r\n public getCacheObjectType = () => 'productBenefitsEnhancedContentCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n// tslint:disable: no-any\r\nasync function getEnhancedContentAction(input: GetProductBenefitsEnhancedContentInput, ctx: Msdyn365.IActionContext): Promise {\r\n const jsonUrlFromGlobals = ctx.requestContext.app.config.productBenefitsEnhancedContentUrl;\r\n const masterProductid = input.masterProductID;\r\n const jsonUrl = jsonUrlFromGlobals || '';\r\n try {\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n if (res && masterProductid) {\r\n const productBenefitData = res.data && res.data[masterProductid];\r\n return productBenefitData;\r\n }\r\n }\r\n catch (error) {\r\n console.log('error', error);\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getEnhancedContentAction\r\n});","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport class GetProductBenefitsData extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n private productBenefitsDataUrl: string = '';\r\n constructor(productBenefitsDataUrl: string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'productBenefitsDataCache', cacheKey: 'productBenefitsDataCache' });\r\n this.productBenefitsDataUrl = productBenefitsDataUrl;\r\n }\r\n public getProductBenefitsDataUrl = () => this.productBenefitsDataUrl;\r\n public getCacheKey = () => `productBenefitsDataCache`;\r\n public getCacheObjectType = () => 'productBenefitsDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.productBenefitsDataUrl) {\r\n return new GetProductBenefitsData(inputData.config.productBenefitsDataUrl);\r\n }\r\n return new GetProductBenefitsData('');\r\n};\r\nasync function action(input: GetProductBenefitsData, ctx: Msdyn365.IActionContext): Promise {\r\n const productBenefitsDataJsonUrl = ctx.requestContext.app.config.productBenefitsDataUrl;\r\n const jsonUrl = productBenefitsDataJsonUrl || '';\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const productBenefitsData = res.data && res.data;\r\n return productBenefitsData;\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetPromocodeValue Input Action\r\n */\r\n\r\nexport class GetPromocodeValueInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `getPromoCode`;\r\n public getCacheObjectType = () => 'getPromoCode';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetPromocodeValueData {\r\n promocodeValue: [IPromoCode];\r\n}\r\nexport interface IPromoCode {\r\n promoCodeApplied: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetPromocodeValueInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetPromocodeValueInput, ctx: Msdyn365.IActionContext): Promise {\r\n // tslint:disable-next-line: no-unnecessary-local-variable\r\n const promocodeValue: IPromoCode[] = [];\r\n return promocodeValue;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetPromocodeValue',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport class GetReasonsToBuyDataInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public categoryName:string ='';\r\n constructor( categoryName:string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'rtbDataCache', cacheKey: 'rtbDataCache' });\r\n this.categoryName = categoryName;\r\n }\r\n public getCacheKey = () => `rtbDataCache`;\r\n public getCacheObjectType = () => 'rtbDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n\r\n}\r\n// tslint:disable: no-any\r\nasync function action(input: GetReasonsToBuyDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n const jsonUrlFromGlobals = ctx.requestContext.app.config.reasonsToBuyJsonUrl;\r\n const categoryName =input.categoryName;\r\n const jsonUrl =jsonUrlFromGlobals || undefined;\r\n if(jsonUrl){\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const reasonsToBuyData = res.data && res.data[categoryName];\r\n return reasonsToBuyData;\r\n }\r\n return undefined;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action\r\n});\r\n","import { buildCacheKey, getSimpleProducts, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, ICommerceApiSettings, ICreateActionContext } from '@msdyn365-commerce/core';\r\nimport { ProductDeliveryOptions, SalesOrder, SimpleProduct, TransactionType } from '@msdyn365-commerce/retail-proxy';\r\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getSalesOrderDetailsBySalesIdAsync, getSalesOrderDetailsByTransactionIdAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/SalesOrdersDataActions.g';\r\n\r\ninterface ISalesOrderWithHydrations {\r\n salesOrder: SalesOrder;\r\n products: SimpleProduct[];\r\n productDeliveryOptions?: ProductDeliveryOptions[];\r\n}\r\n\r\n/**\r\n * orderTypes Types of orders\r\n */\r\nexport const enum orderTypes {\r\n salesOrder = 'salesOrder',\r\n transaction = 'transaction'\r\n}\r\n\r\n/**\r\n * Calls the Retail API and returns the sales order\r\n */\r\nconst getSalesOrder = (orderType: string = '', orderId: string = '') => async (ctx: IActionContext): Promise => {\r\n return orderType === orderTypes.salesOrder\r\n ? getSalesOrderDetailsBySalesIdAsync({ callerContext: ctx }, orderId)\r\n : // Local (1) searches the retail server database, and remote (2) searches\r\n // on the headquarters side. All (3) and none (0) are not supported.\r\n getSalesOrderDetailsByTransactionIdAsync({ callerContext: ctx }, orderId, 1);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the products\r\n */\r\nconst getProducts = (productIds: number[] = [], channelId?: number) => async (ctx: IActionContext): Promise => {\r\n const productInputs = productIds.map(productId => new ProductInput(productId, ctx.requestContext.apiSettings, channelId));\r\n return getSimpleProducts(productInputs, ctx);\r\n};\r\n\r\n/**\r\n * Action input\r\n */\r\nexport class GetSalesOrderWithHydrationsInput implements IActionInput {\r\n public orderType: string;\r\n public orderId: string;\r\n private apiSettings: ICommerceApiSettings;\r\n\r\n constructor(orderType: string , orderId: string, apiSettings: ICommerceApiSettings) {\r\n this.orderType = orderType;\r\n this.orderId = orderId;\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey(`SalesOrderWithHydrations`, this.apiSettings);\r\n public getCacheObjectType = () => `SalesOrderWithHydrations-${this.orderType}-${this.orderId}`;\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nconst createSalesOrderWithHydrationsInput = (inputData: ICreateActionContext) => {\r\n const { salesId = '', transactionId = '' } = (inputData.requestContext.query && inputData.requestContext.query) || {};\r\n if (salesId) {\r\n return new GetSalesOrderWithHydrationsInput(orderTypes.salesOrder, salesId, inputData.requestContext.apiSettings);\r\n } else if (transactionId) {\r\n return new GetSalesOrderWithHydrationsInput(orderTypes.transaction, transactionId, inputData.requestContext.apiSettings);\r\n }\r\n throw new Error(`createSalesOrderWithHydrationsInput - No salesId or transactionId provided.`);\r\n};\r\n\r\n/**\r\n * Get sales order with hydrations action\r\n */\r\nexport async function getSalesOrderWithHydrationsAction(\r\n input: GetSalesOrderWithHydrationsInput,\r\n ctx: IActionContext\r\n): Promise {\r\n if (!ctx) {\r\n throw new Error(`getSalesOrderWithHydrationsAction - Action context cannot be null/undefined`);\r\n }\r\n\r\n const { orderType, orderId } = input;\r\n\r\n if (!orderType || !orderId) {\r\n ctx.trace(`[getSalesOrderWithHydrationsAction] No orderType or orderId provided.`);\r\n return {};\r\n }\r\n\r\n const salesOrder = await getSalesOrder(orderType, orderId)(ctx);\r\n\r\n if (!salesOrder) {\r\n ctx.trace(`[getSalesOrderWithHydrationsAction] No salesOrder found.`);\r\n return {};\r\n }\r\n\r\n // If it is salesInvoice, return salesOrder and empty products\r\n // tslint:disable-next-line:prefer-type-cast\r\n if (salesOrder.TransactionTypeValue === 15 as TransactionType.SalesInvoice) {\r\n return {\r\n salesOrder,\r\n products: []\r\n };\r\n }\r\n\r\n if (!salesOrder.SalesLines || !salesOrder.SalesLines.length) {\r\n ctx.trace(`[getSalesOrderWithHydrationsAction] No salesLine found.`);\r\n return {};\r\n }\r\n\r\n const productIds: number[] = salesOrder.SalesLines.map(salesLine => salesLine.ProductId || 0).filter(productId => productId);\r\n\r\n if (!productIds || !productIds.length) {\r\n ctx.trace(`[getSalesOrderWithHydrationsAction] No productId in saleLines found.`);\r\n return {};\r\n }\r\n\r\n const products = await getProducts(productIds, salesOrder.ChannelId)(ctx);\r\n\r\n if (!products || !products.length) {\r\n ctx.trace(`[getSalesOrderWithHydrationsAction] No product found.`);\r\n return {};\r\n }\r\n\r\n const deliveryOptions = await getDeliveryOptionsAsync({ callerContext: ctx, queryResultSettings: {} }, products.map(x => x.RecordId), {}, 4)\r\n .then(result => {\r\n return result;\r\n }).catch((error: Error) => {\r\n ctx.trace(error.message);\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug(`[getDeliveryOptionsForCartLineItems]Error executing action`);\r\n throw new Error('[getDeliveryOptionsForCartLineItems]Error executing action');\r\n });\r\n\r\n return {\r\n salesOrder,\r\n products,\r\n deliveryOptions\r\n };\r\n}\r\n\r\nexport const getSalesOrderWithHydrationsActionDataAction = createObservableDataAction({\r\n id: 'mfrm-get-sales-order-with-hydrations',\r\n action: >getSalesOrderWithHydrationsAction,\r\n input: createSalesOrderWithHydrationsInput\r\n});\r\n\r\nexport default getSalesOrderWithHydrationsActionDataAction;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { filteredURL } from '../Utilities/plp-url-utils';\r\n\r\nexport class GetSeoDataInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n private seoDataUrl: string = '';\r\n constructor(seoDataUrl: string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'SeoDataCache', cacheKey: 'SeoDataCache' });\r\n this.seoDataUrl = seoDataUrl;\r\n }\r\n\r\n public getSeoDataUrl = () => this.seoDataUrl;\r\n public getCacheKey = () => `SeoDataCache`;\r\n public getCacheObjectType = () => 'SeoDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n\r\n}\r\n\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.seoDataUrl) {\r\n return new GetSeoDataInput(inputData.config.seoDataUrl);\r\n }\r\n return new GetSeoDataInput('');\r\n};\r\n\r\n// tslint:disable: no-any\r\nasync function action(input: GetSeoDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n\r\n const jsonUrlFromGlobals = ctx.requestContext.app.config.seoDataUrl;\r\n // TODO: Just remove the fallback\r\n const jsonUrl = jsonUrlFromGlobals || 'https://files-us-prod.cms.commerce.dynamics.com/cms/api/fknscsckgq/binary/MA5cA7';\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const filteredUrlPath = filteredURL(ctx.requestContext);\r\n const seoData = filteredUrlPath && res.data && res.data[filteredUrlPath];\r\n return seoData && seoData[0];\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport class GetSleepDisruptorIcons extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n private sleepDisuptorIconsDataUrl: string = '';\r\n constructor(sleepDisuptorIconsDataUrl: string) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'sleepDisuptorIconsDataCache', cacheKey: 'sleepDisuptorIconsDataCache' });\r\n this.sleepDisuptorIconsDataUrl = sleepDisuptorIconsDataUrl;\r\n }\r\n public getSleepDisuptorIconsDataUrl = () => this.sleepDisuptorIconsDataUrl;\r\n public getCacheKey = () => `sleepDisuptorIconsDataCache`;\r\n public getCacheObjectType = () => 'sleepDisuptorIconsDataCache';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.sleepDisuptorIconsDataUrl) {\r\n return new GetSleepDisruptorIcons(inputData.config.sleepDisuptorIconsDataUrl);\r\n }\r\n return new GetSleepDisruptorIcons('');\r\n};\r\nasync function action(input: GetSleepDisruptorIcons, ctx: Msdyn365.IActionContext): Promise {\r\n const sleepDisuptorIconsDataJsonUrl = ctx.requestContext.app.config.sleepDisruptorIconDataUrl;\r\n const jsonUrl = sleepDisuptorIconsDataJsonUrl || '';\r\n const res = await Msdyn365.sendRequest(jsonUrl, 'get');\r\n const sleepDisuptorIconsData = res.data && res.data;\r\n return sleepDisuptorIconsData;\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n input: createInput\r\n});","import { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOption, OrgUnitAvailability, OrgUnitLocation, SearchArea, StoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n /*getChannelDeliveryOptionsAsync,*/ getOrgUnitLocationsByAreaAsync,\r\n getStoreHoursAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\r\n// import {FeatureStateInput, getFeatureStateAction} from './get-feature-state';\r\n\r\n/**\r\n * Get selected variant action input class\r\n */\r\nexport class GetOrgUnitLocationsByAreaInput implements IActionInput {\r\n public Latitude?: number;\r\n public Longitude?: number;\r\n public Radius?: number;\r\n public DistanceUnitValue?: number;\r\n public IgnoreLocation?: boolean;\r\n\r\n constructor(_Latitude?: number, _Longitude?: number, _Radius?: number, _DistanceUnitValue?: number, _IgnoreLocation?: boolean) {\r\n this.Latitude = _Latitude;\r\n this.Longitude = _Longitude;\r\n this.Radius = _Radius;\r\n this.DistanceUnitValue = _DistanceUnitValue;\r\n this.IgnoreLocation = _IgnoreLocation;\r\n }\r\n\r\n public getCacheKey = () => `GetOrgUnitLocationsByAreaInput`;\r\n public getCacheObjectType = () => 'GetOrgUnitLocationsByAreaInput';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the getSelectedVariant data action\r\n * @param inputData The input data passed to the createInput method\r\n */\r\nexport const createGetOrgUnitLocationsByAreaInput = (inputData: ICreateActionContext>): GetOrgUnitLocationsByAreaInput => {\r\n return new GetOrgUnitLocationsByAreaInput();\r\n};\r\n\r\n/**\r\n * Calls the Retail Feature State API and returns a list of feature with isEnabled flag.\r\n */\r\n// export async function getFeatureState(context: IActionContext): Promise {\r\n// return getFeatureStateAction(new FeatureStateInput(), context);\r\n// }\r\n\r\n/**\r\n * Action method for the getSelectedVariant data action\r\n * @param input The action input class\r\n * @param ctx The action context\r\n */\r\nexport async function getOrgUnitLocationsByArea(\r\n input: GetOrgUnitLocationsByAreaInput,\r\n ctx: IActionContext\r\n): Promise {\r\n if ((input.Radius === undefined || !input.Latitude || !input.Longitude) && !input.IgnoreLocation) {\r\n // No valid location we want to return empty array so module can show no locations message\r\n return [];\r\n }\r\n\r\n const searchArea: SearchArea = {\r\n Latitude: input.Latitude,\r\n Longitude: input.Longitude,\r\n Radius: input.Radius,\r\n DistanceUnitValue: input.DistanceUnitValue || 0 // 0 is miles\r\n };\r\n\r\n // const featureState = await getFeatureState(ctx);\r\n // const retailMulitplePickupMFeatureState = featureState?.find(item => item.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature')?.IsEnabled;\r\n\r\n return getOrgUnitLocationsByAreaAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: 4 } } }, searchArea)\r\n .then(async (stores: OrgUnitLocation[]) => {\r\n const locationDeliveryOptions: ChannelDeliveryOption[] | undefined = [];\r\n // if mulitple pickup mode is enable then call getchanneldeliveryoption\r\n // if(retailMulitplePickupMFeatureState) {\r\n // const orgUnitChannel = stores.map(store => store.ChannelId);\r\n // locationDeliveryOptions = await _getLocationPickUpDeliveryModes(orgUnitChannel, ctx);\r\n // }\r\n const locationPromiseList = stores.map(store => {\r\n const locationDeliveryOption = locationDeliveryOptions?.find(\r\n _channeldeliveryoption => _channeldeliveryoption.ChannelId === store.ChannelId\r\n );\r\n return _getLocationWithHours(store, locationDeliveryOption, ctx);\r\n });\r\n return Promise.all(locationPromiseList);\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace('[GetOrgUnitLocationsByArea] error getting Locations');\r\n ctx.trace(error.message);\r\n ctx.telemetry.error(error.message);\r\n ctx.telemetry.debug(`[GetOrgUnitLocationsByArea] error getting Locations`);\r\n return [];\r\n });\r\n}\r\n\r\n/**\r\n * Action method that obtains the store information\r\n * @param orgUnitLocation The org unit location\r\n * @param storeMap a map that contains store information group by the inventory location id\r\n * @param ctx The action context\r\n */\r\nasync function _getLocationWithHours(\r\n orgUnitLocation: OrgUnitLocation,\r\n channelDeleiveryOptions: ChannelDeliveryOption | undefined,\r\n ctx: IActionContext\r\n): Promise {\r\n if (!orgUnitLocation || !orgUnitLocation.OrgUnitNumber) {\r\n return { OrgUnitAvailability: undefined };\r\n }\r\n\r\n return getStoreHoursAsync({ callerContext: ctx }, orgUnitLocation.OrgUnitNumber)\r\n .then((hours: StoreHours) => {\r\n const availability: OrgUnitAvailability = {\r\n OrgUnitLocation: orgUnitLocation\r\n };\r\n\r\n if (hours && !(hours instanceof Error)) {\r\n return { OrgUnitAvailability: availability, StoreHours: hours, OrgUnitPickUpDeliveryModes: channelDeleiveryOptions };\r\n }\r\n\r\n return { OrgUnitAvailability: availability, OrgUnitPickUpDeliveryModes: channelDeleiveryOptions };\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace('[GetFullAvailableInventoryNearby] error getting availability with hours');\r\n ctx.trace(error.message);\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug(`[GetFullAvailableInventoryNearby] error getting availability with hours`);\r\n return { OrgUnitAvailability: {} };\r\n });\r\n}\r\n\r\n/**\r\n * Action method that obtains the store information\r\n * @param channelCollection The org unit channel Id list\r\n * @param ctx The action context\r\n */\r\n// VSI Customization Start\r\n// Need to comment this function because we removed featuresState data-action import.\r\n// async function _getLocationPickUpDeliveryModes(\r\n// channelCollection: (number| undefined)[],\r\n// ctx: IActionContext): Promise {\r\n// if (channelCollection?.length === 0 || channelCollection === undefined) {\r\n// return undefined;\r\n// }\r\n\r\n// const channelIdList: number[] = [];\r\n// channelCollection?.map(id => {\r\n// if(id !== undefined) {\r\n// return channelIdList.push(id);\r\n// }\r\n// return null;\r\n// });\r\n\r\n// // to get all channel pickup delivery mode filterOption should be 4\r\n// return getChannelDeliveryOptionsAsync({ callerContext: ctx }, channelIdList, 4)\r\n// .then((channelDeliveryOptions: ChannelDeliveryOption[]) => {\r\n\r\n// if (channelDeliveryOptions && !(channelDeliveryOptions instanceof Error)) {\r\n// return channelDeliveryOptions;\r\n// }\r\n\r\n// return undefined;\r\n// })\r\n// .catch((error: Error) => {\r\n// ctx.trace('[GetFullAvailableInventoryNearby][getChannelDeliveryOptionsAsync] error getting availability with channel delivery options');\r\n// ctx.trace(error.message);\r\n// ctx.telemetry.exception(error);\r\n// ctx.telemetry.debug(`[GetFullAvailableInventoryNearby] [getChannelDeliveryOptionsAsync] error getting availability with channel delivery options`);\r\n// return [];\r\n// });\r\n// }\r\n\r\n/**\r\n * The complete getOrgUnitLocationsByArea data action\r\n */\r\nexport const getOrgUnitLocationsByAreaDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-store-location-information',\r\n action: >getOrgUnitLocationsByArea,\r\n input: createGetOrgUnitLocationsByAreaInput\r\n});\r\n\r\nexport default getOrgUnitLocationsByAreaDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIATPInventoryDynamicAsync } from '../actions/CoreProductDataActionExtension.g';\r\nimport {\r\n IMFIATPInventoryDynamicResponse, IMFICartLine, IMFICLDeliveryScheduleParameters\r\n} from '../actions/CoreProductDataServiceEntities.g';\r\n\r\n/**\r\n * MfiAtpInventory Input Action\r\n */\r\nexport class MfiAtpInventoryInput implements Msdyn365.IActionInput {\r\n // MfiAtpInventory: Construct the input needed to run the action\r\n public inventoryType: string;\r\n public weeks: number;\r\n public storeId: string;\r\n public page: string;\r\n public requestedDate: string;\r\n public zipCode: string;\r\n public itemLines: IMFICartLine[];\r\n\r\n constructor(inventoryType: string, weeks: number, storeId: string, page: string, requestedDate: string, zipCode: string, itemLines: IMFICartLine[]) {\r\n this.inventoryType = inventoryType;\r\n this.weeks = weeks;\r\n this.storeId = storeId;\r\n this.page = page;\r\n this.requestedDate = requestedDate;\r\n this.zipCode = zipCode;\r\n this.itemLines = itemLines;\r\n }\r\n\r\n // MfiAtpInventory: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `MfiAtpInventory`;\r\n public getCacheObjectType = () => 'MfiAtpInventory';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// MfiAtpInventory: Create a data model here or import one to capture the response of the action\r\nexport interface IMfiAtpInventoryData {\r\n text: string;\r\n}\r\n\r\n\r\n/**\r\n * MfiAtpInventory: Use this function to call your action and process the results as needed\r\n */\r\nexport async function mfiAtpInventoryAction(input: MfiAtpInventoryInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const requestBody: IMFICLDeliveryScheduleParameters = {\r\n InventoryType: input.inventoryType,\r\n Weeks: input.weeks,\r\n StoreId: input.storeId,\r\n Page: input.page,\r\n RequestedDate: input.requestedDate,\r\n ZipCode: input.zipCode,\r\n ItemLines: input.itemLines\r\n };\r\n\r\n const response = await mFIATPInventoryDynamicAsync({ callerContext: ctx }, requestBody);\r\n return response;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >mfiAtpInventoryAction,\r\n // MfiAtpInventory: Give your data action a unique id\r\n id: 'MfiAtpInventory'\r\n // input: createInput\r\n // MfiAtpInventory: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMFIBonusItemsDetailsEntity } from '../actions/BonusItemDataServiceEntities.g';\r\n\r\n/**\r\n * MfrmNotification Input Action\r\n */\r\n\r\nexport class MFIbonusitemsInput implements Msdyn365.IActionInput {\r\n public getCacheKey = () => `mfibonusitems`;\r\n public getCacheObjectType = () => 'mfibonusitems';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IMFIBonusItems {\r\n bonusItems: IMFIBonusItemsDetailsEntity[] | undefined;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new MFIbonusitemsInput();\r\n};\r\n\r\nasync function action(input: MFIbonusitemsInput, ctx: Msdyn365.IActionContext): Promise {\r\n // tslint:disable-next-line: no-unnecessary-local-variable\r\n const bonusItems: IMFIBonusItemsDetailsEntity[] | undefined = [];\r\n return bonusItems;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'MFIbonusitems',\r\n input: createInput\r\n});\r\n\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * MfrmNotification Input Action\r\n */\r\n\r\nexport class MfrmNotificationInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `promoCode`;\r\n public getCacheObjectType = () => 'promoCode';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IMfrmNotificationState {\r\n notifications: [INotification];\r\n}\r\n\r\nexport interface INotification {\r\n id?: number | string | undefined;\r\n type?: string;\r\n value?: string | undefined;\r\n status?: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new MfrmNotificationInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: MfrmNotificationInput, ctx: Msdyn365.IActionContext): Promise {\r\n // tslint:disable-next-line: no-unnecessary-local-variable\r\n const notifications: INotification[] = [];\r\n return notifications;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'MfrmNotification',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaymentCcCardTypes Input Action\r\n */\r\nexport class PaymentCcCardTypesInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `payment-cc-card-types`;\r\n public getCacheObjectType = () => 'payment-cc-card-types';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPaymentCcCardTypesData {\r\n cardType: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaymentCcCardTypesInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaymentCcCardTypesInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { cardType: '' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'PaymentCcCardTypes',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaymentErrorState Input Action\r\n */\r\nexport class PaymentErrorStateInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() { }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `PaymentErrorState`;\r\n public getCacheObjectType = () => 'PaymentErrorState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPaymentErrorState {\r\n errorTitle: string;\r\n errorMessage: string;\r\n progressiveLinkText: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaymentErrorStateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaymentErrorStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { errorTitle: \"\", errorMessage: \"\", progressiveLinkText: \"\" };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'PaymentErrorState',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { createObservableDataAction } from '@msdyn365-commerce/action-internal';\r\nimport { IAction, IActionContext } from '@msdyn365-commerce/core-internal';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n// @ts-ignore\r\nimport { CATEGORY_PAGE_NAME } from '@msdyn365-commerce/runtime-internal/dist/lib/consts';\r\n// @ts-ignore\r\nimport { getProductImageUrls } from '@msdyn365-commerce/runtime-internal/dist/lib/utils/product-list-utils';\r\nimport { ProductListInput } from '@msdyn365-commerce/runtime-internal/dist/types/hydrators/hydrator-action-inputs';\r\n\r\nexport const getProductsByCategoryList = async (input: ProductListInput, context: IActionContext): Promise => {\r\n let categoryId: number;\r\n const urlTokens = context.requestContext.urlTokens;\r\n\r\n // If the category ID has been provided from the list metadata use it, otherwise grab the category ID from context\r\n if (input.listMetadata.categoryIds && input.listMetadata.categoryIds.length > 0) {\r\n categoryId = input.listMetadata.categoryIds[0];\r\n } else if (urlTokens && urlTokens.pageType && urlTokens.pageType.toLowerCase() === CATEGORY_PAGE_NAME && urlTokens.recordId) {\r\n categoryId = +urlTokens.recordId;\r\n } else if (urlTokens && urlTokens.categories && urlTokens.categories.length > 0) {\r\n categoryId = +urlTokens.categories[0];\r\n } else {\r\n // Unable to determine category from list meta data or context\r\n throw new Error('CategoryId Missing for ProductsByCategory List');\r\n }\r\n context.telemetry.debug(`Category Id input to ProductsByCategory action : ${categoryId}`);\r\n const productSearchCriteria: ProductSearchCriteria = {\r\n Context: {\r\n ChannelId: +input.channelId,\r\n CatalogId: +input.catalogId\r\n },\r\n CategoryIds: [categoryId],\r\n IncludeAttributes: true\r\n };\r\n\r\n return searchByCriteriaAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n productSearchCriteria\r\n )\r\n .then((products: ProductSearchResult[]) => {\r\n context.telemetry.debug('Products returned by ProductByCategory action', products);\r\n return getProductImageUrls(products, context.requestContext.apiSettings);\r\n })\r\n .catch(error => {\r\n context.telemetry.error(`Error running ProductByCategory action: ${error}`);\r\n throw new Error(error);\r\n });\r\n};\r\n\r\nexport const getProductsByCategoryListAction = createObservableDataAction({\r\n action: >getProductsByCategoryList,\r\n id: '@msdyn365-commerce/products-by-category'\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { createObservableDataAction } from '@msdyn365-commerce/action-internal';\r\nimport { IAction, IActionContext } from '@msdyn365-commerce/core-internal';\r\nimport { IContext } from '@msdyn365-commerce/retail-proxy';\r\nimport { readAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { getProductRatingsAsync, searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getElementsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/RecommendationsDataActions.g';\r\nimport {\r\n Cart,\r\n ProductSearchCriteria,\r\n ProductSearchResult,\r\n RecommendationCriteria,\r\n RecommendedElement\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n// @ts-ignore\r\nimport { CATEGORY_PAGE_NAME, PDP_PAGE_NAME, PICKS_FOR_YOU_LIST } from '@msdyn365-commerce/runtime-internal/dist/lib/consts';\r\n// @ts-ignore\r\nimport * as getSimpleProducts from '@msdyn365-commerce/runtime-internal/dist/lib/hydrators/get-simple-products';\r\n// @ts-ignore\r\n// tslint:disable-next-line:no-duplicate-imports\r\nimport { ProductInput } from '@msdyn365-commerce/runtime-internal/dist/lib/hydrators/get-simple-products';\r\n// @ts-ignore\r\nimport { getProductImageUrls, orderProductSearchResults } from '@msdyn365-commerce/runtime-internal/dist/lib/utils/product-list-utils';\r\nimport { ProductListInput } from '@msdyn365-commerce/runtime-internal/dist/types/hydrators/hydrator-action-inputs';\r\nimport * as semver from 'semver';\r\n\r\nconst actionInputError = (missingType: string) => {\r\n throw new Error(`Input ${missingType} is missing and required to run GetProductsByRecommendationId action`);\r\n};\r\n\r\nconst enum CartTokenPrefix {\r\n Auth = 't',\r\n Anon = 'p'\r\n}\r\n\r\nconst MIN_RETAIL_PROXY_VERSION_FOR_PRODUCT_SEARCH_RESULTS = '9.16.8';\r\n\r\n/**\r\n * Constructs the category context for a recommendation call. If page context is selected the category dervided from page context\r\n * (current page) will be used. If instead a spefic category is chosen as context that category will be used instead.\r\n *\r\n * @param recommendationCriteria The criteria that will be used for the recommendation API call\r\n * @param input The ProductListInput provided to the action\r\n * @param context The current action context\r\n */\r\nconst getCategoryIdForReco = (recommendationCriteria: RecommendationCriteria, input: ProductListInput, context: IActionContext) => {\r\n let categoryIds: number[] = [];\r\n\r\n if (input.listMetadata.includePageContext || !input.listMetadata.categoryIds || input.listMetadata.categoryIds.length === 0) {\r\n const urlTokens = context.requestContext.urlTokens;\r\n\r\n if (urlTokens && urlTokens.pageType && urlTokens.pageType.toLowerCase() === CATEGORY_PAGE_NAME) {\r\n if (urlTokens.recordId) {\r\n categoryIds = [+urlTokens.recordId];\r\n }\r\n }\r\n } else {\r\n // Use category from a specific context if provided\r\n if (input.listMetadata.categoryIds && input.listMetadata.categoryIds.length > 0) {\r\n categoryIds = input.listMetadata.categoryIds;\r\n }\r\n }\r\n\r\n recommendationCriteria.CategoryIds = categoryIds;\r\n};\r\n\r\n/**\r\n * Fetches the current active cart to be used when cart context\r\n * is selected for a reco list\r\n *\r\n * @param ctx The current action context\r\n */\r\nconst getCart = async (ctx: IActionContext): Promise => {\r\n let cart;\r\n if (ctx.requestContext && ctx.requestContext.cookies) {\r\n const cookies = ctx.requestContext && ctx.requestContext.cookies;\r\n const cartCookie = cookies.getCartCookie();\r\n const cartCookieParts = cartCookie.split(':');\r\n if (cartCookieParts && cartCookieParts.length === 2) {\r\n if (\r\n (ctx.requestContext.user.isAuthenticated && cartCookieParts[0] === CartTokenPrefix.Auth) ||\r\n (!ctx.requestContext.user.isAuthenticated && cartCookieParts[0] === CartTokenPrefix.Anon)\r\n ) {\r\n const readCart = await readAsync({ callerContext: ctx }, cartCookieParts[1]);\r\n if (readCart && readCart.Id) {\r\n cart = readCart;\r\n }\r\n }\r\n }\r\n }\r\n return cart;\r\n};\r\n\r\n/**\r\n * Constructs the product context for a recommendation call. If cart context is selected, products currently in the active cart will\r\n * be used as the product ids for the recommendation call. Otherwise, if page context is selected the product derived from page context will be used.\r\n * Finally, if specific context is selected, a product id will be given to us from the ProductListInput which will be used to seed the product id for the reco call.\r\n *\r\n * @param recommendationCriteria The criteria that will be used for the recommendation API call\r\n * @param input The ProductListInput provided to the action\r\n * @param context The current action context\r\n */\r\nconst getProductIdForReco = async (recommendationCriteria: RecommendationCriteria, input: ProductListInput, context: IActionContext) => {\r\n let productIds: number[] = [];\r\n // If include cart is set true, fetch the product ids in the cart to append to the product ID list for the recommendation call\r\n if (input.listMetadata.includeCart) {\r\n const cart = await getCart(context);\r\n if (cart && cart.CartLines) {\r\n const validCartLines = cart.CartLines.filter(element => element.ProductId !== undefined);\r\n const cartProductIds = validCartLines.map(product => product.ProductId);\r\n context.telemetry.debug(`Products in cart: ${cartProductIds}`);\r\n // If the cart isn't empty, assign the products in the cart to the productIds for seeding\r\n if (cartProductIds && cartProductIds.length > 0) {\r\n // @ts-ignore compiler alerts that cartProductIds is of type (number | undefined)[]\r\n // however, we filter on undefined product ids first before mapping on product ids so each element must be defined\r\n productIds = cartProductIds;\r\n }\r\n }\r\n } else if (input.listMetadata.includePageContext || !input.listMetadata.productIds || input.listMetadata.productIds.length === 0) {\r\n const urlTokens = context.requestContext.urlTokens;\r\n\r\n if (urlTokens && urlTokens.recordId && urlTokens.pageType && urlTokens.pageType.toLowerCase() === PDP_PAGE_NAME) {\r\n productIds = [+urlTokens.recordId];\r\n }\r\n } else {\r\n // Use the product from specfic context\r\n if (input.listMetadata.productIds && input.listMetadata.productIds.length > 0) {\r\n productIds = [input.listMetadata.productIds[0]];\r\n }\r\n }\r\n\r\n recommendationCriteria.ProductIds = productIds;\r\n};\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nexport const getProductsByRecommendationList = async (input: ProductListInput, context: IActionContext): Promise => {\r\n // If the recommendation list is picks for you and the user is not signed do not make the reco API call and return empty list of products\r\n const customerAccountNumber =\r\n context.requestContext && context.requestContext.user && context.requestContext.user.customerAccountNumber;\r\n if (input.listMetadata.recommendationListId === PICKS_FOR_YOU_LIST && !customerAccountNumber) {\r\n return [];\r\n }\r\n\r\n const recommendationCriteria: RecommendationCriteria = {};\r\n const proxyContext: IContext = { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } };\r\n recommendationCriteria.CatalogId = input.catalogId;\r\n\r\n let reccomendationListId = '';\r\n if (input.listMetadata.recommendationListId) {\r\n reccomendationListId = input.listMetadata.recommendationListId;\r\n } else {\r\n actionInputError(`recommendationListId (from listmetadata)`);\r\n }\r\n\r\n getCategoryIdForReco(recommendationCriteria, input, context);\r\n await getProductIdForReco(recommendationCriteria, input, context);\r\n\r\n if ((input.listMetadata.personalization || reccomendationListId === PICKS_FOR_YOU_LIST) && customerAccountNumber) {\r\n recommendationCriteria.CustomerAccountNumber = customerAccountNumber;\r\n proxyContext.bypassCache = 'get';\r\n }\r\n\r\n context.telemetry.debug(`Recommendation Criteria: ${JSON.stringify(recommendationCriteria)}`);\r\n\r\n // @ts-ignore\r\n return (\r\n getElementsAsync(proxyContext, reccomendationListId, recommendationCriteria)\r\n .then(async (recommendedElements: RecommendedElement[]) => {\r\n if (recommendedElements) {\r\n const productInputs: ProductInput[] = [];\r\n const productTypeId: string[] = [];\r\n // Grab all the elements that are products and store the product ids\r\n for (let i = 0; i < recommendedElements.length; i++) {\r\n const element = recommendedElements[i];\r\n // Element type value of 1 indicates product type\r\n if (element.ElementId && element.ElementTypeValue === 1) {\r\n productInputs[i] = new ProductInput(+element.ElementId, context.requestContext.apiSettings);\r\n productTypeId[i] = element.ElementId;\r\n }\r\n }\r\n context.telemetry.debug(`Running recommendation action for list ${input.listMetadata.recommendationListId}`);\r\n context.telemetry.debug(`Number of products returned: ${productTypeId.length}`);\r\n context.telemetry.debug('Product ids returned', productTypeId);\r\n\r\n if (productInputs.length) {\r\n // Check to see if retail proxy version is greater than min version required for new API\r\n if (\r\n semver.gte(\r\n semver.coerce(context.requestContext.apiSettings.retailServerProxyVersion) || '',\r\n MIN_RETAIL_PROXY_VERSION_FOR_PRODUCT_SEARCH_RESULTS\r\n )\r\n ) {\r\n const itemIds: number[] = productInputs.map(value => value.productId);\r\n const productSearchCriteria: ProductSearchCriteria = {\r\n Ids: itemIds,\r\n Context: {\r\n ChannelId: +context.requestContext.apiSettings.channelId,\r\n CatalogId: +context.requestContext.apiSettings.catalogId\r\n },\r\n IncludeAttributes: true,\r\n SearchCondition: '*'\r\n };\r\n try {\r\n let productSearchResults = await searchByCriteriaAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n productSearchCriteria\r\n );\r\n // If the ProductSearchResult API finds the products then populate the product image urls and return\r\n // otherwise if the API does not exist or does not return products proceed to the legacy flows for legacy/backward compatibility reasons\r\n context.telemetry.debug('Product search results returned', JSON.stringify(productSearchResults));\r\n if (productSearchResults.length > 0) {\r\n getProductImageUrls(productSearchResults, context.requestContext.apiSettings);\r\n productSearchResults = orderProductSearchResults(itemIds, productSearchResults);\r\n return productSearchResults;\r\n }\r\n } catch (e) {\r\n // In case of an error fall back to legacy flow\r\n context.telemetry.error(`Error while getting productSearchResult: ${e}`);\r\n }\r\n }\r\n\r\n // Get Product Ratings Block (If needed)\r\n const productRatingsPromise = getProductRatingsAsync(\r\n { callerContext: context },\r\n productInputs.map(productInput => productInput.productId)\r\n );\r\n\r\n return getSimpleProducts(productInputs, context).then((products: ProductSearchResult[]) => {\r\n getProductImageUrls(products, context.requestContext.apiSettings);\r\n products = orderProductSearchResults(\r\n productInputs.map(value => value.productId),\r\n products\r\n );\r\n return productRatingsPromise.then(productRatings => {\r\n productRatings.forEach(productRating => {\r\n const unratedProduct: ProductSearchResult = (\r\n products.find(mappedProduct => mappedProduct.RecordId === productRating.ProductId)\r\n );\r\n if (unratedProduct) {\r\n unratedProduct.TotalRatings = productRating.TotalRatings;\r\n unratedProduct.AverageRating = productRating.AverageRating;\r\n }\r\n });\r\n\r\n return products;\r\n });\r\n });\r\n }\r\n }\r\n return [];\r\n })\r\n // tslint:disable-next-line:no-any\r\n .catch((error: any) => {\r\n context.telemetry.error(`Error running productByRecommendation action: ${error}`);\r\n throw new Error(error);\r\n })\r\n );\r\n};\r\n\r\nexport const getProductsByRecommendationListAction = createObservableDataAction({\r\n action: >getProductsByRecommendationList,\r\n id: '@msdyn365-commerce/products-by-recommendation'\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n// @ts-ignore\r\nimport * as semver from 'semver';\r\n\r\nimport { createObservableDataAction } from '@msdyn365-commerce/action-internal';\r\nimport { IAction, IActionContext } from '@msdyn365-commerce/core-internal';\r\nimport {\r\n getByIdAsync,\r\n getRelatedProductsAsync,\r\n searchByCriteriaAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductSearchCriteria, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n// @ts-ignore\r\nimport { getProductImageUrls, orderProductSearchResults } from '@msdyn365-commerce/runtime-internal/dist/lib/utils/product-list-utils';\r\nimport { ProductListInput } from '@msdyn365-commerce/runtime-internal/dist/types';\r\n\r\nconst MIN_RETAIL_PROXY_VERSION_FOR_PRODUCT_SEARCH_RESULTS = '9.16.8';\r\n\r\nconst actionInputError = (missingType: string) => {\r\n throw new Error(`Input ${missingType} is missing and required to run GetProductsByRelationship action`);\r\n};\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nexport const getProductsByRelationshipIdList = async (input: ProductListInput, context: IActionContext): Promise => {\r\n let productId;\r\n let relationshipId;\r\n // Grab the product ID from the list meta data or context\r\n if (input.listMetadata.productIds && input.listMetadata.productIds.length > 0) {\r\n const productResponse: SimpleProduct | SimpleProduct[] = await getByIdAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n input.listMetadata.productIds[0],\r\n input.channelId\r\n );\r\n const baseProduct: SimpleProduct = Array.isArray(productResponse) ? productResponse[0] : productResponse;\r\n productId = input.listMetadata.productIds[0];\r\n if (baseProduct.hasOwnProperty('MasterProductId') && baseProduct.MasterProductId && baseProduct.MasterProductId > 0) {\r\n productId = baseProduct.MasterProductId;\r\n }\r\n } else if (context.requestContext.urlTokens && context.requestContext.urlTokens.itemId) {\r\n const productResponse = await getByIdAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n +context.requestContext.urlTokens.itemId,\r\n input.channelId\r\n );\r\n const baseProduct = Array.isArray(productResponse) ? productResponse[0] : productResponse;\r\n productId = +context.requestContext.urlTokens.itemId;\r\n if (baseProduct.hasOwnProperty('MasterProductId') && baseProduct.MasterProductId > 0) {\r\n productId = baseProduct.MasterProductId;\r\n }\r\n } else {\r\n actionInputError('productId');\r\n }\r\n // The relationship ID must be provided with the list meta data\r\n if (input.listMetadata.relationshipId) {\r\n relationshipId = +input.listMetadata.relationshipId;\r\n } else {\r\n actionInputError('relationshipId');\r\n }\r\n context.telemetry.debug(`Product Id input to productByRelationship action: ${productId}`);\r\n context.telemetry.debug(`Relationship Id input to productByRelationship action: ${relationshipId}`);\r\n\r\n return getRelatedProductsAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n // @ts-ignore\r\n productId,\r\n input.channelId,\r\n input.catalogId,\r\n // @ts-ignore\r\n relationshipId\r\n ).then(\r\n /*VSI Customization - START\r\n This data-action is customized as per Microsoft's guidance to use searchByCriteriaAsync call to get\r\n product attributes for related to products product-collection list\r\n */\r\n async (products: ProductSearchResult[]) => {\r\n context.telemetry.debug('Products returned by getRelatedProducts action', products);\r\n if (products.length) {\r\n if (\r\n semver.gte(\r\n semver.coerce(context.requestContext.apiSettings.retailServerProxyVersion) || '',\r\n MIN_RETAIL_PROXY_VERSION_FOR_PRODUCT_SEARCH_RESULTS\r\n )\r\n ) {\r\n const itemIds: number[] = products.map(value => value.RecordId);\r\n const productSearchCriteria: ProductSearchCriteria = {\r\n Ids: itemIds,\r\n Context: {\r\n ChannelId: +context.requestContext.apiSettings.channelId,\r\n CatalogId: +context.requestContext.apiSettings.catalogId\r\n },\r\n IncludeAttributes: true,\r\n SearchCondition: '*'\r\n };\r\n try {\r\n let productSearchResults = await searchByCriteriaAsync(\r\n { callerContext: context, queryResultSettings: { Paging: { Top: input.listMetadata.pageSize || 10 } } },\r\n productSearchCriteria\r\n );\r\n // If the ProductSearchResult API finds the products then populate the product image urls and return\r\n // otherwise if the API does not exist or does not return products proceed to the legacy flows for legacy/backward compatibility reasons\r\n context.telemetry.debug('Product search results returned', JSON.stringify(productSearchResults));\r\n if (productSearchResults.length > 0) {\r\n getProductImageUrls(productSearchResults, context.requestContext.apiSettings);\r\n productSearchResults = orderProductSearchResults(itemIds, productSearchResults);\r\n return productSearchResults;\r\n }\r\n } catch (e) {\r\n // In case of an error fall back to legacy flow\r\n context.telemetry.error(`Error while getting productSearchResult: ${e}`);\r\n }\r\n }\r\n return getProductImageUrls(products, context.requestContext.apiSettings);\r\n }\r\n }\r\n )\r\n // @ts-ignore\r\n .catch(error => {\r\n context.telemetry.error(`Error running productByRecommendation action: ${error}`);\r\n throw new Error(error);\r\n });\r\n /*VSI Customization - END*/\r\n};\r\n\r\nexport const getProductsByRelationshipIdListAction = createObservableDataAction({\r\n action: >getProductsByRelationshipIdList,\r\n id: '@msdyn365-commerce/products-by-relationship-id'\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n// tslint:disable-next-line: no-duplicate-imports\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CacheType, QueryResultSettings, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getByIdsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\n/**\r\n * GetProductById Input Action\r\n */\r\n\r\nexport class GetProductsByIdInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public productIdsArr: number[];\r\n\r\n public channelId: number;\r\n public queryResultSettings: QueryResultSettings;\r\n constructor(productIdsArr: number[], channelId: number, queryResultSettings: QueryResultSettings) {\r\n this.productIdsArr = productIdsArr;\r\n this.channelId = channelId;\r\n this.queryResultSettings = queryResultSettings;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n\r\n public getCacheKey = () =>\r\n `Get-Products-By-Id-${this.productIdsArr && this.productIdsArr.length >= 1 ? this.productIdsArr.join('-') : ''}`;\r\n public getCacheObjectType = () => 'GetProductsById';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getProductsByIdAction(input: GetProductsByIdInput, ctx: IActionContext): Promise {\r\n if (input.productIdsArr && input.productIdsArr.length >= 1) {\r\n const ctxObject = { callerContext: ctx, queryResultSettings: input.queryResultSettings, bypass: 'none' };\r\n let result;\r\n try {\r\n result = await getByIdsAsync(ctxObject, input.channelId, input.productIdsArr);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('error', error);\r\n }\r\n }\r\n return null;\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getProductsByIdAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetProductsById'\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * ProgressiveLeasingModalState Input Action\r\n */\r\nexport class ProgressiveLeasingModalStateInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() { }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ProgressiveLeasingModalState`;\r\n public getCacheObjectType = () => 'ProgressiveLeasingModalState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IProgressiveLeasingModalStateData {\r\n isOpen: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new ProgressiveLeasingModalStateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ProgressiveLeasingModalStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { isOpen: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'ProgressiveLeasingModalState',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nexport interface IPromoCodeAppliedOnCartState {\r\n isInProcess?: boolean;\r\n}\r\n\r\n/**\r\n * SampleState - action input\r\n */\r\nexport class PromoCodeAppliedOnCartInput implements IActionInput {\r\n public getCacheKey = () => `PromoCodeAppliedOnCartInput`;\r\n public getCacheObjectType = () => 'PromoCodeAppliedOnCartInput';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * SampleState - action\r\n */\r\nexport async function updatePromoCodeAppliedOnCartProgressAction(input: PromoCodeAppliedOnCartInput, ctx: IActionContext): Promise {\r\n return { isInProcess: undefined };\r\n}\r\n\r\n/**\r\n * SampleState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new PromoCodeAppliedOnCartInput();\r\n};\r\n\r\n/**\r\n * SampleState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >updatePromoCodeAppliedOnCartProgressAction,\r\n input: createInput\r\n});","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * RedirectToWmapSubmitPayment Input Action\r\n */\r\nexport class RedirectToWmapSubmitPaymentInput implements Msdyn365.IActionInput {\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `RedirectToWmapSubmitPayment`;\r\n public getCacheObjectType = () => 'RedirectToWmapSubmitPayment';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IRedirectToWmapSubmitPaymentData {\r\n redirectToWmapSubmitPayment: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new RedirectToWmapSubmitPaymentInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: RedirectToWmapSubmitPaymentInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { redirectToWmapSubmitPayment: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'RedirectToWmapSubmitPayment',\r\n input: createInput\r\n});\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { createObservableDataAction, IAction, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { IDataServiceRequest, retailAction } from '@msdyn365-commerce/retail-proxy/dist';\r\nimport { createSearchOrgUnitLocationsInput } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\r\nimport { ProductSearchResult, QueryResultSettings } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n\r\nexport const buildQueryResultSettings = (inputData: ICreateActionContext, IGeneric>): QueryResultSettings => {\r\n try {\r\n // not using this data-action for now, so overriding Top value to 4.\r\n // incase original functionality is required please remove this file.\r\n return { Paging: { Top: 4, Skip: 0 } };\r\n } catch {\r\n return {};\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Search Org Unit Locations action createInput method.\r\n * @param inputData\r\n */\r\nexport function createSearchOrgUnitLocationsInputFunc(inputData: ICreateActionContext, IGeneric>): IDataServiceRequest {\r\n return createSearchOrgUnitLocationsInput(buildQueryResultSettings(inputData), {});\r\n}\r\n\r\nexport const retailActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/search-org-unit-locations',\r\n action: >retailAction,\r\n input: createSearchOrgUnitLocationsInputFunc\r\n});\r\n\r\nexport default retailActionDataAction;\r\n\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * ToggleSynchronySubmitOrderButton Input Action\r\n */\r\nexport class ToggleSubmitOrderButtonInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `toggle-submit-order-button`;\r\n public getCacheObjectType = () => 'toggle-submit-order-button';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IToggleSubmitOrderButtonData {\r\n isSynchronySelected: boolean;\r\n isPaypalSelected: boolean;\r\n isCreditcardSelected: boolean;\r\n isCcFieldsNotPopulated: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new ToggleSubmitOrderButtonInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ToggleSubmitOrderButtonInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { isSynchronySelected: false, isPaypalSelected: false, isCreditcardSelected: false, isCcFieldsNotPopulated: true };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'ToggleSubmitOrderButton',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nexport interface IUpdateEmailCart {\r\n checkEmail: boolean | null;\r\n}\r\n\r\n/**\r\n * SampleState - action input\r\n */\r\nexport class UpdateEmailCartInput implements IActionInput {\r\n public getCacheKey = () => `UpdateEmailCartInput`;\r\n public getCacheObjectType = () => 'UpdateEmailCartInput';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * SampleState - action\r\n */\r\nexport async function updateEmailCartAction(input: UpdateEmailCartInput, ctx: IActionContext): Promise {\r\n return { checkEmail: null };\r\n}\r\n\r\n/**\r\n * SampleState - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new UpdateEmailCartInput();\r\n};\r\n\r\n/**\r\n * SampleState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >updateEmailCartAction,\r\n input: createInput\r\n});","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport axios from 'axios';\r\n/**\r\n * WmapGetOrderDetails Input Action\r\n */\r\nexport class WmapGetOrderDetailsInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n private orderDetailsAPIurl: string = '';\r\n private orderId: string = '';\r\n constructor(orderDetailsAPIurl: string, orderId: string) {\r\n super({ shouldCacheOutput: false, cacheObjectType: 'WmapGetOrderDetails', cacheKey: 'WmapGetOrderDetails' });\r\n this.orderDetailsAPIurl = orderDetailsAPIurl;\r\n this.orderId = orderId;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getOrderDetailsAPIurl = () => this.orderDetailsAPIurl;\r\n public getOrderId = () => this.orderId;\r\n public getCacheKey = () => `WmapGetOrderDetails`;\r\n public getCacheObjectType = () => 'WmapGetOrderDetails';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IWmapGetOrderDetailsData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n\r\n if (inputData.config && inputData.config.orderDetailsAPIurl) {\r\n if (inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.orderId) {\r\n // console.log(\"input data: \" + inputData.requestContext.query.orderId);\r\n return new WmapGetOrderDetailsInput(inputData.config.orderDetailsAPIurl, inputData.requestContext.query.orderId);\r\n } else {\r\n return new WmapGetOrderDetailsInput(inputData.config.orderDetailsAPIurl, '');\r\n }\r\n }\r\n return new WmapGetOrderDetailsInput('', '');\r\n};\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\n// tslint:disable: no-any\r\nasync function action(input: WmapGetOrderDetailsInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiResponseUrl = ctx.requestContext.apiSettings.baseUrl;\r\n const orderDetailsApiUrl = input.getOrderDetailsAPIurl();\r\n const salesOrderId = input.getOrderId();\r\n const orderIdOun = ctx.requestContext.apiSettings.oun;\r\n const makeaPaymentLink = ctx.requestContext.app.config.wmapPageUrlSuffix?.toLowerCase();\r\n const pathName = ctx.requestContext && ctx.requestContext.url.requestUrl.pathname?.toLowerCase().replace(`/`, '');\r\n try {\r\n if (makeaPaymentLink === pathName) {\r\n const response = await axios.post(`${apiResponseUrl}/${orderDetailsApiUrl}`, {\r\n SalesId: salesOrderId\r\n }, {\r\n headers: {\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n 'oun': orderIdOun,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n return response.data;\r\n } else {\r\n console.log('Make a Payment URL is not Configured or URL is not valid');\r\n }\r\n\r\n } catch (e) {\r\n // TODO: will be removed after unit test and deployment on lower environment\r\n console.log('error for getting Sales Order Balance', e);\r\n }\r\n}\r\n\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'WmapGetOrderDetails',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { CartTenderLine } from '@msdyn365-commerce/retail-proxy';\r\nimport axios from 'axios';\r\n/**\r\n * GetAuthTokenInput Input Action\r\n */\r\nexport interface ISubmitPaymentPayload {\r\n cartId: string,\r\n receiptEmail: string | undefined,\r\n cartTenderLines: CartTenderLine[] | undefined,\r\n cartVersion: number | undefined\r\n}\r\n\r\nexport class WmapSubmitPaymentInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n public submitPaymentAPIurl: string | undefined;\r\n public submitPaymentPayload: ISubmitPaymentPayload | {};\r\n constructor(submitPaymentAPIurl: string | undefined, submitPaymentPayload: ISubmitPaymentPayload | {}) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'wmapauthorizepayment', cacheKey: 'wmapcapturepayment' });\r\n this.submitPaymentAPIurl = submitPaymentAPIurl;\r\n this.submitPaymentPayload = submitPaymentPayload;\r\n }\r\n\r\n public getCacheKey = () => `wmapcapturepayment`;\r\n public getCacheObjectType = () => 'wmapcapturepayment';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n\r\n}\r\n\r\nconst createGetCardPaymentAcceptPointInput = (inputData: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n if (inputData.config && inputData.config.submitPaymentAPIurl) {\r\n return new WmapSubmitPaymentInput(inputData.config.submitPaymentAPIurl, {});\r\n }\r\n return new WmapSubmitPaymentInput('', {});\r\n};\r\n\r\n// tslint:disable: no-any\r\nexport async function WmapSubmitPaymentAction(input: WmapSubmitPaymentInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiResponseUrl = ctx.requestContext.apiSettings.baseUrl;\r\n const orderIdOun = ctx.requestContext.apiSettings.oun;\r\n try {\r\n const response = await axios.post(`${apiResponseUrl}${input.submitPaymentAPIurl}`,\r\n input.submitPaymentPayload\r\n , {\r\n headers: {\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n 'oun': orderIdOun,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n return response.data;\r\n } catch (e) {\r\n // TODO: will be removed after unit test and deployment on lower environment\r\n console.log('Error for Submit Payment', e);\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >WmapSubmitPaymentAction,\r\n input: createGetCardPaymentAcceptPointInput\r\n});","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport Cookies from 'universal-cookie';\r\nexport class GetUnbxdSearchAutoSuggestDataInput implements Msdyn365.IActionInput {\r\n public queryText?: string | undefined;\r\n public popularProducts?: number | undefined;\r\n public inFields?: number | undefined;\r\n public topQueries?: number | undefined;\r\n public keywordSuggestions?: number | undefined;\r\n public promotedSuggestion?: number | undefined;\r\n\r\n public getCacheKey = () => `Unbxd-autoSuggest-data-${this.queryText}`;\r\n public getCacheObjectType = () => 'Unbxd-autoSuggest-data';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n\r\n constructor(queryText?: string | undefined, popularProducts?: number | undefined, inFields?: number | undefined, topQueries?: number | undefined, keywordSuggestions?: number | undefined, promotedSuggestion?: number\r\n | undefined) {\r\n this.queryText = queryText;\r\n this.popularProducts = popularProducts;\r\n this.inFields = inFields;\r\n this.topQueries = topQueries;\r\n this.keywordSuggestions = keywordSuggestions;\r\n this.promotedSuggestion = promotedSuggestion;\r\n }\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getUnbxdSearchAutoSuggestData(input: GetUnbxdSearchAutoSuggestDataInput, ctx: Msdyn365.IActionContext): Promise {\r\n const cookies = new Cookies();\r\n const unbxdUid = cookies.get('unbxd.userId');\r\n const queryText = input?.queryText ? input.queryText : \"\";\r\n const popularProductsCount = input?.popularProducts ? input.popularProducts : 0;\r\n const inFieldsCount = input?.inFields ? input.inFields : 0;\r\n const topQueriesCount = input?.topQueries ? input.topQueries : 0;\r\n const keywordSuggestionsCount = input?.keywordSuggestions ? input.keywordSuggestions : 0;\r\n const promotedSuggestionCount = input?.promotedSuggestion ? input.promotedSuggestion : 0;\r\n const unbxdApiKey = ctx.requestContext.app.config.unbxdApiKey;\r\n const unbxdSiteKey = ctx.requestContext.app.config.unbxdSiteKey;\r\n try {\r\n const unbxdUrl = `https://search.unbxd.io/${unbxdApiKey}/${unbxdSiteKey}/autosuggest?q=${queryText}&popularProducts.count=${popularProductsCount}&inFields.count=${inFieldsCount}&topQueries.count=${topQueriesCount}&keywordSuggestions.count=${keywordSuggestionsCount}&promotedSuggestion.count=${promotedSuggestionCount}&uid=${unbxdUid}`;\r\n const response = await Msdyn365.sendRequest(unbxdUrl, 'get');\r\n if (response) {\r\n return response.data;\r\n }\r\n else { return null; }\r\n } catch (e) {\r\n return null;\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getUnbxdSearchAutoSuggestData,\r\n id: 'getUnbxdSearchAutoSuggestData'\r\n});\r\n","/* tslint:disable: no-duplicate-imports */\r\nimport { IPageSummaryData } from '@msdyn365-commerce-modules/page-summary';\r\nimport { buildCacheKeyWithUrlTokens, CurrentCategoryInput, getCategoryUrl, getCurrentCategory } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { CategoryHierarchy, IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n getFriendlyName,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport flatten from 'lodash/flatten';\r\n// VSI customization: 7924 Start\r\nimport getHtmlParserValue from '../../Utilities/get-html-parser-value';\r\nimport { canonicalURL, getSortedVirtualRefinerConfig, getVirtualRefinerNames, regExSpecialChars, removeKeywords } from '../../Utilities/plp-url-utils';\r\nimport getSEOData, { GetSeoDataInput } from '../../data-actions/get-seo-data.action';\r\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductRefiner } from '@msdyn365-commerce/retail-proxy';\r\nimport { IMfrmCategoryPageSummaryConfig } from './mfrm-category-page-summary.props.autogenerated';\r\n// VSI customization: 7924 End\r\n\r\n/** Category Page Summary Input */\r\nexport class MFRMCategoryPageSummaryInput implements IActionInput {\r\n public requestContext: IRequestContext;\r\n public config: IMfrmCategoryPageSummaryConfig;\r\n constructor(config: IMfrmCategoryPageSummaryConfig, requestContext: IRequestContext) {\r\n this.config = config || {};\r\n this.requestContext = requestContext;\r\n }\r\n\r\n public getCacheObjectType = (): string => 'MFRMCategoryPageSummary';\r\n public getCacheKey = (): string => `${buildCacheKeyWithUrlTokens('MFRMCategoryPageSummary', this.requestContext)}-${this.requestContext?.url?.requestUrl?.pathname?.toLowerCase()}`;\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nconst createGetCurrentCategoryInput = (inputData: IActionContext): CurrentCategoryInput => {\r\n if (inputData && inputData.requestContext) {\r\n return new CurrentCategoryInput(inputData.requestContext);\r\n }\r\n\r\n throw new Error('Please specify categoryId query string in request.');\r\n};\r\n\r\nconst _getSEOMetaTagValue = (currentCategory: CategoryHierarchy, keyValue: string) => {\r\n return currentCategory?.ExtensionProperties?.find((attr) => attr.Key === keyValue)?.Value?.StringValue;\r\n};\r\n\r\nconst _getActiveRefiners = (refiners: IProductRefinerHierarchy[], requestContext: IRequestContext, CategoryHierarchy: any): string[] | undefined => {\r\n // get refiners from URL\r\n const configVirtualRefinerNames = getVirtualRefinerNames(requestContext, false);\r\n const filteredRefiners = refiners && refiners.filter((refiner) => {\r\n return refiner.KeyName && configVirtualRefinerNames.indexOf(refiner.KeyName.toLowerCase()) !== -1;\r\n });\r\n // get category slug\r\n let slug = (CategoryHierarchy && CategoryHierarchy.Slug) || '';\r\n let slugArray: string[];\r\n let pathArray: string[];\r\n const sortedConfigValues = getSortedVirtualRefinerConfig(requestContext, false);\r\n if (sortedConfigValues && slug) {\r\n slugArray = slug.split('/').splice(1);\r\n // remove keywords form slugArray\r\n slugArray = removeKeywords(slugArray, requestContext);\r\n // FIX reset slug to without keywords\r\n slug = slugArray.join('/');\r\n // path of URL\r\n let path = requestContext.url.requestUrl.pathname.toLowerCase();\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n path = path.replace(`/${categoryId}`, '');\r\n }\r\n // remove category slug\r\n pathArray = removeKeywords(path.split('\\/').splice(1), requestContext);\r\n path = pathArray.join('\\/');\r\n const removedCategorySlug = path.split(slug).splice(1)[0];\r\n let refinerParts: string[] = [];\r\n if (removedCategorySlug !== '') {\r\n refinerParts = decodeURIComponent(removedCategorySlug).split('/');\r\n }\r\n if (refinerParts && refinerParts.length > 0 && slugArray && slugArray.length > 0) {\r\n // remove duplicates if any from the first url part\r\n slugArray.forEach(_slug => {\r\n refinerParts.forEach(refinerPart => {\r\n const index = slugArray.indexOf(refinerPart);\r\n if (index !== -1) {\r\n slugArray.splice(index, 1);\r\n }\r\n });\r\n });\r\n }\r\n const finalRefinerParts: string[] = [];\r\n refinerParts.forEach(refinerPart => {\r\n refinerPart.split('|').map(item => finalRefinerParts.push(item.includes('-') ? item : item.split('-').join(' ')));\r\n });\r\n refinerParts = finalRefinerParts && flatten(finalRefinerParts);\r\n // setup object with refiner values\r\n const sortedValues: { [key: string]: string[] } = {};\r\n filteredRefiners?.forEach(refinerSet => {\r\n let refinerName = refinerSet.KeyName;\r\n if (refinerName) {\r\n refinerName = refinerName.toLowerCase();\r\n sortedValues[refinerName] = []; // size, brand, price\r\n }\r\n refinerSet.Values.forEach((refiner) => {\r\n refinerParts.forEach((refinerPart) => {\r\n if (refinerName && refiner.LeftValueBoundString &&\r\n (refiner.LeftValueBoundString.toLowerCase().replace(/\\&/g, 'and').replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-') === refinerPart.toLocaleLowerCase().split('-').join(' ')\r\n || refiner.LeftValueBoundString.toLowerCase().replace(/\\&/g, 'and').replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-') === refinerPart.toLocaleLowerCase())) {\r\n sortedValues[refinerName].push(refiner.LeftValueBoundString);\r\n } else if (refinerName && refiner.LeftValueBoundString &&\r\n refiner.LeftValueBoundString.toLowerCase() === refinerPart.toLowerCase().split('-').join(' ')) {\r\n sortedValues[refinerName].push(refinerPart);\r\n }\r\n });\r\n });\r\n });\r\n // alpha sort\r\n // @ts-ignore\r\n for (const sortedValue of Object.keys(sortedValues)) {\r\n sortedValues[sortedValue].length > 0 &&\r\n sortedValues[sortedValue].sort((a: string, b: string) => {\r\n if (a < b) {\r\n return -1;\r\n }\r\n if (a > b) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n // @ts-ignore\r\n const finalRefiners: string[] = [];\r\n sortedConfigValues.forEach(sortedConfigValue => {\r\n const sortedRefinerName = sortedConfigValue.refinerName.toLowerCase();\r\n if (sortedValues[sortedRefinerName] !== undefined && sortedValues[sortedRefinerName].length > 0) {\r\n // @ts-ignore\r\n finalRefiners.push(sortedValues[sortedRefinerName].join(' '));\r\n }\r\n });\r\n return finalRefiners;\r\n }\r\n return undefined;\r\n};\r\n\r\nasync function getAllRefinersAction(ctx: IActionContext): Promise {\r\n const searchCriteria = {\r\n SearchCondition: '*',\r\n Context: {\r\n ChannelId: ctx.requestContext.apiSettings.channelId,\r\n CatalogId: ctx.requestContext.apiSettings.catalogId\r\n }\r\n };\r\n return getProductSearchRefinersAsync({ callerContext: ctx }, searchCriteria).then(\r\n (productRefiners: ProductRefiner[]) => {\r\n if (!productRefiners) {\r\n ctx.telemetry.error('[getRefinersByCriteriaAction] returned no refiners');\r\n return [];\r\n }\r\n\r\n const result = (productRefiners || []).map((productRefiner: ProductRefiner) => productRefiner);\r\n\r\n if (result.length === 0) {\r\n ctx.telemetry.error('[getRefinersByCriteriaAction] returned no IProductRefinerHierarchy objects');\r\n return [];\r\n }\r\n\r\n return result;\r\n }\r\n ).catch((err) => {\r\n console.log('[getRefinersByCriteriaAction Category-page-summary] returned no IProductRefinerHierarchy objects', err);\r\n ctx.telemetry.error(`[getRefinersByCriteriaAction Category-page-summary] returned no IProductRefinerHierarchy objects ${err}`);\r\n return [];\r\n });\r\n}\r\n\r\nasync function getFallbackTitle(context: IActionContext, requestContext: IRequestContext, currentCategory: any): Promise {\r\n let activeRefinerList: string[] | undefined = [];\r\n return getAllRefinersAction(context).then(refiners => {\r\n activeRefinerList = _getActiveRefiners(refiners, requestContext, currentCategory);\r\n const concateTitle = `${activeRefinerList && activeRefinerList?.length > 0 ? activeRefinerList.length === 1 ? ` ${activeRefinerList[0]} ` : ` ${activeRefinerList?.join(' ')} ` : ''}`;\r\n const fallbackTitle = concateTitle && `Shop for${concateTitle}Products | Mattress Firm`;\r\n return fallbackTitle;\r\n }).catch((err) => {\r\n console.log('[getFallbackTitle Category-page-summary] has some errors', err);\r\n context.telemetry.error(`[getFallbackTitle Category-page-summary] has some errors- ${err}`);\r\n return \"\";\r\n });\r\n}\r\n\r\nconst action = async (input: MFRMCategoryPageSummaryInput, context: IActionContext): Promise => {\r\n const { config } = input;\r\n const seoInput = new GetSeoDataInput(context.requestContext.app.config.seoDataUrl || 'https://files-us-prod.cms.commerce.dynamics.com/cms/api/fknscsckgq/binary/MA5cA7');\r\n const seoData = await getSEOData(seoInput, context);\r\n const seoPageTitle = seoData && seoData['SEO State'] === 'Active' && seoData['Title Tag'];\r\n const seoPageMetaData = seoData && seoData['SEO State'] === 'Active' && seoData['Meta Description'];\r\n let currentCategory: any;\r\n try {\r\n currentCategory = await getCurrentCategory(createGetCurrentCategoryInput(context), context);\r\n } catch (e) {\r\n // Do nothing, if the action fails fallback to values defined in data\r\n }\r\n if (currentCategory) {\r\n let categoryUrl: string | undefined;\r\n let fallbackTitle;\r\n if (!seoPageTitle) {\r\n fallbackTitle = await getFallbackTitle(context, input.requestContext, currentCategory);\r\n }\r\n const pageTitle = seoPageTitle || fallbackTitle || _getSEOMetaTagValue(currentCategory, 'CategoryPageTitle');\r\n const pageTitleParser = getHtmlParserValue(pageTitle);\r\n\r\n const fallBackMeta = 'Find comfortable mattresses, high quality beds, and accessories from top brands all at great low prices at Mattress Firm';\r\n const categoryPageMetaData = seoPageMetaData || fallBackMeta || _getSEOMetaTagValue(currentCategory, 'CategoryPageMetaData');\r\n const categoryPageMetaDataParser = getHtmlParserValue(categoryPageMetaData);\r\n try {\r\n // reset category's name neutralizedName\r\n const localName = getFriendlyName(context.requestContext.locale, currentCategory.NameTranslations);\r\n const neutralizedName = currentCategory.NeutralizedName || currentCategory.Name;\r\n currentCategory.Name = localName;\r\n currentCategory.NeutralizedName = neutralizedName;\r\n categoryUrl = getCategoryUrl(currentCategory);\r\n // @ts-ignore - TODO: property exits in new version of SDK. Remove once released.\r\n const canonicalDomain = context.requestContext.canonicalDomain;\r\n if (categoryUrl && canonicalDomain) {\r\n categoryUrl = canonicalURL(context.requestContext).toLocaleLowerCase();\r\n } else {\r\n categoryUrl = undefined;\r\n }\r\n } catch (e) {\r\n categoryUrl = undefined;\r\n }\r\n return {\r\n title: pageTitleParser || currentCategory.Name,\r\n description: categoryPageMetaDataParser || '',\r\n sharingImageUrl: currentCategory.OfflineImage,\r\n canonicalUrl: categoryUrl,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n // If the action fails fallback to values defined from data\r\n } else if (config) {\r\n return {\r\n title: config.title,\r\n sharingImageUrl: config.sharingImage && config.sharingImage.src,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n } else {\r\n return {};\r\n }\r\n};\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/page-summary/category-page-summary',\r\n action: >action,\r\n input: (args: ICreateActionContext) => {\r\n return new MFRMCategoryPageSummaryInput(args.config, args.requestContext);\r\n }\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getByIdAsync,\r\n getVariantsByDimensionValuesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport {\r\n ProductDimension,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n\r\nexport class GetProductRecordidInput implements Msdyn365.IActionInput {\r\n public productId: number;\r\n public channelId: number;\r\n public matchingDimensionValues: ProductDimension[];\r\n\r\n constructor(productId: number, channelId: number, matchingDimensionValues?: ProductDimension[]) {\r\n this.productId = productId;\r\n this.channelId = channelId;\r\n this.matchingDimensionValues = matchingDimensionValues || [];\r\n }\r\n\r\n public getCacheKey = () => `GetProductRecord`;\r\n public getCacheObjectType = () => 'SimpleProduct';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetProductRecordidData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (inputData: Msdyn365.ICreateActionContext): GetProductRecordidInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n if (productId) {\r\n return new GetProductRecordidInput(+productId, +inputData.requestContext.apiSettings.channelId, []);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetProductRecordidInput, ctx: Msdyn365.IActionContext): Promise {\r\n let baseProduct: SimpleProduct | null = null;\r\n if (!ctx.requestContext.app.config.queryBasedVariantSelection) {\r\n const response = await getByIdAsync({ callerContext: ctx }, input.productId, input.channelId);\r\n baseProduct = Array.isArray(response) ? response[0] : response;\r\n }\r\n const matchingDimensionValues = input.matchingDimensionValues ?? [];\r\n const data = await getVariantsByDimensionValuesAsync(\r\n { callerContext: ctx, queryResultSettings: {} },\r\n baseProduct && baseProduct?.MasterProductId ? baseProduct.MasterProductId : input.productId,\r\n input.channelId,\r\n matchingDimensionValues\r\n );\r\n\r\n return data;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetProductRecordId',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365All from '@msdyn365-commerce/core';\r\nimport Msdyn365 from '@msdyn365-commerce/core';\r\nimport fetchChooseYourFoundationDatabaseDataAction, { FetchChooseYourFoundationDatabaseInput } from '../../actions/fetch-choose-your-foundation-database.action';\r\nimport { getQueryParamsFromQueryByName, getSelectedProductIdFromActionInput } from '../../data-actions/utilities/utils';\r\nimport { getDefaultVariantId } from '../../data-actions/get-selected-variant.override.action';\r\nimport { variantQueryStringName } from '../../Utilities/constants';\r\n\r\n/**\r\n * GetUnbxdCollectionCompareData Input Action\r\n */\r\nexport class GetUnbxdCollectionCompareDataInput implements Msdyn365All.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public configs?: any;\r\n public recordId?: string;\r\n constructor(configs?: any, recordId?: string) {\r\n this.configs = configs;\r\n this.recordId = recordId;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `VariantIDs-${this.recordId}`;\r\n public getCacheObjectType = () => 'VariantIDs';\r\n public dataCacheType = (): Msdyn365All.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetUnbxdCollectionCompareDataData {\r\n collectionData: any | null;\r\n productId: number | undefined | null;\r\n variantIds: string[] | undefined;\r\n collectionDescription: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365All.ICreateActionContext): Msdyn365All.IActionInput => {\r\n const variantId = args.requestContext.app.config.queryBasedVariantSelection\r\n ? getQueryParamsFromQueryByName(\r\n Msdyn365.isBrowser\r\n ? new URL(window.location.href.toString())\r\n : args.requestContext.url.requestUrl,\r\n variantQueryStringName)\r\n : undefined;\r\n return new GetUnbxdCollectionCompareDataInput(args, variantId);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getUnbxdCollectionCompare(input: GetUnbxdCollectionCompareDataInput, ctx: Msdyn365All.IActionContext): Promise {\r\n let variantIdNumber: number | null | undefined;\r\n const actionInput = new FetchChooseYourFoundationDatabaseInput(input?.configs?.jsonSrc);\r\n const unbxdApiKey = ctx.requestContext.app.config.unbxdApiKey;\r\n const unbxdSiteKey = ctx.requestContext.app.config.unbxdSiteKey;\r\n const collectionJson: any = await fetchChooseYourFoundationDatabaseDataAction(actionInput, ctx);\r\n let collectionData: any | null = {};\r\n let variantIds: string[] | undefined = [];\r\n let collectionDescription: string | undefined;\r\n let response: any = {};\r\n if (collectionJson) {\r\n const baseURL = 'https://search.unbxd.io';\r\n variantIdNumber = input.recordId && !Number.isNaN(Number(input.recordId))\r\n ? Number(input.recordId)\r\n : await getDefaultVariantId(Number(getSelectedProductIdFromActionInput(ctx)), ctx);\r\n if (collectionJson.length > 0 && variantIdNumber) {\r\n variantIds = collectionJson?.find((item: any) => Number(item.mattressVariantReqId) === variantIdNumber)?.mattressComparisonReqIdList?.map((value: any) => value);\r\n collectionDescription = collectionJson?.find((item: any) => Number(item.mattressVariantReqId) === variantIdNumber)?.collectionDescription;\r\n variantIds && variantIds?.length >= 1 && variantIds?.unshift(`${variantIdNumber}`);\r\n let collectionCompareIds = '';\r\n if (variantIds && variantIds?.length >= 2) {\r\n for (let index = 0; index < variantIds?.length; index++) {\r\n // eslint-disable-next-line security/detect-object-injection\r\n collectionCompareIds += index === 0 ? `variantId:${variantIds[index]}` : ` OR variantId:${variantIds[index]}`;\r\n }\r\n } else {\r\n return { collectionData: null, productId: null, variantIds: undefined, collectionDescription };\r\n }\r\n if (collectionCompareIds.length) {\r\n const unbxdUrl = `${baseURL}/${unbxdApiKey}/${unbxdSiteKey}/search?q=*&variants=true&variants.count=*&filter= ${collectionCompareIds}`;\r\n response = await Msdyn365All.sendRequest(unbxdUrl, 'get');\r\n } else {\r\n return { collectionData: null, productId: null, variantIds: undefined, collectionDescription };\r\n }\r\n\r\n collectionData = response?.data?.response;\r\n return { collectionData, productId: variantIdNumber, variantIds: variantIds, collectionDescription };\r\n }\r\n }\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { collectionData: null, productId: null, variantIds: undefined, collectionDescription };\r\n}\r\n\r\nexport default Msdyn365All.createObservableDataAction({\r\n action: >getUnbxdCollectionCompare,\r\n // TODO: Give your data action a unique id\r\n id: 'GetUnbxdCollectionCompareData',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n\r\n\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n { \n const actionPath = 'actions/bonus-coupon-details.action';\n binding.dataActions[actionPath] = require('partner/actions/bonus-coupon-details.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/bonus-item-product.action';\n binding.dataActions[actionPath] = require('partner/actions/bonus-item-product.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/checkout-billing-validity.action';\n binding.dataActions[actionPath] = require('partner/actions/checkout-billing-validity.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/checkout-disabled-button-state.action';\n binding.dataActions[actionPath] = require('partner/actions/checkout-disabled-button-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/complete-your-bed-pillow.action';\n binding.dataActions[actionPath] = require('partner/actions/complete-your-bed-pillow.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/complete-your-bed-protector.action';\n binding.dataActions[actionPath] = require('partner/actions/complete-your-bed-protector.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/express-order-submit-state.action';\n binding.dataActions[actionPath] = require('partner/actions/express-order-submit-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/fetch-choose-your-foundation-database.action';\n binding.dataActions[actionPath] = require('partner/actions/fetch-choose-your-foundation-database.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/fetch-complete-your-bed.action';\n binding.dataActions[actionPath] = require('partner/actions/fetch-complete-your-bed.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/fetch-core-delivery-list.action';\n binding.dataActions[actionPath] = require('partner/actions/fetch-core-delivery-list.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-delivery-fee-update.action';\n binding.dataActions[actionPath] = require('partner/actions/get-delivery-fee-update.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-delivery-message.action';\n binding.dataActions[actionPath] = require('partner/actions/get-delivery-message.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-eyebrow-message.action';\n binding.dataActions[actionPath] = require('partner/actions/get-eyebrow-message.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-mattress-foundations-to-add.action';\n binding.dataActions[actionPath] = require('partner/actions/get-mattress-foundations-to-add.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-mfrm-products-category-paths.action';\n binding.dataActions[actionPath] = require('partner/actions/get-mfrm-products-category-paths.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-recycle-fee-checkout.action';\n binding.dataActions[actionPath] = require('partner/actions/get-recycle-fee-checkout.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-sm-inventory-status.action';\n binding.dataActions[actionPath] = require('partner/actions/get-sm-inventory-status.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-soci-data.action';\n binding.dataActions[actionPath] = require('partner/actions/get-soci-data.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-try-in-store-info.action';\n binding.dataActions[actionPath] = require('partner/actions/get-try-in-store-info.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-unbxd-product-recommendations.action';\n binding.dataActions[actionPath] = require('partner/actions/get-unbxd-product-recommendations.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/payment-redirect-to-order-confirmation.action';\n binding.dataActions[actionPath] = require('partner/actions/payment-redirect-to-order-confirmation.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/paypal-express-edit-state.action';\n binding.dataActions[actionPath] = require('partner/actions/paypal-express-edit-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/paypalexpress-tryagain-trigger.action';\n binding.dataActions[actionPath] = require('partner/actions/paypalexpress-tryagain-trigger.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/paypalsuccesstrigger.action';\n binding.dataActions[actionPath] = require('partner/actions/paypalsuccesstrigger.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/select-your-foundation.action';\n binding.dataActions[actionPath] = require('partner/actions/select-your-foundation.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/social-icons-state.action';\n binding.dataActions[actionPath] = require('partner/actions/social-icons-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/srp-breadcrumb-page.action';\n binding.dataActions[actionPath] = require('partner/actions/srp-breadcrumb-page.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/trigger-special-synchrony-financing.action';\n binding.dataActions[actionPath] = require('partner/actions/trigger-special-synchrony-financing.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/update-monthly-payment.action';\n binding.dataActions[actionPath] = require('partner/actions/update-monthly-payment.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/user-defined-promocode.action';\n binding.dataActions[actionPath] = require('partner/actions/user-defined-promocode.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/wmap-address-state.action';\n binding.dataActions[actionPath] = require('partner/actions/wmap-address-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/zip-code-state.action';\n binding.dataActions[actionPath] = require('partner/actions/zip-code-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/zip-code-validation.action';\n binding.dataActions[actionPath] = require('partner/actions/zip-code-validation.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/bonuscoupons-action.action';\n binding.dataActions[actionPath] = require('partner/data-actions/bonuscoupons-action.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/brightspot-content-action.action';\n binding.dataActions[actionPath] = require('partner/data-actions/brightspot-content-action.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/financing-offer-state.action';\n binding.dataActions[actionPath] = require('partner/data-actions/financing-offer-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-address-from-zipcode.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-address-from-zipcode.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-card-payment-accept-point.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-card-payment-accept-point.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-comfort-type.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-comfort-type.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-dimensions-for-selected-variant.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-dimensions-for-selected-variant.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-franchise-data.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-franchise-data.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-product-benefit-enhanced-content.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-product-benefit-enhanced-content.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-product-benefits-data.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-product-benefits-data.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-promocode-value.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-promocode-value.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-resons-to-buy-data.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-resons-to-buy-data.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-sales-order-details-action.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-sales-order-details-action.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-selected-variant.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-selected-variant.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-seo-data.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-seo-data.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-sleep-disruptor-icons.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-sleep-disruptor-icons.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/get-store-location-information.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/get-store-location-information.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/mfi-atp-inventory.action';\n binding.dataActions[actionPath] = require('partner/data-actions/mfi-atp-inventory.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/mfrm-mfi-bonusitem.action';\n binding.dataActions[actionPath] = require('partner/data-actions/mfrm-mfi-bonusitem.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/mfrm-notification.action';\n binding.dataActions[actionPath] = require('partner/data-actions/mfrm-notification.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/payment-cc-card-types.action';\n binding.dataActions[actionPath] = require('partner/data-actions/payment-cc-card-types.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/payment-error-state.action';\n binding.dataActions[actionPath] = require('partner/data-actions/payment-error-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/products-by-category.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/products-by-category.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/products-by-recommendation.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/products-by-recommendation.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/products-by-relationship-id.override.action';\n binding.dataActions[actionPath] = require('partner/data-actions/products-by-relationship-id.override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/products-get-by-id.action';\n binding.dataActions[actionPath] = require('partner/data-actions/products-get-by-id.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/progressive-leasing-modal-state.action';\n binding.dataActions[actionPath] = require('partner/data-actions/progressive-leasing-modal-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/promocode-applied-in-progress.action';\n binding.dataActions[actionPath] = require('partner/data-actions/promocode-applied-in-progress.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/redirect-to-wmap-submit-payment.action';\n binding.dataActions[actionPath] = require('partner/data-actions/redirect-to-wmap-submit-payment.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/search-org-unit-locations.action';\n binding.dataActions[actionPath] = require('partner/data-actions/search-org-unit-locations.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/toggle-submit-order-button.action';\n binding.dataActions[actionPath] = require('partner/data-actions/toggle-submit-order-button.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/update-email-call.action';\n binding.dataActions[actionPath] = require('partner/data-actions/update-email-call.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/wmap-get-order-details.action';\n binding.dataActions[actionPath] = require('partner/data-actions/wmap-get-order-details.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'data-actions/wmap-submit-payment.action';\n binding.dataActions[actionPath] = require('partner/data-actions/wmap-submit-payment.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mfrm-autosuggest/actions/get-unbxd-search-autosuggest.action';\n binding.dataActions[actionPath] = require('partner/modules/mfrm-autosuggest/actions/get-unbxd-search-autosuggest.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mfrm-category-page-summary/mfrm-category-page-summary.action';\n binding.dataActions[actionPath] = require('partner/modules/mfrm-category-page-summary/mfrm-category-page-summary.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mfrm-product-page-summary/get-product-recordId.action';\n binding.dataActions[actionPath] = require('partner/modules/mfrm-product-page-summary/get-product-recordId.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mfrm-product-page-summary/mfrm-product-page-summary.action';\n binding.dataActions[actionPath] = require('partner/modules/mfrm-product-page-summary/mfrm-product-page-summary.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mfrm-products-compare/get-unbxd-collection-compare-data.action';\n binding.dataActions[actionPath] = require('partner/modules/mfrm-products-compare/get-unbxd-collection-compare-data.action');\n registerActionId(actionPath);\n }\n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.packageDataActions = {};\n window.__bindings__.packageDataActions['__local__'] = {\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["getSetLocalStorage","key","getSet","valueToSet","returnType","MsDyn365","localStorage","setItem","JSON","stringify","parse","getItem","getSetProductData","products","getSetProductSpec","getSetPromoCodeApplyList","getSetPromoCode","getSetGrandTotal","total","getSetBonusItemProd","globalBonusItems","getSetSelectedBonasItem","bonusItemArray","getSetBonusCouponDetail","getCoupons","getSetPrevBonasModalState","previousBonasModal","getSetBonusItemBrandName","bonusItemsBrandName","getSetDateGroupedProducts","getSetExpressFlow","express","getSetWmapCartLines","canonicalURL","requestContext","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","filteredPath","join","filteredURL","undefined","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","forEach","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","async","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","link","linkBase","linkParams","endsWith","linkParam","map","param","filteredLink","includeConfigList","includeConfig","pattern","RegExp","dayjs","tz","utc","isBetween","format","getValidSpecialCampaign","financingOffer","specialCampaign","enableCampaign","initialMonthlyAmount","numOfDiscountedMonths","isCampaignScheduled","getCampaignRemainingCost","campaign","totalPrice","remainingCost","remainingMonths","numOfMonths","cost","months","offer","tempOffer","Object","create","campaignValidStartDate","campaignValidEndDate","startDate","endDate","isScheduled","add","startDateCentralTime","isValid","local","endDateCentralTime","now","selectFinancingOffer","returnCustomOfferArray","campaignFound","limitedTimeFinancingOffers","everydayFinancingOffers","specialFinancingOffer","synchronySpecialFinancingCondition","specialFinancingEnable","highestMinimumPurchase","bestOffer","costPerMonth","isLTO","minPurchase","everydayFinancingOfferMessage","limitedFinancingOfferMessage","monthlyOfferDetails","financingOfferDescription","disclaimer","offerFound","everydayOffers","specialOffer","validLimitedTimeFinancingOffers","offerValidStartDate","offerValidEndDate","isValidLimitedTimeOffer","currentOfferAccepted","noInterestFor","Math","ceil","offerName","isAfter","currentOffer","specialCampaignOffer","checkoutDisplay","validCampaign","MFIGetBonusItemsParametersExtensionClass","constructor","odataObject","this","CartId","Coupons","i","Id","ExtensionProperties","className","substr","lastIndexOf","concat","EntityClasses","MFIBonusItemsDetailsEntityExtensionClass","Coupon","IsBonusCoupon","CouponMessage","Items","MFIQualifyingItemDetailsExtensionClass","QualifyingItemId","QualifyingProductId","BonusProductQty","parseFloat","BonusItems","MFIBonusItemDetailsExtensionClass","BonusItemId","PrimaryImageUrl","ProductTypeValue","BonusProductId","Name","AdditionToCart","AdjustedPrice","BasePrice","CustomerContextualPrice","DiscountAmount","DiscountTypeValue","DiscountType","DealPriceOrDiscountPercentage","BonusCalculatedDiscountPrice","MFIGetBonusCouponsDetailsResponseExtensionClass","BonusCoupons","MFIBonusCouponsDetailExtensionClass","MFIBonusItemsResponseExtensionClass","BonusItemsDetails","Message","BonusCoupon","BonusCouponMessage","ChildCoupons","bonusItemsQuery","id","DataServiceQuery","DataServiceEntities","mFIGetBonusCouponsDetailsAsync","context","bonusCoupons","request","createDataServiceRequestForOperation","bypassCache","returnEntity","createMFIGetBonusCouponsDetailsInput","callActionOrExecute","callerContext","mFIGetBonusItemsDetailAsync","bonusItemParams","createMFIGetBonusItemsDetailInput","BonusCouponDetailsInput","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","input","ctx","bonusCouponDetail","args","BonusItemProductInput","bonusItemProduct","BillingStateInput","BillingStateAction","isBillingFormValid","createObservableDataAction","inputData","CheckoutDisabledButtonStateInput","disabled","CompleteYourBedPillowInput","pillow","CompleteyourBedProtectorInput","protector","ExpressOrderSubmitStateActionInput","expressSubmit","slotTime","slotDate","selectedService","FetchChooseYourFoundationDatabaseInput","jsonSrc","data","FetchCompleteYourBedDataInput","jsonData","GetDeliveryFeeUpdateInput","deliveryAmount","GetMattressFoundationsToAddInput","console","log","text","GetCategoryPathsInput","catalogId","productIds","constructedCacheKey","ChannelId","apiSettings","channelId","CatalogId","ids","toString","createGetCategoryPathsInput","Error","getProductsCategoryPathsAction","catPaths","hasArray","productsIter","ProductId","getCategoryPathsAsync","queryResultSettings","Paging","Top","Sorting","err","getCategoryPathsActionDataAction","GetRecycleFeeCheckoutInput","recycleFee","tax","GetATPInventoryStatusInput","isCached","Array","prototype","call","ItemLines","item","VariantRecordId","ZipCode","ItemId","Weeks","RequestedDate","result","mFIATPInventoryStatusAsync","error","GetSociDataInput","searchradius","searchLimit","zipCode","getZipCode","response","axios","headers","e","lookupRadius","maxNoOfFranchise","MFITryInStoreExtensionClass","StoreId","Products","Limit","Radius","MFITryInStoreInfoResponseExtensionClass","Status","Inventory","createMFIGetTryInStoreInfoInput","tryInStoreProductIDs","storeId","tryInStoresQuery","GetTryInStoreInfoInput","mFIGetTryInStoreInfoAsync","GetUnbxdRecommendationsDataInput","pageType","widgetNumber","productID","catLevels","cartItemIDs","unbxdUid","Cookies","get","toUpperCase","unbxdApiKey","unbxdSiteKey","unbxdUrl","catnames","catName","index","categoryLevelName","productitemIds","itemId","PaymentRedirectToOrderConfirmationInput","redirectToOrderConfirmation","PaypalExpressEditStateInput","isDisabled","PaypalexpressTryagainTriggerInput","buttonClicked","orderSubmitClick","PaypalsuccesstriggerInput","isPaymentSuccess","paymentSuccessEmail","SelectYourFoundationInput","foundation","SocialIconsStateInput","socialIconStateAction","copyLinkClick","SrpBreadcrumbPageInput","breadcrumbCheck","TriggerSpecialSynchronyFinancingInput","triggerSpecialFinancing","UpdateMonthlyPaymentInput","updateTotal","UserDefinedPromocodeInput","userDefinedPromos","WmapAddressStateInput","preFilledAddress","isAddressUpdate","ZipCodeStateInput","ZipCodeStateAction","isStateValid","ZipCodeValidationInput","ZipcodeValidationAction","isZipcodeValid","BonusCouponsInfoInput","bonusCoupon","getAllBonusCouponsDetails","couponsDetails","telemetry","warning","debug","BrightSpotContentInput","brightspotUrl","super","shouldCacheOutput","cacheObjectType","cacheKey","getBrightspotUrl","brightspotPageUrl","FinancingOfferStateInput","isOpen","GetAddressByZipcodeInput","country","zipcode","getAddressFromZipCodeAsync","GetCardPaymentAcceptPointInput","buildCacheKey","paymenTenderType","showBillingAddress","selectedOfferName","isReload","amountDue","createCheckoutPaymentInstrumentInput","getCardPaymentAcceptPointInput","showBillingAddres","getCardPaymentAcceptPointAction","exception","checkoutState","getCheckoutState","catch","isEmptyOrNullObject","checkoutCart","cart","CartLines","URL","window","cardPaymentAcceptSettings","HostPageOrigin","AdaptorPath","CardPaymentEnabled","CardTokenizationEnabled","HideBillingAddress","TenderTypeId","PaymentAmount","addPaymentMethodName","extensionKeyPlanId","getOffer","allOffers","defaultVal","find","isSynchrony","set","planID","ep","Key","Value","StringValue","getCardPaymentAcceptPointAsync","then","cardPaymentAcceptPoint","AcceptPageUrl","AcceptPageContent","getCardPaymentAcceptPointActionDataAction","GetComfortTypesData","comfortTypesDataUrl","getComfortTypesDataUrl","jsonUrl","comfortTypesDataJsonUrl","res","GetDimensionsForSelectedVariantInput","productId","matchingDimensionValues","getDimensionsForSelectedVariantAction","variantId","queryBasedVariantSelection","getQueryParamsFromQueryByName","location","href","variantQueryStringName","activeProduct","ProductsDataActions","Number","isNaN","ArrayExtensions","Dimensions","promises","dimension","shippingInventoryConfiguration","createInventoryAvailabilitySearchCriteria","searchCriteria","RequestedDimensionTypeValue","DimensionTypeValue","MatchingDimensionValues","DefaultWarehouseOnly","FilterByChannelFulfillmentGroup","DeliveryModeTypeFilterValue","MasterProductId","RecordId","dimensionValues","dimensionValuesWithInventory","dimensionValuesResults","Promise","all","newDimension","oldDimension","DimensionValues","value","DimensionValue","getDimensionsForSelectedVariantActionDataAction","getSelectedProductIdFromActionInput","getDimensionValuesFromQuery","GetFranchiseData","_Latitude","_Longitude","_Radius","Latitude","Longitude","getFranchiseInput","getFranchise","sociFranchiseDataUrl","franchiseDataJson","franchiseStores","franchise","miles","latitude1","longitude1","latitude2","longitude2","long1","PI","long2","lat1","lat2","dlon","dlat","pow","sin","cos","asin","sqrt","_calculateDistance","lat","long","GetProductBenefitsEnhancedContentInput","masterProductID","jsonUrlFromGlobals","productBenefitsEnhancedContentUrl","masterProductid","GetProductBenefitsData","productBenefitsDataUrl","getProductBenefitsDataUrl","GetPromocodeValueInput","GetReasonsToBuyDataInput","categoryName","reasonsToBuyJsonUrl","orderTypes","GetSalesOrderWithHydrationsInput","orderType","orderId","getSalesOrderWithHydrationsAction","trace","salesOrder","getSalesOrderDetailsBySalesIdAsync","getSalesOrderDetailsByTransactionIdAsync","getSalesOrder","TransactionTypeValue","SalesLines","salesLine","productInputs","ProductInput","getSimpleProducts","getProducts","deliveryOptions","getDeliveryOptionsAsync","x","message","getSalesOrderWithHydrationsActionDataAction","salesId","transactionId","query","transaction","GetSeoDataInput","seoDataUrl","getSeoDataUrl","filteredUrlPath","seoData","GetSleepDisruptorIcons","sleepDisuptorIconsDataUrl","getSleepDisuptorIconsDataUrl","sleepDisruptorIconDataUrl","GetOrgUnitLocationsByAreaInput","_DistanceUnitValue","_IgnoreLocation","DistanceUnitValue","IgnoreLocation","createGetOrgUnitLocationsByAreaInput","getOrgUnitLocationsByArea","searchArea","getOrgUnitLocationsByAreaAsync","locationDeliveryOptions","locationPromiseList","stores","store","locationDeliveryOption","_channeldeliveryoption","orgUnitLocation","channelDeleiveryOptions","OrgUnitNumber","OrgUnitAvailability","getStoreHoursAsync","hours","availability","OrgUnitLocation","OrgUnitPickUpDeliveryModes","StoreHours","_getLocationWithHours","getOrgUnitLocationsByAreaDataAction","MfiAtpInventoryInput","inventoryType","weeks","page","requestedDate","itemLines","mfiAtpInventoryAction","requestBody","InventoryType","Page","mFIATPInventoryDynamicAsync","MFIbonusitemsInput","MfrmNotificationInput","PaymentCcCardTypesInput","cardType","PaymentErrorStateInput","errorTitle","errorMessage","progressiveLinkText","getProductsByCategoryList","categoryId","listMetadata","categoryIds","CATEGORY_PAGE_NAME","categories","productSearchCriteria","Context","CategoryIds","IncludeAttributes","searchByCriteriaAsync","pageSize","getProductImageUrls","getProductsByCategoryListAction","CartTokenPrefix","getProductIdForReco","recommendationCriteria","includeCart","cookies","cartCookieParts","getCartCookie","user","isAuthenticated","Auth","Anon","readCart","readAsync","getCart","cartProductIds","element","product","includePageContext","PDP_PAGE_NAME","ProductIds","getProductsByRecommendationList","customerAccountNumber","recommendationListId","PICKS_FOR_YOU_LIST","proxyContext","reccomendationListId","missingType","actionInputError","getCategoryIdForReco","personalization","CustomerAccountNumber","getElementsAsync","recommendedElements","productTypeId","ElementId","ElementTypeValue","semver","retailServerProxyVersion","itemIds","Ids","SearchCondition","productSearchResults","orderProductSearchResults","productRatingsPromise","getProductRatingsAsync","productInput","productRatings","productRating","unratedProduct","mappedProduct","TotalRatings","AverageRating","getProductsByRecommendationListAction","getProductsByRelationshipIdList","relationshipId","productResponse","getByIdAsync","baseProduct","isArray","hasOwnProperty","getRelatedProductsAsync","getProductsByRelationshipIdListAction","GetProductsByIdInput","productIdsArr","ctxObject","bypass","getByIdsAsync","ProgressiveLeasingModalStateInput","PromoCodeAppliedOnCartInput","updatePromoCodeAppliedOnCartProgressAction","isInProcess","RedirectToWmapSubmitPaymentInput","redirectToWmapSubmitPayment","buildQueryResultSettings","Skip","createSearchOrgUnitLocationsInputFunc","createSearchOrgUnitLocationsInput","retailActionDataAction","retailAction","ToggleSubmitOrderButtonInput","isSynchronySelected","isPaypalSelected","isCreditcardSelected","isCcFieldsNotPopulated","UpdateEmailCartInput","updateEmailCartAction","checkEmail","WmapGetOrderDetailsInput","orderDetailsAPIurl","getOrderDetailsAPIurl","getOrderId","apiResponseUrl","baseUrl","orderDetailsApiUrl","salesOrderId","orderIdOun","oun","makeaPaymentLink","wmapPageUrlSuffix","pathName","SalesId","WmapSubmitPaymentInput","submitPaymentAPIurl","submitPaymentPayload","WmapSubmitPaymentAction","GetUnbxdSearchAutoSuggestDataInput","queryText","popularProducts","inFields","topQueries","keywordSuggestions","promotedSuggestion","popularProductsCount","inFieldsCount","topQueriesCount","keywordSuggestionsCount","promotedSuggestionCount","MFRMCategoryPageSummaryInput","buildCacheKeyWithUrlTokens","_getSEOMetaTagValue","currentCategory","keyValue","attr","getFallbackTitle","activeRefinerList","getProductSearchRefinersAsync","productRefiners","productRefiner","getAllRefinersAction","refiners","CategoryHierarchy","configVirtualRefinerNames","filteredRefiners","refiner","KeyName","slugArray","pathArray","slug","Slug","sortedConfigValues","removedCategorySlug","refinerParts","_slug","refinerPart","finalRefinerParts","includes","flatten","sortedValues","refinerSet","toLocaleLowerCase","sortedValue","keys","finalRefiners","sortedConfigValue","sortedRefinerName","_getActiveRefiners","concateTitle","seoInput","getSEOData","seoPageTitle","seoPageMetaData","getCurrentCategory","CurrentCategoryInput","createGetCurrentCategoryInput","categoryUrl","fallbackTitle","pageTitle","pageTitleParser","getHtmlParserValue","fallBackMeta","categoryPageMetaData","categoryPageMetaDataParser","localName","getFriendlyName","locale","NameTranslations","neutralizedName","NeutralizedName","getCategoryUrl","canonicalDomain","title","description","sharingImageUrl","OfflineImage","canonicalUrl","faviconUrl","sharingImage","src","GetProductRecordidInput","getVariantsByDimensionValuesAsync","GetUnbxdCollectionCompareDataInput","configs","Msdyn365All","variantIdNumber","actionInput","collectionJson","fetchChooseYourFoundationDatabaseDataAction","collectionDescription","collectionData","variantIds","baseURL","getDefaultVariantId","mattressVariantReqId","mattressComparisonReqIdList","unshift","collectionCompareIds","binding","modules","dataActions","registerActionId","actionPath","default","exportName","Action","require","__bindings__","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}