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E,mBAA8B,UAACD,EAAA,GAC5Cd,EAAQE,iCCrFvBc,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/ContactActions/DataServiceEntities.g.ts?c7c8","webpack://Msdyn365.Commerce.Online/./src/actions/ContactActions/DataActionExtension.g.ts?25e5","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/add-order-template-to-cart-override.action.ts?2f05","webpack://Msdyn365.Commerce.Online/./src/actions/create-order-template-override.action.ts?711a","webpack://Msdyn365.Commerce.Online/./src/actions/get-availabilities-cartlines-override.action.ts?0841","webpack://Msdyn365.Commerce.Online/./src/actions/get-customer-contacts.action.ts?1dc0","webpack://Msdyn365.Commerce.Online/./src/actions/get-order-templates-preview-override.action.ts?2a32","webpack://Msdyn365.Commerce.Online/./src/actions/get-product-availabilities-for-selected-variant-override.action.ts?4f06","webpack://Msdyn365.Commerce.Online/./src/utilities/get-cart-from-cache.ts?7335","webpack://Msdyn365.Commerce.Online/./src/utilities/get-catalog-id-from-context.ts?89bf","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":["\r\n // @ts-ignore -- Unused import\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n // @ts-ignore -- Unused import\r\n import { jsonLightReadStringPropertyValue } from '@msdyn365-commerce/retail-proxy/dist/externals';\r\n\r\n \r\n /**\r\n * PCTProductCatalog entity interface.\r\n */\r\n export interface IPCTProductCatalog {\r\n RecordId: number;\r\n ChannelId: number;\r\n Name?: string;\r\n Description?: string;\r\n Language?: string;\r\n Images?: Entities.MediaLocation[];\r\n DefaultImage?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n \r\n /**\r\n * ContactEntity entity interface.\r\n */\r\n export interface IContactEntity {\r\n ContactPersonId?: string;\r\n PersonId?: string;\r\n BusinessPartnerId?: string;\r\n FirstName?: string;\r\n LastName?: string;\r\n Email?: string;\r\n SpendingLimit: number;\r\n IsAdmin: number;\r\n AccountNumber?: string;\r\n B2BUserId?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n \r\n /**\r\n * EligibleCustomerEntity entity interface.\r\n */\r\n export interface IEligibleCustomerEntity {\r\n Name?: string;\r\n AccountNumber?: string;\r\n ContactPersonID?: string;\r\n IsSelected: boolean;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n \r\n /**\r\n * UserInfoEntity entity interface.\r\n */\r\n export interface IUserInfoEntity {\r\n BusinessPartnerId?: string;\r\n B2BUserId?: string;\r\n IsB2BAdmin: number;\r\n ContactPersonID?: string;\r\n FirstName?: string;\r\n LastName?: string;\r\n AccountNumber?: string;\r\n Email?: string;\r\n Phone?: string;\r\n VatNumber?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n \r\n /**\r\n * CreateContactResponse entity interface.\r\n */\r\n export interface ICreateContactResponse {\r\n Success?: boolean;\r\n }\r\n \r\n /**\r\n * UpdateContactResponse entity interface.\r\n */\r\n export interface IUpdateContactResponse {\r\n Success?: boolean;\r\n }\r\n \r\n /**\r\n * RemoveContactResponse entity interface.\r\n */\r\n export interface IRemoveContactResponse {\r\n Success?: boolean;\r\n }\r\n \r\n /**\r\n * SaveSessionCustomerResponse entity interface.\r\n */\r\n export interface ISaveSessionCustomerResponse {\r\n Message?: string;\r\n }\r\n \r\n /**\r\n * GetEligibleCustomersTotalResponse entity interface.\r\n */\r\n export interface IGetEligibleCustomersTotalResponse {\r\n Total?: number;\r\n ChargeOverriden?: boolean;\r\n }\r\n \r\n /**\r\n * GetUserInfoResponse entity interface.\r\n */\r\n export interface IGetUserInfoResponse {\r\n UserInfo?: IUserInfoEntity;\r\n }\r\n \r\n /**\r\n * PCTProductCatalog entity class.\r\n */\r\n export class PCTProductCatalogExtensionClass implements IPCTProductCatalog {\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 RecordId: 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 ChannelId: 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 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 Description: 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 Language: 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 Images: Entities.MediaLocation[];\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 DefaultImage: 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 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.RecordId = (odataObject.RecordId) ? parseInt(odataObject.RecordId, 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.ChannelId = (odataObject.ChannelId) ? parseInt(odataObject.ChannelId, 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.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.Description = odataObject.Description;\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.Language = odataObject.Language;\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.Images = undefined;\r\n if (odataObject.Images) {\r\n this.Images = [];\r\n for (var i = 0; i < odataObject.Images.length; i++) {\r\n if (odataObject.Images[i]) {\r\n if (odataObject.Images[i]['@odata.type']) {\r\n var className: string = odataObject.Images[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.Images[i] = new EntityClasses[className](odataObject.Images[i])\r\n }\r\n } else {\r\n this.Images[i] = new EntityClasses.MediaLocationClass(odataObject.Images[i]);\r\n }\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.Images[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.DefaultImage = odataObject.DefaultImage;\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 \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 * ContactEntity entity class.\r\n */\r\n export class ContactEntityExtensionClass implements IContactEntity {\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 ContactPersonId: 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 PersonId: 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 BusinessPartnerId: 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 FirstName: 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 LastName: 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 Email: 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 SpendingLimit: 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 IsAdmin: 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 AccountNumber: 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 B2BUserId: 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 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.ContactPersonId = odataObject.ContactPersonId;\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.PersonId = odataObject.PersonId;\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.BusinessPartnerId = odataObject.BusinessPartnerId;\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.FirstName = odataObject.FirstName;\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.LastName = odataObject.LastName;\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.Email = odataObject.Email;\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.SpendingLimit = (odataObject.SpendingLimit) ? parseFloat(odataObject.SpendingLimit) : 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.IsAdmin = odataObject.IsAdmin;\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.AccountNumber = odataObject.AccountNumber;\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.B2BUserId = odataObject.B2BUserId;\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 \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 * EligibleCustomerEntity entity class.\r\n */\r\n export class EligibleCustomerEntityExtensionClass implements IEligibleCustomerEntity {\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 AccountNumber: 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 ContactPersonID: 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 IsSelected: boolean;\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.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.AccountNumber = odataObject.AccountNumber;\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.ContactPersonID = odataObject.ContactPersonID;\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.IsSelected = odataObject.IsSelected;\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 \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 * UserInfoEntity entity class.\r\n */\r\n export class UserInfoEntityExtensionClass implements IUserInfoEntity {\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 BusinessPartnerId: 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 B2BUserId: 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 IsB2BAdmin: 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 ContactPersonID: 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 FirstName: 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 LastName: 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 AccountNumber: 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 Email: 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 Phone: 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 VatNumber: 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 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.BusinessPartnerId = odataObject.BusinessPartnerId;\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.B2BUserId = odataObject.B2BUserId;\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.IsB2BAdmin = odataObject.IsB2BAdmin;\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.ContactPersonID = odataObject.ContactPersonID;\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.FirstName = odataObject.FirstName;\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.LastName = odataObject.LastName;\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.AccountNumber = odataObject.AccountNumber;\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.Email = odataObject.Email;\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.Phone = odataObject.Phone;\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.VatNumber = odataObject.VatNumber;\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 \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 * CreateContactResponse entity class.\r\n */\r\n export class CreateContactResponseExtensionClass implements ICreateContactResponse {\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 Success: boolean;\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.Success = odataObject.Success;\r\n \r\n }\r\n }\r\n\r\n /**\r\n * UpdateContactResponse entity class.\r\n */\r\n export class UpdateContactResponseExtensionClass implements IUpdateContactResponse {\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 Success: boolean;\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.Success = odataObject.Success;\r\n \r\n }\r\n }\r\n\r\n /**\r\n * RemoveContactResponse entity class.\r\n */\r\n export class RemoveContactResponseExtensionClass implements IRemoveContactResponse {\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 Success: boolean;\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.Success = odataObject.Success;\r\n \r\n }\r\n }\r\n\r\n /**\r\n * SaveSessionCustomerResponse entity class.\r\n */\r\n export class SaveSessionCustomerResponseExtensionClass implements ISaveSessionCustomerResponse {\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.Message = odataObject.Message;\r\n \r\n }\r\n }\r\n\r\n /**\r\n * GetEligibleCustomersTotalResponse entity class.\r\n */\r\n export class GetEligibleCustomersTotalResponseExtensionClass implements IGetEligibleCustomersTotalResponse {\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 Total: 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 ChargeOverriden: boolean;\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.Total = odataObject.Total;\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.ChargeOverriden = odataObject.ChargeOverriden;\r\n \r\n }\r\n }\r\n\r\n /**\r\n * GetUserInfoResponse entity class.\r\n */\r\n export class GetUserInfoResponseExtensionClass implements IGetUserInfoResponse {\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 UserInfo: \r\n IUserInfoEntity;\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 if (odataObject.UserInfo === null) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.UserInfo = undefined;\r\n } else if (odataObject.UserInfo['@odata.type'] == null) {\r\n this.UserInfo = new UserInfoEntityExtensionClass(odataObject.UserInfo);\r\n } else {\r\n var className: string = odataObject.UserInfo['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.UserInfo = new EntityClasses[className](odataObject.UserInfo)\r\n }\r\n }\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 import {\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\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n // @ts-ignore -- Unused import\r\n import * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n import * as DataServiceEntities from './DataServiceEntities.g';\r\n\r\n \r\n function pCTGetCatalogsQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function pCTGetCatalogsInput (\r\n queryResultSettings: IQueryResultSettings, channelId:\r\n number,\r\n activeOnly:\r\n boolean\r\n ): IDataServiceRequest {\r\n const query = pCTGetCatalogsQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'PCTGetCatalogs',\r\n true, \r\n DataServiceEntities.PCTProductCatalogExtensionClass\r\n ,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IPCTProductCatalog' },\r\n {\r\n channelId: channelId,\r\n activeOnly: activeOnly\r\n }\r\n );\r\n }\r\n\r\n export function pCTGetCatalogsAsync (\r\n context: IContext, channelId:\r\n number,\r\n activeOnly:\r\n boolean\r\n ): AsyncResult {\r\n const request = pCTGetCatalogsInput(\r\n context.queryResultSettings || {}, channelId, activeOnly);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function getContactsQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function getContactsInput (\r\n queryResultSettings: IQueryResultSettings\r\n ): IDataServiceRequest {\r\n const query = getContactsQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetContacts',\r\n false, \r\n DataServiceEntities.ContactEntityExtensionClass\r\n ,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IContactEntity' },\r\n {\r\n \r\n }\r\n );\r\n }\r\n\r\n export function getContactsAsync (\r\n context: IContext\r\n ): AsyncResult {\r\n const request = getContactsInput(\r\n context.queryResultSettings || {});\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function createContactQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function createContactInput (\r\n accountNum:\r\n string,\r\n firstName:\r\n string,\r\n lastName:\r\n string,\r\n email:\r\n string\r\n ): IDataServiceRequest {\r\n const query = createContactQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'CreateContact',\r\n false, \r\n DataServiceEntities.CreateContactResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ICreateContactResponse' },\r\n {\r\n accountNum: accountNum,\r\n firstName: firstName,\r\n lastName: lastName,\r\n email: email\r\n }\r\n );\r\n }\r\n\r\n export function createContactAsync (\r\n context: IContext, accountNum:\r\n string,\r\n firstName:\r\n string,\r\n lastName:\r\n string,\r\n email:\r\n string\r\n ): AsyncResult {\r\n const request = createContactInput(accountNum, firstName, lastName, email);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function updateContactQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function updateContactInput (\r\n contactPersonId:\r\n string,\r\n personId:\r\n string,\r\n firstName:\r\n string,\r\n lastName:\r\n string\r\n ): IDataServiceRequest {\r\n const query = updateContactQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'UpdateContact',\r\n false, \r\n DataServiceEntities.UpdateContactResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IUpdateContactResponse' },\r\n {\r\n contactPersonId: contactPersonId,\r\n personId: personId,\r\n firstName: firstName,\r\n lastName: lastName\r\n }\r\n );\r\n }\r\n\r\n export function updateContactAsync (\r\n context: IContext, contactPersonId:\r\n string,\r\n personId:\r\n string,\r\n firstName:\r\n string,\r\n lastName:\r\n string\r\n ): AsyncResult {\r\n const request = updateContactInput(contactPersonId, personId, firstName, lastName);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function removeContactQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function removeContactInput (\r\n contactPersonId:\r\n string,\r\n personId:\r\n string\r\n ): IDataServiceRequest {\r\n const query = removeContactQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'RemoveContact',\r\n false, \r\n DataServiceEntities.RemoveContactResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IRemoveContactResponse' },\r\n {\r\n contactPersonId: contactPersonId,\r\n personId: personId\r\n }\r\n );\r\n }\r\n\r\n export function removeContactAsync (\r\n context: IContext, contactPersonId:\r\n string,\r\n personId:\r\n string\r\n ): AsyncResult {\r\n const request = removeContactInput(contactPersonId, personId);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function getEligibleCustomersQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function getEligibleCustomersInput (\r\n queryResultSettings: IQueryResultSettings\r\n ): IDataServiceRequest {\r\n const query = getEligibleCustomersQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetEligibleCustomers',\r\n false, \r\n DataServiceEntities.EligibleCustomerEntityExtensionClass\r\n ,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IEligibleCustomerEntity' },\r\n {\r\n \r\n }\r\n );\r\n }\r\n\r\n export function getEligibleCustomersAsync (\r\n context: IContext\r\n ): AsyncResult {\r\n const request = getEligibleCustomersInput(\r\n context.queryResultSettings || {});\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function saveSessionCustomerQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function saveSessionCustomerInput (\r\n accountNum:\r\n string,\r\n contactPersonId:\r\n string,\r\n cartId:\r\n string\r\n ): IDataServiceRequest {\r\n const query = saveSessionCustomerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'SaveSessionCustomer',\r\n false, \r\n DataServiceEntities.SaveSessionCustomerResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ISaveSessionCustomerResponse' },\r\n {\r\n accountNum: accountNum,\r\n contactPersonId: contactPersonId,\r\n cartId: cartId\r\n }\r\n );\r\n }\r\n\r\n export function saveSessionCustomerAsync (\r\n context: IContext, accountNum:\r\n string,\r\n contactPersonId:\r\n string,\r\n cartId:\r\n string\r\n ): AsyncResult {\r\n const request = saveSessionCustomerInput(accountNum, contactPersonId, cartId);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function getEligibleCustomersTotalQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function getEligibleCustomersTotalInput (\r\n cartId:\r\n string,\r\n checkoutCartId:\r\n string\r\n ): IDataServiceRequest {\r\n const query = getEligibleCustomersTotalQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetEligibleCustomersTotal',\r\n false, \r\n DataServiceEntities.GetEligibleCustomersTotalResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IGetEligibleCustomersTotalResponse' },\r\n {\r\n cartId: cartId,\r\n checkoutCartId: checkoutCartId\r\n }\r\n );\r\n }\r\n\r\n export function getEligibleCustomersTotalAsync (\r\n context: IContext, cartId:\r\n string,\r\n checkoutCartId:\r\n string\r\n ): AsyncResult {\r\n const request = getEligibleCustomersTotalInput(cartId, checkoutCartId);\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n \r\n function getUserInfoQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n \r\n export function getUserInfoInput (\r\n \r\n ): IDataServiceRequest {\r\n const query = getUserInfoQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetUserInfo',\r\n false, \r\n DataServiceEntities.GetUserInfoResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IGetUserInfoResponse' },\r\n {\r\n \r\n }\r\n );\r\n }\r\n\r\n export function getUserInfoAsync (\r\n context: IContext\r\n ): AsyncResult {\r\n const request = getUserInfoInput();\r\n return callActionOrExecute(request, context.callerContext);\r\n }\r\n ","\r\n// @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/**\r\n * CreateCatalogResponseEntity entity interface.\r\n */\r\nexport interface ICreateCatalogResponseEntity {\r\n ProductListId?: string;\r\n}\r\n\r\n/**\r\n * EveProductList entity interface.\r\n */\r\nexport interface IEveProductList {\r\n Id?: string;\r\n Name?: string;\r\n CustomerId?: string;\r\n CreatedDateTime?: Date;\r\n LastUpdated?: Date;\r\n DeletedDateTime?: Date;\r\n ProductListTypeValue: number;\r\n DataAreaId?: string;\r\n ProductListLines?: Entities.ProductListLine[];\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * InventoryLabelInput entity interface.\r\n */\r\nexport interface IInventoryLabelInput {\r\n ItemId?: string;\r\n Quantity: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * InventoryLabelEntity entity interface.\r\n */\r\nexport interface IInventoryLabelEntity {\r\n ItemId?: string;\r\n RecId: number;\r\n UpperBoundInclusive: number;\r\n Label?: string;\r\n LanguageId?: string;\r\n Txt?: string;\r\n ProductId: number;\r\n Code?: string;\r\n Quantity: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * GetCatalogWarehouseResponse entity interface.\r\n */\r\nexport interface IGetCatalogWarehouseResponse {\r\n CatalogWarehouse?: string;\r\n IsDefaultWarehouse: boolean;\r\n}\r\n\r\n/**\r\n * CreateCatalogResponseEntity entity class.\r\n */\r\nexport class CreateCatalogResponseEntityExtensionClass implements ICreateCatalogResponseEntity {\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 ProductListId: 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.ProductListId = odataObject.ProductListId;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * EveProductList entity class.\r\n */\r\nexport class EveProductListExtensionClass implements IEveProductList {\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: 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 CustomerId: 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 CreatedDateTime: Date;\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 LastUpdated: Date;\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 DeletedDateTime: Date;\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 ProductListTypeValue: 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 DataAreaId: 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 ProductListLines: Entities.ProductListLine[];\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.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.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.CustomerId = odataObject.CustomerId;\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.CreatedDateTime = (odataObject.CreatedDateTime instanceof Date) ? odataObject.CreatedDateTime\r\n : (odataObject.CreatedDateTime) ? jsonLightReadStringPropertyValue(odataObject.CreatedDateTime, 'Edm.DateTimeOffset', false) : undefined;\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.LastUpdated = (odataObject.LastUpdated instanceof Date) ? odataObject.LastUpdated\r\n : (odataObject.LastUpdated) ? jsonLightReadStringPropertyValue(odataObject.LastUpdated, 'Edm.DateTimeOffset', false) : undefined;\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.DeletedDateTime = (odataObject.DeletedDateTime instanceof Date) ? odataObject.DeletedDateTime\r\n : (odataObject.DeletedDateTime) ? jsonLightReadStringPropertyValue(odataObject.DeletedDateTime, 'Edm.DateTimeOffset', false) : undefined;\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.ProductListTypeValue = odataObject.ProductListTypeValue;\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.DataAreaId = odataObject.DataAreaId;\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.ProductListLines = undefined;\r\n if (odataObject.ProductListLines) {\r\n this.ProductListLines = [];\r\n for (var i = 0; i < odataObject.ProductListLines.length; i++) {\r\n if (odataObject.ProductListLines[i]) {\r\n if (odataObject.ProductListLines[i]['@odata.type']) {\r\n var className: string = odataObject.ProductListLines[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ProductListLines[i] = new EntityClasses[className](odataObject.ProductListLines[i])\r\n }\r\n } else {\r\n this.ProductListLines[i] = new EntityClasses.ProductListLineClass(odataObject.ProductListLines[i]);\r\n }\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.ProductListLines[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.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\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 * InventoryLabelInput entity class.\r\n */\r\nexport class InventoryLabelInputExtensionClass implements IInventoryLabelInput {\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 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.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.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\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 * InventoryLabelEntity entity class.\r\n */\r\nexport class InventoryLabelEntityExtensionClass implements IInventoryLabelEntity {\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 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 UpperBoundInclusive: 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 Label: 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 LanguageId: 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 Txt: 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 Code: 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 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.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.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.UpperBoundInclusive = (odataObject.UpperBoundInclusive) ? parseFloat(odataObject.UpperBoundInclusive) : 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.Label = odataObject.Label;\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.LanguageId = odataObject.LanguageId;\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.Txt = odataObject.Txt;\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.Code = odataObject.Code;\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.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\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 * GetCatalogWarehouseResponse entity class.\r\n */\r\nexport class GetCatalogWarehouseResponseExtensionClass implements IGetCatalogWarehouseResponse {\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 CatalogWarehouse: 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 IsDefaultWarehouse: boolean;\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.CatalogWarehouse = odataObject.CatalogWarehouse;\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.IsDefaultWarehouse = odataObject.IsDefaultWarehouse;\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\n\r\nfunction createCatalogProductListQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function createCatalogProductListInput (\r\n productList:\r\n Entities.ProductList,\r\n catalogId:\r\n number\r\n): IDataServiceRequest {\r\n const query = createCatalogProductListQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'CreateCatalogProductList',\r\n true,\r\n DataServiceEntities.CreateCatalogResponseEntityExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.ICreateCatalogResponseEntity' },\r\n {\r\n productList: productList,\r\n catalogId: catalogId\r\n }\r\n );\r\n}\r\n\r\nexport function createCatalogProductListAsync (\r\n context: IContext, productList:\r\n Entities.ProductList,\r\n catalogId:\r\n number\r\n): AsyncResult {\r\n const request = createCatalogProductListInput(productList, catalogId);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction deleteCatalogProductListQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function deleteCatalogProductListInput (\r\n productListId:\r\n string,\r\n catalogId:\r\n number\r\n): IDataServiceRequest {\r\n const query = deleteCatalogProductListQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'DeleteCatalogProductList',\r\n true,\r\n ''\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: '' },\r\n {\r\n productListId: productListId,\r\n catalogId: catalogId\r\n }\r\n );\r\n}\r\n\r\nexport function deleteCatalogProductListAsync (\r\n context: IContext, productListId:\r\n string,\r\n catalogId:\r\n number\r\n): AsyncResult {\r\n const request = deleteCatalogProductListInput(productListId, catalogId);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getCatalogProductListQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function getCatalogProductListInput (\r\n queryResultSettings: IQueryResultSettings, catalogId:\r\n number,\r\n productListSearchCriteria:\r\n Entities.ProductListSearchCriteria\r\n): IDataServiceRequest {\r\n const query = getCatalogProductListQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetCatalogProductList',\r\n true,\r\n DataServiceEntities.EveProductListExtensionClass\r\n ,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IEveProductList' },\r\n {\r\n catalogId: catalogId,\r\n productListSearchCriteria: productListSearchCriteria\r\n }\r\n );\r\n}\r\n\r\nexport function getCatalogProductListAsync (\r\n context: IContext, catalogId:\r\n number,\r\n productListSearchCriteria:\r\n Entities.ProductListSearchCriteria\r\n): AsyncResult {\r\n const request = getCatalogProductListInput(\r\n context.queryResultSettings || {}, catalogId, productListSearchCriteria);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getInventoryLabelQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function getInventoryLabelInput (\r\n queryResultSettings: IQueryResultSettings, availabilities:\r\n DataServiceEntities.IInventoryLabelInput[]\r\n): IDataServiceRequest {\r\n const query = getInventoryLabelQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetInventoryLabel',\r\n true,\r\n DataServiceEntities.InventoryLabelEntityExtensionClass\r\n ,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IInventoryLabelEntity' },\r\n {\r\n availabilities: availabilities\r\n }\r\n );\r\n}\r\n\r\nexport function getInventoryLabelAsync (\r\n context: IContext, availabilities:\r\n DataServiceEntities.IInventoryLabelInput[]\r\n): AsyncResult {\r\n const request = getInventoryLabelInput(\r\n context.queryResultSettings || {}, availabilities);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nfunction getCatalogWarehouseQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function getCatalogWarehouseInput (\r\n catalogId:\r\n number\r\n): IDataServiceRequest {\r\n const query = getCatalogWarehouseQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetCatalogWarehouse',\r\n false,\r\n DataServiceEntities.GetCatalogWarehouseResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IGetCatalogWarehouseResponse' },\r\n {\r\n catalogId: catalogId\r\n }\r\n );\r\n}\r\n\r\nexport function getCatalogWarehouseAsync (\r\n context: IContext, catalogId:\r\n number\r\n): AsyncResult {\r\n const request = getCatalogWarehouseInput(catalogId);\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { CartLine, QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\nimport { addCartLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\n\r\nimport { getPaginatedOrderTemplateLinesAction, GetPaginatedOrderTemplateLinesInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { GetCatalogIdFromContext } from '../utilities';\r\n\r\n/**\r\n * Input class for the AddOrderTemplateToCart data action.\r\n */\r\nexport class AddOrderTemplateToCartInput implements IActionInput {\r\n public readonly orderTemplateId: string;\r\n\r\n constructor(orderTemplateId: string) {\r\n this.orderTemplateId = orderTemplateId;\r\n }\r\n\r\n public getCacheKey = () => 'AddOrderTemplateToCartInput';\r\n\r\n public getCacheObjectType = () => 'AddOrderTemplateToCartInput';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the AddOrderTemplateToCart method.\r\n * @param {ICreateActionContext} inputData The input data passed to the createInput method.\r\n * @param {string} orderTemplateId The id of template.\r\n */\r\nexport const addOrderTemplateToCartInput = (inputData: ICreateActionContext, orderTemplateId: string): AddOrderTemplateToCartInput => {\r\n const { requestContext } = inputData;\r\n if (!requestContext.user.isAuthenticated) {\r\n throw new Error('Unable to create order template. User is not authenticated.');\r\n }\r\n return new AddOrderTemplateToCartInput(orderTemplateId);\r\n};\r\n\r\n/**\r\n * The action method for the AddOrderTemplateToCart data action.\r\n * @param {AddOrderTemplateToCartInput} input The action input.\r\n * @param {IActionContext} ctx The action context.\r\n * @param context\r\n */\r\nexport async function addOrderTemplateToCartAction(input: AddOrderTemplateToCartInput, context: IActionContext): Promise {\r\n const cartState = await getCartState(context);\r\n const catalogId = GetCatalogIdFromContext(context);\r\n const chunkCount = 1000;\r\n const queryResultSettings: QueryResultSettings = {\r\n Paging: {\r\n Top: chunkCount,\r\n Skip: 0\r\n }\r\n };\r\n const getPaginatedOrderTemplateLinesInput = new GetPaginatedOrderTemplateLinesInput(input.orderTemplateId, queryResultSettings);\r\n let orderTemplateLines = await getPaginatedOrderTemplateLinesAction(getPaginatedOrderTemplateLinesInput, context);\r\n let addedCartLines: CartLine[] = [];\r\n for (let skip = chunkCount; orderTemplateLines.lines.length > 0; skip += chunkCount) {\r\n const cartLines: CartLine[] = orderTemplateLines.lines.map(productLine => {\r\n const cartLine: CartLine = {\r\n ItemId: productLine.fullProduct?.ProductDetails.ItemId,\r\n ProductId: productLine.productListLine.ProductId,\r\n Quantity: productLine.productListLine.Quantity,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: productLine.productListLine.UnitOfMeasure,\r\n CatalogId: catalogId\r\n };\r\n return cartLine;\r\n });\r\n await addCartLinesAsync({ callerContext: context }, cartState.cart.Id, cartLines, cartState.cart.Version).catch(error => {\r\n context.telemetry.trace(error.data?.ValidationResults);\r\n context.telemetry.trace('Unable to add order template to cart.');\r\n throw error.data?.ValidationResults;\r\n });\r\n addedCartLines = addedCartLines.concat(cartLines);\r\n getPaginatedOrderTemplateLinesInput.queryResultSettings.Paging!.Skip = skip;\r\n orderTemplateLines = await getPaginatedOrderTemplateLinesAction(getPaginatedOrderTemplateLinesInput, context);\r\n }\r\n await cartState.refreshCart({});\r\n return addedCartLines;\r\n}\r\n\r\n/**\r\n * The AddOrderTemplateToCart Data Action.\r\n * Returns created order template.\r\n */\r\nexport const addOrderTemplateToCartActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/add-order-template-to-cart',\r\n action: >addOrderTemplateToCartAction,\r\n input: addOrderTemplateToCartInput\r\n});\r\nexport default addOrderTemplateToCartActionDataAction;\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { ProductList, ProductListType } from '@msdyn365-commerce/retail-proxy';\r\nimport { createCatalogProductListAsync, getCatalogProductListAsync } from './DataActionExtension.g';\r\nimport { ProductListSearchCriteria } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { GetCartFromCache, GetCatalogIdFromContext } from '../utilities';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Input class for the CreateOrderTemplate data action.\r\n */\r\nexport class CreateOrderTemplateInput implements IActionInput {\r\n public readonly templateName: string;\r\n\r\n constructor(templateName: string) {\r\n this.templateName = templateName;\r\n }\r\n\r\n public getCacheKey = () => 'CreateOrderTemplateInput';\r\n\r\n public getCacheObjectType = () => 'CreateOrderTemplateInput';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the CreateOrderTemplate method.\r\n * @param {ICreateActionContext} inputData The input data passed to the createInput method.\r\n * @param {string} templateName The name of template.\r\n */\r\nexport const createOrderTemplateInput = (inputData: ICreateActionContext, templateName: string): CreateOrderTemplateInput => {\r\n const { requestContext } = inputData;\r\n if (!requestContext.user.isAuthenticated) {\r\n throw new Error('Unable to create order template. User is not authenticated.');\r\n }\r\n return new CreateOrderTemplateInput(templateName);\r\n};\r\n\r\n/**\r\n * The action method for the CreateOrderTemplate data action.\r\n * @param {CreateOrderTemplateInput} input The action input.\r\n * @param {IActionContext} ctx The action context.\r\n */\r\nexport async function createOrderTemplateAction(input: CreateOrderTemplateInput, ctx: IActionContext): Promise {\r\n try {\r\n const cart = GetCartFromCache(ctx);\r\n let catalogId: number;\r\n if (cart && ArrayExtensions.hasElements(cart?.CartLines)) {\r\n catalogId = cart.CartLines[0].CatalogId || 0;\r\n } else {\r\n catalogId = GetCatalogIdFromContext(ctx);\r\n }\r\n\r\n const orderTemplate: ProductList = {\r\n Id: '',\r\n Name: input.templateName,\r\n ProductListTypeValue: ProductListType.OrderTemplate\r\n };\r\n const createdProductListId = await createCatalogProductListAsync(\r\n {\r\n callerContext: ctx\r\n },\r\n orderTemplate,\r\n catalogId\r\n );\r\n\r\n if (createdProductListId?.ProductListId) {\r\n const searchCriteria: ProductListSearchCriteria = {\r\n ProductListId: createdProductListId.ProductListId,\r\n CustomerId: ctx.requestContext.user.customerAccountNumber!\r\n };\r\n const createdList = await getCatalogProductListAsync({ callerContext: ctx }, catalogId, searchCriteria);\r\n\r\n if (createdList && createdList && createdList.length) {\r\n return createdList[0] as ProductList;\r\n }\r\n }\r\n ctx.telemetry.error('Created product list was null');\r\n throw new Error('Created product list was null');\r\n } catch (error) {\r\n ctx.telemetry.error('Not able to create order template', error);\r\n throw error;\r\n }\r\n}\r\n\r\n/**\r\n * The CreateOrderTemplate Data Action.\r\n * Returns created order template.\r\n */\r\nexport const createOrderTemplateActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/create-order-template',\r\n action: >createOrderTemplateAction,\r\n input: createOrderTemplateInput\r\n});\r\n\r\nexport default createOrderTemplateActionDataAction;\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { CartLine, ChannelDeliveryOptionConfiguration, FeatureState, ProductWarehouse } from '@msdyn365-commerce/retail-proxy';\r\nimport { getOrgUnitConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\r\nimport { getEstimatedProductWarehouseAvailabilityAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getChannelDeliveryOptionConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\nimport {\r\n ActiveCartProductsInput,\r\n ArrayExtensions,\r\n buildCacheKey,\r\n getActiveCartProductsAction,\r\n IProductInventoryInformation,\r\n mapAggregatedProductInventoryInformation,\r\n mapProductInventoryInformation\r\n} from '@msdyn365-commerce-modules/retail-actions'; // @ts-ignore\r\nimport { FeatureStateInput, getFeatureStateActionDataAction } from '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\r\nimport { GetCatalogIdFromContext } from '../utilities';\r\nimport { getCatalogWarehouseAsync } from './DataActionExtension.g';\r\n\r\n/**\r\n * Input class for availabilities for items in cart.\r\n */\r\nexport class ProductAvailabilitiesForCartLineItems implements IActionInput {\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(apiSettings: ICommerceApiSettings) {\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey('ActiveCartLineItemsAvailability', this.apiSettings);\r\n\r\n public getCacheObjectType = () => 'ActiveCartLineItemsAvailability';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>) => {\r\n return new ProductAvailabilitiesForCartLineItems(inputData.requestContext.apiSettings);\r\n};\r\n\r\n/**\r\n * Calls the Retail Feature State API and returns a list of feature with isEnabled flag.\r\n * @param cartLine\r\n * @param featureSate\r\n * @param channelDeliveryOptionConfig\r\n * @param pickupDeliveryMode\r\n */\r\nconst getDeliveryMode = (\r\n cartLine: CartLine,\r\n featureSate: boolean = false,\r\n channelDeliveryOptionConfig: ChannelDeliveryOptionConfiguration,\r\n pickupDeliveryMode?: string\r\n) => {\r\n if (!featureSate) {\r\n return cartLine.DeliveryMode === pickupDeliveryMode;\r\n }\r\n return (\r\n cartLine.DeliveryMode ===\r\n channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === cartLine.DeliveryMode)\r\n );\r\n};\r\n\r\n/**\r\n * Calls the Retail API to get the product availabilities for items in the cart.\r\n * @param input\r\n * @param ctx\r\n */\r\n// eslint-disable-next-line complexity\r\nexport async function getAvailabilitiesForCartLineItems(\r\n input: ProductAvailabilitiesForCartLineItems,\r\n ctx: IActionContext\r\n): Promise {\r\n // If no input is provided fail out\r\n if (!input) {\r\n throw new Error('[getAvailabilitiesForCartLineItems]No valid Input was provided, failing');\r\n }\r\n\r\n const shippingItems: CartLine[] = [];\r\n const bopisItems = [];\r\n let productAvailabilities: IProductInventoryInformation[] = [];\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n let channelDeliveryOptionConfig: any;\r\n\r\n const cartState = await getCartState(ctx);\r\n const cart = cartState.cart;\r\n const channelConfiguration = await getOrgUnitConfigurationAsync({ callerContext: ctx });\r\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx);\r\n\r\n /**\r\n * Calls the Retail Feature State API and returns a list of feature with isEnabled flag.\r\n * @param context\r\n */\r\n async function getFeatureState(context: IActionContext): Promise {\r\n return getFeatureStateActionDataAction(new FeatureStateInput(), context);\r\n }\r\n const featureState = await getFeatureState(ctx);\r\n const retailMultiplePickUpOptionEnabled = featureState?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n if (retailMultiplePickUpOptionEnabled) {\r\n channelDeliveryOptionConfig = await getChannelDeliveryOptionConfigurationAsync({ callerContext: ctx });\r\n }\r\n const PickupDeliveryModeCode = channelConfiguration.PickupDeliveryModeCode;\r\n const EmailDeliveryModeCode = channelConfiguration.EmailDeliveryModeCode;\r\n\r\n if (!cart || !channelConfiguration || !products || products.length === 0) {\r\n ctx.trace('[getAvailabilitiesForCartLineItems] Not able to get cart OR channelConfiguration or no products in cart');\r\n return [];\r\n }\r\n\r\n if (cart && cart.Id && cart.CartLines && cart.CartLines.length > 0 && channelConfiguration) {\r\n for (const cartLine of cart.CartLines) {\r\n if (\r\n cartLine.DeliveryMode &&\r\n cartLine.DeliveryMode !== '' &&\r\n getDeliveryMode(cartLine, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, PickupDeliveryModeCode)\r\n ) {\r\n bopisItems.push(cartLine);\r\n } else if (EmailDeliveryModeCode === '' || cartLine.DeliveryMode !== EmailDeliveryModeCode) {\r\n shippingItems.push(cartLine);\r\n }\r\n }\r\n }\r\n\r\n // Step 1: Get Catalog and catalog warehouse data\r\n const catalogId = GetCatalogIdFromContext(ctx);\r\n var inventLocationId = ctx.requestContext.channel?.InventLocation || '';\r\n //For some reason this configu is not coming through\r\n const shouldFilterByCatalog: boolean = true; //ctx.requestContext.app.config.enableCatalogWarehouseFiltering || false;\r\n\r\n if (shouldFilterByCatalog && catalogId > 0) {\r\n const catalogWarehouseResponse = await getCatalogWarehouseAsync({ callerContext: ctx }, catalogId);\r\n if (!catalogWarehouseResponse?.IsDefaultWarehouse) {\r\n inventLocationId = catalogWarehouseResponse.CatalogWarehouse || inventLocationId;\r\n }\r\n }\r\n\r\n if (shippingItems && shippingItems.length > 0) {\r\n let productIds = shippingItems.map(x => x.ProductId!);\r\n productIds = ArrayExtensions.unique(productIds);\r\n /*\r\n INFO: Removed default search for shipping locations and changed to use warehouse locations found by the channel instead.\r\n */\r\n // const searchCriteria = createInventoryAvailabilitySearchCriteria(ctx, productIds, true);\r\n // const shippingProductAvailabilities = await getEstimatedAvailabilityAsync(\r\n // { callerContext: ctx, bypassCache: 'get' },\r\n // searchCriteria\r\n // );\r\n const productWarehouses: ProductWarehouse[] = [];\r\n\r\n for (const productId of productIds) {\r\n const productWarehouse: ProductWarehouse = {\r\n ProductId: productId,\r\n InventLocationId: inventLocationId\r\n };\r\n if (ctx.requestContext.channel && ctx.requestContext.channel.InventLocationDataAreaId) {\r\n productWarehouse.DataAreaId = ctx.requestContext.channel.InventLocationDataAreaId;\r\n }\r\n productWarehouses.push(productWarehouse);\r\n }\r\n\r\n const quantityUnitTypeSales: number = 2;\r\n const getProductWarehouseAvail = await getEstimatedProductWarehouseAvailabilityAsync(\r\n { callerContext: ctx, bypassCache: 'get', queryResultSettings: {} },\r\n productWarehouses,\r\n quantityUnitTypeSales\r\n );\r\n if (\r\n getProductWarehouseAvail &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities.length > 0\r\n ) {\r\n productAvailabilities = mapAggregatedProductInventoryInformation(ctx, getProductWarehouseAvail);\r\n }\r\n }\r\n\r\n if (bopisItems && bopisItems.length > 0) {\r\n const productWarehouses: ProductWarehouse[] = [];\r\n\r\n for (const bopisItem of bopisItems) {\r\n const productWarehouse: ProductWarehouse = {\r\n ProductId: bopisItem.ProductId,\r\n InventLocationId: bopisItem.WarehouseId\r\n };\r\n\r\n if (ctx.requestContext.channel && ctx.requestContext.channel.InventLocationDataAreaId) {\r\n productWarehouse.DataAreaId = ctx.requestContext.channel.InventLocationDataAreaId;\r\n }\r\n productWarehouses.push(productWarehouse);\r\n }\r\n const quantityUnitTypeSales: number = 2;\r\n const getProductWarehouseAvail = await getEstimatedProductWarehouseAvailabilityAsync(\r\n { callerContext: ctx, bypassCache: 'get', queryResultSettings: {} },\r\n productWarehouses,\r\n quantityUnitTypeSales\r\n );\r\n\r\n if (\r\n getProductWarehouseAvail &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities.length > 0\r\n ) {\r\n const productWarehouseMapping = mapProductInventoryInformation(\r\n ctx,\r\n getProductWarehouseAvail?.ProductWarehouseInventoryAvailabilities\r\n );\r\n if (productWarehouseMapping && productWarehouseMapping.length > 0) {\r\n for (const item of productWarehouseMapping) {\r\n productAvailabilities.push(item);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (productAvailabilities && productAvailabilities.length > 0) {\r\n return productAvailabilities;\r\n }\r\n\r\n ctx.trace('[getAvailabilitiesForCartLineItems] unable to get availabilities for product');\r\n return [];\r\n}\r\n\r\nexport const getAvailabilitiesForCartLineItemsDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-availabilities-cartlines',\r\n action: >getAvailabilitiesForCartLineItems,\r\n input: createInput\r\n});\r\n\r\nexport default getAvailabilitiesForCartLineItemsDataAction;\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 { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICommerceApiSettings,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { getContactsAsync } from '../actions/ContactActions/DataActionExtension.g';\r\nimport { IContactEntity } from './ContactActions/DataServiceEntities.g';\r\n\r\n/**\r\n * Input class for get customer data action.\r\n */\r\nexport class ContactsInput implements IActionInput {\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(apiSettings: ICommerceApiSettings) {\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey('Contacts', this.apiSettings);\r\n\r\n public getCacheObjectType = () => 'Contacts';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\nexport const createGetContactsInput = (inputData: ICreateActionContext): IActionInput => {\r\n const { requestContext } = inputData;\r\n\r\n // Check if the user is authenticated.\r\n if (!requestContext.user.isAuthenticated) {\r\n throw new Error('User is not logged in.');\r\n }\r\n\r\n return new ContactsInput(requestContext.apiSettings);\r\n};\r\n\r\nexport async function getContactUsers(input: ContactsInput, ctx: IActionContext): Promise {\r\n return getContactsAsync({ callerContext: ctx })\r\n .then(users => {\r\n return users;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n ctx.trace('[get-customer-contacts] Unable to load users');\r\n throw new Error('[get-customer-contacts] Unable to load users');\r\n });\r\n}\r\nexport const getContactsDataAction = createObservableDataAction({\r\n id: 'get-customer-contacts',\r\n action: >(getContactUsers),\r\n input: createGetContactsInput\r\n});\r\n\r\nexport default getContactsDataAction;\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 {\r\n AsyncResult,\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { IQueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\nimport { ProductList, ProductListSearchCriteria, ProductListType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport {\r\n OrderTemplate,\r\n QueryResultSettingsProxy,\r\n GetPaginatedOrderTemplateLinesInput,\r\n getPaginatedOrderTemplateLinesAction\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IOrderTemplateLinesState } from '@msdyn365-commerce-modules/retail-actions/src/utilities/order-templates';\r\nimport { GetCatalogIdFromContext } from '../utilities';\r\nimport { getCatalogProductListAsync } from './DataActionExtension.g';\r\n\r\n/**\r\n * Input class for the GetOrderTemplates data action.\r\n */\r\nexport class GetOrderTemplatesPreviewInput implements IActionInput {\r\n public queryResultSettings: IQueryResultSettings;\r\n\r\n constructor(queryResultSettings: IQueryResultSettings) {\r\n this.queryResultSettings = queryResultSettings;\r\n this.queryResultSettings.count = true;\r\n this.queryResultSettings.Paging!.Top = 4;\r\n }\r\n\r\n public getCacheKey = () => 'GetOrderTemplatesPreview';\r\n\r\n public getCacheObjectType = () => 'GetOrderTemplatesPreview';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the GetOrderTemplate method.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createGetOrderTemplatesPreviewInput = (inputData: ICreateActionContext): GetOrderTemplatesPreviewInput => {\r\n const queryResultSettings: IQueryResultSettings = QueryResultSettingsProxy.fromInputData(inputData).QueryResultSettings;\r\n return new GetOrderTemplatesPreviewInput(queryResultSettings);\r\n};\r\n\r\n/**\r\n * The action method for the GetOrderTemplatesPreview data action.\r\n * @param input The action input.\r\n * @param context The action context.\r\n */\r\nexport async function getOrderTemplatesPreview(input: GetOrderTemplatesPreviewInput, context: IActionContext): Promise {\r\n try {\r\n const productListSearchCriteria: ProductListSearchCriteria = {\r\n ProductListId: '',\r\n ProductListType: `${ProductListType.OrderTemplate}`\r\n };\r\n const catalogId = GetCatalogIdFromContext(context);\r\n const queryResultSettings = QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context);\r\n const resp = await getCatalogProductListAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: queryResultSettings\r\n },\r\n +catalogId || 0,\r\n productListSearchCriteria\r\n );\r\n\r\n const orderTemplates: OrderTemplate[] = [];\r\n const inputLinesRequests: AsyncResult[] = [];\r\n const productLists = resp as ProductList[];\r\n for (const list of productLists) {\r\n const inputLine = new GetPaginatedOrderTemplateLinesInput(list.Id, input.queryResultSettings, undefined);\r\n inputLinesRequests.push(getPaginatedOrderTemplateLinesAction(inputLine, context));\r\n }\r\n const inputLinesResponses = await Promise.all(inputLinesRequests);\r\n\r\n for (const list of productLists) {\r\n const productLinesResponse = inputLinesResponses.filter(\r\n x => x.lines.length > 0 && x.lines[0].productListLine.ProductListId === list.Id\r\n );\r\n\r\n if (productLinesResponse.length > 0) {\r\n orderTemplates.push(new OrderTemplate(list, productLinesResponse[0].lines, productLinesResponse[0].totalCount));\r\n } else {\r\n orderTemplates.push(new OrderTemplate(list, [], 0));\r\n }\r\n }\r\n return orderTemplates;\r\n } catch (error) {\r\n context.telemetry.error('Not able to get order template(s)', error);\r\n throw error;\r\n }\r\n}\r\n\r\n/**\r\n * The GetOrderTemplatesPreview Data Action\r\n * Returns order templates.\r\n */\r\nexport const getOrderTemplatesPreviewDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/get-order-templates-preview',\r\n action: >getOrderTemplatesPreview,\r\n input: createGetOrderTemplatesPreviewInput\r\n});\r\n\r\nexport default getOrderTemplatesPreviewDataAction;\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 {\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 {\r\n ProductAvailableQuantity,\r\n ProductsDataActions,\r\n ProductType,\r\n ProductWarehouseInventoryAvailability,\r\n ReleasedProductType\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport {\r\n ArrayExtensions,\r\n createInventoryAvailabilitySearchCriteria,\r\n DeliveryMode,\r\n getSelectedProductIdFromActionInput,\r\n getSelectedVariant,\r\n IProductInventoryInformation,\r\n mapAggregatedProductInventoryInformation,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { GetCatalogIdFromContext } from '../utilities';\r\nimport { getCatalogWarehouseAsync, getInventoryLabelAsync } from './DataActionExtension.g';\r\nimport { IInventoryLabelInput } from './DataServiceEntities.g';\r\n\r\n/**\r\n * Input class for the getProductAvailabilitiesForSelectedVariant Data Action.\r\n */\r\nexport class ProductAvailabilitiesForSelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public constructor(productId: number | string, channelId: number) {\r\n this.productId = typeof productId === 'string' ? +productId : productId;\r\n this.channelId = channelId;\r\n }\r\n\r\n /**\r\n * GetCacheKey.\r\n * @returns - Returns string.\r\n */\r\n public getCacheKey = (): string => 'ProductAvailabilitiesForSelectedVariant';\r\n\r\n /**\r\n * GetCacheObjectType.\r\n * @returns - Cache Object Type string.\r\n */\r\n public getCacheObjectType = (): string => 'ProductAvailabilities';\r\n\r\n /**\r\n * DataCacheType.\r\n * @returns - CacheType string.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the getProductAvailabilitiesForSelectedVariant data action.\r\n * @param inputData - The input data passed to the createInput method.\r\n * @returns - ProductAvailabilitiesForSelectedVariant or error.\r\n */\r\nexport const createProductAvailabilitiesForSelectedVariantInput = (\r\n inputData: ICreateActionContext>\r\n): ProductAvailabilitiesForSelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n\r\n if (productId) {\r\n return new ProductAvailabilitiesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId);\r\n }\r\n throw new Error('Unable to create ProductAvailabilitiesForSelectedVariantInput, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * The action method for the getProductAvailabilitiesForSelectedVariant data action.\r\n * @param input - ProductAvailabilitiesForSelectedVariant.\r\n * @param ctx - Action Context.\r\n * @returns - Product inventory information.\r\n */\r\nexport async function getProductAvailabilitiesForSelectedVariantAction(\r\n input: ProductAvailabilitiesForSelectedVariantInput,\r\n ctx: IActionContext\r\n): Promise {\r\n const selectedVariantInput = new SelectedVariantInput(input.productId, input.channelId, undefined, undefined, ctx.requestContext);\r\n let productInventoryInformation: IProductInventoryInformation[] = [];\r\n\r\n try {\r\n const productResult = await getSelectedVariant(selectedVariantInput, ctx);\r\n\r\n // Don't get availability if it is service item && enableStockCheck is disbaled.\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Reading config.\r\n if (\r\n ctx.requestContext.app.config.enableStockCheck &&\r\n productResult &&\r\n productResult.ItemTypeValue !== ReleasedProductType.Service &&\r\n productResult.ProductTypeValue !== ProductType.Master\r\n ) {\r\n const catalogId = GetCatalogIdFromContext(ctx);\r\n let inventLocationId = ctx.requestContext.channel?.InventLocation || '';\r\n //For some reason this configu is not coming through\r\n const shouldFilterByCatalog: boolean = true; //ctx.requestContext.app.config.enableCatalogWarehouseFiltering || false;\r\n\r\n if (shouldFilterByCatalog && catalogId > 0) {\r\n const catalogWarehouseResponse = await getCatalogWarehouseAsync({ callerContext: ctx }, catalogId);\r\n if (!catalogWarehouseResponse?.IsDefaultWarehouse) {\r\n inventLocationId = catalogWarehouseResponse.CatalogWarehouse || inventLocationId;\r\n }\r\n }\r\n const shippingSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [productResult.RecordId],\r\n true,\r\n undefined,\r\n undefined,\r\n DeliveryMode.shipping\r\n );\r\n const pickupSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [input.productId],\r\n false,\r\n true,\r\n undefined,\r\n DeliveryMode.pickup\r\n );\r\n const shippingAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n shippingSearchCriteria\r\n );\r\n\r\n const fullAvailability: IProductInventoryInformation[] = [];\r\n if (shippingAvailability.ProductWarehouseInventoryAvailabilities) {\r\n const shippingInventory = mapAggregatedProductInventoryInformation(ctx, shippingAvailability);\r\n if (ArrayExtensions.hasElements(shippingInventory)) {\r\n fullAvailability.push(...shippingInventory);\r\n shippingInventory[0].deliveryType = DeliveryMode.shipping;\r\n productInventoryInformation.push(shippingInventory[0]);\r\n }\r\n }\r\n const pickupAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n pickupSearchCriteria\r\n );\r\n if (pickupAvailability.ProductWarehouseInventoryAvailabilities) {\r\n const pickupInventory = mapAggregatedProductInventoryInformation(ctx, pickupAvailability);\r\n if (ArrayExtensions.hasElements(pickupInventory)) {\r\n fullAvailability.push(...pickupInventory);\r\n pickupInventory[0].deliveryType = DeliveryMode.pickup;\r\n productInventoryInformation.push(pickupInventory[0]);\r\n }\r\n }\r\n if (shouldFilterByCatalog && catalogId !== 0 && ArrayExtensions.hasElements(fullAvailability)) {\r\n const filteredWarehouse = fullAvailability.filter(f => f.InventLocationId === inventLocationId);\r\n if (filteredWarehouse.length === 0) {\r\n const productInput: IInventoryLabelInput = {\r\n ItemId: productResult.ItemId,\r\n Quantity: 0\r\n };\r\n const labelData = await getInventoryLabelAsync({ callerContext: ctx }, [productInput]);\r\n if (labelData?.length) {\r\n const label = labelData[0];\r\n filteredWarehouse.push({\r\n IsProductAvailable: false,\r\n ProductAvailableQuantity: {\r\n ProductId: label.ProductId,\r\n AvailableQuantity: label.Quantity\r\n },\r\n InventLocationId: inventLocationId,\r\n deliveryType: DeliveryMode.shipping,\r\n StockLevelCode: label.Code,\r\n StockLevelLabel: label.Label\r\n });\r\n }\r\n } else {\r\n filteredWarehouse.forEach(fw => (fw.deliveryType = DeliveryMode.shipping));\r\n }\r\n productInventoryInformation = [...filteredWarehouse];\r\n }\r\n return productInventoryInformation;\r\n }\r\n return undefined;\r\n } catch (error) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- cann't assign type to the error variable.\r\n // @ts-ignore\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug('[getPriceForSelectedVariantAction]Error executing action');\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * The function that maps a ProductWareHouse object into a ProductAvailabilityQuantity.\r\n * @param productsWarehouseInventory - Product warehouse inventory.\r\n * @returns Product Available quantity.\r\n */\r\nexport function mergeProductWarehouseToProductAvailabities(\r\n productsWarehouseInventory: ProductWarehouseInventoryAvailability[]\r\n): ProductAvailableQuantity[] {\r\n const productAvailable: ProductAvailableQuantity[] = [];\r\n if (ArrayExtensions.hasElements(productsWarehouseInventory)) {\r\n for (const product of productsWarehouseInventory) {\r\n if (product.TotalAvailable !== undefined && product.ProductId !== undefined) {\r\n productAvailable.push({ ProductId: product.ProductId, AvailableQuantity: product.TotalAvailable });\r\n }\r\n }\r\n }\r\n return productAvailable;\r\n}\r\n\r\n/**\r\n * The complete getProductAvailabilitiesForSelectedVariant data action\r\n * Get the currently selected variant via the getSelectedVariant data action, and\r\n * then gets the availabilities for the variant via the getProductAvailabilities RetailServer API.\r\n */\r\nexport const getProductAvailabilitiesForSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-product-availabilities-for-selected-variant',\r\n action: >getProductAvailabilitiesForSelectedVariantAction,\r\n input: createProductAvailabilitiesForSelectedVariantInput\r\n});\r\n\r\nexport default getProductAvailabilitiesForSelectedVariantActionDataAction;\r\n","import { AsyncResult, Cart } from '@msdyn365-commerce/retail-proxy';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { IActionContext } from '@msdyn365-commerce/core-internal';\r\nimport { GetCatalogIdFromContext } from './get-catalog-id-from-context';\r\n\r\nexport const GetCartFromCache = (context: IActionContext): Cart | undefined => {\r\n const cacheKey = _buildCartCacheKey(context);\r\n const cacheObjectType = 'CART';\r\n\r\n const cartResult = context.get>(cacheObjectType, cacheKey);\r\n\r\n let cart: Cart | undefined;\r\n if (cartResult) {\r\n if (Array.isArray(cartResult)) {\r\n cart = cartResult[0].result?.cart;\r\n } else {\r\n cart = cartResult.result?.cart;\r\n }\r\n }\r\n\r\n return cart;\r\n};\r\n\r\nconst _buildCartCacheKey = (context: IActionContext) => {\r\n const catalogId = GetCatalogIdFromContext(context);\r\n const channelId = context.requestContext.channel!.RecordId;\r\n return `GETCART-CHANNELID:${channelId}-CATALOGID:${catalogId}`;\r\n};\r\n","import { IActionContext } from '@msdyn365-commerce/core-internal';\r\n\r\n/**\r\n * Gets Catalog ID from the action context object\r\n * @param context\r\n * @constructor\r\n */\r\nexport const GetCatalogIdFromContext = (context: IActionContext): number => {\r\n if (!context.requestContext.user) {\r\n return 0;\r\n }\r\n let catalogId =\r\n (context.requestContext.query && context.requestContext.query['catalogid'] && +context.requestContext.query['catalogid']) || 0;\r\n if (catalogId === 0) {\r\n catalogId = (context.requestContext.user.catalogId && +context.requestContext.user.catalogId) || 0;\r\n }\r\n\r\n return catalogId;\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/add-order-template-to-cart-override.action';\n binding.dataActions[actionPath] = require('partner/actions/add-order-template-to-cart-override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/create-order-template-override.action';\n binding.dataActions[actionPath] = require('partner/actions/create-order-template-override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-availabilities-cartlines-override.action';\n binding.dataActions[actionPath] = require('partner/actions/get-availabilities-cartlines-override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-customer-contacts.action';\n binding.dataActions[actionPath] = require('partner/actions/get-customer-contacts.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-order-templates-preview-override.action';\n binding.dataActions[actionPath] = require('partner/actions/get-order-templates-preview-override.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-availabilities-for-selected-variant-override.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-availabilities-for-selected-variant-override.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":["ContactEntityExtensionClass","constructor","odataObject","this","ContactPersonId","PersonId","BusinessPartnerId","FirstName","LastName","Email","SpendingLimit","parseFloat","IsAdmin","AccountNumber","B2BUserId","ExtensionProperties","undefined","i","length","className","substr","lastIndexOf","concat","EntityClasses","EligibleCustomerEntityExtensionClass","Name","ContactPersonID","IsSelected","UserInfoEntityExtensionClass","IsB2BAdmin","Phone","VatNumber","CreateContactResponseExtensionClass","Success","UpdateContactResponseExtensionClass","RemoveContactResponseExtensionClass","SaveSessionCustomerResponseExtensionClass","Message","GetEligibleCustomersTotalResponseExtensionClass","Total","ChargeOverriden","GetUserInfoResponseExtensionClass","UserInfo","getContactsInput","queryResultSettings","DataServiceQuery","resultSettings","createDataServiceRequestForOperation","DataServiceEntities","bypassCache","returnEntity","getContactsAsync","context","request","callActionOrExecute","callerContext","createContactInput","accountNum","firstName","lastName","email","createContactAsync","updateContactInput","contactPersonId","personId","updateContactAsync","removeContactInput","removeContactAsync","getEligibleCustomersInput","getEligibleCustomersAsync","saveSessionCustomerInput","cartId","saveSessionCustomerAsync","getEligibleCustomersTotalInput","checkoutCartId","getEligibleCustomersTotalAsync","getUserInfoInput","getUserInfoAsync","CreateCatalogResponseEntityExtensionClass","ProductListId","EveProductListExtensionClass","Id","CustomerId","CreatedDateTime","Date","jsonLightReadStringPropertyValue","LastUpdated","DeletedDateTime","ProductListTypeValue","DataAreaId","ProductListLines","InventoryLabelEntityExtensionClass","ItemId","RecId","parseInt","UpperBoundInclusive","Label","LanguageId","Txt","ProductId","Code","Quantity","GetCatalogWarehouseResponseExtensionClass","CatalogWarehouse","IsDefaultWarehouse","createCatalogProductListInput","productList","catalogId","createCatalogProductListAsync","deleteCatalogProductListInput","productListId","deleteCatalogProductListAsync","getCatalogProductListInput","productListSearchCriteria","getCatalogProductListAsync","getInventoryLabelInput","availabilities","getInventoryLabelAsync","getCatalogWarehouseInput","getCatalogWarehouseAsync","AddOrderTemplateToCartInput","orderTemplateId","getCacheKey","getCacheObjectType","dataCacheType","addOrderTemplateToCartInput","inputData","requestContext","user","isAuthenticated","Error","async","addOrderTemplateToCartAction","input","cartState","getCartState","GetCatalogIdFromContext","chunkCount","Paging","Top","Skip","getPaginatedOrderTemplateLinesInput","GetPaginatedOrderTemplateLinesInput","orderTemplateLines","getPaginatedOrderTemplateLinesAction","addedCartLines","skip","lines","cartLines","map","productLine","_productLine$fullProd","fullProduct","ProductDetails","productListLine","TrackingId","UnitOfMeasureSymbol","UnitOfMeasure","CatalogId","addCartLinesAsync","cart","Version","catch","error","_error$data","_error$data2","telemetry","trace","data","ValidationResults","refreshCart","addOrderTemplateToCartActionDataAction","createObservableDataAction","id","action","CreateOrderTemplateInput","templateName","createOrderTemplateInput","createOrderTemplateAction","ctx","GetCartFromCache","ArrayExtensions","hasElements","CartLines","orderTemplate","ProductListType","OrderTemplate","createdProductListId","searchCriteria","customerAccountNumber","createdList","createOrderTemplateActionDataAction","ProductAvailabilitiesForCartLineItems","apiSettings","buildCacheKey","getDeliveryMode","cartLine","_channelDeliveryOptio","featureSate","arguments","channelDeliveryOptionConfig","pickupDeliveryMode","DeliveryMode","PickupDeliveryModeCodes","find","deliveryMode","getAvailabilitiesForCartLineItems","_featureState$find","_ctx$requestContext$c","shippingItems","bopisItems","productAvailabilities","channelConfiguration","getOrgUnitConfigurationAsync","products","getActiveCartProductsAction","ActiveCartProductsInput","featureState","getFeatureStateActionDataAction","FeatureStateInput","getFeatureState","retailMultiplePickUpOptionEnabled","item","IsEnabled","getChannelDeliveryOptionConfigurationAsync","PickupDeliveryModeCode","EmailDeliveryModeCode","push","inventLocationId","channel","InventLocation","catalogWarehouseResponse","productIds","x","unique","productWarehouses","productId","productWarehouse","InventLocationId","InventLocationDataAreaId","quantityUnitTypeSales","getProductWarehouseAvail","getEstimatedProductWarehouseAvailabilityAsync","ProductWarehouseInventoryAvailabilities","mapAggregatedProductInventoryInformation","bopisItem","WarehouseId","productWarehouseMapping","mapProductInventoryInformation","getAvailabilitiesForCartLineItemsDataAction","ContactsInput","createGetContactsInput","getContactUsers","then","users","exception","getContactsDataAction","GetOrderTemplatesPreviewInput","count","createGetOrderTemplatesPreviewInput","QueryResultSettingsProxy","fromInputData","QueryResultSettings","getOrderTemplatesPreview","getPagingFromInputDataOrDefaultValue","resp","orderTemplates","inputLinesRequests","productLists","list","inputLine","inputLinesResponses","Promise","all","productLinesResponse","filter","totalCount","getOrderTemplatesPreviewDataAction","ProductAvailabilitiesForSelectedVariantInput","channelId","createProductAvailabilitiesForSelectedVariantInput","getSelectedProductIdFromActionInput","getProductAvailabilitiesForSelectedVariantAction","selectedVariantInput","SelectedVariantInput","productInventoryInformation","productResult","getSelectedVariant","app","config","enableStockCheck","ItemTypeValue","ReleasedProductType","Service","ProductTypeValue","ProductType","Master","shouldFilterByCatalog","shippingSearchCriteria","createInventoryAvailabilitySearchCriteria","RecordId","shipping","pickupSearchCriteria","pickup","shippingAvailability","ProductsDataActions","fullAvailability","shippingInventory","deliveryType","pickupAvailability","pickupInventory","filteredWarehouse","f","productInput","labelData","label","IsProductAvailable","ProductAvailableQuantity","AvailableQuantity","StockLevelCode","StockLevelLabel","forEach","fw","debug","mergeProductWarehouseToProductAvailabities","productsWarehouseInventory","productAvailable","product","TotalAvailable","getProductAvailabilitiesForSelectedVariantActionDataAction","cacheKey","_buildCartCacheKey","cartResult","get","_cartResult$0$result","_cartResult$result","Array","isArray","result","query","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","exportName","Action","require","window","__bindings__","_objectSpread","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}