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B,EAAiE,GAUvE,OARArR,GACIA,EAASxb,SAAQ8sB,IACTA,GAAWA,EAAQvQ,WACnBuQ,EAAQznB,gBA7BQ0nB,EAACC,EAA8B/jB,IACvD+jB,EAEIA,EAASC,WAAW,QACbD,EAIJ/jB,EAAYikB,aAAeC,mBAAmBH,QAGrD,EAkBkCD,CAAiBD,EAAQznB,gBAAiB4D,GACpE4jB,EAAsBzrB,KAAK0rB,OAIhCD,GAUEO,EAA4BA,CACrCC,EACAC,IAEOD,EAAYE,QAAO,CAACjf,EAA+BoB,KACtD,MAAMod,EAAUQ,EAA8B3K,MAAK6K,GAAWA,EAAQjR,WAAa7M,IAInF,OAHIod,GACAxe,EAAOlN,KAAK0rB,GAETxe,IACR,wBCnEPmf,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/actions/BonusItemDataServiceEntities.g.ts?cf80","webpack://mattressfirm/./src/actions/BonusItemDataActionExtension.g.ts?22ff","webpack://mattressfirm/./src/actions/applepay-payment-connector-loader.action.ts?d6f3","webpack://mattressfirm/./src/actions/bedhub-footer.action.ts?7b9f","webpack://mattressfirm/./src/Utilities/get-bedhub-token.ts?632a","webpack://mattressfirm/./src/actions/bedhub-header.action.ts?b6f2","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-custom-errors-validator.action.ts?c782","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-edit-state.action.ts?e40f","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-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/paypal-express-edit-state.action.ts?34db","webpack://mattressfirm/./src/actions/paypal-payment-connector-loader.action.ts?b83c","webpack://mattressfirm/./src/actions/paypalexpress-tryagain-trigger.action.ts?df08","webpack://mattressfirm/./src/actions/progressive-actions/Lease-Lookup.action.ts?e8c0","webpack://mattressfirm/./src/actions/progressive-actions/Progressive-address-mismatch.action.ts?56e7","webpack://mattressfirm/./src/actions/progressive-actions/Progressive-get-payment-estimate.action.ts?1455","webpack://mattressfirm/./src/actions/progressive-actions/Progressive-get-pricing-info.action.ts?252c","webpack://mattressfirm/./src/actions/progressive-actions/Progressive-submit-cart.action.ts?8816","webpack://mattressfirm/./src/actions/progressive-actions/progressive-get-lease-contract.action.ts?765f","webpack://mattressfirm/./src/actions/progressive-actions/progressive-set-lease-lookup-info.action.ts?5ac5","webpack://mattressfirm/./src/actions/progressive-actions/progressive-set-pricing-info.action.ts?7c03","webpack://mattressfirm/./src/actions/select-your-foundation.action.ts?e743","webpack://mattressfirm/./src/actions/showloading-continuetodelivery.action.ts?daa8","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/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/atp-slots-information-state.action.ts?6f2e","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/get-address-from-zipcode.action.ts?d9c9","webpack://mattressfirm/./src/data-actions/get-comfort-type.action.ts?e535","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-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/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/products-by-category.override.action.ts?6afc","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/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-products-compare/get-unbxd-collection-compare-data.action.ts?e1f9","webpack://mattressfirm/./lib/__local__/module-registration.js?8a42","webpack://mattressfirm/../../src/consts.ts?a6b5","webpack://mattressfirm/../../../src/utils/product-list-utils.ts?20d3","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["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 // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n }\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 * ApplePayConnectorLoader Input Action\r\n */\r\nexport class ApplePayConnectorLoaderInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `ApplePayConnectorLoader`;\r\n public getCacheObjectType = () => 'ApplePayConnectorLoader';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IApplePayConnectorLoaderData {\r\n applepPayConnectorLoading: boolean; // applepay\r\n}\r\n\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new ApplePayConnectorLoaderInput();\r\n};\r\n\r\nasync function action(input: ApplePayConnectorLoaderInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { applepPayConnectorLoading: true };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'ApplePayConnectorLoader',\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport axios from 'axios';\r\nimport { getAccessToken } from '../Utilities/get-bedhub-token';\r\n/**\r\n * BedhubFooterDataAction Input Action\r\n */\r\nexport class BedhubFooterInput implements Msdyn365.IActionInput {\r\n constructor() { }\r\n public getCacheKey = () => 'BedhubFooter';\r\n public getCacheObjectType = () => 'BedhubFooter';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\nconst createInput = (args: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n // Ensure Bedhub API is Enable\r\n if (args.config && !args.config.bedhubDataSource) {\r\n throw new Error('Cant call BEDHUB API, as its turn off');\r\n } else {\r\n return new BedhubFooterInput();\r\n }\r\n};\r\nasync function getBedhubFooterData(input: BedhubFooterInput, ctx: Msdyn365.IActionContext): Promise {\r\n const baseURL = ctx?.requestContext?.app?.config?.bedhubBaseUrl;\r\n let token = '';\r\n try {\r\n token = await getAccessToken(baseURL, ctx.requestContext);\r\n } catch (error) {\r\n console.error('error for getting bedhub footer authorization token [getAccessToken]', error);\r\n }\r\n const graphqlURL = new URL('graphql', baseURL).href;\r\n try {\r\n // Query to get the GRAPHQL Data\r\n const query = `\r\n {\r\n ui {\r\n disclosure {\r\n maximum\r\n more {\r\n ariaLabel\r\n label\r\n }\r\n sections {\r\n html\r\n truncate\r\n }\r\n }\r\n footer {\r\n accessibilityReader {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n categories {\r\n items {\r\n ariaLabel\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n label\r\n }\r\n socials {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n }\r\n }\r\n }\r\n `;\r\n const response = await axios.post(\r\n graphqlURL,\r\n JSON.stringify({\r\n query: query\r\n }),\r\n {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n );\r\n if (response?.data) {\r\n return response.data;\r\n }\r\n return {};\r\n } catch (error) {\r\n console.error('error for bedhub footer [getBedhubFooterData]', error);\r\n return {};\r\n }\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getBedhubFooterData,\r\n id: 'BedhubFooter',\r\n input: createInput\r\n});\r\n\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport async function getAccessToken(baseURL: string, ctx: Msdyn365.IRequestContext) {\r\n const clientId: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const clientSecret: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-secret',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const tenant: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-tenant-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n if (process.env.CURRENT_ENVIRONMENT === 'node') {\r\n const msalConfig = {\r\n auth: {\r\n authority: new URL(tenant?.value ?? '', 'https://login.microsoftonline.com').href,\r\n clientId: clientId?.value ?? '',\r\n clientSecret: clientSecret?.value ?? '',\r\n tenantId: tenant?.value ?? ''\r\n }\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-require-imports\r\n const ConfidentialClientApplication = require('@azure/msal-node').ConfidentialClientApplication;\r\n const msalInstance = new ConfidentialClientApplication(msalConfig);\r\n const token = await msalInstance.acquireTokenByClientCredential({ scopes: [new URL('.default', baseURL).href] });\r\n return token?.accessToken;\r\n }\r\n return '';\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 * BedhubHeaderDataAction Input Action\r\n */\r\nexport class BedhubHeaderInput implements Msdyn365.IActionInput {\r\n constructor() { }\r\n public getCacheKey = () => 'BedhubHeader';\r\n public getCacheObjectType = () => 'BedhubHeader';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n // Ensure Bedhub API is Enable\r\n if (args.config && !args.config.bedhubDataSource) {\r\n throw new Error('Cant call BEDHUB API, as its turn off');\r\n } else {\r\n return new BedhubHeaderInput();\r\n }\r\n};\r\n\r\nasync function getAccessToken(baseURL: string, ctx: Msdyn365.IRequestContext) {\r\n const clientId: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const clientSecret: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-secret',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const tenant: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-tenant-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n\r\n if (process.env.CURRENT_ENVIRONMENT === 'node') {\r\n const msalConfig = {\r\n auth: {\r\n authority: new URL(tenant?.value ?? '', 'https://login.microsoftonline.com').href,\r\n clientId: clientId?.value ?? '',\r\n clientSecret: clientSecret?.value ?? '',\r\n tenantId: tenant?.value ?? ''\r\n }\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-require-imports\r\n const ConfidentialClientApplication = require('@azure/msal-node').ConfidentialClientApplication;\r\n\r\n const msalInstance = new ConfidentialClientApplication(msalConfig);\r\n const token = await msalInstance.acquireTokenByClientCredential({ scopes: [new URL('.default', baseURL).href] });\r\n return token?.accessToken;\r\n }\r\n return '';\r\n}\r\nasync function getBedhubHeaderData(input: BedhubHeaderInput, ctx: Msdyn365.IActionContext): Promise {\r\n const baseURL = ctx?.requestContext?.app?.config?.bedhubBaseUrl;\r\n let token = '';\r\n try {\r\n token = await getAccessToken(baseURL, ctx.requestContext);\r\n } catch (error) {\r\n console.error('error for getting bedhub authorization token [getAccessToken]', error);\r\n }\r\n const graphqlURL = new URL('graphql', baseURL).href;\r\n\r\n try {\r\n // Query to get the GRAPHQL Data\r\n const query = `\r\n {\r\n ui {\r\n header {\r\n account {\r\n myAccount {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n signIn {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n signOut {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n signUp {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n }\r\n accountMenu {\r\n url\r\n type\r\n signedIn\r\n label\r\n ariaLabel\r\n callout\r\n }\r\n search {\r\n icon {\r\n url\r\n }\r\n placeholder\r\n url\r\n }\r\n actions {\r\n image {\r\n url\r\n }\r\n label\r\n mobile\r\n desktop\r\n type\r\n url\r\n beforeLogo\r\n ariaLabel\r\n }\r\n }\r\n navbar {\r\n products {\r\n ... on UIProductMenu {\r\n __typename\r\n action {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n badge {\r\n label\r\n type\r\n }\r\n callout\r\n categories {\r\n label\r\n items {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n type\r\n url\r\n }\r\n accordion {\r\n less {\r\n ariaLabel\r\n label\r\n }\r\n maximum\r\n more {\r\n ariaLabel\r\n label\r\n }\r\n }\r\n }\r\n label\r\n promotion {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n type\r\n url\r\n }\r\n subcategories {\r\n items {\r\n ariaLabel\r\n badge {\r\n label\r\n type\r\n }\r\n image {\r\n url\r\n }\r\n label\r\n type\r\n url\r\n }\r\n label\r\n }\r\n }\r\n ... on UIProductMenuLink {\r\n __typename\r\n ariaLabel\r\n type\r\n badge {\r\n label\r\n type\r\n }\r\n callout\r\n html\r\n label\r\n url\r\n }\r\n }\r\n utilities {\r\n ariaLabel\r\n label\r\n type\r\n url\r\n }\r\n }\r\n pencilBanner {\r\n interval\r\n items {\r\n ariaLabel\r\n countdown {\r\n end\r\n start\r\n }\r\n html\r\n label\r\n schedule {\r\n end\r\n start\r\n }\r\n type\r\n url\r\n }\r\n next {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n }\r\n previous {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n }\r\n }\r\n }\r\n }\r\n `;\r\n const response = await axios.post(\r\n graphqlURL,\r\n JSON.stringify({\r\n query: query\r\n }),\r\n {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n );\r\n if (response?.data) {\r\n return response.data;\r\n }\r\n return {};\r\n } catch (error) {\r\n console.error('error for bedhub header [getBedhubHeaderData]', error);\r\n return {};\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getBedhubHeaderData,\r\n id: 'BedhubHeader',\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 * BonusCouponDetails Input Action\r\n */\r\nexport class BonusCouponDetailsInput implements Msdyn365.IActionInput {\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'BonusCouponDetails',\r\n input: createInput\r\n // 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 // 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 = () => `BonusItemProduct`;\r\n public getCacheObjectType = () => 'BonusItemProduct';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'BonusItemProduct',\r\n input: createInput\r\n // 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 IBillingCustomError {\r\n billingHasCustomError: boolean;\r\n}\r\n\r\n/**\r\n * BillingCustomError - action input\r\n */\r\nexport class billingCustomErrorInput implements IActionInput {\r\n public getCacheKey = () => `billingCustomErrors`;\r\n public getCacheObjectType = () => 'billingCustomErrors';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * BillingCustomError - action\r\n */\r\nexport async function billingCustomErrorAction(input: billingCustomErrorInput, ctx: IActionContext): Promise {\r\n return { billingHasCustomError: false};\r\n}\r\n\r\n/**\r\n * BillingCustomError - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new billingCustomErrorInput();\r\n};\r\n\r\n/**\r\n * BillingCustomError - create action\r\n */\r\nexport default createObservableDataAction({\r\n id: 'BillingCustomErrors',\r\n action: >billingCustomErrorAction,\r\n input: createInput\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 id: 'BillingState',\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 // 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 // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'CompleteyourBedPillow',\r\n input: createInput\r\n // 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 // 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 // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'CompleteyourBedProtector',\r\n input: createInput\r\n // 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 * ExpressEditState Input Action\r\n */\r\nexport class ExpressEditStateInput implements Msdyn365.IActionInput {\r\n // ExpressEditStateInput: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // ExpressEditState: 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 = () => `ExpressEditState`;\r\n public getCacheObjectType = () => 'ExpressEditState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// IExpressEditStateData: Create a data model here or import one to capture the response of the action\r\nexport interface IExpressEditStateData {\r\n shippingEdit: boolean;\r\n deliveryEdit: boolean;\r\n}\r\n\r\n/**\r\n * createInput: 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 ExpressEditStateInput();\r\n};\r\n\r\n/**\r\n * action: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ExpressEditStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { shippingEdit: false, deliveryEdit: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // id: Give your data action a unique id\r\n id: 'ExpressEditState',\r\n input: createInput\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 // Construct the input needed to run the action\r\n constructor(jsonSrc: string) {\r\n this.jsonSrc = jsonSrc;\r\n }\r\n\r\n // 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// 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 splitVariantReqIdList: string[];\r\n}\r\n\r\nexport interface foo {\r\n database: AsyncResult;\r\n}\r\n\r\n/**\r\n * 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?.requestContext.app.config.jsonSrc!);\r\n};\r\n\r\n/**\r\n * 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 // Give your data action a unique id\r\n id: 'FetchChooseYourFoundationDatabase',\r\n input: createInput\r\n // 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 // Construct the input needed to run the action\r\n constructor(jsonData: string) {\r\n this.jsonData = jsonData;\r\n }\r\n\r\n // 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// 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 * 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 * 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 // Give your data action a unique id\r\n id: 'FetchcompleteYourBedData',\r\n input: createInput\r\n // 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 // Construct the input needed to run the action\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'GetDeliveryFeeUpdate',\r\n input: createInput\r\n // 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 // Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // 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 = () => `GetMattressFoundationsToAdd`;\r\n public getCacheObjectType = () => 'GetMattressFoundationsToAdd';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'GetMattressFoundationsToAdd',\r\n input: createInput\r\n // 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 * 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 * 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 let geoLoc = [];\r\n if(/^[0-9]+$/.test(zipCode)){\r\n geoLoc = [\r\n {\r\n \"postalcode\": zipCode\r\n }\r\n ];\r\n } else{\r\n geoLoc = [\r\n {\r\n \"state\": zipCode,\r\n \"city\": zipCode\r\n }\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\": geoLoc\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 // 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 // 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 // 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 // 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// Create a data model here or import one to capture the response of the action\r\n/**\r\n * 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 * 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 // Give your data action a unique id\r\n id: 'GetTryInStoreInfo'\r\n // input: createInput\r\n // 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 private currentCategories: string;\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 this.currentCategories = '';\r\n catLevels?.forEach(catLevel => {\r\n this.currentCategories = catLevel?.categoryLevelName ? this.currentCategories.concat(`${catLevel?.categoryLevelName}-`) : this.currentCategories;\r\n });\r\n }\r\n\r\n public getCacheKey = () => `Unbxd-recommendation-data-${this.pageType}-${this.widgetNumber}-${this.currentCategories}`;\r\n public getCacheObjectType = () => 'Unbxd-recommendation-data';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n/**\r\n * 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 * 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 * PaymentConnectorLoader Input Action\r\n */\r\nexport class PaymentConnectorLoaderInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `PaymentConnectorLoader`;\r\n public getCacheObjectType = () => 'PaymentConnectorLoader';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IPaymentConnectorLoaderData {\r\n paymentConnectorLoading: boolean; // paypal\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaymentConnectorLoaderInput();\r\n};\r\n\r\nasync function action(input: PaymentConnectorLoaderInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { paymentConnectorLoading: true};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'PaymentConnectorLoader',\r\n input: createInput\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\nimport { mFIGetLeaseLookupByCustomerAsync } from './progressive-proxy-files/ProgressiveDataActionExtension.g';\r\nimport { ILeaseLookup, IMFILeaseLookupByCustomerResponse } from './progressive-proxy-files/ProgressiveDataServiceEntities.g';\r\n\r\n/**\r\n * ProgressiveLeaselookupbycustomer Input Action\r\n */\r\nexport class ProgressiveLeaselookupbycustomerInput implements Msdyn365.IActionInput {\r\n public phoneNumber?: string;\r\n public ssn?: string;\r\n public tenderType?: string;\r\n public checkoutType?: string;\r\n constructor(phoneNumber?: string | undefined, ssn?: string | undefined, tenderType?: string, checkoutType?: string) {\r\n this.phoneNumber = phoneNumber;\r\n this.ssn = ssn;\r\n this.tenderType = tenderType;\r\n this.checkoutType = checkoutType;\r\n }\r\n public getCacheKey = () => `progressiveLeaselookupbycustomer`;\r\n public getCacheObjectType = () => 'progressiveLeaselookupbycustomer';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// Progressive Leaselookup by custome: Create a data model here or import one to capture the response of the action\r\nexport interface IProgressiveLeaselookupbycustomerData {\r\n text: string;\r\n}\r\n/**\r\n * Progressive Leaselookup by custome: 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 ProgressiveLeaselookupbycustomerInput();\r\n};\r\n\r\n/**\r\n * progressiveLeaselookupbycustomer: Use this function to call your action and process the results as needed\r\n */\r\nasync function progressiveLeaselookup(\r\n input: ProgressiveLeaselookupbycustomerInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n const inputData = {\r\n MobilePhoneNumber: input.phoneNumber?.replace(/\\D/g, ''),\r\n Last4SSN: input.ssn,\r\n TenderType: input.tenderType,\r\n TransactionType: input.checkoutType\r\n };\r\n\r\n try {\r\n const response: IMFILeaseLookupByCustomerResponse = await mFIGetLeaseLookupByCustomerAsync({ callerContext: ctx }, inputData);\r\n if (response.LeaseLookupByCustomer?.IsNoContent || !response.LeaseLookupByCustomer?.LeaseLookup) {\r\n return null;\r\n }\r\n return response.LeaseLookupByCustomer.LeaseLookup;\r\n } catch (error) {\r\n console.error('Progressive Leaselookup Error:', error);\r\n return null;\r\n }\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >progressiveLeaselookup,\r\n id: 'ProgressiveLeaselookupbycustomer',\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 * ProgressiveAddressMismatch Input Action\r\n */\r\nexport class ProgressiveAddressMismatchInput implements Msdyn365.IActionInput {\r\n // ProgressiveAddressMismatchInput: Construct the input needed to run the action\r\n constructor() {}\r\n public getCacheKey = () => `ProgressiveAddressMismatchInput`;\r\n public getCacheObjectType = () => 'ProgressiveAddressMismatchInput';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// ProgressiveAddressMismatchInput: Create a data model here or import one to capture the response of the action\r\nexport interface IProgressiveAddressMismatchData {\r\n misMatch: boolean;\r\n}\r\n\r\n/**\r\n * ProgressiveAddressMismatchInput: 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 ProgressiveAddressMismatchInput();\r\n};\r\n\r\n/**\r\n * ProgressiveAddressMismatchInput: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ProgressiveAddressMismatchInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { misMatch: false};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // ProgressiveAddressMismatchInput: Give your data action a unique id\r\n id: 'ProgressiveAddressMismatch',\r\n input: createInput\r\n // ProgressiveAddressMismatchInput: 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 { mFIGetPaymentEstimatesAsync } from './progressive-proxy-files/ProgressiveDataActionExtension.g';\r\nimport { IMFIGetPaymentEstimateResponse, IPaymentEstimateResponse } from './progressive-proxy-files/ProgressiveDataServiceEntities.g';\r\n\r\n/**\r\n * ProgressiveGetPaymentEstimate Input Action\r\n */\r\nexport class ProgressiveGetPaymentEstimateInput implements Msdyn365.IActionInput {\r\n public invoiceAmount?: number;\r\n public state?: string;\r\n public tenderType?: string;\r\n public checkoutType?: string;\r\n constructor(invoiceAmount?: number, state?: string, tenderType?: string, checkoutType?: string) {\r\n this.invoiceAmount = invoiceAmount;\r\n this.state = state;\r\n this.tenderType = tenderType;\r\n this.checkoutType = checkoutType;\r\n }\r\n public getCacheKey = () => `ProgressiveGetPaymentEstimate`;\r\n public getCacheObjectType = () => 'ProgressiveGetPaymentEstimate';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n/**\r\n * ProgressiveGetPaymentEstimate: 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 ProgressiveGetPaymentEstimateInput();\r\n};\r\n\r\n/**\r\n * ProgressiveGetPaymentEstimate: Use this function to call your action and process the results as needed\r\n */\r\nasync function getProgressiveEstimate(\r\n input: ProgressiveGetPaymentEstimateInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n const getLeaseObj = {\r\n InvoiceAmount: input.invoiceAmount ?? 0,\r\n Deposit: 0,\r\n TenderType: input.tenderType,\r\n TransactionType: input.checkoutType,\r\n PaymentFrequency: 'biweekly',\r\n State: input.state\r\n };\r\n\r\n try {\r\n const response: IMFIGetPaymentEstimateResponse = await mFIGetPaymentEstimatesAsync({ callerContext: ctx }, getLeaseObj);\r\n if(response.PaymentEstimates) {\r\n return response.PaymentEstimates;\r\n } else {\r\n return null;\r\n }\r\n } catch (error) {\r\n console.error('Error:', error);\r\n return null;\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getProgressiveEstimate,\r\n id: 'ProgressiveGetPaymentEstimate',\r\n input: createInput\r\n});\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIGetPricingInformationAsync, IGetPricingInformationRequet, IGetPricingInformationResponse, IMFIGetPricingInformationResponse } from './progressive-proxy-files';\r\n\r\n/**\r\n * GetPricingInformation Input Action\r\n */\r\n\r\nexport class GetPricingInformationInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public leasePricingInformationPayload: IGetPricingInformationRequet;\r\n\r\n constructor(leasePricingInformation: IGetPricingInformationRequet) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'GetPricingInformation', cacheKey: 'GetPricingInformation' });\r\n this.leasePricingInformationPayload = leasePricingInformation;\r\n }\r\n\r\n public getCacheKey = () => `GetPricingInformation`;\r\n public getCacheObjectType = () => 'GetPricingInformation';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetPricingInformationInput({ ApplicationId: '' });\r\n};\r\n\r\n/**\r\n * GetPricingInformationAction function receives applicationId and returns details\r\n */\r\nexport async function GetPricingInformationAction(input: GetPricingInformationInput, ctx: Msdyn365.IActionContext): Promise {\r\n try {\r\n const leasePricingInformationResponse: IMFIGetPricingInformationResponse = await mFIGetPricingInformationAsync({ callerContext: ctx }, input.leasePricingInformationPayload);\r\n return leasePricingInformationResponse.PricingInformation ?? null;\r\n } catch (error) {\r\n console.error('Error:', error);\r\n return null;\r\n }\r\n}\r\n\r\nexport const IGetPricingInformationAction = Msdyn365.createObservableDataAction({\r\n action: >GetPricingInformationAction,\r\n input: createInput,\r\n id: 'GetPricingInformation'\r\n});","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMFISubmitCartInformationResponse, ISubmitCartInformationRequest, ISubmitCartInformationResponse } from './progressive-proxy-files/ProgressiveDataServiceEntities.g';\r\nimport { mFISubmitCartInformationAsync } from './progressive-proxy-files/ProgressiveDataActionExtension.g';\r\n\r\n\r\n/**\r\n * SubmitCartInformation Input Action\r\n */\r\nexport class SubmitCartInformationInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public submitCartInformation: ISubmitCartInformationRequest;\r\n\r\n constructor(submitCartInformation: ISubmitCartInformationRequest) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'SubmitCartInformation', cacheKey: 'SubmitCartInformation' });\r\n this.submitCartInformation = submitCartInformation;\r\n }\r\n\r\n public getCacheKey = () => `SubmitCartInformation`;\r\n public getCacheObjectType = () => 'SubmitCartInformation';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n const submitCartInformation: ISubmitCartInformationRequest = { ApplicationId: '', MerchantTransactionId: '', Deposit: 0, SalesTax: 0, CartTotal: 0, Store: { ProgressiveMerchantId: 0 }, Items: []};\r\n return new SubmitCartInformationInput(submitCartInformation);\r\n};\r\n\r\n/**\r\n * SubmitCartInformationAction function receives cart information and application ID and returns CartId\r\n */\r\nexport async function SubmitCartInformationAction(input: SubmitCartInformationInput, ctx: Msdyn365.IActionContext): Promise {\r\n const { submitCartInformation } = input;\r\n try {\r\n const cartInformation: IMFISubmitCartInformationResponse = await mFISubmitCartInformationAsync({ callerContext: ctx }, submitCartInformation);\r\n return cartInformation.SubmitCartInformation ?? null;\r\n } catch (error) {\r\n console.error('Error:', error);\r\n return null;\r\n }\r\n}\r\n\r\nexport const ISubmitCartInformationAction = Msdyn365.createObservableDataAction({\r\n action: >SubmitCartInformationAction,\r\n input: createInput,\r\n id: 'SubmitCartInformation'\r\n});","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IGetLeaseContractRequest, mFIGetLeaseContractAsync, IGetLeaseContractResponse } from './progressive-proxy-files';\r\n\r\n/**\r\n * GetLeaseContract Input Action\r\n */\r\n\r\nexport class GetLeaseContractInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n public leaseContractPayload: IGetLeaseContractRequest;\r\n\r\n constructor(leaseContract: IGetLeaseContractRequest) {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'GetLeaseContract', cacheKey: 'GetLeaseContract' });\r\n this.leaseContractPayload = leaseContract;\r\n }\r\n\r\n public getCacheKey = () => `GetLeaseContract`;\r\n public getCacheObjectType = () => 'GetLeaseContract';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetLeaseContractInput({ ApplicationId: '' });\r\n};\r\n\r\n/**\r\n * GetLeaseContractAction function receives applicationId and returns Iframe url to sign the lease contract\r\n */\r\nexport async function getLeaseContractAction(input: GetLeaseContractInput, ctx: Msdyn365.IActionContext): Promise {\r\n try {\r\n const leaseContractResponse = await mFIGetLeaseContractAsync({ callerContext: ctx }, input.leaseContractPayload);\r\n return leaseContractResponse.LeaseContacts ?? null;\r\n } catch (error) {\r\n console.error('Error:', error);\r\n return null;\r\n }\r\n}\r\n\r\nexport const IGetLeaseContractAction = Msdyn365.createObservableDataAction({\r\n action: >getLeaseContractAction,\r\n input: createInput,\r\n id: 'GetLeaseContract'\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 { ILeaseLookup } from './progressive-proxy-files/ProgressiveDataServiceEntities.g';\r\n\r\n/**\r\n * ProgressiveSetLeaseLookupInfo Action\r\n */\r\nexport class ProgressiveSetLeaseLookupInfoInput implements Msdyn365.IActionInput {\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ProgressiveSetLeaseLookupInfo`;\r\n public getCacheObjectType = () => 'ProgressiveSetLeaseLookupInfo';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IProgressiveSetLeaseLookupInfoData {\r\n leaseLookupByCustomerInfo?: ILeaseLookup;\r\n}\r\n\r\n/**\r\n * ProgressiveSetLeaseLookupInfo 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 ProgressiveSetLeaseLookupInfoInput();\r\n};\r\n/**\r\n * ProgressiveSetLeaseLookupInfo Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ProgressiveSetLeaseLookupInfoInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { leaseLookupByCustomerInfo: undefined };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'ProgressiveSetLeaseLookupInfo',\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\nimport { IGetPricingInformationResponse } from './progressive-proxy-files/ProgressiveDataServiceEntities.g';\r\n\r\n/**\r\n * ProgressiveSetPricingInfo Input Action\r\n */\r\nexport class ProgressiveSetPricingInfoInput implements Msdyn365.IActionInput {\r\n // ProgressiveSetPricingInfo 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 = () => `ProgressiveSetPricingInfo`;\r\n public getCacheObjectType = () => 'ProgressiveSetPricingInfo';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// ProgressiveSetPricingInfo Create a data model here or import one to capture the response of the action\r\nexport interface IProgressiveSetPricingInfoData {\r\n pricingInfo: IGetPricingInformationResponse;\r\n leaseId: string;\r\n approvalAmount: string;\r\n applyProgressive: boolean;\r\n contractESignUrl: string;\r\n cartId: string;\r\n}\r\n\r\n/**\r\n * ProgressiveSetPricingInfo 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 ProgressiveSetPricingInfoInput();\r\n};\r\n/**\r\n * ProgressiveSetPricingInfo Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ProgressiveSetPricingInfoInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { pricingInfo: { CRTStatus: false, IsNoContent: true }, leaseId: '', approvalAmount: '', applyProgressive: false, contractESignUrl: '', cartId: '' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // ProgressiveSetPricingInfo: Give your data action a unique id\r\n id: 'ProgressiveSetPricingInfo',\r\n input: createInput\r\n // ProgressiveSetPricingInfo: 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 // 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 // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'SelectYourFoundation',\r\n input: createInput\r\n // 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 * ShowloadingContinuetodelivery Input Action\r\n */\r\nexport class ShowloadingContinuetodeliveryInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ShowloadingContinuetodeliveryInput`;\r\n public getCacheObjectType = () => 'ShowloadingContinuetodeliveryInput';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\nexport interface IShowloadingContinuetodeliveryData {\r\n customersApiLoadingCase: boolean;\r\n}\r\n\r\n/**\r\n * 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 ShowloadingContinuetodeliveryInput();\r\n};\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: ShowloadingContinuetodeliveryInput, ctx: Msdyn365.IActionContext): Promise {\r\n\r\n return { customersApiLoadingCase: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // Give your data action a unique id\r\n id: 'ShowloadingContinuetodelivery',\r\n input: createInput\r\n // 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// 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 * 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 // 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 // Construct the input needed to run the action\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'SrpBreadcrumbPage',\r\n input: createInput\r\n // 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 // Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'TriggerSpecialSynchronyFinancing',\r\n input: createInput\r\n // 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 * UserDefinedPromocode Input Action\r\n */\r\nexport class UserDefinedPromocodeInput implements Msdyn365.IActionInput {\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'UserDefinedPromocode',\r\n input: createInput\r\n // 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 id: 'WmapAddressState',\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 id: 'ZipCodeState',\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 id: 'ZipCodeValidation',\r\n action: >ZipcodeValidationAction,\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 * AtpSlotsInformationState Input Action\r\n */\r\nexport class AtpSlotsInformationStateInput implements Msdyn365.IActionInput {\r\n // AtpSlotsInformationState: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // AtpSlotsInformationState: 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 = () => `AtpSlotsInformationState`;\r\n public getCacheObjectType = () => 'AtpSlotsInformationState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// AtpSlotsInformationState: Create a data model here or import one to capture the response of the action\r\nexport interface IAtpSlotsInformationStateData {\r\n checkAvailable?: boolean;\r\n buttonDisabled?: boolean;\r\n isbackOrdered?: boolean;\r\n willCall?: boolean;\r\n isSynchorniCall?: boolean;\r\n}\r\n\r\n/**\r\n * AtpSlotsInformationState: 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 AtpSlotsInformationStateInput();\r\n};\r\n\r\n/**\r\n * AtpSlotsInformationState: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: AtpSlotsInformationStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { checkAvailable: false , buttonDisabled: false , isbackOrdered: false , willCall: true , isSynchorniCall: false};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // AtpSlotsInformationState: Give your data action a unique id\r\n id: 'AtpSlotsInformationState',\r\n input: createInput\r\n // AtpSlotsInformationState: 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 {\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 id : 'MFRMBonusCouponsInfo',\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 id: 'BsPageCache',\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// 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 // 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 // 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 => 'application';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * 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 const { zipcode, country } = input;\r\n const isValidZipcode = typeof zipcode === 'string' && zipcode?.trim()?.length === 5 && zipcode !== \"00000\";\r\n return isValidZipcode ? getAddressFromZipCodeAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: 1 } } }, country, zipcode) : null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getAddressByZipcodeAction,\r\n // Give your data action a unique id\r\n id: 'GetAddressByZipcode'\r\n // 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 * 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 id: 'ComfortTypesDataCache',\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\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 id: 'FranchiseData',\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 id: 'productBenefitsEnhancedContent',\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 id: 'productBenefitsData',\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\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 id: 'GetReasonsToBuyData',\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 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 id: 'SeoDataCache',\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 id: 'SleepDisuptorIconsData',\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\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 // Construct the input needed to run the action\r\n\r\n // 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// 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 * 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 * 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 // Give your data action a unique id\r\n id: 'MfrmNotification',\r\n input: createInput\r\n // 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 // Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'PaymentCcCardTypes',\r\n input: createInput\r\n // 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. 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 // 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 // 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// Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * 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 // Give your data action a unique id\r\n id: 'GetProductsById'\r\n // 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 // Construct the input needed to run the action\r\n constructor() { }\r\n\r\n // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'ProgressiveLeasingModalState',\r\n input: createInput\r\n // 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 id: 'PromoCodeAppliedOnCartInput',\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 * 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 * 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","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 id: 'UpdateEmailCart',\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 // 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 // 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// 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 * 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 * 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 // 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 // Give your data action a unique id\r\n id: 'WmapGetOrderDetails',\r\n input: createInput\r\n // 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 requestOptions: Msdyn365.IHTTPRequestOptions = {\r\n headers: {\r\n 'oun': orderIdOun,\r\n 'Content-Type': 'application/json'\r\n }\r\n };\r\n if (requestOptions.headers && ctx.requestContext.user.token) {\r\n requestOptions.headers.Authorization = `id_token ${ctx.requestContext.user.token}`;\r\n }\r\n const response = await axios.post(`${apiResponseUrl}${input.submitPaymentAPIurl}`,\r\n input.submitPaymentPayload,\r\n requestOptions);\r\n return response.data;\r\n } catch (e) {\r\n ctx.telemetry.error('Error for Submit Payment', e);\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n id: 'WmapCapturePayment',\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 * 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, removeDomainQspFromUrl } 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 IAny,\r\n IGeneric\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\n/**\r\n * Get skip count.\r\n * @param inputData\r\n */\r\nfunction getSkipCount(inputData: ICreateActionContext, IGeneric>): string | undefined {\r\n return inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.skip;\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 /**\r\n * Changes from v30\r\n */\r\n const skipCount = getSkipCount(context);\r\n const Url = new URL(categoryUrl);\r\n const urlParams: URLSearchParams = new URLSearchParams(Url.search);\r\n if (skipCount) {\r\n urlParams.set('skip', skipCount);\r\n }\r\n Url.search = urlParams.toString();\r\n categoryUrl = Url.toString();\r\n categoryUrl = removeDomainQspFromUrl(categoryUrl, context.requestContext);\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 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 // 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 // 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// 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 * 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 * 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(ctx.requestContext.app.config.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 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 // 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 // Give your data action a unique id\r\n id: 'GetUnbxdCollectionCompareData',\r\n input: createInput\r\n // 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/applepay-payment-connector-loader.action';\n binding.dataActions[actionPath] = require('partner/actions/applepay-payment-connector-loader.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/bedhub-footer.action';\n binding.dataActions[actionPath] = require('partner/actions/bedhub-footer.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/bedhub-header.action';\n binding.dataActions[actionPath] = require('partner/actions/bedhub-header.action');\n registerActionId(actionPath);\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-custom-errors-validator.action';\n binding.dataActions[actionPath] = require('partner/actions/checkout-billing-custom-errors-validator.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-edit-state.action';\n binding.dataActions[actionPath] = require('partner/actions/express-edit-state.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/paypal-payment-connector-loader.action';\n binding.dataActions[actionPath] = require('partner/actions/paypal-payment-connector-loader.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/progressive-actions/Lease-Lookup.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/Lease-Lookup.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/Progressive-address-mismatch.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/Progressive-address-mismatch.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/Progressive-get-payment-estimate.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/Progressive-get-payment-estimate.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/Progressive-get-pricing-info.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/Progressive-get-pricing-info.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/Progressive-submit-cart.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/Progressive-submit-cart.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/progressive-delete-transaction.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/progressive-delete-transaction.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/progressive-get-lease-contract.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/progressive-get-lease-contract.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/progressive-set-lease-lookup-info.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/progressive-set-lease-lookup-info.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/progressive-actions/progressive-set-pricing-info.action';\n binding.dataActions[actionPath] = require('partner/actions/progressive-actions/progressive-set-pricing-info.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/showloading-continuetodelivery.action';\n binding.dataActions[actionPath] = require('partner/actions/showloading-continuetodelivery.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/atp-slots-information-state.action';\n binding.dataActions[actionPath] = require('partner/data-actions/atp-slots-information-state.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/checkout-skeleton.action';\n binding.dataActions[actionPath] = require('partner/data-actions/checkout-skeleton.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-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-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/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-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 };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Default mount point name\n */\nexport const LAYOUT_MOUNT_POINT = 'renderPage';\n\n/**\n * Default Proxy Address\n */\nexport const DEFAULT_PROXY_HOST = 'http://127.0.0.1';\n\n/**\n * Default Proxy Port\n */\nexport const DEFAULT_PROXY_PORT = 8888;\n\n/**\n * Default request timeout in ms (1m default);\n */\nexport const DEFAULT_REQUEST_TIMEOUT: number = parseInt(process.env.REQUEST_TIMEOUT || '60000', 10);\n\nexport const GLIMPSE_LOGGER_NAME = '__INTERNAL_GLIPMPSE_LOGGER_!@';\nexport const PAGE_LOGGER_NAME = '__PAGE_LOGGER__';\n\n/**\n * appCacheSetting Name\n */\n\nexport const CACHE_SETTING = '__CACHE_SETTINGS';\n\n/**\n * const for client entry points type\n */\nexport const CLIENT_ENTRY_POINTS_TYPE = '__CEP__';\n\n/**\n * PDP PageType Name\n */\nexport const PDP_PAGE_NAME = 'product';\n\n/**\n * Product recommendtion list\n */\nexport const PRODUCT_RECOMMENDATION_LIST = 'pal';\n\n/**\n * Frequently bought together recommendation list\n */\nexport const FREQUENTLY_BOUGHT_TOGETHER_LIST = 'fbt';\n\n/**\n * Picks for you recommendation list\n */\nexport const PICKS_FOR_YOU_LIST = 'picks';\n\n/**\n * Category PageType Name\n */\nexport const CATEGORY_PAGE_NAME = 'category';\n\n/**\n * List PageType Name\n */\nexport const LIST_PAGE_NAME = 'list';\n\n/*\n * Cache key for module\n */\nexport const MODULE_CACHE_KEY: string = '__M';\n\n/**\n * Cache key for module config\n */\nexport const MODULE_CONFIG_KEY: string = '__MC';\n\n/**\n * Cache key for module disabled properties\n */\nexport const MSDYN365_WYSIWYG_DISABLED_PROPS = '__MDP';\n\n/**\n * Cache key for module disabled properties\n */\nexport const MSDYN365_WYSIWYG_CANADDMODULE = '__MCA';\n\n/**\n * Cache key for module config errors\n */\nexport const MODULE_CONFIG_ERRORS_KEY: string = '__MCE';\n\n/**\n * Cache key for module data\n */\nexport const MODULE_DATA_KEY: string = '__MD';\n\n/**\n * Cache key for module resources\n */\nexport const MODULE_RESOURCES_KEY: string = '__MR';\n\n/**\n * Cache key for module action\n */\nexport const MODULE_ACTION_KEY: string = '__MA';\n\n/**\n * Cache key for module deferred render\n */\nexport const MODULE_DEFERRED_KEY: string = '__MDR';\n\n/**\n * Cache key for module view cache\n */\nexport const MODULE_VIEW_CACHE_KEY = '__VIEWCACHEKEY__';\n\n/**\n * Cache key for module render to string result\n */\nexport const MODULE_RENDER_RESULT_CACHE_KEY = '__MODULE_RENDER_RESULT__';\n\n/**\n * Server Render Error Cache key type\n */\nexport const SERVER_RENDER_ERROR_CACHE_KEY = '__SERVER_RENDER_ERROR__';\n\n/**\n * Cache key for page render results\n */\nexport const PAGE_RENDER_RESULT_CACHE_KEY = '__PAGE_RENDER_RESULT__';\n\n/**\n * Cache key for page insights view extensions\n */\nexport const PAGE_INSIGHTS_VIEWS_KEY = '__VIEW_INSIGHTS__';\n\n/**\n * Cache key for page insights view extensions\n */\nexport const PAGE_INSIGHTS_COMPONENTS_KEY = '__COMPONENT_INSIGHTS__';\n\n/**\n * Cache key for page insights view extensions\n */\nexport const PAGE_INSIGHTS_ACTIONS_KEY = '__ACTION_INSIGHTS__';\n\n/**\n * Cache key for page insights retail api data\n */\nexport const PAGE_INSIGHTS_API_KEY = '__API_INSIGHTS__';\n\n/**\n * The Prefix for the module lazyload feature switch\n */\nexport const LAZYLOAD_SWITCH_PREFIX = 'lazyload_';\n\n/**\n * DEPRECATED Client Render Complete Event Name\n */\nexport const DEPRECATED_CLIENT_RENDER_COMPLETE_EVENT = '_msdyn365_client_render_complete';\n\n/**\n * Client Data Update Event Name\n */\nexport const CLIENT_DATA_UPDATE_EVENT = '_msdyn365_client_data_update';\n\n/**\n * Client Render Complete Event Name\n */\nexport const CLIENT_RENDER_START_EVENT = '_msdyn365_client_render_start';\n\n/**\n * Client Render Complete Event Name\n */\nexport const CLIENT_RENDER_COMPLETE_EVENT = '_msdyn365_client_render_complete';\n\n/**\n * Event that fires when Authoring module or fragment add operation completes rendering\n */\nexport const AUTHORING_ADD_RENDER_COMPLETE_EVENT = '_msdyn365_authoring_add_render_complete';\n\n/**\n * User Consent Given Event Name\n */\nexport const USER_CONSENT_GIVEN_EVENT = '_msdyn365_user_consent_given';\n\n/**\n * Field name of the module layout that authoring sends\n */\nexport const MODULE_LAYOUT_FIELD = 'msdyn365__moduleLayout';\n\n/**\n * Process type enum\n */\nexport const enum PROCESS_TYPE {\n server = 'server',\n client = 'client'\n}\n/**\n * The retail server base URL request header key.\n */\nexport const RETAIL_SERVER_BASE_URL_HEADER_KEY = `x-rs-base-url`;\n/**\n * Error message for when the provider get experiments function fails.\n */\nexport const PROVIDER_GET_EXPERIMENTS_FAIL = 'Provider get experiments call failed. Retail Server Base URL: \"{retailServerBaseUrl}\"';\n\n/**\n * Error message for when the retail server api call fail.\n */\nexport const GET_FEATURE_STATES_API_CALL_FAIL = 'The retail server getFeatureStatesAsync API call failed.';\n\n/**\n * Error message for when the internal get feature states data action fail.\n */\nexport const GET_FEATURE_STATES_INTERNAL_DATA_ACTION_FAIL = 'The internal get feature states data action failed.';\n\n/**\n * Error message for when the internal get feature states data action fail.\n */\nexport const ERROR_PROCESSING_APP_SETTINGS = 'Error processing application settings.';\n\n/**\n * Error message for missing required chunks\n */\nexport const ERROR_MISSING_REQUIRED_CHUNKS = `Failed to get required chunks for module '{moduleId}' of type '{moduleType}'. List of missing chunks: '{listOfMissingChunks}'`;\n\n/**\n * The feature states.\n */\nexport const FEATURE_STATE = {\n ON: 'ON',\n OFF: 'OFF'\n};\n\n/**\n * Application settings configs feature management properties.\n */\nexport const APP_SETTINGS_CONFIG_PROPS = {\n DISABLED_WITH_FEATURE_FLAGS: 'disabledWithFeatureFlags',\n HIDDEN_WITH_FEATURE_FLAGS: 'hiddenWithFeatureFlags',\n DISABLED: 'disabled',\n HIDDEN: 'hidden'\n};\n\n/**\n * Cache type name for module css chunks\n */\nexport const MODULE_CSS_CACHE_TYPENAME = '__ModuleCssChunks__';\n\n/**\n * Cache key name for module css chunks\n */\nexport const MODULE_CSS_CACHE_KEY = 'module-css-chunks';\n\n/**\n * Cache key name for module css chunks\n */\nexport const INLINE_MODULE_CSS_CACHE_KEY = 'inline-module-css-chunks';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICommerceApiSettings } from '@msdyn365-commerce/core-internal';\nimport { ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Generates a Image URL based on data return from retail server\n * @param imageUrl The image url returned by Retail Server\n * @param ctx The request context\n */\nexport const generateImageUrl = (imageUrl: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\n if (imageUrl) {\n // Images hosted in CMS include schema\n if (imageUrl.startsWith('http')) {\n return imageUrl;\n }\n\n // Images hosted in Retail Server must be encoded and joined with the base image url\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\n } else {\n // d365Commerce.telemetry.warning(`Unable to generate a proper Image URL for Product: ${product.RecordId}`);\n return undefined;\n }\n};\n\n/**\n * Generates a Image URL for a product based on data return from retail server\n * @param product The Product returned by Retail Server\n * @param ctx The request context\n */\nexport const getProductImageUrls = (\n products: SimpleProduct[] | ProductSearchResult[],\n apiSettings: ICommerceApiSettings\n): SimpleProduct[] | ProductSearchResult[] => {\n const productsWithImageUrls: SimpleProduct[] | ProductSearchResult[] = [];\n\n products &&\n products.forEach(product => {\n if (product && product.RecordId) {\n product.PrimaryImageUrl = generateImageUrl(product.PrimaryImageUrl, apiSettings);\n productsWithImageUrls.push(product);\n }\n });\n\n return productsWithImageUrls;\n};\n\n/**\n * Uses the order in which the product ids were returned from the reco call to order\n * the results from the product hydration call\n *\n * @param itemIdOrder The order of product ids to observe\n * @param unorderedProductSearchResults Unordered set of hydrated products\n */\nexport const orderProductSearchResults = (\n itemIdOrder: number[],\n unorderedProductSearchResults: ProductSearchResult[]\n): ProductSearchResult[] => {\n return itemIdOrder.reduce((result: ProductSearchResult[], itemId: number) => {\n const product = unorderedProductSearchResults.find(element => element.RecordId === itemId);\n if (product) {\n result.push(product);\n }\n return result;\n }, []);\n};\n","module.exports = React;","module.exports = ReactDOM;"],"names":["canonicalURL","requestContext","_urlParts","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","join","filteredURL","_urlParts2","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","_refinerValue$LeftVal","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","link","_linkParams$map","_urlParts4","linkBase","linkParams","endsWith","linkParam","map","param","includeConfigList","includeConfig","_includeConfigList$tr","RegExp","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","key","DataServiceQuery","DataServiceEntities","mFIGetBonusCouponsDetailsAsync","context","bonusCoupons","request","createDataServiceRequestForOperation","bypassCache","returnEntity","createMFIGetBonusCouponsDetailsInput","callActionOrExecute","callerContext","mFIGetBonusItemsDetailAsync","bonusItemParams","createMFIGetBonusItemsDetailInput","ApplePayConnectorLoaderInput","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","input","ctx","applepPayConnectorLoading","args","BedhubFooterInput","_ctx$requestContext","baseURL","bedhubBaseUrl","token","_Msdyn365$msdyn365Com","_Msdyn365$msdyn365Com2","_Msdyn365$msdyn365Com3","secretManager","getSecretValue","apiSettings","baseUrl","getAccessToken","error","console","graphqlURL","URL","href","query","response","axios","JSON","stringify","headers","Authorization","data","bedhubDataSource","Error","BedhubHeaderInput","BonusCouponDetailsInput","bonusCouponDetail","BonusItemProductInput","bonusItemProduct","billingCustomErrorInput","billingCustomErrorAction","billingHasCustomError","createObservableDataAction","inputData","BillingStateInput","BillingStateAction","isBillingFormValid","CheckoutDisabledButtonStateInput","disabled","CompleteYourBedPillowInput","pillow","_args$config","CompleteyourBedProtectorInput","protector","ExpressEditStateInput","shippingEdit","deliveryEdit","ExpressOrderSubmitStateActionInput","expressSubmit","slotTime","slotDate","selectedService","FetchChooseYourFoundationDatabaseInput","jsonSrc","FetchCompleteYourBedDataInput","jsonData","GetDeliveryFeeUpdateInput","deliveryAmount","GetMattressFoundationsToAddInput","log","text","GetSociDataInput","searchradius","searchLimit","zipCode","_input$searchLimit","_input$searchradius$t","_input$searchradius","getZipCode","geoLoc","test","toString","e","_args$config$maxNoOfF","_args$config2","lookupRadius","maxNoOfFranchise","MFITryInStoreExtensionClass","ZipCode","StoreId","Products","Limit","Radius","MFITryInStoreInfoResponseExtensionClass","Status","Inventory","createMFIGetTryInStoreInfoInput","tryInStoreProductIDs","storeId","tryInStoresQuery","GetTryInStoreInfoInput","result","mFIGetTryInStoreInfoAsync","GetUnbxdRecommendationsDataInput","pageType","widgetNumber","productID","catLevels","cartItemIDs","currentCategories","catLevel","categoryLevelName","unbxdUid","Cookies","get","toUpperCase","unbxdApiKey","unbxdSiteKey","unbxdUrl","catName","index","itemId","PaypalExpressEditStateInput","isDisabled","PaymentConnectorLoaderInput","paymentConnectorLoading","PaypalexpressTryagainTriggerInput","buttonClicked","orderSubmitClick","ProgressiveLeaselookupbycustomerInput","phoneNumber","ssn","tenderType","checkoutType","_input$phoneNumber","MobilePhoneNumber","Last4SSN","TenderType","TransactionType","_response$LeaseLookup","_response$LeaseLookup2","mFIGetLeaseLookupByCustomerAsync","LeaseLookupByCustomer","IsNoContent","LeaseLookup","ProgressiveAddressMismatchInput","misMatch","ProgressiveGetPaymentEstimateInput","invoiceAmount","state","_input$invoiceAmount","getLeaseObj","InvoiceAmount","Deposit","PaymentFrequency","State","mFIGetPaymentEstimatesAsync","PaymentEstimates","GetPricingInformationInput","leasePricingInformation","super","shouldCacheOutput","cacheObjectType","cacheKey","leasePricingInformationPayload","GetPricingInformationAction","_leasePricingInformat","mFIGetPricingInformationAsync","PricingInformation","IGetPricingInformationAction","ApplicationId","SubmitCartInformationInput","submitCartInformation","SubmitCartInformationAction","_cartInformation$Subm","mFISubmitCartInformationAsync","SubmitCartInformation","ISubmitCartInformationAction","MerchantTransactionId","SalesTax","CartTotal","Store","ProgressiveMerchantId","GetLeaseContractInput","leaseContract","leaseContractPayload","getLeaseContractAction","_leaseContractRespons","mFIGetLeaseContractAsync","LeaseContacts","IGetLeaseContractAction","ProgressiveSetLeaseLookupInfoInput","leaseLookupByCustomerInfo","ProgressiveSetPricingInfoInput","pricingInfo","CRTStatus","leaseId","approvalAmount","applyProgressive","contractESignUrl","cartId","SelectYourFoundationInput","foundation","ShowloadingContinuetodeliveryInput","customersApiLoadingCase","SocialIconsStateInput","socialIconStateAction","copyLinkClick","SrpBreadcrumbPageInput","breadcrumbCheck","TriggerSpecialSynchronyFinancingInput","triggerSpecialFinancing","UserDefinedPromocodeInput","userDefinedPromos","WmapAddressStateInput","preFilledAddress","isAddressUpdate","ZipCodeStateInput","ZipCodeStateAction","isStateValid","ZipCodeValidationInput","ZipcodeValidationAction","isZipcodeValid","AtpSlotsInformationStateInput","checkAvailable","buttonDisabled","isbackOrdered","willCall","isSynchorniCall","BonusCouponsInfoInput","bonusCoupon","getAllBonusCouponsDetails","couponsDetails","telemetry","warning","debug","BrightSpotContentInput","brightspotUrl","getBrightspotUrl","brightspotPageUrl","GetAddressByZipcodeInput","country","zipcode","_zipcode$trim","getAddressFromZipCodeAsync","queryResultSettings","Paging","Top","GetComfortTypesData","comfortTypesDataUrl","getComfortTypesDataUrl","jsonUrl","comfortTypesDataJsonUrl","res","GetFranchiseData","_Latitude","_Longitude","_Radius","Latitude","Longitude","getFranchiseInput","getFranchise","sociFranchiseDataUrl","franchiseDataJson","franchiseStores","franchise","miles","_calculateDistance","latitude1","longitude1","latitude2","longitude2","long1","Math","PI","long2","lat1","lat2","dlon","dlat","pow","sin","cos","asin","sqrt","lat","long","GetProductBenefitsEnhancedContentInput","masterProductID","jsonUrlFromGlobals","productBenefitsEnhancedContentUrl","masterProductid","GetProductBenefitsData","productBenefitsDataUrl","getProductBenefitsDataUrl","GetReasonsToBuyDataInput","categoryName","reasonsToBuyJsonUrl","orderTypes","GetSalesOrderWithHydrationsInput","orderType","orderId","buildCacheKey","getSalesOrderWithHydrationsAction","trace","salesOrder","arguments","getSalesOrderDetailsBySalesIdAsync","getSalesOrderDetailsByTransactionIdAsync","getSalesOrder","TransactionTypeValue","products","SalesLines","productIds","salesLine","ProductId","productId","channelId","productInputs","ProductInput","getSimpleProducts","getProducts","ChannelId","deliveryOptions","getDeliveryOptionsAsync","x","RecordId","then","catch","message","exception","getSalesOrderWithHydrationsActionDataAction","salesId","transactionId","transaction","GetSeoDataInput","seoDataUrl","getSeoDataUrl","filteredUrlPath","seoData","GetSleepDisruptorIcons","sleepDisuptorIconsDataUrl","getSleepDisuptorIconsDataUrl","sleepDisruptorIconDataUrl","MFIbonusitemsInput","MfrmNotificationInput","PaymentCcCardTypesInput","cardType","getProductsByCategoryList","categoryId","listMetadata","categoryIds","CATEGORY_PAGE_NAME","categories","productSearchCriteria","Context","CatalogId","catalogId","CategoryIds","IncludeAttributes","searchByCriteriaAsync","pageSize","getProductImageUrls","getProductsByCategoryListAction","GetProductsByIdInput","productIdsArr","ctxObject","bypass","getByIdsAsync","ProgressiveLeasingModalStateInput","isOpen","PromoCodeAppliedOnCartInput","updatePromoCodeAppliedOnCartProgressAction","isInProcess","RedirectToWmapSubmitPaymentInput","redirectToWmapSubmitPayment","buildQueryResultSettings","Skip","_unused","createSearchOrgUnitLocationsInputFunc","createSearchOrgUnitLocationsInput","retailActionDataAction","retailAction","UpdateEmailCartInput","updateEmailCartAction","checkEmail","WmapGetOrderDetailsInput","orderDetailsAPIurl","getOrderDetailsAPIurl","getOrderId","_ctx$requestContext$a","_ctx$requestContext$u","apiResponseUrl","orderDetailsApiUrl","salesOrderId","orderIdOun","oun","makeaPaymentLink","wmapPageUrlSuffix","pathName","SalesId","WmapSubmitPaymentInput","submitPaymentAPIurl","submitPaymentPayload","WmapSubmitPaymentAction","requestOptions","user","GetUnbxdSearchAutoSuggestDataInput","queryText","popularProducts","inFields","topQueries","keywordSuggestions","promotedSuggestion","popularProductsCount","inFieldsCount","topQueriesCount","keywordSuggestionsCount","promotedSuggestionCount","MFRMCategoryPageSummaryInput","_this$requestContext","buildCacheKeyWithUrlTokens","_getSEOMetaTagValue","currentCategory","keyValue","_currentCategory$Exte","find","attr","Key","Value","StringValue","getFallbackTitle","activeRefinerList","searchCriteria","SearchCondition","getProductSearchRefinersAsync","productRefiners","productRefiner","err","getAllRefinersAction","refiners","_activeRefinerList","_activeRefinerList2","_getActiveRefiners","CategoryHierarchy","configVirtualRefinerNames","filteredRefiners","refiner","KeyName","slugArray","pathArray","slug","Slug","sortedConfigValues","_path","removedCategorySlug","refinerParts","_slug","refinerPart","finalRefinerParts","item","includes","flatten","sortedValues","refinerSet","_refiner$LeftValueBou","_refiner$LeftValueBou2","toLocaleLowerCase","sortedValue","Object","keys","finalRefiners","sortedConfigValue","sortedRefinerName","concateTitle","seoInput","getSEOData","seoPageTitle","seoPageMetaData","getCurrentCategory","CurrentCategoryInput","createGetCurrentCategoryInput","categoryUrl","fallbackTitle","pageTitle","pageTitleParser","getHtmlParserValue","fallBackMeta","categoryPageMetaData","categoryPageMetaDataParser","localName","getFriendlyName","locale","NameTranslations","neutralizedName","NeutralizedName","getCategoryUrl","canonicalDomain","skipCount","skip","Url","urlParams","URLSearchParams","search","set","removeDomainQspFromUrl","title","description","sharingImageUrl","OfflineImage","canonicalUrl","faviconUrl","sharingImage","src","GetUnbxdCollectionCompareDataInput","configs","Msdyn365All","variantIdNumber","actionInput","collectionJson","fetchChooseYourFoundationDatabaseDataAction","collectionDescription","collectionData","variantIds","Number","isNaN","getDefaultVariantId","getSelectedProductIdFromActionInput","_collectionJson$find","_collectionJson$find2","_variantIds","_variantIds2","_variantIds3","_response","mattressVariantReqId","mattressComparisonReqIdList","value","unshift","collectionCompareIds","_variantIds4","variantId","queryBasedVariantSelection","getQueryParamsFromQueryByName","isBrowser","window","location","variantQueryStringName","binding","modules","dataActions","registerActionId","actionPath","default","prototype","exportName","Action","require","__bindings__","_objectSpread","packageDataActions","LAYOUT_MOUNT_POINT","CACHE_SETTING","parseInt","CLIENT_ENTRY_POINTS_TYPE","PDP_PAGE_NAME","FREQUENTLY_BOUGHT_TOGETHER_LIST","PICKS_FOR_YOU_LIST","MODULE_CACHE_KEY","MODULE_CONFIG_KEY","MSDYN365_WYSIWYG_DISABLED_PROPS","MSDYN365_WYSIWYG_CANADDMODULE","MODULE_CONFIG_ERRORS_KEY","MODULE_DATA_KEY","MODULE_RESOURCES_KEY","MODULE_ACTION_KEY","MODULE_DEFERRED_KEY","SERVER_RENDER_ERROR_CACHE_KEY","PAGE_INSIGHTS_VIEWS_KEY","PAGE_INSIGHTS_COMPONENTS_KEY","PAGE_INSIGHTS_ACTIONS_KEY","LAZYLOAD_SWITCH_PREFIX","DEPRECATED_CLIENT_RENDER_COMPLETE_EVENT","CLIENT_DATA_UPDATE_EVENT","CLIENT_RENDER_START_EVENT","CLIENT_RENDER_COMPLETE_EVENT","AUTHORING_ADD_RENDER_COMPLETE_EVENT","USER_CONSENT_GIVEN_EVENT","MODULE_LAYOUT_FIELD","productsWithImageUrls","product","generateImageUrl","imageUrl","startsWith","baseImageUrl","encodeURIComponent","orderProductSearchResults","itemIdOrder","unorderedProductSearchResults","reduce","element","module","exports","React","ReactDOM"],"sourceRoot":""}