@microsoft/omnichannel-chat-sdk
Advanced tools
Comparing version 0.3.1-main.31aff70 to 0.3.1-main.5a4544e
@@ -6,5 +6,8 @@ # Changelog | ||
### Added | ||
- Add `GetAuthToken` & `GetPreChatSurvey` telemetry events | ||
- Add `Domain` telemetry base property | ||
### Changed | ||
- Uptake [@microsoft/ocsdk@0.3.0](https://www.npmjs.com/package/@microsoft/ocsdk/v/0.3.0) | ||
- Use `lockfileVersion: 2` in `package-lock.json` via npm v7 | ||
@@ -11,0 +14,0 @@ ### Fixed |
@@ -26,2 +26,3 @@ import { AWTEventData } from '../external/aria/webjs/AriaSDK'; | ||
private static fillMobilePlatformData; | ||
private static fillWebPlatformData; | ||
private static populateIC3ClientBaseProperties; | ||
@@ -28,0 +29,0 @@ private static populateOCSDKBaseProperties; |
@@ -45,3 +45,3 @@ "use strict"; | ||
name: ScenarioType_1.default.EVENTS, | ||
properties: __assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.INFO }), | ||
properties: __assign(__assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillWebPlatformData()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.INFO }), | ||
priority: Enums_1.AWTEventPriority.High | ||
@@ -76,3 +76,3 @@ }; | ||
name: ScenarioType_1.default.EVENTS, | ||
properties: __assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.DEBUG }), | ||
properties: __assign(__assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillWebPlatformData()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.DEBUG }), | ||
priority: Enums_1.AWTEventPriority.High | ||
@@ -107,3 +107,3 @@ }; | ||
name: ScenarioType_1.default.EVENTS, | ||
properties: __assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.WARN }), | ||
properties: __assign(__assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillWebPlatformData()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.WARN }), | ||
priority: Enums_1.AWTEventPriority.High | ||
@@ -138,3 +138,3 @@ }; | ||
name: ScenarioType_1.default.EVENTS, | ||
properties: __assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.ERROR }), | ||
properties: __assign(__assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillWebPlatformData()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.ERROR }), | ||
priority: Enums_1.AWTEventPriority.High | ||
@@ -169,3 +169,3 @@ }; | ||
name: ScenarioType_1.default.EVENTS, | ||
properties: __assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.LOG }), | ||
properties: __assign(__assign(__assign(__assign(__assign({}, AriaTelemetry.populateBaseProperties()), AriaTelemetry.fillWebPlatformData()), AriaTelemetry.fillMobilePlatformData()), properties), { LogLevel: LogLevel_1.default.LOG }), | ||
priority: Enums_1.AWTEventPriority.High | ||
@@ -219,2 +219,3 @@ }; | ||
CallId: '', | ||
Domain: '', | ||
ExceptionDetails: '', | ||
@@ -251,2 +252,18 @@ ElapsedTimeInMilliseconds: '', | ||
}; | ||
AriaTelemetry.fillWebPlatformData = function () { | ||
var platformData = {}; // eslint-disable-line @typescript-eslint/no-explicit-any | ||
if (!window) { | ||
return platformData; | ||
} | ||
try { | ||
platformData.Domain = window.location.origin || ''; | ||
/* istanbul ignore next */ | ||
this._debug && console.log("[AriaTelemetry][fillWebPlatformData]"); | ||
} | ||
catch (_a) { | ||
/* istanbul ignore next */ | ||
this._debug && console.log("[AriaTelemetry][fillWebPlatformData][Error]"); | ||
} | ||
return platformData; | ||
}; | ||
AriaTelemetry.populateIC3ClientBaseProperties = function () { | ||
@@ -253,0 +270,0 @@ return { |
@@ -8,2 +8,4 @@ declare enum TelemetryEvent { | ||
GetLiveChatConfig = "GetLiveChatConfig", | ||
GetAuthToken = "GetAuthToken", | ||
GetPreChatSurvey = "GetPreChatSurvey", | ||
GetChatToken = "GetChatToken", | ||
@@ -10,0 +12,0 @@ GetConversationDetails = "GetConversationDetails", |
@@ -12,2 +12,4 @@ "use strict"; | ||
TelemetryEvent["GetLiveChatConfig"] = "GetLiveChatConfig"; | ||
TelemetryEvent["GetAuthToken"] = "GetAuthToken"; | ||
TelemetryEvent["GetPreChatSurvey"] = "GetPreChatSurvey"; | ||
TelemetryEvent["GetChatToken"] = "GetChatToken"; | ||
@@ -14,0 +16,0 @@ TelemetryEvent["GetConversationDetails"] = "GetConversationDetails"; |
{ | ||
"name": "@microsoft/omnichannel-chat-sdk", | ||
"version": "0.3.1-main.31aff70", | ||
"version": "0.3.1-main.5a4544e", | ||
"description": "Microsoft Omnichannel Chat SDK", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
754259
9217