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OC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaE,mBAAqB,GACzCH,OAAOC,aAAaE,mBAA8B,UAACD,EAAA,GAC5Cf,EAAQE,iCCnEvBe,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/DataServiceEntities.g.ts?6c17","webpack://Msdyn365.Commerce.Online/./src/actions/DataActionExtension.g.ts?ff78","webpack://Msdyn365.Commerce.Online/./src/actions/get-allowed-days.action.ts?21f1","webpack://Msdyn365.Commerce.Online/./src/actions/get-variant-price.action.ts?880e","webpack://Msdyn365.Commerce.Online/./src/actions/override-cart-lines.action.ts?18ed","webpack://Msdyn365.Commerce.Online/./lib/__local__/module-registration.js?8a42","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["// @ts-ignore -- Unused import\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// @ts-ignore -- Unused import\r\nimport { jsonLightReadStringPropertyValue } from '@msdyn365-commerce/retail-proxy/dist/externals';\r\n\r\n/**\r\n * PromiseDateEntity entity interface.\r\n */\r\nexport interface IPromiseDateEntity {\r\n ZipCodeId?: string;\r\n Sunday: number;\r\n Monday: number;\r\n Tuesday: number;\r\n Wednesday: number;\r\n Thursday: number;\r\n Friday: number;\r\n Saturday: number;\r\n RouteMaxWeight: number;\r\n Route?: string;\r\n RECID: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * ExampleEntity entity interface.\r\n */\r\nexport interface IExampleEntity {\r\n IntData: number;\r\n StringData?: string;\r\n UnusualEntityId: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * CartLineProductEntity entity interface.\r\n */\r\nexport interface ICartLineProductEntity {\r\n CartLineId?: string;\r\n ItemId?: string;\r\n ProductId: number;\r\n Price: number;\r\n Quantity: number;\r\n CWTPrice?: string;\r\n CMAPriceUOM?: string;\r\n ConversionMatrix?: string;\r\n TotalWeight?: string;\r\n}\r\n\r\n/**\r\n * CartDetailEntity entity interface.\r\n */\r\nexport interface ICartDetailEntity {\r\n TotalWeight: number;\r\n}\r\n\r\n/**\r\n * CartLineEntity entity interface.\r\n */\r\nexport interface ICartLineEntity {\r\n VariantId?: string;\r\n ItemId?: string;\r\n Quantity: number;\r\n LogLines?: string[];\r\n}\r\n\r\n/**\r\n * OrgAccountEntity entity interface.\r\n */\r\nexport interface IOrgAccountEntity {\r\n CustomerAccountNumber?: string;\r\n OrgAccountNumber?: string;\r\n}\r\n\r\n/**\r\n * CalculateCartPriceResponse entity interface.\r\n */\r\nexport interface ICalculateCartPriceResponse {\r\n CartLines?: ICartLineEntity[];\r\n}\r\n\r\n/**\r\n * PromiseDateEntity entity class.\r\n */\r\nexport class PromiseDateEntityExtensionClass implements IPromiseDateEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ZipCodeId: 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 Sunday: 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 Monday: 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 Tuesday: 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 Wednesday: 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 Thursday: 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 Friday: 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 Saturday: 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 RouteMaxWeight: 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 Route: 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 RECID: 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.ZipCodeId = odataObject.ZipCodeId;\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.Sunday = odataObject.Sunday;\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.Monday = odataObject.Monday;\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.Tuesday = odataObject.Tuesday;\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.Wednesday = odataObject.Wednesday;\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.Thursday = odataObject.Thursday;\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.Friday = odataObject.Friday;\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.Saturday = odataObject.Saturday;\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.RouteMaxWeight = odataObject.RouteMaxWeight ? parseFloat(odataObject.RouteMaxWeight) : 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.Route = odataObject.Route;\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.RECID = odataObject.RECID ? parseInt(odataObject.RECID, 10) : 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.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var 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 * ExampleEntity entity class.\r\n */\r\nexport class ExampleEntityExtensionClass implements IExampleEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IntData: 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 StringData: 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 UnusualEntityId: 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.IntData = odataObject.IntData;\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.StringData = odataObject.StringData;\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.UnusualEntityId = odataObject.UnusualEntityId ? parseInt(odataObject.UnusualEntityId, 10) : 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.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var 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 * CartLineProductEntity entity class.\r\n */\r\nexport class CartLineProductEntityExtensionClass implements ICartLineProductEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CartLineId: 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 ItemId: 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 ProductId: 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 Price: 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 Quantity: 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 CWTPrice: 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 CMAPriceUOM: 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 ConversionMatrix: 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 TotalWeight: 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.CartLineId = odataObject.CartLineId;\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.ItemId = odataObject.ItemId;\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.ProductId = odataObject.ProductId ? parseInt(odataObject.ProductId, 10) : 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.Price = odataObject.Price ? parseFloat(odataObject.Price) : 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.Quantity = odataObject.Quantity ? parseFloat(odataObject.Quantity) : 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.CWTPrice = odataObject.CWTPrice;\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.CMAPriceUOM = odataObject.CMAPriceUOM;\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.ConversionMatrix = odataObject.ConversionMatrix;\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.TotalWeight = odataObject.TotalWeight;\r\n }\r\n}\r\n\r\n/**\r\n * CartDetailEntity entity class.\r\n */\r\nexport class CartDetailEntityExtensionClass implements ICartDetailEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TotalWeight: 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.TotalWeight = odataObject.TotalWeight ? parseFloat(odataObject.TotalWeight) : 0;\r\n }\r\n}\r\n\r\n/**\r\n * CartLineEntity entity class.\r\n */\r\nexport class CartLineEntityExtensionClass implements ICartLineEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public VariantId: 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 ItemId: 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 Quantity: 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 LogLines: 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.VariantId = odataObject.VariantId;\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.ItemId = odataObject.ItemId;\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.Quantity = odataObject.Quantity ? parseFloat(odataObject.Quantity) : 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.LogLines = undefined;\r\n if (odataObject.LogLines) {\r\n this.LogLines = [];\r\n for (var i = 0; i < odataObject.LogLines.length; i++) {\r\n if (odataObject.LogLines[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.LogLines[i] = odataObject.LogLines[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.LogLines[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * OrgAccountEntity entity class.\r\n */\r\nexport class OrgAccountEntityExtensionClass implements IOrgAccountEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerAccountNumber: 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 OrgAccountNumber: 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.CustomerAccountNumber = odataObject.CustomerAccountNumber;\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.OrgAccountNumber = odataObject.OrgAccountNumber;\r\n }\r\n}\r\n\r\n/**\r\n * CalculateCartPriceResponse entity class.\r\n */\r\nexport class CalculateCartPriceResponseExtensionClass implements ICalculateCartPriceResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CartLines: ICartLineEntity[];\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.CartLines = undefined;\r\n if (odataObject.CartLines) {\r\n this.CartLines = [];\r\n for (var i = 0; i < odataObject.CartLines.length; i++) {\r\n if (odataObject.CartLines[i]) {\r\n if (odataObject.CartLines[i]['@odata.type']) {\r\n var className: string = odataObject.CartLines[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.CartLines[i] = new EntityClasses[className](odataObject.CartLines[i]);\r\n }\r\n } else {\r\n this.CartLines[i] = new CartLineEntityExtensionClass(odataObject.CartLines[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.CartLines[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\nimport {\r\n AsyncResult,\r\n callActionOrExecute,\r\n DataServiceQuery,\r\n IContext,\r\n IDataServiceRequest,\r\n IQueryResultSettings,\r\n // @ts-ignore -- Unused import\r\n NullResult\r\n} from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore -- Unused import\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n// @ts-ignore -- Unused import\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport * as DataServiceEntities from './DataServiceEntities.g';\r\n\r\nfunction getLineDetailsQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function getLineDetailsInput(customer: string, cartLineProduct: DataServiceEntities.ICartLineProductEntity): IDataServiceRequest {\r\n const query = getLineDetailsQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetLineDetails',\r\n true,\r\n DataServiceEntities.CartLineProductEntityExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ICartLineProductEntity' },\r\n {\r\n customer: customer,\r\n cartLineProduct: cartLineProduct\r\n }\r\n );\r\n}\r\n\r\nexport function getLineDetailsAsync(\r\n context: IContext,\r\n customer: string,\r\n cartLineProduct: DataServiceEntities.ICartLineProductEntity\r\n): AsyncResult {\r\n const request = getLineDetailsInput(customer, cartLineProduct);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getCartWeightQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function getCartWeightInput(customer: string, cartLineProducts: DataServiceEntities.ICartLineProductEntity[]): IDataServiceRequest {\r\n const query = getCartWeightQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetCartWeight',\r\n true,\r\n DataServiceEntities.CartDetailEntityExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ICartDetailEntity' },\r\n {\r\n customer: customer,\r\n cartLineProducts: cartLineProducts\r\n }\r\n );\r\n}\r\n\r\nexport function getCartWeightAsync(\r\n context: IContext,\r\n customer: string,\r\n cartLineProducts: DataServiceEntities.ICartLineProductEntity[]\r\n): AsyncResult {\r\n const request = getCartWeightInput(customer, cartLineProducts);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getVariantPriceQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function getVariantPriceInput(customer: string, cartLines: DataServiceEntities.ICartLineEntity[]): IDataServiceRequest {\r\n const query = getVariantPriceQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetVariantPrice',\r\n true,\r\n DataServiceEntities.CalculateCartPriceResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ICalculateCartPriceResponse' },\r\n {\r\n customer: customer,\r\n cartLines: cartLines\r\n }\r\n );\r\n}\r\n\r\nexport function getVariantPriceAsync(\r\n context: IContext,\r\n customer: string,\r\n cartLines: DataServiceEntities.ICartLineEntity[]\r\n): AsyncResult {\r\n const request = getVariantPriceInput(customer, cartLines);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction simplePingPostQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function simplePingPostInput(): IDataServiceRequest {\r\n const query = simplePingPostQuery();\r\n return query.createDataServiceRequestForOperation('SimplePingPost', true, '', 'false', { bypassCache: 'get', returnEntity: '' }, {});\r\n}\r\n\r\nexport function simplePingPostAsync(context: IContext): AsyncResult {\r\n const request = simplePingPostInput();\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getCachedDataQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function getCachedDataInput(searchCriteria: Entities.ProductSearchCriteria): IDataServiceRequest {\r\n const query = getCachedDataQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetCachedData',\r\n true,\r\n '',\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n {\r\n searchCriteria: searchCriteria\r\n }\r\n );\r\n}\r\n\r\nexport function getCachedDataAsync(context: IContext, searchCriteria: Entities.ProductSearchCriteria): AsyncResult {\r\n const request = getCachedDataInput(searchCriteria);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getOrganizationAccountQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function getOrganizationAccountInput(customerAccount: string): IDataServiceRequest {\r\n const query = getOrganizationAccountQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetOrganizationAccount',\r\n true,\r\n DataServiceEntities.OrgAccountEntityExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IOrgAccountEntity' },\r\n {\r\n customerAccount: customerAccount\r\n }\r\n );\r\n}\r\n\r\nexport function getOrganizationAccountAsync(\r\n context: IContext,\r\n customerAccount: string\r\n): AsyncResult {\r\n const request = getOrganizationAccountInput(customerAccount);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction simplePingGetQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\nexport function simplePingGetInput(): IDataServiceRequest {\r\n const query = simplePingGetQuery();\r\n return query.createDataServiceRequestForOperation('SimplePingGet', false, '', 'false', { bypassCache: 'get', returnEntity: '' }, {});\r\n}\r\n\r\nexport function simplePingGetAsync(context: IContext): AsyncResult {\r\n const request = simplePingGetInput();\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction allowedDaysByZipControllerQuery(rECID?: number): DataServiceQuery {\r\n const key = rECID ? { RECID: rECID } : null;\r\n return new DataServiceQuery(\r\n 'AllowedDaysByZipController',\r\n 'PromiseDateEntity',\r\n DataServiceEntities.PromiseDateEntityExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createGetAllowedDatesInput(zipCode: string, route: string): IDataServiceRequest {\r\n const query = allowedDaysByZipControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetAllowedDates',\r\n false,\r\n DataServiceEntities.PromiseDateEntityExtensionClass,\r\n 'false',\r\n { bypassCache: 'none', returnEntity: 'DataServiceEntities.IPromiseDateEntity' },\r\n { zipCode: zipCode, route: route }\r\n );\r\n}\r\n\r\nexport function getAllowedDatesAsync(\r\n context: IContext,\r\n zipCode: string,\r\n route: string\r\n): AsyncResult {\r\n const request = createGetAllowedDatesInput(zipCode, route);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createGetAllAllowedDatesInput(\r\n queryResultSettings: IQueryResultSettings,\r\n zipCode: string,\r\n route: string\r\n): IDataServiceRequest {\r\n const query = allowedDaysByZipControllerQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetAllAllowedDates',\r\n false,\r\n DataServiceEntities.PromiseDateEntityExtensionClass,\r\n 'true',\r\n { bypassCache: 'none', returnEntity: 'DataServiceEntities.IPromiseDateEntity' },\r\n { zipCode: zipCode, route: route }\r\n );\r\n}\r\n\r\nexport function getAllAllowedDatesAsync(\r\n context: IContext,\r\n zipCode: string,\r\n route: string\r\n): AsyncResult {\r\n const request = createGetAllAllowedDatesInput(context.queryResultSettings || {}, zipCode, route);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createCheckTableExistsInput(schemaName: string, tableName: string): IDataServiceRequest {\r\n const query = allowedDaysByZipControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'CheckTableExists',\r\n false,\r\n '',\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n { schemaName: schemaName, tableName: tableName }\r\n );\r\n}\r\n\r\nexport function checkTableExistsAsync(context: IContext, schemaName: string, tableName: string): AsyncResult {\r\n const request = createCheckTableExistsInput(schemaName, tableName);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction boundControllerQuery(unusualEntityId?: number): DataServiceQuery {\r\n const key = unusualEntityId ? { UnusualEntityId: unusualEntityId } : null;\r\n return new DataServiceQuery('BoundController', 'ExampleEntity', DataServiceEntities.ExampleEntityExtensionClass, key);\r\n}\r\n\r\nexport function createCreateExampleEntityInput(entityData: DataServiceEntities.IExampleEntity): IDataServiceRequest {\r\n const query = boundControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'CreateExampleEntity',\r\n true,\r\n '',\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n { entityData: entityData }\r\n );\r\n}\r\n\r\nexport function createExampleEntityAsync(context: IContext, entityData: DataServiceEntities.IExampleEntity): AsyncResult {\r\n const request = createCreateExampleEntityInput(entityData);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createUpdateExampleEntityInput(\r\n unusualEntityId: number,\r\n updatedEntity: DataServiceEntities.IExampleEntity\r\n): IDataServiceRequest {\r\n const query = boundControllerQuery(unusualEntityId);\r\n return query.createDataServiceRequestForOperation(\r\n 'UpdateExampleEntity',\r\n true,\r\n '',\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n { updatedEntity: updatedEntity }\r\n );\r\n}\r\n\r\nexport function updateExampleEntityAsync(\r\n context: IContext,\r\n unusualEntityId: number,\r\n updatedEntity: DataServiceEntities.IExampleEntity\r\n): AsyncResult {\r\n const request = createUpdateExampleEntityInput(unusualEntityId, updatedEntity);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createDeleteExampleEntityInput(unusualEntityId: number): IDataServiceRequest {\r\n const query = boundControllerQuery(unusualEntityId);\r\n return query.createDataServiceRequestForOperation(\r\n 'DeleteExampleEntity',\r\n true,\r\n '',\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n {}\r\n );\r\n}\r\n\r\nexport function deleteExampleEntityAsync(context: IContext, unusualEntityId: number): AsyncResult {\r\n const request = createDeleteExampleEntityInput(unusualEntityId);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createGetAllExampleEntitiesInput(queryResultSettings: IQueryResultSettings): IDataServiceRequest {\r\n const query = boundControllerQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetAllExampleEntities',\r\n false,\r\n DataServiceEntities.ExampleEntityExtensionClass,\r\n 'true',\r\n { bypassCache: 'none', returnEntity: 'DataServiceEntities.IExampleEntity' },\r\n {}\r\n );\r\n}\r\n\r\nexport function getAllExampleEntitiesAsync(context: IContext): AsyncResult {\r\n const request = createGetAllExampleEntitiesInput(context.queryResultSettings || {});\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\nimport { generateCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ICommerceApiSettings } from '@msdyn365-commerce/core';\r\nimport { IPromiseDateEntity } from './DataServiceEntities.g';\r\nimport { getAllowedDatesAsync } from './DataActionExtension.g';\r\n\r\n/**\r\n * GetAllowedDays Input Action\r\n */\r\nexport class GetAllowedDaysInput implements Msdyn365.IActionInput {\r\n public zipCode: string;\r\n public route: string;\r\n private readonly apiSettings: ICommerceApiSettings;\r\n public constructor(zipCode: string, route: string, apiSettings: ICommerceApiSettings) {\r\n this.zipCode = zipCode;\r\n this.route = route;\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () =>\r\n generateCacheKey(this.apiSettings, { key: 'ZipCode', value: this.zipCode }, { key: 'Route', value: this.route });\r\n public getCacheObjectType = () => 'IPromiseDateEntity';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetAllowedDaysData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst DateofDeliveryInput = (args: Msdyn365.ICreateActionContext<{ zipCode: string; route: string }>): Msdyn365.IActionInput => {\r\n return new GetAllowedDaysInput(args.config?.zipCode || '', args.config?.route || '', args.requestContext.apiSettings);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getAllowedDays(input: GetAllowedDaysInput, ctx: Msdyn365.IActionContext): Promise {\r\n const response = await getAllowedDatesAsync({ callerContext: ctx }, input.zipCode, input.route);\r\n return Promise.resolve(response);\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getAllowedDays,\r\n // TODO: Give your data action a unique id\r\n id: 'GetAllowedDays',\r\n input: DateofDeliveryInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { generateCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ICommerceApiSettings } from '@msdyn365-commerce/core';\r\nimport { getVariantPriceAsync } from './DataActionExtension.g';\r\nimport { ICartLineEntity } from './DataServiceEntities.g';\r\n\r\n/**\r\n * GetVariantPrice Input Action\r\n */\r\nexport class GetVariantPriceInput implements Msdyn365.IActionInput {\r\n public customer: string;\r\n public cartLines: ICartLineEntity[];\r\n private readonly apiSettings: ICommerceApiSettings;\r\n // TODO: Construct the input needed to run the action\r\n public constructor(customer: string, cartLines: ICartLineEntity[], apiSettings: ICommerceApiSettings) {\r\n this.customer = customer;\r\n this.cartLines = cartLines;\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => generateCacheKey(this.apiSettings, { key: 'customer', value: this.customer });\r\n public getCacheObjectType = () => 'TODO';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetVariantPriceData {\r\n cartLines: ICartLineEntity[];\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createVariantPriceInput = (\r\n args: Msdyn365.ICreateActionContext<{ customer: string; cartLines: ICartLineEntity[] }>\r\n): Msdyn365.IActionInput => {\r\n return new GetVariantPriceInput(args.config?.customer || '', args.config?.cartLines || [], args.requestContext.apiSettings);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getVariantPrice(input: GetVariantPriceInput, ctx: Msdyn365.IActionContext): Promise {\r\n const response = await getVariantPriceAsync({ callerContext: ctx }, input.customer, input.cartLines);\r\n return { cartLines: response.CartLines! };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getVariantPrice,\r\n // TODO: Give your data action a unique id\r\n id: 'GetVariantPrice',\r\n input: createVariantPriceInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { Cart, ReasonCodeLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { overrideCartLineChargeAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\n/**\r\n * OverrideCartLines Input Action\r\n */\r\nexport class OverrideCartLinesInput implements Msdyn365.IActionInput {\r\n public cartId: string;\r\n public cartLineId: string;\r\n public chargeLineId?: string;\r\n public amount: number;\r\n public reasonCodeLines?: ReasonCodeLine[] | null | undefined;\r\n\r\n constructor(cartId: string, cartLineId: string, amount: number, chargeLineId?: string, reasonCodeLines?: ReasonCodeLine[]) {\r\n this.cartId = cartId;\r\n this.cartLineId = cartLineId;\r\n this.amount = amount;\r\n this.chargeLineId = chargeLineId;\r\n this.reasonCodeLines = reasonCodeLines;\r\n }\r\n\r\n public getCacheKey = () => `TODO`;\r\n public getCacheObjectType = () => 'TODO';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (\r\n args: Msdyn365.ICreateActionContext<{\r\n cartId: string;\r\n cartLineId: string;\r\n chargeLineId: string;\r\n amount: number;\r\n reasonCodeLines?: ReasonCodeLine[];\r\n }>\r\n): Msdyn365.IActionInput => {\r\n return new OverrideCartLinesInput(\r\n args.config?.cartId || '',\r\n args.config?.cartLineId || '',\r\n args.config?.amount || 0,\r\n args.config?.chargeLineId || '',\r\n args.config?.reasonCodeLines || []\r\n );\r\n};\r\n\r\nasync function overrideCartLineAsync(input: OverrideCartLinesInput, ctx: Msdyn365.IActionContext): Promise {\r\n const response = await overrideCartLineChargeAsync(\r\n { callerContext: ctx },\r\n input.cartId,\r\n input.cartLineId,\r\n input.chargeLineId || '',\r\n input.amount,\r\n input.reasonCodeLines\r\n );\r\n return response;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >overrideCartLineAsync,\r\n id: 'OverrideCartLines',\r\n input: createInput\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/get-allowed-days.action';\n binding.dataActions[actionPath] = require('partner/actions/get-allowed-days.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-variant-price.action';\n binding.dataActions[actionPath] = require('partner/actions/get-variant-price.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/override-cart-lines.action';\n binding.dataActions[actionPath] = require('partner/actions/override-cart-lines.action');\n registerActionId(actionPath);\n }\n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.packageDataActions = {};\n window.__bindings__.packageDataActions['__local__'] = {\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["PromiseDateEntityExtensionClass","constructor","odataObject","this","ZipCodeId","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","RouteMaxWeight","parseFloat","Route","RECID","parseInt","ExtensionProperties","undefined","i","length","className","substr","lastIndexOf","concat","EntityClasses","CartLineProductEntityExtensionClass","CartLineId","ItemId","ProductId","Price","Quantity","CWTPrice","CMAPriceUOM","ConversionMatrix","TotalWeight","CartDetailEntityExtensionClass","CartLineEntityExtensionClass","VariantId","LogLines","OrgAccountEntityExtensionClass","CustomerAccountNumber","OrgAccountNumber","CalculateCartPriceResponseExtensionClass","CartLines","getLineDetailsInput","customer","cartLineProduct","DataServiceQuery","createDataServiceRequestForOperation","DataServiceEntities","bypassCache","returnEntity","getLineDetailsAsync","context","request","callActionOrExecute","callerContext","getCartWeightInput","cartLineProducts","getCartWeightAsync","getVariantPriceInput","cartLines","getVariantPriceAsync","getOrganizationAccountInput","customerAccount","getOrganizationAccountAsync","allowedDaysByZipControllerQuery","rECID","key","getAllowedDatesAsync","zipCode","route","createGetAllowedDatesInput","GetAllowedDaysInput","apiSettings","getCacheKey","generateCacheKey","value","getCacheObjectType","dataCacheType","Msdyn365","action","async","input","ctx","response","Promise","resolve","id","args","_args$config","_args$config2","config","requestContext","GetVariantPriceInput","OverrideCartLinesInput","cartId","cartLineId","amount","chargeLineId","reasonCodeLines","overrideCartLineChargeAsync","_args$config3","_args$config4","_args$config5","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","forEach","exportName","Action","require","window","__bindings__","_objectSpread","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}