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AIf,OAAO,GAGEC,EAAc,CACvBrE,OAAQyE,EACRL,sBA3KoC,MA4KpCI,KAAKhL,EAAUpM,GACX,MA3FYwZ,EAAC3C,EAASzK,EAAUpM,KAQpC,IAAKoM,IAAaA,EAAS5H,QACvB,OAAO,EAGX,MAAMkU,EAAQnG,EAAYnG,EAAS5H,QAAQmU,iBACrC/R,EAAU0R,EAAsBlM,IAAa,GAC7C1H,EAAO0H,EAAS1H,KAEtB,IAAKA,EACD,OAAO,EAGX,GAAI2S,EAAclL,QAAQuM,EAAMZ,YAAc,EAI1C,OAHoBE,EAAuBU,EAAO9R,EAAS5G,EAAS6W,GACxDzK,SAAWA,EACvBA,EAAS3H,KAAuB,iBAATC,EAAoB0E,KAAK0H,MAAMpM,GAAQA,OACrCpD,IAAlB8K,EAAS3H,KAGpB,OAAO,GAgEI+U,CAAY5V,KAAMwI,EAAUpM,IAGvC+W,MAAMlX,EAASG,GACX,OAAOyY,EAAa7U,KAAM/D,EAASG","sources":["webpack://Msdyn365.Commerce.Online/../src/retail-action.ts?fc97","webpack://Msdyn365.Commerce.Online/../../src/extensions/StringExtensions.ts?6e3d","webpack://Msdyn365.Commerce.Online/../../src/exceptions/ProxyErrorSDK.ts?c06e","webpack://Msdyn365.Commerce.Online/../../src/exceptions/ProxyError.ts?f6d3","webpack://Msdyn365.Commerce.Online/../../src/logging/ConsoleEventWriter.ts?1638","webpack://Msdyn365.Commerce.Online/../../src/logging/RetailLogger.ts?9e7e","webpack://Msdyn365.Commerce.Online/../../src/logging/Tracer.ts?faf4","webpack://Msdyn365.Commerce.Online/../../src/exceptions/ErrorHelper.ts?deca","webpack://Msdyn365.Commerce.Online/../../src/externals/helper.ts?18b4","webpack://Msdyn365.Commerce.Online/../../src/exceptions/ErrorParser.ts?d883","webpack://Msdyn365.Commerce.Online/../../src/externals/DataJS.New.ts?f131","webpack://Msdyn365.Commerce.Online/../../src/externals/handler.ts?a98d"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from './async-result';\nimport { IDataServiceRequest } from './Interfaces';\n\n/**\n * Calls the Retail action\n */\nexport function retailAction(input: IDataServiceRequest, callerContext: unknown): Promise {\n return input.execute(callerContext);\n}\n\nretailAction.prototype = {\n isAction: true,\n isObservable: true\n};\n\nexport function callActionOrExecute(request: IDataServiceRequest, callerContext: any): AsyncResult {\n return callerContext.chainAction ? callerContext.chainAction(retailAction, request) : request.execute(callerContext);\n}\n\nexport function executeAction(request: IDataServiceRequest, context: any): AsyncResult {\n if (!context) {\n throw new Error('context is undefined while executing action');\n }\n\n if (context.callerContext && context.callerContext.chainAction) {\n context.bypassCache && request.overrideCacheType(context.bypassCache);\n context.clientTimeoutInMs && request.setClientTimeoutInMs(context.clientTimeoutInMs);\n return context.callerContext.chainAction(retailAction, request);\n } else if (context.chainAction) {\n return context.chainAction(retailAction, request);\n }\n\n return new AsyncResult((resolve, reject) => {\n request\n .execute(context)\n .then(result => {\n resolve(result);\n })\n .catch(error => {\n reject(error);\n });\n });\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// TODO - refactor to incorporate inbuilt JS extension method\n// TODO - integrate Trace.error\n\nexport const EMPTY = '';\n\nexport function convertToString(obj: any, accumulator: string[] = [], depth: number = 0): string {\n if (!obj) {\n return null;\n }\n\n if (typeof obj === 'string') {\n return obj;\n }\n\n if (typeof obj !== 'object') {\n return obj.toString();\n }\n\n for (const prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n const value = obj[prop];\n const stringifyValue = convertToString(value, accumulator, depth + 1);\n if (stringifyValue) {\n if (accumulator.length > 0 && depth === 0) {\n accumulator.push('&');\n }\n accumulator.push(prop);\n accumulator.push(typeof value === 'object' ? '.' : ':');\n accumulator.push(stringifyValue);\n }\n }\n }\n\n if (depth === 0) {\n return accumulator.join(EMPTY);\n }\n}\n\n/**\n * Verifies whether the object array has elements.\n *\n * @param {any[]} array The array.\n * @return {boolean} True if the object has elements, false otherwise.\n */\nexport function hasElements(array?: any[]): boolean {\n return !!array && array.length > 0;\n}\n\n/**\n * Verifies whether the string is empty or whitespace, but not null.\n *\n * @param {string} object The object.\n * @return {boolean} True if the object is empty or whitespace, false otherwise.\n */\nexport function isObjectNotEmptyOrNull(value: object): boolean {\n return value && typeof value === 'object' && Object.keys(value).length > 0;\n}\n\n/**\n * Verifies whether the string is empty, but not null.\n *\n * @param {string} object The object.\n * @return {boolean} True if the object is empty, false otherwise.\n */\nexport function isEmpty(object: string): boolean {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.isEmpty() has received input parameter not of type string.\");\n }\n return object != null && object.length === 0;\n}\n\n/**\n * Verifies whether the string is empty or whitespace, but not null.\n *\n * @param {string} object The object.\n * @return {boolean} True if the object is empty or whitespace, false otherwise.\n */\nexport function isEmptyOrWhitespace(object: string): boolean {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.isEmptyOrWhitespace() has received input parameter not of type string.\");\n }\n if (object) {\n // Make sure object is of type string\n object = object.toString();\n\n return typeof object.trim === 'function' && (object.trim() || '').length === 0;\n }\n return false;\n}\n\n/**\n * Verifies whether the string is null or whitespace.\n *\n * @param {string} object The object.\n * @return {boolean} True if the object is null or whitespace, false otherwise.\n */\nexport function isNullOrWhitespace(object: string): boolean {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.isNullOrWhitespace() has received input parameter not of type string.\");\n }\n let returnValue = true;\n try {\n returnValue = !object;\n if (!returnValue) {\n // Make sure object is of type string\n object = object.toString();\n returnValue = object.trim().length === 0;\n }\n } catch (err) {\n // Commerce.Proxy.Tracer.Error(\"StringExtensions.isNullOrWhitespace() caught exception = {0}\", err.message);\n }\n\n return returnValue;\n}\n\n/**\n * Pad left with padString until the required length is reached.\n */\nexport function padLeft(object: string, padString: string, length: number): string {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.padLeft() has received input parameter not of type string.\");\n }\n\n if (!padString || !object) {\n return object;\n }\n\n while (object.length < length) {\n object = padString + object;\n }\n return object;\n}\n\n/**\n * Pad right with padString until the required length is reached.\n */\nexport function padRight(object: string, padString: string, length: number): string {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.padRight() has received input parameter not of type string.\");\n }\n\n if (!padString || !object) {\n return object;\n }\n\n while (object.length < length) {\n object += padString;\n }\n return object;\n}\n\n/**\n * Basic C# like string format function.\n */\nexport function format(object: string, ...params: any[]): string {\n if (object && typeof object !== 'string') {\n // Tracer.Error(\"StringExtensions.isEmptyOrWhitespace has received input parameter not of type string.\");\n }\n\n if (isNullOrWhitespace(object)) {\n return object;\n }\n\n if (params == null) {\n throw new Error('StringExtensions::format Invalid parameter (params) cannot be null.');\n }\n\n for (let index = 0; index < params.length; index++) {\n if (params[index] == null) {\n throw new Error('StringExtensions::format Invalid parameter (at index ' + index + ') cannot be null or undefined.');\n }\n\n // escape '$' to avoid '$0' issue, '$$$$' means '$$' escaped\n const param = params[index].toString().replace(/\\$/gi, '$$$$');\n const regexp = new RegExp('\\\\{' + index + '\\\\}', 'gi');\n object = object.replace(regexp, param);\n }\n\n return object;\n}\n\n/**\n * Returns an ordinal to indicate the ordering of the strings\n * -1: This object is less than comparison object\n * 0: This object is equal to the comparison object\n * 1: This object is greater than the comparison object\n */\nexport function compare(object: string, comparisonObject: string, ignoreCase?: boolean): number {\n if (!object && !comparisonObject) {\n return 0;\n } else if (!object) {\n return -1;\n } else if (!comparisonObject) {\n return 1;\n }\n\n const val1: string = ignoreCase ? object.toLowerCase() : object;\n const val2: string = ignoreCase ? comparisonObject.toLowerCase() : comparisonObject;\n\n return val1 < val2 ? -1 : val1 > val2 ? 1 : 0;\n}\n\n/**\n * Replaces new line character with
for display.\n */\nexport function replaceNewLineWithBr(text: string) {\n if (text) {\n return replaceAll(text, '\\n', '
');\n }\n\n return text;\n}\n\n/**\n * Replaces all instances of @txtToReplace\n */\nexport function replaceAll(txt, txtToReplace, valueToReplaceWith) {\n return txt.replace(new RegExp(txtToReplace, 'g'), valueToReplaceWith);\n}\n\n/**\n * Escapes single quote to be send as part of URLs.\n */\nexport function escapeSingleQuote(text: string) {\n return text.replace(/(')/g, '\\'$1');\n}\n\n/**\n * Removes the trailing slashes from the URI.\n *\n * @param {string} uri The URI to clean.\n * @return {string} The uri without trailing slashes.\n */\nexport function CleanUri(uri: string): string {\n if (isNullOrWhitespace(uri)) {\n return EMPTY;\n }\n\n // the cutoff index for the string\n let cutoffIndex = uri.length - 1;\n\n while (cutoffIndex >= 0 && (uri[cutoffIndex] === '/' || uri[cutoffIndex] === '\\\\')) {\n --cutoffIndex;\n }\n\n // if it ever becomes negative, cutoffIndex + 1 = 0\n return uri.substr(0, cutoffIndex + 1);\n}\n\n/**\n * Determines whether the end of string matches a specified string.\n *\n * @param {string} str: The string to search in.\n * @param {string} suffix: The string to compare to the substring at the end of str.\n * @param {boolean} caseSensitive: Determines if the comparison case sensitive (false, by default)\n * @return {boolean} true if suffix matches the end of str; otherwise, false.\n */\nexport function endsWith(str: string, suffix: string, caseSensitive: boolean = false): boolean {\n if (!str || !suffix) {\n return false;\n }\n if (suffix.length > str.length) {\n return false;\n }\n\n const originalString: string = caseSensitive ? str : str.toLowerCase();\n const subString: string = caseSensitive ? suffix : suffix.toLowerCase();\n return originalString.indexOf(subString, originalString.length - subString.length) !== -1;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// Following reference is added to fix the build dependency between CommerceContxt and DataServiceQuery.\n// This will eventually be moved to CommerceContext.ts when MPOS proxy and Commerce Proxy are merged.\nexport class ProxyErrorSDK extends Error {\n public errorCode: string;\n public errorMessage: string;\n public localizedErrorMessage: string = '';\n public canRetry: boolean = false;\n public commerceException: any;\n public formatData: any[] = [];\n public requestUri: any;\n public data: any;\n public statusCode: any;\n\n constructor(\n errorCode: string,\n errorMessage: string,\n canRetry: boolean\n ) {\n super();\n this.name = errorCode;\n this.message = errorMessage;\n this.errorCode = errorCode;\n this.errorMessage = errorMessage;\n this.canRetry = canRetry;\n Object.setPrototypeOf(this, ProxyErrorSDK.prototype);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// Following reference is added to fix the build dependency between CommerceContxt and DataServiceQuery.\n// This will eventually be moved to CommerceContext.ts when MPOS proxy and Commerce Proxy are merged.\n\nimport { ProxyErrorSDK } from './ProxyErrorSDK';\n\n'use strict';\n\n/**\n * Class for representing an error.\n */\nexport class ProxyError {\n private _errorCode: string;\n private _errorMessage: string;\n private _localizedErrorMessage: string;\n private _canRetry: boolean = false;\n private _commerceException: any;\n private _formatData: any[];\n private _extraData: any;\n\n constructor(errorCode: string, errorMessage: string, localizedErrorMessage, canRetry: boolean, extraData: any, ...formatData: any[]) {\n this._errorCode = errorCode;\n this._errorMessage = errorMessage;\n this._localizedErrorMessage = localizedErrorMessage;\n this._canRetry = canRetry;\n this._commerceException = null;\n this._formatData = formatData;\n if (extraData && typeof extraData == 'object' && extraData.request) {\n // Remove sensitive data (EUII) so that it doesn't get logged to AppInsights\n extraData.request.headers = {};\n extraData.request.data = {};\n extraData.request.body = {};\n }\n this._extraData = extraData;\n }\n\n /**\n * Takes a proxy error and returns a proper JS error version of it\n * @param proxyError The proxyError\n */\n public static toError(proxyError: ProxyError): Error {\n const errorName = proxyError.ErrorCode || 'Proxy Error';\n const errorMessage = proxyError.ErrorMessage || proxyError.LocalizedErrorMessage;\n const e = new ProxyErrorSDK(errorName, errorMessage, proxyError.CanRetry);\n\n // Assign extra error details to error.\n // ts-ignoring as the standard error contract only supports name and message\n if (proxyError.extraData) {\n e.requestUri = proxyError.extraData.requestUri;\n\n e.data = proxyError.extraData.data;\n\n e.statusCode = proxyError.extraData.statusCode;\n }\n\n return e;\n }\n\n /**\n * Gets the commerce exception that caused this error.\n *\n * @return {any} The commerce exception.\n */\n public get commerceException(): any {\n return this._commerceException;\n }\n\n /**\n * Sets the commerce exception that caused this error.\n *\n * @param {any} exception The commerce exception.\n */\n public set commerceException(exception: any) {\n this._commerceException = exception;\n }\n\n /**\n * Gets the error code.\n *\n * @return {string} The error code.\n */\n public get ErrorCode(): string {\n return this._errorCode;\n }\n\n /**\n * Gets the error message.\n *\n * @return {string} The error message.\n */\n public get ErrorMessage(): string {\n return this._errorMessage;\n }\n\n /**\n * Gets the localized error message.\n *\n * @return {string} The localized error message.\n */\n public get LocalizedErrorMessage(): string {\n return this._localizedErrorMessage;\n }\n\n /**\n * Gets the format data used on formatted error messages.\n *\n * @return {any[]} The format data.\n */\n public get formatData(): any[] {\n return this._formatData;\n }\n\n /**\n * Gets the additional information the might be supplied by the error.\n *\n * @return {any} The extra data.\n */\n public get extraData(): any {\n return this._extraData;\n }\n\n /**\n * Gets the error title. Defaults to the resource string string_29004 for the error title if\n * no error title is mapped for the error.\n */\n public get ErrorTitleResourceId(): string {\n const errorTitleResourceId = 'string_29004'; // Error string: There is a problem with the server\n return errorTitleResourceId;\n }\n\n /**\n * Gets whether the action that generated the error can be retried.\n *\n * @return {string} Whether the action that generated the error can be retried.\n */\n public get CanRetry(): boolean {\n return this._canRetry;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum EventLevel {\n LogAlways = 0,\n Critical = 1,\n Error = 2,\n Warning = 3,\n Informational = 4,\n Verbose = 5\n}\n\nexport enum EventChannel {\n Admin = 16,\n Operational = 17,\n Analytic = 18,\n Debug = 19\n}\n\nexport interface ILoggingSink {\n writeEvent(event: Event): void;\n setSessionInfo(\n appSessionId: string,\n userSessionId: string,\n deviceId: string,\n deviceNumber: string,\n terminalId: string,\n userId: string,\n tenantId: string,\n offlineAvailability: string,\n offlineCurrentMode: string,\n screenResolution: string\n ): void;\n setInstrumentationKey(instrumentationKey: string): void;\n}\n\nexport class Utils {\n public static getParameterNames(func: Function): string[] {\n return [];\n }\n\n public static generateGuid(): string {\n return '';\n }\n\n public static emptyGuid(): string {\n return '';\n }\n}\n\nexport enum EventType {\n None = 0,\n Custom = 1,\n PageView = 2\n}\n\nexport class PageViewMetadata {\n public PageName: string;\n}\n\nexport class EventStaticMetadata {\n public Name: string;\n public Id: number;\n public Version: number;\n public Level: EventLevel;\n public LevelName: string;\n public Channel: EventChannel;\n public ChannelName: string;\n public Keywords: string[];\n public Task: string;\n public OpCode: string;\n public Message: string;\n}\n\nexport class EventCoreFields {\n public ClientTimestamp: number;\n public AppSessionId: string;\n public UserSessionId: string;\n public DeviceId: string;\n public DeviceNumber: string;\n public TerminalId: string;\n public UserId: string;\n public TenantId: string;\n public OfflineAvailability: string;\n public OfflineCurrentMode: string;\n public ScreenResolution: string;\n}\n\nexport class Event {\n public Type: EventType;\n public PageViewMetadata: PageViewMetadata;\n public StaticMetadata: EventStaticMetadata;\n public CoreFields: EventCoreFields;\n public Payload: {\n [name: string]: any;\n };\n constructor(\n type: EventType,\n appSessionId: string,\n userSessionId: string,\n deviceId: string,\n deviceNumber: string,\n terminalId: string,\n userId: string,\n tenantId: string,\n offlineAvailability: string,\n offlineCurrentMode: string,\n screenResolution: string\n ) {}\n}\n\nexport class DebuggingConsoleSink implements ILoggingSink {\n public setSessionInfo(\n appSessionId: string,\n userSessionId: string,\n deviceId: string,\n deviceNumber: string,\n terminalId: string,\n userId: string,\n tenantId: string,\n offlineAvailability: string,\n offlineCurrentMode: string\n ): void {}\n\n public setInstrumentationKey(instrumentationKey: string): void {}\n\n public writeEvent(event: Event): void {}\n}\n\nexport class LoggerBase {\n public static writeEvent(\n name: string,\n eventId: number,\n version: number,\n channel: EventChannel,\n level: EventLevel,\n keywords: string[],\n task: string,\n opCode: string,\n message: string\n ) {\n // console.log(`name: ${name}, eventId: ${eventId}, version: ${version}, channel: ${this.getEnumKeyForValue(EventChannel, channel)}`);\n // console.log(\n // `level: ${this.getEnumKeyForValue(\n // EventLevel,\n // level\n // )}, keywords: ${keywords.toString()}, task: ${task}, opCode: ${opCode}, message: ${message}`\n // );\n }\n\n public static addLoggingSink(loggingSink: ILoggingSink): void {}\n\n public static getEnumKeyForValue(enumType: any, value: number): string {\n for (const key in Object.keys(enumType)) {\n if (enumType[key] === value) {\n return key;\n }\n }\n return '';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { EventChannel, EventLevel, ILoggingSink, LoggerBase } from './ConsoleEventWriter';\n\n/**\n * Attaches the logging sink to the LoggerBase.\n *\n * @method attachLoggingSink\n * @param sink {ILoggingSink} Sink to attach to Retail Logger.\n */\nexport function attachLoggingSink(sink: ILoggingSink) {\n LoggerBase.addLoggingSink(sink);\n}\n\nexport const modelManagersRetailServerRequestStarted = (requestId: string, requestUrl: string): void => {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestStarted',\n 44004,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' started.\"\n );\n};\n\nexport const modelManagersRetailServerRequestError = (requestId: string, requestUrl: string, error: string): void => {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestError',\n 44005,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' failed. Error: {2}.\"\n );\n};\n\nexport const modelManagersRetailServerRequestFinished = (requestId: string, requestUrl: string): void => {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestFinished',\n 44006,\n EventChannel.Debug,\n 1,\n EventLevel.Informational,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' succeeded.\"\n );\n};\n\nexport const genericWarning = (message: string): void => {\n LoggerBase.writeEvent('GenericWarning', 44001, 1, EventChannel.Operational, EventLevel.Warning, [], '', '', '{0}');\n};\n\nexport const genericError = (message: string): void => {\n LoggerBase.writeEvent('GenericEvent', 44000, 1, EventChannel.Operational, EventLevel.Error, [], '', '', '{0}');\n};\n\nexport const genericInfo = (message: string): void => {\n LoggerBase.writeEvent('GenericInfo', 44002, 1, EventChannel.Operational, EventLevel.Informational, [], '', '', '{0}');\n};\n\n/**\n * Class represents proxy events.\n * Event Code Range: 44000 - 44999.\n */\nexport class RetailLogger {\n public static LogEvent(eventName: Function, error?: string): void {\n error ? eventName(error) : eventName();\n }\n\n // Core - Event Range: 44000 - 44099.\n public static genericError(message: string): void {\n LoggerBase.writeEvent('GenericEvent', 44000, 1, EventChannel.Operational, EventLevel.Error, [], '', '', '{0}');\n }\n\n public static genericWarning(message: string): void {\n LoggerBase.writeEvent('GenericWarning', 44001, 1, EventChannel.Operational, EventLevel.Warning, [], '', '', '{0}');\n }\n\n public static genericInfo(message: string): void {\n LoggerBase.writeEvent('GenericInfo', 44002, 1, EventChannel.Operational, EventLevel.Informational, [], '', '', '{0}');\n }\n\n public static modelManagersRetailServerRequestStarted(requestId: string, requestUrl: string): void {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestStarted',\n 44004,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' started.\"\n );\n }\n\n public static modelManagersRetailServerRequestError(requestId: string, requestUrl: string, error: string): void {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestError',\n 44005,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' failed. Error: {2}.\"\n );\n }\n\n public static modelManagersRetailServerRequestFinished(requestId: string, requestUrl: string): void {\n LoggerBase.writeEvent(\n 'ModelManagersRetailServerRequestFinished',\n 44006,\n EventChannel.Debug,\n 1,\n EventLevel.Informational,\n [],\n '',\n '',\n \"The Retail Server Request with request id '{0}' and request url '{1}' succeeded.\"\n );\n }\n\n public static initEntitySetInvalidError(entitySetId: string): void {\n LoggerBase.writeEvent(\n 'InitEntitySetInvalidError',\n 44007,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"A method with invalid InitEntitySet id '{0}' was reported.\"\n );\n }\n\n public static initEntitySetMultipleTimesError(entitySetId: string): void {\n LoggerBase.writeEvent(\n 'InitEntitySetMultipleTimesError',\n 44008,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"A method with InitEntitySet ID '{0}' was reported multiple times.\"\n );\n }\n\n public static initEntitySetNoMethodNumberError(): void {\n LoggerBase.writeEvent(\n 'InitEntitySetNoMethodNumberError',\n 44009,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'The value InitEntitySet.All does not represent the number of methods that can be run'\n );\n }\n\n public static initPaymentEntitySetInvalidError(entitySetId: string): void {\n LoggerBase.writeEvent(\n 'InitPaymentEntitySetInvalidError',\n 44010,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"A method with invalid InitPaymentEntitySet id '{0}' was reported.\"\n );\n }\n\n public static initPaymentEntitySetMultipleTimesError(entitySetId: string): void {\n LoggerBase.writeEvent(\n 'InitPaymentEntitySetMultipleTimesError',\n 44011,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n \"A method with InitPaymentEntitySet ID '{0}' was reported multiple times.\"\n );\n }\n\n public static initPaymentEntitySetNoMethodNumberError(): void {\n LoggerBase.writeEvent(\n 'InitPaymentEntitySetNoMethodNumberError',\n 44012,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'The value InitPaymentEntitySet.All does not represent the number of methods that can be run'\n );\n }\n\n // Shopping Cart Service - Event Range: 44100 - 44199.\n public static shoppingCartServiceGetShoppingCartStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceGetShoppingCartStarted',\n 44100,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get shopping cart started.'\n );\n }\n\n public static shoppingCartServiceGetShoppingCartError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceGetShoppingCartError',\n 44101,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get shopping cart failed with error {0}.'\n );\n }\n\n public static shoppingCartServiceGetShoppingCartFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceGetShoppingCartFinished',\n 44102,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get shopping cart finished.'\n );\n }\n\n public static shoppingCartServiceRemoveFromCartStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceRemoveFromCartStarted',\n 44104,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Removing item from cart started.'\n );\n }\n\n public static shoppingCartServiceRemoveFromCartError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceRemoveFromCartError',\n 44105,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Removing item from cart failed with error {0}.'\n );\n }\n\n public static shoppingCartServiceRemoveFromCartFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartServiceRemoveFromCartFinished',\n 44106,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Removing item from cart finished.'\n );\n }\n\n public static shoppingCartApplyPromotionCodeStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartApplyPromotionCodeStarted',\n 44108,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Applying promotion code started.'\n );\n }\n\n public static shoppingCartApplyPromotionCodeError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartApplyPromotionCodeError',\n 44109,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Applying promotion code failed with error {0}.'\n );\n }\n\n public static shoppingCartApplyPromotionCodeFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartApplyPromotionCodeFinished',\n 44110,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Applying promotion code finished.'\n );\n }\n\n public static shoppingCartUpdateQuantityStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateQuantityStarted',\n 44112,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Updating quantity started.'\n );\n }\n\n public static shoppingCartUpdateQuantityError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateQuantityError',\n 44113,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Updating quantity failed with error {0}.'\n );\n }\n\n public static shoppingCartUpdateQuantityFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateQuantityFinished',\n 44114,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Updating quantity finished.'\n );\n }\n\n public static shoppingCartRemovePromotionCodeStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartRemovePromotionCodeStarted',\n 44116,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Removing promotion code started.'\n );\n }\n\n public static shoppingCartRemovePromotionCodeError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartRemovePromotionCodeError',\n 44117,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Removing promotion code failed with error {0}.'\n );\n }\n\n public static shoppingCartRemovePromotionCodeFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartRemovePromotionCodeFinished',\n 44118,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Removing promotion code finished.'\n );\n }\n\n public static shoppingCartUpdateLoyaltyCardIdStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateLoyaltyCardIdStarted',\n 44120,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Updating loyalty card id started.'\n );\n }\n\n public static shoppingCartUpdateLoyaltyCardIdError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateLoyaltyCardIdError',\n 44121,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Updating loyalty card id failed with error {0}.'\n );\n }\n\n public static shoppingCartUpdateLoyaltyCardIdFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartUpdateLoyaltyCardIdFinished',\n 44122,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Updating loyalty card id finished.'\n );\n }\n\n public static shoppingCartCommenceCheckoutStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartCommenceCheckoutStarted',\n 44124,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Commence checkout started.'\n );\n }\n\n public static shoppingCartCommenceCheckoutError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartCommenceCheckoutError',\n 44125,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Commence checkout failed with error {0}.'\n );\n }\n\n public static shoppingCartCommenceCheckoutFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartCommenceCheckoutFinished',\n 44126,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Commence checkout finished.'\n );\n }\n\n public static shoppingCartGetPromotionsStarted(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartGetPromotionsStarted',\n 44128,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting promotions started.'\n );\n }\n\n public static shoppingCartGetPromotionsError(error: string): void {\n LoggerBase.writeEvent(\n 'ShoppingCartGetPromotionsError',\n 44129,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting promotions failed with error {0}.'\n );\n }\n\n public static shoppingCartGetPromotionsFinished(): void {\n LoggerBase.writeEvent(\n 'ShoppingCartGetPromotionsFinished',\n 44130,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting promotions finished.'\n );\n }\n\n public static getSimpleProductsByIdStarted(): void {\n LoggerBase.writeEvent(\n 'getSimpleProductsByIdStarted',\n 44132,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting simple products by ids started.'\n );\n }\n\n public static getSimpleProductsByIdError(error: string): void {\n LoggerBase.writeEvent(\n 'getSimpleProductsByIdError',\n 44133,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting simple products by ids failed with error {0}.'\n );\n }\n\n public static getSimpleProductsByIdFinished(): void {\n LoggerBase.writeEvent(\n 'getSimpleProductsByIdFinished',\n 44134,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting simple products by ids finished.'\n );\n }\n\n public static getKitComponentsError(): void {\n LoggerBase.writeEvent(\n 'GetKitComponentsError',\n 44136,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'One of the kit components could not be retrieved.'\n );\n }\n\n public static searchProductsByProductIdsStarted(): void {\n LoggerBase.writeEvent(\n 'SearchProductsByProductIdsStarted',\n 44140,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Searching products by product ids started.'\n );\n }\n\n public static searchProductsByProductIdsError(error: string): void {\n LoggerBase.writeEvent(\n 'SearchProductsByProductIdsError',\n 44141,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Searching products by product ids failed with error {0}.'\n );\n }\n\n public static searchProductsByProductIdsFinished(): void {\n LoggerBase.writeEvent(\n 'SearchProductsByProductIdsFinished',\n 44142,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Searching products by product ids finished.'\n );\n }\n\n // Checkout Service - Event Range: 44200 - 44299.\n public static checkoutServiceGetAllDeliveryOptionDescriptionsStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetAllDeliveryOptionDescriptionsStarted',\n 44200,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get all delivery option descriptions started.'\n );\n }\n\n public static checkoutServiceGetAllDeliveryOptionDescriptionsError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetAllDeliveryOptionDescriptionsError',\n 44201,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get all delivery option descriptions failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetAllDeliveryOptionDescriptionsFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetAllDeliveryOptionDescriptionsFinished',\n 44202,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get all delivery option descriptions finished.'\n );\n }\n\n public static checkoutServiceGetDeliveryPreferencesStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetDeliveryPreferencesStarted',\n 44204,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting delivery preferences started.'\n );\n }\n\n public static checkoutServiceGetDeliveryPreferencesError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetDeliveryPreferencesError',\n 44205,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting delivery preferences failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetDeliveryPreferencesFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetDeliveryPreferencesFinished',\n 44206,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting delivery preferences finished.'\n );\n }\n\n public static checkoutServiceGetOrderDeliveryOptionsStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetOrderDeliveryOptionsStarted',\n 44208,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting order delivery options started.'\n );\n }\n\n public static checkoutServiceGetOrderDeliveryOptionsError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetOrderDeliveryOptionsError',\n 44209,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting order delivery options failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetOrderDeliveryOptionsFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetOrderDeliveryOptionsFinished',\n 44210,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting order delivery options finished.'\n );\n }\n\n public static checkoutServiceGetItemDeliveryOptionsStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetItemDeliveryOptionsStarted',\n 44212,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting item delivery options started.'\n );\n }\n\n public static checkoutServiceGetItemDeliveryOptionsError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetItemDeliveryOptionsError',\n 44213,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting item delivery options failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetItemDeliveryOptionsFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetItemDeliveryOptionsFinished',\n 44214,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting item delivery options finished.'\n );\n }\n\n public static checkoutServiceUpdateDeliverySpecificationsStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateDeliverySpecificationsStarted',\n 44216,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update of order delivery specifications started.'\n );\n }\n\n public static checkoutServiceUpdateDeliverySpecificationsError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateDeliverySpecificationsError',\n 44217,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Update of order delivery specifications failed with error {0}.'\n );\n }\n\n public static checkoutServiceUpdateDeliverySpecificationsFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateDeliverySpecificationsFinished',\n 44218,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update of order delivery specifications finished.'\n );\n }\n\n public static checkoutServiceUpdateLineDeliverySpecificationsStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateLineDeliverySpecificationsStarted',\n 44220,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update of line delivery specifications started.'\n );\n }\n\n public static checkoutServiceUpdateLineDeliverySpecificationsError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateLineDeliverySpecificationsError',\n 44221,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Update of line delivery specifications failed with error {0}.'\n );\n }\n\n public static checkoutServiceUpdateLineDeliverySpecificationsFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceUpdateLineDeliverySpecificationsFinished',\n 44222,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update of line delivery specifications finished.'\n );\n }\n\n public static checkoutServiceGetPaymentCardTypesStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetPaymentCardTypesStarted',\n 44224,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting payment card types started.'\n );\n }\n\n public static checkoutServiceGetPaymentCardTypesError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetPaymentCardTypesError',\n 44225,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting payment card types failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetPaymentCardTypesFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetPaymentCardTypesFinished',\n 44226,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting payment card types finished.'\n );\n }\n\n public static checkoutServiceGetGiftCardBalanceStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetGiftCardBalanceStarted',\n 44228,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting gift card balance started.'\n );\n }\n\n public static checkoutServiceGetGiftCardBalanceError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetGiftCardBalanceError',\n 44229,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Getting gift card balance failed with error {0}.'\n );\n }\n\n public static checkoutServiceGetGiftCardBalanceFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetGiftCardBalanceFinished',\n 44230,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Getting gift card balance finished.'\n );\n }\n\n public static checkoutServiceSubmitOrderStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceSubmitOrderStarted',\n 44232,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Submit order started.'\n );\n }\n\n public static checkoutServiceSubmitOrderError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceSubmitOrderError',\n 44233,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Submit order failed with error {0}.'\n );\n }\n\n public static checkoutServiceSubmitOrderFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceSubmitOrderFinished',\n 44234,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Submit order finished.'\n );\n }\n\n public static checkoutServiceGetCardPaymentAcceptUrlStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetCardPaymentAcceptUrlStarted',\n 44235,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get card payment accept url started.'\n );\n }\n\n public static checkoutServiceGetCardPaymentAcceptUrlFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetCardPaymentAcceptUrlFinished',\n 44236,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get card payment accept url finished.'\n );\n }\n\n public static checkoutServiceGetCardPaymentAcceptUrlError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceGetCardPaymentAcceptUrlError',\n 44237,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get card payment accept url failed with error {0}.'\n );\n }\n\n public static checkoutServiceRetrieveCardPaymentAcceptResultStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceRetrieveCardPaymentAcceptResultStarted',\n 44238,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Retrieve card payment accept result started.'\n );\n }\n\n public static checkoutServiceRetrieveCardPaymentAcceptResultFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceRetrieveCardPaymentAcceptResultFinished',\n 44239,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Retrieve card payment accept result finished.'\n );\n }\n\n public static checkoutServiceRetrieveCardPaymentAcceptResultError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceRetrieveCardPaymentAcceptResultError',\n 44240,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Retrieve card payment accept result failed with error {0}.'\n );\n }\n\n public static checkoutServiceCleanUpAfterSuccessfulOrderStarted(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceCleanUpAfterSuccessfulOrderStarted',\n 44241,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Shopping cart clean failed post successful submit order started.'\n );\n }\n\n public static checkoutServiceCleanUpAfterSuccessfulOrderError(error: string): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceCleanUpAfterSuccessfulOrderError',\n 44242,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Shopping cart clean failed post successful submit order with error {0}.'\n );\n }\n\n public static checkoutServiceCleanUpAfterSuccessfulOrderFinished(): void {\n LoggerBase.writeEvent(\n 'CheckoutServiceCleanUpAfterSuccessfulOrderFinished',\n 44243,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Shopping cart clean failed post successful submit order finished.'\n );\n }\n\n // Channel Service - Event Range: 44300 - 44349.\n public static channelServiceGetChannelConfigurationStarted(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetChannelConfigurationStarted',\n 44300,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get channel Configuration started.'\n );\n }\n\n public static channelServiceGetChannelConfigurationError(error: string): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetChannelConfigurationError',\n 44301,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get channel Configuration failed with error {0}.'\n );\n }\n\n public static channelServiceGetChannelConfigurationFinished(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetChannelConfigurationFinished',\n 44302,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get channel Configuration finished.'\n );\n }\n\n public static channelServiceGetCountryRegionInfoStarted(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCountryRegionInfoStarted',\n 44304,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get country region info started.'\n );\n }\n\n public static channelServiceGetCountryRegionInfoError(error: string): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCountryRegionInfoError',\n 44305,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get country region info failed with error {0}.'\n );\n }\n\n public static channelServiceGetCountryRegionInfoFinished(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCountryRegionInfoFinished',\n 44306,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get country region info finished.'\n );\n }\n\n public static channelServiceGetStateProvinceInfoStarted(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetStateProvinceInfoStarted',\n 44308,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get state province info started.'\n );\n }\n\n public static channelServiceGetStateProvinceInfoError(error: string): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetStateProvinceInfoError',\n 44309,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get state province info error {0}.'\n );\n }\n\n public static channelServiceGetStateProvinceInfoFinished(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetStateProvinceInfoFinished',\n 44310,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get state province info finished.'\n );\n }\n\n public static channelServiceGetTenderTypesStarted(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetTenderTypesStarted',\n 44312,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get tender types started.'\n );\n }\n\n public static channelServiceGetTenderTypesError(error: string): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetTenderTypesError',\n 44313,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get tender types failed with error {0}.'\n );\n }\n\n public static channelServiceGetTenderTypesFinished(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetTenderTypesFinished',\n 44314,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get tender types finished.'\n );\n }\n\n public static channelServiceGetCardTypesStarted(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCardTypesStarted',\n 44315,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get card types started.'\n );\n }\n\n public static channelServiceGetCardTypesError(error: string): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCardTypesError',\n 44316,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get card types failed with error {0}.'\n );\n }\n\n public static channelServiceGetCardTypesFinished(): void {\n LoggerBase.writeEvent(\n 'ChannelServiceGetCardTypesFinished',\n 44317,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get card types finished.'\n );\n }\n\n // Item Availability Service - Event Range: 44350 - 44369.\n public static storeProductAvailabilityServiceGetNearbyStoresWithAvailabilityStarted(): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresWithAvailabilityStarted',\n 44350,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get nearby stores with availability started.'\n );\n }\n\n public static storeProductAvailabilityServiceGetNearbyStoresWithAvailabilityError(error: string): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresWithAvailabilityError',\n 44351,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get nearby stores with availability failed with error {0}.'\n );\n }\n\n public static storeProductAvailabilityServiceGetNearbyStoresWithAvailabilityFinished(): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresWithAvailabilityFinished',\n 44352,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get nearby stores with availability finished.'\n );\n }\n\n public static storeProductAvailabilityServiceGetNearbyStoresStarted(): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresStarted',\n 44354,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get nearby stores started.'\n );\n }\n\n public static storeProductAvailabilityServiceGetNearbyStoresError(error: string): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresError',\n 44355,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get nearby stores failed with error {0}.'\n );\n }\n\n public static storeProductAvailabilityServiceGetNearbyStoresFinished(): void {\n LoggerBase.writeEvent(\n 'StoreProductAvailabilityServiceGetNearbyStoresFinished',\n 44356,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get nearby stores finished.'\n );\n }\n\n // Loyalty Service - Event Range: 44370 - 44399.\n public static loyaltyServiceGetLoyaltyCardsStarted(): void {\n LoggerBase.writeEvent(\n 'LoyaltyServiceGetLoyaltyCardsStarted',\n 44370,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get loyalty cards started.'\n );\n }\n\n public static loyaltyServiceGetLoyaltyCardsError(error: string): void {\n LoggerBase.writeEvent(\n 'LoyaltyServiceGetLoyaltyCardsError',\n 44371,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get loyalty cards failed with error {0}.'\n );\n }\n\n public static loyaltyServiceGetLoyaltyCardsFinished(): void {\n LoggerBase.writeEvent(\n 'LoyaltyServiceGetLoyaltyCardsFinished',\n 44372,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get loyalty cards finished.'\n );\n }\n\n public static loyaltyServiceUpdateLoyaltyCardIdStarted(): void {\n LoggerBase.writeEvent(\n 'loyaltyServiceUpdateLoyaltyCardIdStarted',\n 44374,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update loyalty card id started.'\n );\n }\n\n public static loyaltyServiceUpdateLoyaltyCardIdError(error: string): void {\n LoggerBase.writeEvent(\n 'LoyaltyServiceUpdateLoyaltyCardIdError',\n 44375,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Update loyalty card id failed with error {0}.'\n );\n }\n\n public static loyaltyServiceUpdateLoyaltyCardIdFinished(): void {\n LoggerBase.writeEvent(\n 'LoyaltyServiceUpdateLoyaltyCardIdFinished',\n 44376,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update loyalty card id finished.'\n );\n }\n\n // Customer Service - Event Range: 44400 - 44499.\n public static customerServiceGetCustomerStarted(): void {\n LoggerBase.writeEvent(\n 'CustomerServiceGetCustomerStarted',\n 44400,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get customer started.'\n );\n }\n\n public static customerServiceGetCustomerError(error: string): void {\n LoggerBase.writeEvent(\n 'CustomerServiceGetCustomerError',\n 44401,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get customer failed with error {0}.'\n );\n }\n\n public static customerServiceGetCustomerFinished(): void {\n LoggerBase.writeEvent(\n 'CustomerServiceGetCustomerFinished',\n 44402,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get customer finished.'\n );\n }\n\n public static customerServiceIsAuthenticationSessionStarted(): void {\n LoggerBase.writeEvent(\n 'CustomerServiceIsAuthenticationSessionStarted',\n 44403,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Is authentication session started.'\n );\n }\n\n public static customerServiceIsAuthenticationSessionError(error: string): void {\n LoggerBase.writeEvent(\n 'CustomerServiceIsAuthenticationSessionError',\n 44404,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Is authentication session failed with error {0}.'\n );\n }\n\n public static customerServiceIsAuthenticationSessionFinished(): void {\n LoggerBase.writeEvent(\n 'CustomerServiceIsAuthenticationSessionFinished',\n 44405,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Is authentication session finished.'\n );\n }\n\n // Order Service - Event Range: 44500 - 44599.\n public static getOrderHistoryStarted(): void {\n LoggerBase.writeEvent(\n 'GetOrderHistoryStarted',\n 44500,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get order history started.'\n );\n }\n\n public static getOrderHistoryError(error: string): void {\n LoggerBase.writeEvent(\n 'GetOrderHistoryError',\n 44501,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get order history failed with error {0}.'\n );\n }\n\n public static getOrderHistoryFinished(): void {\n LoggerBase.writeEvent(\n 'GetOrderHistoryFinished',\n 44502,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get order history finished.'\n );\n }\n\n public static getOrderDetailsStarted(): void {\n LoggerBase.writeEvent(\n 'GetOrderDetailsStarted',\n 44504,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get order details started.'\n );\n }\n\n public static getOrderDetailsError(error: string): void {\n LoggerBase.writeEvent(\n 'GetOrderDetailsError',\n 44505,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get order details failed with error {0}.'\n );\n }\n\n public static getOrderDetailsFinished(): void {\n LoggerBase.writeEvent(\n 'GetOrderDetailsFinished',\n 44506,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get order details finished.'\n );\n }\n\n // Commerce list realtime service - Event Range: 44600 - 44699.\n public static createWishListStarted(): void {\n LoggerBase.writeEvent(\n 'CreateWishListStarted',\n 44600,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Create wish list started.'\n );\n }\n\n public static createWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'CreateWishListError',\n 44601,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Create wish list failed with error {0}.'\n );\n }\n\n public static createWishListFinished(): void {\n LoggerBase.writeEvent(\n 'CreateWishListFinished',\n 44602,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Create wish list finished.'\n );\n }\n\n public static deleteWishListStarted(): void {\n LoggerBase.writeEvent(\n 'DeleteWishListStarted',\n 44604,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Delete wish list started.'\n );\n }\n\n public static deleteWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'DeleteWishListError',\n 44605,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Delete wish list failed with error {0}.'\n );\n }\n\n public static deleteWishListFinished(): void {\n LoggerBase.writeEvent(\n 'DeleteWishListFinished',\n 44606,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Delete wish list finished.'\n );\n }\n\n public static updateWishListStarted(): void {\n LoggerBase.writeEvent(\n 'UpdateWishListStarted',\n 44608,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update wish list started.'\n );\n }\n\n public static updateWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'UpdateWishListError',\n 44609,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Update wish list failed with error {0}.'\n );\n }\n\n public static updateWishListFinished(): void {\n LoggerBase.writeEvent(\n 'UpdateWishListFinished',\n 44610,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update wish list finished.'\n );\n }\n\n public static getWishListsStarted(): void {\n LoggerBase.writeEvent(\n 'GetWishListsStarted',\n 44612,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get wish lists started.'\n );\n }\n\n public static getWishListsError(error: string): void {\n LoggerBase.writeEvent(\n 'GetWishListsError',\n 44613,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get wish lists failed with error {0}.'\n );\n }\n\n public static getWishListsFinished(): void {\n LoggerBase.writeEvent(\n 'GetWishListsFinished',\n 44614,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get wish lists finished.'\n );\n }\n\n public static getWishListStarted(): void {\n LoggerBase.writeEvent(\n 'GetWishListStarted',\n 44616,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get wish list started.'\n );\n }\n\n public static getWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'GetWishListError',\n 44617,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Get wish list failed with error {0}.'\n );\n }\n\n public static getWishListFinished(): void {\n LoggerBase.writeEvent(\n 'GetWishListFinished',\n 44618,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Get wish list finished.'\n );\n }\n\n public static addLinesToWishListStarted(): void {\n LoggerBase.writeEvent(\n 'AddLinesToWishListStarted',\n 44620,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Add lines to wish list started.'\n );\n }\n\n public static addLinesToWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'AddLinesToWishListError',\n 44621,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Add lines to wish list failed with error {0}.'\n );\n }\n\n public static addLinesToWishListFinished(): void {\n LoggerBase.writeEvent(\n 'AddLinesToWishListFinished',\n 44622,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Add lines to wish list finished.'\n );\n }\n\n public static removeItemsFromWishListStarted(): void {\n LoggerBase.writeEvent(\n 'RemoveItemsFromWishListStarted',\n 44624,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Remove items from wish list started.'\n );\n }\n\n public static removeItemsFromWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'RemoveItemsFromWishListError',\n 44625,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Remove items from wish list failed with error {0}.'\n );\n }\n\n public static removeItemsFromWishListFinished(): void {\n LoggerBase.writeEvent(\n 'RemoveItemsFromWishListFinished',\n 44626,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Remove items from wish list finished.'\n );\n }\n\n public static updateLinesOnWishListStarted(): void {\n LoggerBase.writeEvent(\n 'UpdateLinesOnWishListStarted',\n 44628,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update lines on wish list started.'\n );\n }\n\n public static updateLinesOnWishListError(error: string): void {\n LoggerBase.writeEvent(\n 'UpdateLinesOnWishListError',\n 44629,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Update lines on wish list failed with error {0}.'\n );\n }\n\n public static updateLinesOnWishListFinished(): void {\n LoggerBase.writeEvent(\n 'UpdateLinesOnWishListFinished',\n 44630,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Update lines on wish list finished.'\n );\n }\n\n public static addItemsToCartStarted(): void {\n LoggerBase.writeEvent(\n 'AddItemsToCartStarted',\n 44632,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Add items to cart started.'\n );\n }\n\n public static addItemsToCartError(error: string): void {\n LoggerBase.writeEvent(\n 'AddItemsToCartError',\n 44633,\n 1,\n EventChannel.Operational,\n EventLevel.Error,\n [],\n '',\n '',\n 'Add items to cart failed with error {0}.'\n );\n }\n\n public static addItemsToCartFinished(): void {\n LoggerBase.writeEvent(\n 'AddItemsToCartFinished',\n 44634,\n 1,\n EventChannel.Debug,\n EventLevel.Informational,\n [],\n '',\n '',\n 'Add items to cart finished.'\n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProxyError } from '../exceptions';\nimport { EMPTY, format } from '../extensions/StringExtensions';\nimport { DebuggingConsoleSink } from './ConsoleEventWriter';\nimport { attachLoggingSink, genericError, genericInfo, genericWarning } from './RetailLogger';\n\n/**\n * The tracer class allows information to be logged on the device for Information, Warning or Error\n * The same method call can be used for each type\n * Example:\n * Commerce.Proxy.Tracer.Information(\"Message {0} {1}\", [\"Arg1\", \"Arg2\"]); // With parameters to be formatted\n * Commerce.Proxy.Tracer.Information(\"Message\"); // Without parameters\n *\n * Example of different tracer logs\n * Dynamics-Information: <> <>\n * Dynamics-Warning: <> <>\n * Dynamics-Error: <> <>\n */\n\nexport class Tracer {\n private static TracerDynamics: string = 'Dynamics-';\n private static TracerDynamicsError: string = 'Error: ';\n\n private static TracingOn: boolean = true;\n\n private static Counters: any[] = new Array();\n private static Timers: any[] = new Array();\n\n public static init(): boolean {\n attachLoggingSink(new DebuggingConsoleSink());\n return true;\n }\n\n public static _initialized: boolean = Tracer.init();\n\n /**\n * Traces an informational message in the specified format.\n */\n public static Information(informationformat: string, ...args: any[]): void {\n if (Tracer.TracingOn) {\n genericInfo(Tracer.GetMessage.apply(null, [Tracer.TracerDynamicsError, informationformat, ...args]));\n }\n }\n\n /**\n * Traces a warning message in the specified format.\n */\n public static Warning(warningFormat: string, ...args: any[]): void {\n if (Tracer.TracingOn) {\n genericWarning(Tracer.GetMessage.apply(null, [Tracer.TracerDynamicsError, warningFormat, ...args]));\n }\n }\n\n /**\n * Traces an error message in the specified format.\n */\n public static Error(errorFormat: string, ...args: any[]): void {\n if (Tracer.TracingOn) {\n genericError(Tracer.GetMessage.apply(null, [Tracer.TracerDynamicsError, errorFormat, ...args]));\n }\n }\n\n /**\n * Traces an error message in the specified format.\n */\n public static Errors(errors: ProxyError[], formatString: string, ...args: any[]): void {\n if (Tracer.TracingOn && errors !== null && errors.length > 0) {\n let errorMessage: string = '';\n let errorCode: string = '';\n let errorString: string = '';\n\n errors.forEach(error => {\n errorMessage = error.ErrorMessage || EMPTY;\n errorCode = error.ErrorCode || EMPTY;\n errorString = JSON.stringify(error);\n Tracer.Error(\n formatString +\n ' ' +\n format(\" \\n ErrorMessage: {0}; \\n ErrorCode: {1}; \\n ErrorObject: '{2}'\", errorMessage, errorCode, errorString),\n args\n );\n });\n }\n }\n\n public static StartCounter(uniqueFunctionName: string): void {\n let counter;\n if (Tracer.Counters[uniqueFunctionName] === undefined) {\n counter = new PerformanceCounters();\n counter.Name = uniqueFunctionName;\n } else {\n counter = Tracer.Counters[uniqueFunctionName];\n }\n counter.Count += 1;\n Tracer.Counters[uniqueFunctionName] = counter;\n const now = new Date().getTime();\n Tracer.Timers.push(now);\n }\n\n public static EndCounter(uniqueFunctionName: string): void {\n const now = new Date().getTime();\n const startTime = Tracer.Timers.pop();\n const counter = Tracer.Counters[uniqueFunctionName];\n counter.TotalTime += now - startTime;\n }\n\n public static DumpCounters() {\n for (const item in Tracer.Counters) {\n if (Tracer.Counters.hasOwnProperty(item)) {\n Tracer.Information(\n 'Method = {0} Number of calls = {1} TotalTime = {2}mS Avg = {3}mS',\n Tracer.Counters[item].Name,\n Tracer.Counters[item].Count,\n Tracer.Counters[item].TotalTime,\n Tracer.Counters[item].TotalTime / Tracer.Counters[item].Count\n );\n }\n }\n }\n\n private static GetMessage(type: string, formatString: string, ...args: any[]) {\n const now = '' + new Date().getTime() + 'mS';\n if (Tracer.TracingOn) {\n if (!args) {\n return Tracer.TracerDynamics + type + '\\t' + formatString + '\\t' + now;\n } else {\n return (\n Tracer.TracerDynamics + type + '\\t' + format.apply(null, [formatString, Array.prototype.slice.call(args)]) + '\\t' + now\n );\n }\n }\n }\n}\n\nclass PerformanceCounters {\n public Name: string;\n public Count: number = 0;\n public TotalTime: number = 0;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { EMPTY, hasElements } from '../extensions/StringExtensions';\nimport { ProxyError } from './ProxyError';\n\nexport class ErrorTypeEnum {\n public static SERVER_ERROR: string = 'string_29002';\n public static SERVICE_UNAVAILABLE: string = 'string_29278';\n public static SERVER_TIMEOUT: string = 'string_29279';\n public static RETAIL_SERVER_REDIRECT_ERROR = 'RETAIL_SERVER_REDIRECT_ERROR';\n public static GENERICERRORMESSAGE: string = 'string_29201';\n public static MICROSOFT_DYNAMICS_SERVER_INTERNAL_ERROR: string = ErrorTypeEnum.GENERICERRORMESSAGE;\n public static BAD_REQUEST: string = 'string_29274';\n public static NOT_AUTHORIZIED: string = 'string_29275';\n public static FORBIDDEN: string = 'string_29276';\n public static PRECONDITION_FAILED: string = 'string_29277';\n public static RETURN_NO_ORDERS_FOUND: string = 'string_1218';\n}\n\n/**\n * Forward links for device activation errors.\n */\nexport class DeviceActivationErrorsForwardLinks {\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_CHANNELDATABASECONNECTIONFAILED: string =\n 'http://go.microsoft.com/fwlink/?LinkId=403590';\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_REALTIMESERVICECONNECTIONFAILED: string =\n 'http://go.microsoft.com/fwlink/?LinkId=403591';\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_TERMINALNOTASSIGNEDTOSTORE: string = 'http://go.microsoft.com/fwlink/?LinkId=403592';\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_USERNOTASSIGNEDTOSTORE: string = 'http://go.microsoft.com/fwlink/?LinkId=403593';\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_INCORRECTSTAFFIDORPASSWORD: string = 'http://go.microsoft.com/fwlink/?LinkId=403594';\n public static MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_DEVICEALREADYACTIVATED: string = 'http://go.microsoft.com/fwlink/?LinkId=519136';\n public static SERVER_ERROR: string = 'http://go.microsoft.com/fwlink/?LinkId=519137';\n}\n\nexport class ErrorHelper {\n private static AGGREGATED_ERROR_RESOUCEIDS: string[] = [\n 'Microsoft_Dynamics_Commerce_Runtime_AggregateValidationError',\n 'Microsoft_Dynamics_Commerce_Runtime_AggregateCommunicationError',\n 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartLinesAggregateError'\n ];\n\n public static MICROSOFT_DYNAMICS_SERVER_INTERNAL_ERROR: string = 'Microsoft_Dynamics_Internal_Server_Error';\n\n public static isAggregatedErrorResourceId(errorResourceId: string): boolean {\n return ErrorHelper.AGGREGATED_ERROR_RESOUCEIDS.indexOf(errorResourceId) !== -1;\n }\n\n /**\n * Map response status code to error.\n *\n * @param {any} Error returned by retail server call.\n */\n public static MapResponseStatusCodeToError(errorMessage: string, statusCode: number, err?: any): ProxyError {\n let errorCode = '';\n let canRetry = false;\n\n switch (statusCode) {\n case 400:\n errorCode = ErrorTypeEnum.BAD_REQUEST;\n break;\n case 401:\n errorCode = ErrorTypeEnum.NOT_AUTHORIZIED;\n break;\n case 403:\n errorCode = ErrorTypeEnum.FORBIDDEN;\n break;\n case 412:\n errorCode = ErrorTypeEnum.PRECONDITION_FAILED;\n break;\n case 503:\n errorCode = ErrorTypeEnum.SERVICE_UNAVAILABLE;\n canRetry = true;\n break;\n case 500:\n default:\n errorCode = ErrorTypeEnum.SERVER_ERROR;\n errorMessage = 'The server error format is not supported or it does not have enough information.';\n\n // Temporary until the fix for Bug 681427 goes in\n // If no orders were found, than an error did not occur\n if (err && err.response && err.response.body && err.response.requestUri) {\n if (err.response.requestUri.indexOf('GetOrderByReceiptId') > -1) {\n if (err.response.body.indexOf('No orders were found') > -1) {\n errorMessage = ErrorTypeEnum.RETURN_NO_ORDERS_FOUND;\n }\n }\n }\n }\n\n if (errorMessage && errorMessage.toUpperCase() === 'TIMEOUT') {\n errorCode = ErrorTypeEnum.SERVER_TIMEOUT;\n }\n\n return new ProxyError(errorCode, errorMessage || EMPTY, EMPTY, canRetry, err);\n }\n\n /**\n * Checks whether all the provided errors are retryable. If no error code is provided or an error is undefined,\n * then the errors will be treated as not retryable.\n *\n * @return {boolean} True if the error codes are retryable, false if the error codes are not retryable or not defined\n */\n public static isRetryable(errors: ProxyError[]): boolean {\n const numErrors: number = !errors ? 0 : errors.length;\n let isRetryable: boolean = numErrors > 0;\n for (let i: number = 0; i < numErrors; i++) {\n if (errors[i]) {\n isRetryable = isRetryable && errors[i].CanRetry;\n } else {\n isRetryable = false;\n }\n }\n\n return isRetryable;\n }\n\n /**\n * Gets a string with all error codes.\n * @param {ProxyError[]} errors the error collection.\n * @return {string} a formated string containing all error codes.\n */\n public static getErrorResourceIds(errors: ProxyError[]): string {\n let result: string = '';\n\n if (hasElements(errors)) {\n const errorResourceIds: string[] = [];\n for (const error of errors) {\n errorResourceIds.push(error.ErrorCode);\n }\n\n result = errorResourceIds.join(', ');\n }\n\n return result;\n }\n\n /**\n * Gets a string with all error messages.\n * @param {ProxyError[]} errors the error collection.\n * @return {string} a formated string containing all error messages.\n */\n public static getErrorMessages(errors: ProxyError[]): string {\n let result: string = '';\n\n if (hasElements(errors)) {\n const errorResourceIds: string[] = [];\n for (const error of errors) {\n errorResourceIds.push(error.LocalizedErrorMessage);\n }\n\n result = errorResourceIds.join(', ');\n }\n\n return result;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\nimport { ICallerContext } from './../Interfaces';\n\nconst EDM = 'Edm.';\nconst EDM_BOOLEAN = EDM + 'Boolean';\nconst EDM_BYTE = EDM + 'Byte';\nconst EDM_DATETIME = EDM + 'DateTime';\nconst EDM_DATETIMEOFFSET = EDM + 'DateTimeOffset';\nconst EDM_DECIMAL = EDM + 'Decimal';\nconst EDM_DOUBLE = EDM + 'Double';\nconst EDM_INT16 = EDM + 'Int16';\nconst EDM_INT32 = EDM + 'Int32';\nconst EDM_INT64 = EDM + 'Int64';\nconst EDM_SBYTE = EDM + 'SByte';\nconst EDM_SINGLE = EDM + 'Single';\nconst EDM_TIME = EDM + 'Time';\n\nconst OBO_REQUEST = 'isOBORequest';\n\nconst parseBool = propertyValue => {\n /// Parses a string into a boolean value.\n /// Value to parse.\n /// true if the property value is 'true'; false otherwise.\n\n if (typeof propertyValue === 'boolean') {\n return propertyValue;\n }\n\n return typeof propertyValue === 'string' && propertyValue.toLowerCase() === 'true';\n};\n\nconst formatNumberWidth = (value, width, append) => {\n /// Formats the specified value to the given width.\n /// Number to format (non-negative).\n /// Minimum width for number.\n /// Flag indicating if the value is padded at the beginning (false) or at the end (true).\n /// Text representation.\n let result = value.toString(10);\n while (result.length < width) {\n if (append) {\n result += '0';\n } else {\n result = '0' + result;\n }\n }\n\n return result;\n};\n\nconst parseTimezone = timezone => {\n /// Parses a timezone description in (+|-)nn:nn format.\n /// Timezone offset.\n /// \n /// An object with a (d)irection property of 1 for + and -1 for -,\n /// offset (h)ours and offset (m)inutes.\n /// \n\n let direction = timezone.substring(0, 1);\n direction = direction === '+' ? 1 : -1;\n\n const offsetHours = parseInt(timezone.substring(1), 10);\n const offsetMinutes = parseInt(timezone.substring(timezone.indexOf(':') + 1), 10);\n return { d: direction, h: offsetHours, m: offsetMinutes };\n};\n\n// The captured indices for this expression are:\n// 0 - complete input\n// 1 - direction\n// 2,3,4 - years, months, days\n// 5,6,7,8 - hours, minutes, seconds, miliseconds\nconst parseTimeRE = /^([+-])?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)(?:\\.(\\d+))?S)?)?/;\n\n// The captured indices for this expression are:\n// 0 - complete input\n// 1,2,3 - year with optional minus sign, month, day\n// 4,5,6 - hours, minutes, seconds\n// 7 - optional milliseconds\n// 8 - everything else (presumably offset information)\nconst parseDateTimeRE = /^(-?\\d{4,})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(.*)$/;\n\nconst getCanonicalTimezone = timezone => {\n /// Gets the canonical timezone representation.\n /// Timezone representation.\n /// An 'Z' string if the timezone is absent or 0; the timezone otherwise.\n\n return !timezone || timezone === 'Z' || timezone === '+00:00' || timezone === '-00:00' ? 'Z' : timezone;\n};\n\nconst parseDuration = duration => {\n /// Parses a string in xsd:duration format.\n /// Duration value.\n /// \n /// This method will throw an exception if the input string has a year or a month component.\n /// \n /// Object representing the time\n\n const parts = parseTimeRE.exec(duration);\n\n if (parts === null) {\n throw { message: 'Invalid duration value.' };\n }\n\n const years = parts[2] || '0';\n const months = parts[3] || '0';\n const days = parseInt(parts[4], 10) || 0;\n const hours = parseInt(parts[5], 10) || 0;\n const minutes = parseInt(parts[6], 10) || 0;\n const seconds = parseFloat(parts[7]) || 0;\n\n if (years !== '0' || months !== '0') {\n throw { message: 'Unsupported duration value.' };\n }\n\n let ms: any = parts[8];\n let ns: any = 0;\n if (!ms) {\n ms = 0;\n } else {\n if (ms.length > 7) {\n throw { message: 'Cannot parse duration value to given precision.' };\n }\n\n ns = formatNumberWidth(ms.substring(3), 4, true);\n ms = formatNumberWidth(ms.substring(0, 3), 3, true);\n\n ms = parseInt(ms, 10);\n ns = parseInt(ns, 10);\n }\n\n ms += seconds * 1000 + minutes * 60000 + hours * 3600000 + days * 86400000;\n\n if (parts[1] === '-') {\n ms = -ms;\n }\n\n const result: any = { ms, __edmType: 'Edm.Time' };\n\n if (ns) {\n result.ns = ns;\n }\n return result;\n};\n\nconst parseDateTimeOffset = (value, withOffset, nullOnError) => {\n /// Parses a string into a DateTime value.\n /// Value to parse.\n /// Whether offset is expected.\n /// The parsed value.\n\n // We cannot parse this in cases of failure to match or if offset information is specified.\n const parts = parseDateTimeRE.exec(value);\n const offset = parts ? getCanonicalTimezone(parts[8]) : null;\n\n if (!parts || (!withOffset && offset !== 'Z')) {\n if (nullOnError) {\n return null;\n }\n throw { message: 'Invalid date/time value' };\n }\n\n // Pre-parse years, account for year '0' being invalid in dateTime.\n let year = parseInt(parts[1], 10);\n if (year <= 0) {\n year++;\n }\n\n // Pre-parse optional milliseconds, fill in default. Fail if value is too precise.\n let ms: any = parts[7];\n let ns: any = 0;\n if (!ms) {\n ms = 0;\n } else {\n if (ms.length > 7) {\n if (nullOnError) {\n return null;\n }\n throw { message: 'Cannot parse date/time value to given precision.' };\n }\n\n ns = formatNumberWidth(ms.substring(3), 4, true);\n ms = formatNumberWidth(ms.substring(0, 3), 3, true);\n\n ms = parseInt(ms, 10);\n ns = parseInt(ns, 10);\n }\n\n // Pre-parse other time components and offset them if necessary.\n let hours = parseInt(parts[4], 10);\n let minutes = parseInt(parts[5], 10);\n const seconds = parseInt(parts[6], 10);\n if (offset !== 'Z') {\n // The offset is reversed to get back the UTC date, which is\n // what the API will eventually have.\n const timezone = parseTimezone(offset);\n const direction = -timezone.d;\n hours += timezone.h * direction;\n minutes += timezone.m * direction;\n }\n\n // Set the date and time separately with setFullYear, so years 0-99 aren't biased like in Date.UTC.\n const result: any = new Date();\n result.setUTCFullYear(\n year, // Year.\n parseInt(parts[2], 10) - 1, // Month (zero-based for Date.UTC and setFullYear).\n parseInt(parts[3], 10) // Date.\n );\n result.setUTCHours(hours, minutes, seconds, ms);\n\n if (isNaN(result.valueOf())) {\n if (nullOnError) {\n return null;\n }\n throw { message: 'Invalid date/time value' };\n }\n\n if (withOffset) {\n result.__edmType = 'Edm.DateTimeOffset';\n result.__offset = offset;\n }\n\n if (ns) {\n result.__ns = ns;\n }\n\n return result;\n};\n\nexport const jsonLightReadStringPropertyValue = (value, propertyType, recognizeDates) => {\n /// Convertes the value of a string property in a JSON light object to its library representation.\n /// String value to convert.\n /// Type name of the property.\n /// Flag indicating whether datetime literal strings should be converted to JavaScript Date objects.\n /// String property value in its library representation.\n\n switch (propertyType) {\n case EDM_BOOLEAN:\n return parseBool(value);\n case EDM_BYTE:\n case EDM_INT16:\n case EDM_INT32:\n case EDM_INT64:\n case EDM_SBYTE:\n return parseInt(value, 10);\n case EDM_DOUBLE:\n case EDM_SINGLE:\n case EDM_DECIMAL:\n return parseFloat(value);\n case EDM_TIME:\n return parseDuration(value);\n case EDM_DATETIME:\n const dateStr = value || '';\n const time = dateStr.substring(dateStr.indexOf('T') + 1);\n const timezoneOffsetIndex = time.indexOf('-');\n timezoneOffsetIndex === -1 ? time.indexOf('+') : timezoneOffsetIndex;\n\n if (timezoneOffsetIndex !== -1) {\n return parseDateTimeOffset(value, true, /* nullOnError */ false);\n } else {\n return parseDateTimeOffset(value, false, /* nullOnError */ false);\n }\n case EDM_DATETIMEOFFSET:\n return parseDateTimeOffset(value, true, /* nullOnError */ false);\n }\n\n if (recognizeDates) {\n return (\n parseDateTimeOffset(value, false, /* nullOnError */ true) || parseDateTimeOffset(value, true, /* nullOnError */ true) || value\n );\n }\n return value;\n};\n\n// isOBORequest representing whether current user is on behalf of or not\nexport const isOboRequest = (callerContext: ICallerContext): boolean => {\n const { user } = callerContext.requestContext;\n return user[OBO_REQUEST] || false;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CommerceException, DataValidationException, DataValidationFailure } from '../Entities/CommerceTypes.g';\nimport { EMPTY, hasElements } from '../extensions/StringExtensions';\nimport { genericWarning, Tracer } from '../logging';\nimport { ErrorTypeEnum, ErrorHelper } from './ErrorHelper';\nimport { ProxyError } from './ProxyError';\nimport {\n ICallerContext\n} from './../Interfaces';\nimport {\n isOboRequest\n} from './../externals/helper'\n\n/**\n * Error parser class.\n */\nexport class ErrorParser {\n private static DataValidationExceptionType: string = 'Microsoft.Dynamics.Commerce.Runtime.DataValidationException';\n private static CartValidationExceptionType: string = 'Microsoft.Dynamics.Commerce.Runtime.CartValidationException';\n private static StorageExceptionType: string = 'Microsoft.Dynamics.Commerce.Runtime.StorageException';\n\n /**\n * Parses an error message.\n *\n * @param {any} error The error message.\n * @return {ProxyError[]} The collection of error messages.\n */\n public static parseErrorMessage(error: any, callerContext?: ICallerContext): ProxyError[] {\n const response = error.response;\n let errors: ProxyError[] = [];\n const isObo = callerContext ? isOboRequest(callerContext) : false;\n if (response) {\n let handled = true;\n Tracer.Information(`Server response status code is '${response.statusCode}'`);\n switch (response.statusCode) {\n case 306: // Custom - Redirection\n const redirectUrl = response.headers['Location'];\n error.redirectUrl = redirectUrl;\n errors = [new ProxyError(ErrorTypeEnum.RETAIL_SERVER_REDIRECT_ERROR, response.statusText, EMPTY, false, error)];\n break;\n\n case 401: // Unauthorized (Generally Expired Token)\n if (process.env.CURRENT_ENVIRONMENT === 'web') {\n const redirectCountQueryString = 'rdc';\n const noRedirectQueryString = 'noredirect';\n try {\n const currentUrl = new URL(location.href);\n if (currentUrl.searchParams.get(noRedirectQueryString)) {\n break;\n }\n if (isObo) {\n break;\n }\n const rdc = parseInt(currentUrl.searchParams.get(redirectCountQueryString), 10) || 0;\n if (rdc && rdc >= 3) {\n break;\n }\n currentUrl.searchParams.set(redirectCountQueryString, `${rdc + 1}`);\n location.href = currentUrl.href;\n } catch (e) {\n break;\n }\n }\n\n break;\n\n case 408: // Request Timeout\n errors = [new ProxyError(ErrorTypeEnum.SERVER_TIMEOUT, response.statusText, EMPTY, false, error)];\n break;\n\n case 0: // WWAHost reports status code as 0, If server is unreachable.\n case 502: // Bad Gateway\n case 503: // Service Unavailable\n case 504: // Gateway timeout\n errors = [new ProxyError(ErrorTypeEnum.SERVICE_UNAVAILABLE, response.statusText, EMPTY, false, error)];\n break;\n\n default:\n handled = false;\n }\n\n if (!handled) {\n errors = ErrorParser.parseError(error);\n }\n }\n\n // If we couldn't create any error object from error message, add error parsing failure\n if (!errors || !errors.length) {\n errors = [new ProxyError(ErrorTypeEnum.SERVER_ERROR, 'Could not parse error message sent by the server.', EMPTY, false, error)];\n }\n\n return errors;\n }\n\n /**\n * Parses an error message sent from Hardware station.\n *\n * @param {any} error The error message.\n * @retunrs {ProxyError[]} The collection of error messages.\n */\n public static parseHardwareStationErrorMessage(error: any): ProxyError[] {\n let errors: ProxyError[] = [];\n\n if (error) {\n try {\n const response = error.responseText;\n\n if (response) {\n const jsonResponse = JSON.parse(response);\n\n // Parse errors in json format\n if (jsonResponse) {\n errors = [\n new ProxyError(\n jsonResponse.ErrorResourceId ? jsonResponse.ErrorResourceId : ErrorTypeEnum.SERVER_ERROR,\n jsonResponse.Message || '',\n EMPTY,\n false,\n error\n )\n ];\n } else {\n // If not in json, we cannot parse it\n errors = [\n new ProxyError(\n ErrorTypeEnum.SERVER_ERROR,\n 'The value of Content-Type on server response is not supported.',\n EMPTY,\n false,\n error\n )\n ];\n }\n } else {\n // In case we don't have a body, we don't know the error message but from http status\n errors = [ErrorHelper.MapResponseStatusCodeToError(error.statusText, error.status, error)];\n }\n } catch (ex) {\n const errorMessage: string = `parseHardwareStationErrorMessage: Failed parse error message '${ex.message}'.`;\n Tracer.Error(errorMessage, ex);\n }\n }\n\n // If we couldn't create any error object from error message, add error parsing failure\n if (!errors || !errors.length) {\n errors = [new ProxyError(ErrorTypeEnum.SERVER_ERROR, 'Could not parse error message sent by the server.', EMPTY, false, error)];\n }\n\n return errors;\n }\n\n public static parseJSONError(errorString: string, errorResponse?: any): ProxyError[] {\n let commerceErrors: ProxyError[] = [];\n\n try {\n const odataError: any = JSON.parse(errorString);\n odataError.CorrelationId = errorResponse.data.CorrelationId;\n\n // assign parsed data to errorResponse\n errorResponse.data = odataError;\n\n // due to odata json format limitation, a collection of errors is provided in the message field\n const localizedMessage: string = odataError.LocalizedMessage;\n const exceptionType: string = odataError.ErrorResourceId;\n\n if (exceptionType === ErrorTypeEnum.MICROSOFT_DYNAMICS_SERVER_INTERNAL_ERROR) {\n commerceErrors = [\n new ProxyError(\n ErrorTypeEnum.MICROSOFT_DYNAMICS_SERVER_INTERNAL_ERROR,\n localizedMessage || 'Server failed with uncaught exception. Please report this failure.',\n localizedMessage,\n false,\n errorResponse\n )\n ];\n } else if (localizedMessage != null && exceptionType != null) {\n commerceErrors = ErrorParser.convertExceptionToErrors(odataError, exceptionType, errorResponse);\n } else {\n throw new Error('Server exception is not in expected format.');\n }\n } catch (ex) {\n const errorMessage: string =\n 'DataServiceRequest::parseJSONError: Invalid json format from server. It was not possible to parse error message. {0}';\n Tracer.Error(errorMessage, ex);\n }\n\n if (!hasElements(commerceErrors)) {\n commerceErrors = [\n new ProxyError(\n ErrorTypeEnum.GENERICERRORMESSAGE,\n 'Could not parse error message from server. Possible invalid OData request, please check your request.',\n EMPTY,\n false,\n errorResponse\n )\n ];\n }\n\n return commerceErrors;\n }\n\n private static convertExceptionToErrors(serverException: CommerceException, exceptionType: string, errorResponse: any): ProxyError[] {\n let errors: ProxyError[] = [];\n\n switch (exceptionType) {\n // CartValidationExceptionType extends DataValidationExceptionType\n case ErrorParser.DataValidationExceptionType:\n case ErrorParser.CartValidationExceptionType:\n const dataValidation: DataValidationException = serverException as DataValidationException;\n // json is in odata format, array has elements inside result member\n errors = ErrorParser.getErrorsFromDataValidationFailures(dataValidation.ValidationResults as any);\n errors.push(\n new ProxyError(\n dataValidation.ErrorResourceId || ErrorTypeEnum.SERVER_ERROR,\n EMPTY,\n dataValidation.LocalizedMessage,\n false,\n errorResponse\n )\n );\n break;\n\n case ErrorParser.StorageExceptionType:\n errors.push(\n new ProxyError(ErrorTypeEnum.SERVICE_UNAVAILABLE, EMPTY, serverException.LocalizedMessage, false, errorResponse)\n );\n break;\n }\n\n if (errors.length === 0) {\n const error: ProxyError = new ProxyError(\n serverException.ErrorResourceId || ErrorTypeEnum.SERVER_ERROR,\n EMPTY,\n serverException.LocalizedMessage,\n false,\n errorResponse\n );\n error.commerceException = serverException;\n errors.push(error);\n }\n\n return errors;\n }\n\n private static getErrorsFromDataValidationFailures(failures: DataValidationFailure[]): ProxyError[] {\n const errors: ProxyError[] = [];\n failures = failures || [];\n\n for (const failure of failures) {\n errors.push(\n new ProxyError(\n failure.ErrorResourceId || ErrorTypeEnum.SERVER_ERROR,\n failure.ErrorContext || '',\n failure.LocalizedMessage,\n false,\n {}\n )\n );\n }\n\n return errors;\n }\n\n /**\n * Parses an error to get the error code and error message.\n *\n * @param {any} error The error message.\n * @retunrs {ProxyError[]} The collection of error messages.\n */\n private static parseError(error: any): ProxyError[] {\n const response = error.response;\n let errors: ProxyError[] = [];\n if (response.body && response.data) {\n // If we have a response body\n const contentType: string = (response.headers && (response.headers['Content-Type'] || response.headers['content-type'])) || '';\n const bodyString: string = response.data.Exception;\n // Parse errors in json format\n if (contentType.toLowerCase().indexOf('application/json') !== -1) {\n errors = ErrorParser.parseJSONError(bodyString, error.response);\n } else {\n const message: string = `Server error has been received with unsupported content type: '${contentType}'.`;\n genericWarning(message);\n }\n }\n // if we couldn't parse the errors from the body, we can only rely on status text and status code\n if (!hasElements(errors)) {\n // In case we don't have a body, we don't know the error message but from http status code\n errors = [ErrorHelper.MapResponseStatusCodeToError(response.statusText, response.statusCode, error)];\n }\n return errors;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport axios from 'axios';\nimport { ICacheKey, ICallerContext, IRequestContextParams } from '../Interfaces';\nimport { jsonHandler } from './handler';\n\n/**\n * OData request interface.\n */\nexport interface IODataRequest {\n /**\n * OData endpoint URI\n */\n requestUri: string;\n\n /**\n * HTTP method (GET, POST, PUT, DELETE)\n */\n method: string;\n\n /**\n * Payload of the request (in intermediate format)\n */\n data: any;\n\n /**\n * Object that contains HTTP headers as name value pairs\n */\n headers?: Object;\n\n /**\n * (Optional) Username to send for BASIC authentication\n */\n user?: string;\n\n /**\n * (Optional) Password to send for BASIC authentication\n */\n password?: string;\n\n /**\n * (Optional) Whether or not to use cross domain cookies.\n */\n useCrossDomainCookies?: boolean;\n}\n\nconst normalHeaders = {\n accept: 'Accept',\n 'content-type': 'Content-Type',\n 'odata-version': 'OData-Version',\n 'odata-maxversion': 'OData-MaxVersion'\n};\n\nconst isAbsoluteUrl = url => {\n /// Checks whether the specified URL is an absolute URL.\n /// URL to check.\n /// true if the url is an absolute URL; false otherwise.\n\n return url.indexOf('http://') === 0 || url.indexOf('https://') === 0 || url.indexOf('file://') === 0;\n};\n\nconst normalizeHeaders = headers => {\n /// Normalizes headers so they can be found with consistent casing.\n /// Dictionary of name/value pairs.\n\n for (const name in headers) {\n if (headers.hasOwnProperty(name)) {\n const lowerName = name.toLowerCase();\n const normalName = normalHeaders[lowerName];\n if (normalName && name !== normalName) {\n const val = headers[name];\n delete headers[name];\n headers[normalName] = val;\n }\n }\n }\n};\n\nconst getCacheObjectValueFromReturnType = (returnType: any): string => {\n // return type can be actual class itself like CategoryClass instead of string 'CategoryClass'\n const cacheObjectTypeValue = typeof returnType === 'function' ? returnType.name : returnType;\n return cacheObjectTypeValue.replace('Class', '');\n};\n\nconst defaultHttpClient = {\n callbackParameterName: '$callback',\n formatQueryString: '$format=json',\n enableJsonpCallback: false,\n\n request(request, success, error, returnType: string, clientTimeout?: number, callerContext?: ICallerContext) {\n /// Performs a network request.\n /// Request description.\n /// Success callback with the response object.\n /// Error callback with an error object.\n /// Object with an 'abort' method for the operation.\n const result = { abort: null, handleTimeout: null };\n\n const cancelToken = axios.CancelToken.source();\n\n let done = false;\n result.abort = () => {\n if (done) {\n return;\n }\n done = true;\n cancelToken.cancel('Request aborted');\n error({ message: 'Request aborted' });\n };\n\n request.handleTimeout = () => {\n if (!done) {\n done = true;\n cancelToken.cancel('Request aborted');\n error({ message: 'Request timed out' });\n }\n };\n\n const url = request.requestUri;\n const enableJsonpCallback = request.enableJsonpCallback || false;\n if (!enableJsonpCallback || !isAbsoluteUrl(url)) {\n let authenticationCreds;\n if (request.user) {\n authenticationCreds = {\n username: request.user,\n password: request.password || ''\n };\n }\n // console.log('\\r\\nDataServiceRequest - \\r\\n\\n', request);\n let axiosTimeout = request.timeoutMS || 10000;\n // check if on client side.\n if (process.env.CURRENT_ENVIRONMENT === 'web') {\n // @ts-ignore -using client window object\n if (typeof window != undefined && window.___initialData___) {\n // @ts-ignore -using client window object\n const initialData = window.___initialData___;\n const rtype = getCacheObjectValueFromReturnType(returnType);\n const rTypeLowerCase = rtype.toLowerCase();\n const clientTimeoutMap = initialData._clientPlatformSetting?.clientTimeoutMapInMs;\n if (clientTimeoutMap && clientTimeoutMap[rTypeLowerCase]) {\n axiosTimeout = clientTimeoutMap[rTypeLowerCase];\n } else if (initialData._clientPlatformSetting?.clientSideDataActionTimeoutInMs) {\n // @ts-ignore -using client window object\n axiosTimeout = initialData._clientPlatformSetting.clientSideDataActionTimeoutInMs;\n }\n\n if (clientTimeout) {\n axiosTimeout = clientTimeout;\n }\n }\n } else {\n const serverSideDataActionTimeoutInMs = process.env.serverSideDataActionTimeoutInMs;\n axiosTimeout =\n serverSideDataActionTimeoutInMs && serverSideDataActionTimeoutInMs !== ''\n ? Number(serverSideDataActionTimeoutInMs)\n : 4000;\n }\n\n const pageInsightsData = {\n Request: {\n Headers: request.headers,\n Method: request.method,\n Body: request.body\n },\n Response: {\n Headers: {},\n Body: {},\n StatusText: '',\n StatusCode: 0\n }\n };\n\n axios\n .request({\n method: request.method || 'get',\n url,\n data: request.body,\n auth: authenticationCreds,\n headers: request.headers || {},\n timeout: axiosTimeout,\n cancelToken: cancelToken.token\n })\n .then(axiosResponse => {\n const response = {\n requestUri: url,\n statusCode: axiosResponse.status,\n statusText: axiosResponse.statusText,\n headers: axiosResponse.headers,\n body: axiosResponse.data\n };\n done = true;\n\n if (isPageInsightsEnabled(callerContext.requestContext.params)) {\n pageInsightsData.Response.Body = axiosResponse.data;\n pageInsightsData.Response.StatusText = axiosResponse.statusText;\n pageInsightsData.Response.StatusCode = axiosResponse.status;\n pageInsightsData.Response.Headers = axiosResponse.headers;\n const insightsKey: ICacheKey = {\n typeName: 'string',\n key: '__API_INSIGHTS__'\n };\n const insightsData = callerContext.requestCache.get(insightsKey)?.item || {};\n insightsData[url] = pageInsightsData;\n callerContext.requestCache.put(insightsKey, { item: insightsData });\n }\n\n success(response);\n })\n .catch(axiosError => {\n const response = {\n requestUri: url,\n statusCode: axiosError.response ? parseInt(axiosError.response.status, 10) : 0,\n statusText: axiosError.name,\n body: axiosError.message,\n data: axiosError.response ? axiosError.response.data : {},\n headers: axiosError.response ? axiosError.response.headers : {}\n };\n\n if (isPageInsightsEnabled(callerContext.requestContext.params)) {\n pageInsightsData.Response.Body = axiosError.response ? axiosError.response.data : {};\n pageInsightsData.Response.StatusText = axiosError.name;\n pageInsightsData.Response.StatusCode = axiosError.response ? parseInt(axiosError.response.status, 10) : 0;\n pageInsightsData.Response.Headers = axiosError.response ? axiosError.response.headers : {};\n const insightsKey: ICacheKey = {\n typeName: 'string',\n key: '__API_INSIGHTS__'\n };\n const insightsData = callerContext.requestCache.get(insightsKey)?.item || {};\n insightsData[url] = pageInsightsData;\n callerContext.requestCache.put(insightsKey, { item: insightsData });\n }\n\n error({ message: 'HTTP request failed', request, response });\n });\n } else {\n error({\n message: 'Only requests to non-absolute urls are supported at this time without JSONP callback'\n });\n }\n return result;\n }\n};\n\nconst prepareRequest = (request, handler, context) => {\n /// Prepares a request object so that it can be sent through the network.\n /// Object that represents the request to be sent.\n /// Handler for data serialization\n /// Context used for preparing the request\n\n // Default to GET if no method has been specified.\n if (!request.method) {\n request.method = 'GET';\n }\n\n if (!request.headers) {\n request.headers = {};\n } else {\n normalizeHeaders(request.headers);\n }\n\n if (request.headers.Accept === undefined) {\n request.headers.Accept = handler.accept;\n }\n\n if (request.data && request.body === undefined) {\n handler.write(request, context);\n }\n\n if (!request.headers['OData-MaxVersion']) {\n request.headers['OData-MaxVersion'] = handler.maxDataServiceVersion || '4.0';\n }\n};\n\nconst invokeRequest = (\n request,\n success,\n error,\n handler,\n httpClient,\n context,\n returnType: string,\n clientTimeout?: number,\n callerContext?: ICallerContext\n) => {\n /// Sends a request containing OData payload to a server.\n /// Object that represents the request to be sent..\n /// Callback for a successful read operation.\n /// Callback for handling errors.\n /// Handler for data serialization.\n /// HTTP client layer.\n /// Context used for processing the request\n\n return httpClient.request(\n request,\n response => {\n try {\n if (response.headers) {\n normalizeHeaders(response.headers);\n }\n\n if (response.data === undefined && response.statusCode !== 204) {\n if (!handler.read(response, context)) {\n throw { message: 'Handler could not parse response.' };\n }\n }\n } catch (err) {\n if (err.request === undefined) {\n err.request = request;\n }\n if (err.response === undefined) {\n err.response = response;\n }\n error(err);\n return;\n }\n\n success(response.data, response);\n },\n error,\n returnType,\n clientTimeout,\n callerContext\n );\n};\n\nexport const isPageInsightsEnabled = (params: IRequestContextParams): boolean => {\n return params?.pageInsights === 'all' || params?.pageInsights === 'info' || params?.pageInsights === 'error';\n};\n\nexport const ODataHttpRequest = (request, success, error, returnType: string, clientTimeout?: number, callerContext?: ICallerContext) => {\n /// Sends a request containing OData payload to a server.\n /// Object that represents the request to be sent.\n /// Callback for a successful read operation.\n /// Callback for handling errors.\n /// Handler for data serialization.\n /// HTTP client layer.\n /// Conceptual metadata for this request.\n\n success = success || (data => process.env.NODE_ENV !== 'production' && console.log(JSON.stringify(data)));\n error =\n error ||\n (err => {\n throw err;\n });\n\n // Augment the request with additional defaults.\n request.recognizeDates = request.recognizeDates || false;\n request.useJsonLight = request.useJsonLight || false;\n request.inferJsonLightFeedAsObject = request.inferJsonLightFeedAsObject || false;\n request.callbackParameterName = request.callbackParameterName || defaultHttpClient.callbackParameterName;\n request.formatQueryString = request.formatQueryString || defaultHttpClient.formatQueryString;\n request.enableJsonpCallback = request.enableJsonpCallback || defaultHttpClient.enableJsonpCallback;\n\n // Create the base context for read/write operations, also specifying complete settings.\n const context = {\n recognizeDates: request.recognizeDates,\n callbackParameterName: request.callbackParameterName,\n formatQueryString: request.formatQueryString,\n enableJsonpCallback: request.enableJsonpCallback,\n useJsonLight: request.useJsonLight,\n inferJsonLightFeedAsObject: request.inferJsonLightFeedAsObject\n };\n\n try {\n prepareRequest(request, jsonHandler, context);\n return invokeRequest(request, success, error, jsonHandler, defaultHttpClient, context, returnType, clientTimeout, callerContext);\n } catch (err) {\n error(err);\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport const MAX_DATA_SERVICE_VERSION = '4.0';\nexport const jsonMediaType = 'application/json';\n\nconst CONTENT_TYPE_HEADER_NAME = 'Content-Type';\nconst ODATA_VERSION = 'OData-Version';\nconst ODATA_MAX_VERSION = 'OData-MaxVersion';\n\nconst contentType = str => {\n /// Parses a string into an object with media type and properties.\n /// String with media type to parse.\n /// null if the string is empty; an object with 'mediaType' and a 'properties' dictionary otherwise.\n\n if (!str) {\n return null;\n }\n\n const contentTypeParts = str.split(';');\n const properties = {};\n\n let i;\n let len;\n for (i = 1, len = contentTypeParts.length; i < len; i++) {\n const contentTypeParams = contentTypeParts[i].split('=');\n properties[contentTypeParams[0].trim()] = contentTypeParams[1];\n }\n\n return { mediaType: contentTypeParts[0].trim(), properties };\n};\n\nexport const jsonContentType = contentType(jsonMediaType);\n\nconst contentTypeToString = contentTypeObj => {\n /// Serializes an object with media type and properties dictionary into a string.\n /// Object with media type and properties dictionary to serialize.\n /// String representation of the media type object; undefined if contentType is null or undefined.\n\n if (!contentTypeObj) {\n return undefined;\n }\n\n let result = contentTypeObj.mediaType;\n for (const property in contentTypeObj.properties) {\n if (contentTypeObj.properties.hasOwnProperty(property)) {\n result += ';' + property + '=' + contentTypeObj.properties[property];\n }\n }\n return result;\n};\n\nconst createReadWriteContext = (contentTypeStr, dataServiceVersion, context, handler) => {\n /// Creates an object that is going to be used as the context for the handler's parser and serializer.\n /// Object with media type and properties dictionary.\n /// String indicating the version of the protocol to use.\n /// Operation context.\n /// Handler object that is processing a resquest or response.\n /// Context object.\n\n // First create a clone\n const rwContext = { ...context };\n\n // And then override with provided parameters\n rwContext['contentType'] = contentTypeStr || jsonContentType;\n rwContext['dataServiceVersion'] = dataServiceVersion;\n rwContext['handler'] = handler;\n\n return rwContext;\n};\n\nconst versionRE = /^\\s?(\\d+\\.\\d+);?.*$/;\nconst getDataServiceVersion = headerVersion => {\n /// Gets the value of the OData-Version header from a request or response.\n /// Object representing a request or a response.\n /// Data service version; undefined if the header cannot be found.\n\n if (headerVersion) {\n const matches = versionRE.exec(headerVersion);\n if (matches && matches.length) {\n return matches[1];\n }\n }\n};\n\nconst handlerRead = (handler, response, context) => {\n /// Invokes the parser associated with a handler for reading the payload of a HTTP response.\n /// Handler object that is processing the response.\n /// Parser function that will process the response payload.\n /// HTTP response whose payload is going to be processed.\n /// Object used as the context for processing the response.\n /// True if the handler processed the response payload and the response.data property was set; false otherwise.\n\n if (!response || !response.headers) {\n return false;\n }\n\n const cType = contentType(response.headers[CONTENT_TYPE_HEADER_NAME]);\n const version = getDataServiceVersion(response) || '';\n const body = response.body;\n\n if (!body) {\n return false;\n }\n\n if (jsonMediaType.indexOf(cType.mediaType) >= 0) {\n const readContext = createReadWriteContext(cType, version, context, handler);\n readContext.response = response;\n response.data = typeof body === 'string' ? JSON.parse(body) : body;\n return response.data !== undefined;\n }\n\n return false;\n};\n\nconst maxVersion = (left, right) => {\n /// Compares to version strings and returns the higher one.\n /// Version string in the form \"major.minor.rev\"\n /// Version string in the form \"major.minor.rev\"\n /// The higher version string.\n\n if (left === right) {\n return left;\n }\n\n const leftParts = left.split('.');\n const rightParts = right.split('.');\n\n const len = leftParts.length >= rightParts.length ? leftParts.length : rightParts.length;\n\n for (let i = 0; i < len; i++) {\n const leftVersion = leftParts[i] && parseInt(leftParts[i], 10);\n const rightVersion = rightParts[i] && parseInt(rightParts[i], 10);\n if (leftVersion > rightVersion) {\n return left;\n }\n if (leftVersion < rightVersion) {\n return right;\n }\n }\n};\n\nconst handlerWrite = (handler, request, context) => {\n /// Invokes the serializer associated with a handler for generating the payload of a HTTP request.\n /// Handler object that is processing the request.\n /// Serializer function that will generate the request payload.\n /// HTTP request whose payload is going to be generated.\n /// Object used as the context for serializing the request.\n /// True if the handler serialized the request payload and the request.body property was set; false otherwise.\n if (!request || !request.headers) {\n return false;\n }\n\n const cType = contentType(request.headers[CONTENT_TYPE_HEADER_NAME]);\n const version = getDataServiceVersion(request.headers[ODATA_VERSION]);\n\n if (!cType || jsonMediaType.indexOf(cType.mediaType)) {\n const writeContext = createReadWriteContext(cType, version, context, handler);\n writeContext.request = request;\n request.body = request.data;\n\n if (request.body !== undefined) {\n request.headers[ODATA_VERSION] = version ? maxVersion(version, '4.0') : '4.0';\n request.headers.ContentType = request.headers[CONTENT_TYPE_HEADER_NAME] || contentTypeToString(writeContext.contentType);\n request.headers[ODATA_MAX_VERSION] = request.headers[ODATA_MAX_VERSION] || handler.maxDataServiceVersion;\n return true;\n }\n }\n\n return false;\n};\n\nexport const jsonHandler = {\n accept: jsonMediaType,\n maxDataServiceVersion: MAX_DATA_SERVICE_VERSION,\n read(response, context) {\n return handlerRead(this, response, context);\n },\n\n write(request, context) {\n return handlerWrite(this, request, context);\n }\n};\n"],"names":["retailAction","input","callerContext","execute","callActionOrExecute","request","chainAction","executeAction","context","Error","bypassCache","overrideCacheType","clientTimeoutInMs","setClientTimeoutInMs","AsyncResult","resolve","reject","then","result","catch","error","prototype","isAction","isObservable","EMPTY","convertToString","obj","accumulator","arguments","length","undefined","depth","toString","prop","hasOwnProperty","value","stringifyValue","push","join","hasElements","array","isObjectNotEmptyOrNull","Object","keys","isEmpty","object","isNullOrWhitespace","returnValue","trim","err","format","_len","params","Array","_key","index","param","replace","regexp","RegExp","ProxyErrorSDK","constructor","errorCode","errorMessage","canRetry","super","localizedErrorMessage","formatData","this","name","message","setPrototypeOf","ProxyError","extraData","_canRetry","_errorCode","_errorMessage","_localizedErrorMessage","_commerceException","_formatData","headers","data","body","_extraData","proxyError","errorName","ErrorCode","ErrorMessage","LocalizedErrorMessage","e","CanRetry","requestUri","statusCode","exception","EventLevel","EventChannel","EventType","Utils","func","DebuggingConsoleSink","setSessionInfo","appSessionId","userSessionId","deviceId","deviceNumber","terminalId","userId","tenantId","offlineAvailability","offlineCurrentMode","setInstrumentationKey","instrumentationKey","writeEvent","event","LoggerBase","eventId","version","channel","level","keywords","task","opCode","loggingSink","enumType","key","modelManagersRetailServerRequestStarted","requestId","requestUrl","Debug","Informational","modelManagersRetailServerRequestError","Operational","modelManagersRetailServerRequestFinished","genericWarning","Warning","Tracer","sink","addLoggingSink","informationformat","TracingOn","args","GetMessage","apply","TracerDynamicsError","warningFormat","_len2","_key2","errorFormat","_len3","_key3","errors","formatString","_len4","_key4","errorString","forEach","JSON","stringify","uniqueFunctionName","counter","Counters","PerformanceCounters","Name","Count","now","Date","getTime","Timers","startTime","pop","TotalTime","item","Information","type","_len5","_key5","TracerDynamics","slice","call","_initialized","init","ErrorTypeEnum","SERVER_ERROR","SERVICE_UNAVAILABLE","SERVER_TIMEOUT","RETAIL_SERVER_REDIRECT_ERROR","GENERICERRORMESSAGE","MICROSOFT_DYNAMICS_SERVER_INTERNAL_ERROR","BAD_REQUEST","NOT_AUTHORIZIED","FORBIDDEN","PRECONDITION_FAILED","RETURN_NO_ORDERS_FOUND","DeviceActivationErrorsForwardLinks","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_CHANNELDATABASECONNECTIONFAILED","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_REALTIMESERVICECONNECTIONFAILED","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_TERMINALNOTASSIGNEDTOSTORE","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_USERNOTASSIGNEDTOSTORE","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_INCORRECTSTAFFIDORPASSWORD","MICROSOFT_DYNAMICS_COMMERCE_RUNTIME_DEVICEALREADYACTIVATED","ErrorHelper","errorResourceId","AGGREGATED_ERROR_RESOUCEIDS","indexOf","response","toUpperCase","numErrors","isRetryable","i","errorResourceIds","formatNumberWidth","width","append","parseTimeRE","parseDateTimeRE","parseDateTimeOffset","withOffset","nullOnError","parts","exec","offset","timezone","year","parseInt","ms","ns","substring","hours","minutes","seconds","direction","d","h","m","parseTimezone","setUTCFullYear","setUTCHours","isNaN","valueOf","__edmType","__offset","__ns","jsonLightReadStringPropertyValue","propertyType","recognizeDates","EDM","propertyValue","toLowerCase","parseFloat","duration","years","months","days","parseDuration","dateStr","time","timezoneOffsetIndex","isOboRequest","user","requestContext","ErrorParser","isObo","handled","redirectUrl","statusText","redirectCountQueryString","noRedirectQueryString","currentUrl","URL","location","href","searchParams","get","rdc","set","parseError","responseText","jsonResponse","parse","ErrorResourceId","Message","MapResponseStatusCodeToError","status","ex","errorResponse","commerceErrors","odataError","CorrelationId","localizedMessage","LocalizedMessage","exceptionType","convertExceptionToErrors","serverException","DataValidationExceptionType","CartValidationExceptionType","dataValidation","getErrorsFromDataValidationFailures","ValidationResults","StorageExceptionType","commerceException","failures","failure","ErrorContext","contentType","bodyString","Exception","parseJSONError","normalHeaders","accept","normalizeHeaders","lowerName","normalName","val","defaultHttpClient","callbackParameterName","formatQueryString","enableJsonpCallback","success","returnType","clientTimeout","abort","handleTimeout","cancelToken","axios","source","done","cancel","url","isAbsoluteUrl","authenticationCreds","username","password","axiosTimeout","timeoutMS","window","___initialData___","_initialData$_clientP","_initialData$_clientP2","initialData","rTypeLowerCase","getCacheObjectValueFromReturnType","clientTimeoutMap","_clientPlatformSetting","clientTimeoutMapInMs","clientSideDataActionTimeoutInMs","pageInsightsData","Request","Headers","Method","method","Body","Response","StatusText","StatusCode","auth","timeout","token","axiosResponse","isPageInsightsEnabled","_callerContext$reques","insightsKey","typeName","insightsData","requestCache","put","axiosError","_callerContext$reques2","pageInsights","ODataHttpRequest","process","useJsonLight","inferJsonLightFeedAsObject","prepareRequest","handler","Accept","write","maxDataServiceVersion","jsonHandler","invokeRequest","httpClient","read","jsonMediaType","ODATA_VERSION","ODATA_MAX_VERSION","str","contentTypeParts","split","properties","len","contentTypeParams","mediaType","jsonContentType","createReadWriteContext","contentTypeStr","dataServiceVersion","rwContext","_objectSpread","versionRE","getDataServiceVersion","headerVersion","matches","handlerWrite","cType","CONTENT_TYPE_HEADER_NAME","writeContext","maxVersion","left","right","leftParts","rightParts","leftVersion","rightVersion","ContentType","contentTypeObj","property","contentTypeToString","handlerRead"],"sourceRoot":""}