@microsoft/omnichannel-chat-sdk
Advanced tools
Comparing version 1.0.1-main.90a4f94 to 1.0.1-main.9e71fa6
@@ -11,2 +11,8 @@ # Changelog | ||
- Update `ChatConfig` interface with `LiveChatVersion`, `allowedFileExtensions` & `maxUploadFileSize` properties | ||
- Add ability to automatically detect locale from chat config | ||
- Add `runtimeId` attribute in `OmnichannelChatSDK` & `ChatSDKRuntimeId` field in telemetry | ||
- Add ability to automatically pass locale from chat config on calling `ChatSDK.emailLiveChatTranscript()` | ||
- Bubble up `WidgetUseOutsideOperatingHour` exception | ||
- Add `acs_webchat-chat-adapter` middleware to add default `channelData.tags` & `channelData.metadata` | ||
- Update `ChatConfig` interface with `msdyn_enablemarkdown` property | ||
@@ -16,2 +22,6 @@ ### Fix | ||
- Skip `session init` call on existing conversation | ||
- Fix `chat reconnect` not ending the conversation on calling `ChatSDK.endChat()` | ||
- Fix on messaging client not sending heartbeat on new conversations subsequent to the first conversation | ||
- Fix `ChatSDK.getConversationDetails()` not passing `authenticatedUserToken` | ||
- Fix `IC3Client.dispose()` called when `IC3Client` is `undefined` | ||
@@ -18,0 +28,0 @@ ### Changed |
@@ -9,2 +9,3 @@ export default interface ChatConfig { | ||
maxUploadFileSize: string; | ||
msdyn_enablemarkdown?: string; | ||
} |
@@ -0,1 +1,3 @@ | ||
export declare const channelIdTag = "ChannelId-lcw"; | ||
export declare const customerMessageTag = "FromCustomer"; | ||
export declare const defaultMessageTags: string[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.defaultMessageTags = void 0; | ||
exports.defaultMessageTags = ['ChannelId-lcw', 'FromCustomer']; | ||
exports.defaultMessageTags = exports.customerMessageTag = exports.channelIdTag = void 0; | ||
exports.channelIdTag = 'ChannelId-lcw'; // Tag for PVA bot to return proper response for live chat channel | ||
exports.customerMessageTag = 'FromCustomer'; // Tag to support transcript analytics feature | ||
exports.defaultMessageTags = [exports.channelIdTag, exports.customerMessageTag]; | ||
//# sourceMappingURL=MessageTags.js.map |
@@ -0,3 +1,6 @@ | ||
import HostType from "@microsoft/omnichannel-ic3core/lib/interfaces/HostType"; | ||
import ProtocolType from "@microsoft/omnichannel-ic3core/lib/interfaces/ProtocoleType"; | ||
import IConversation from "@microsoft/omnichannel-ic3core/lib/model/IConversation"; | ||
import IChatToken from "./IChatToken"; | ||
import INotification from "./INotification"; | ||
export default interface IIC3AdapterOptions { | ||
@@ -10,2 +13,11 @@ userId: string; | ||
sdk?: any; | ||
visitor?: boolean; | ||
sendHeartBeat?: boolean; | ||
hostType?: HostType; | ||
protocolType?: ProtocolType; | ||
callbackOnNotification?: (notification: INotification) => void; | ||
callbackOnThreadNotFound?: () => void; | ||
featureConfig?: { | ||
ShouldEnableInlinePlaying: boolean; | ||
}; | ||
} |
import ACSClient from "./core/messaging/ACSClient"; | ||
import { ParticipantsRemovedEvent } from '@azure/communication-signaling'; | ||
import ChatAdapterOptionalParams from "./core/messaging/ChatAdapterOptionalParams"; | ||
import ChatConfig from "./core/ChatConfig"; | ||
@@ -26,2 +27,3 @@ import ChatReconnectContext from "./core/ChatReconnectContext"; | ||
private debug; | ||
runtimeId: string; | ||
OCSDKProvider: unknown; | ||
@@ -36,2 +38,3 @@ IC3SDKProvider: unknown; | ||
isInitialized: boolean; | ||
localeId: string; | ||
requestId: string; | ||
@@ -84,3 +87,3 @@ private chatToken; | ||
getLiveChatTranscript(): Promise<any>; | ||
createChatAdapter(protocol?: string | null): Promise<unknown>; | ||
createChatAdapter(optionalParams?: ChatAdapterOptionalParams): Promise<unknown>; | ||
getVoiceVideoCalling(params?: any): Promise<any>; | ||
@@ -93,3 +96,4 @@ getPostChatSurveyContext(): Promise<any>; | ||
private updateChatToken; | ||
private setAuthTokenProvider; | ||
} | ||
export default OmnichannelChatSDK; |
@@ -286,2 +286,3 @@ "use strict"; | ||
return { | ||
ChatSDKRuntimeId: '', | ||
OrgId: '', | ||
@@ -354,2 +355,3 @@ OrgUrl: '', | ||
return { | ||
ChatSDKRuntimeId: '', | ||
OrgId: '', | ||
@@ -373,2 +375,3 @@ OrgUrl: '', | ||
return { | ||
ChatSDKRuntimeId: '', | ||
OrgId: '', | ||
@@ -388,2 +391,3 @@ OrgUrl: '', | ||
return { | ||
ChatSDKRuntimeId: '', | ||
OrgId: '', | ||
@@ -402,2 +406,3 @@ OrgUrl: '', | ||
return { | ||
ChatSDKRuntimeId: '', | ||
OrgId: '', | ||
@@ -404,0 +409,0 @@ OrgUrl: '', |
@@ -8,2 +8,3 @@ import AriaTelemetry from "./AriaTelemetry"; | ||
private debug; | ||
private runtimeId; | ||
private telemetryEvents; | ||
@@ -15,2 +16,3 @@ private telemetry; | ||
setScenarioType(scenarioType: ScenarioType): void; | ||
setRuntimeId(runtimeId: string): void; | ||
useTelemetry(telemetry: typeof AriaTelemetry): void; | ||
@@ -17,0 +19,0 @@ startScenario(event: string, additionalProperties?: AWTEventData["properties"]): void; |
@@ -20,2 +20,3 @@ "use strict"; | ||
this.omnichannelConfig = omnichannelConfig; | ||
this.runtimeId = ''; | ||
this.telemetry = null; | ||
@@ -35,2 +36,5 @@ this.debug = false; | ||
}; | ||
ScenarioMarker.prototype.setRuntimeId = function (runtimeId) { | ||
this.runtimeId = runtimeId; | ||
}; | ||
ScenarioMarker.prototype.useTelemetry = function (telemetry) { | ||
@@ -49,3 +53,3 @@ this.debug && console.log("[ScenarioMarker][useTelemetry]"); | ||
} | ||
var properties = __assign({ Event: EventMarker_1.startEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId }, additionalProperties); | ||
var properties = __assign({ ChatSDKRuntimeId: this.runtimeId, Event: EventMarker_1.startEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId }, additionalProperties); | ||
(_a = this.telemetry) === null || _a === void 0 ? void 0 : _a.info(properties, this.scenarioType); | ||
@@ -63,3 +67,3 @@ }; | ||
this.telemetryEvents.delete(event); | ||
var properties = __assign({ Event: EventMarker_1.failEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId, ElapsedTimeInMilliseconds: stopWatch.stop() }, additionalProperties); | ||
var properties = __assign({ ChatSDKRuntimeId: this.runtimeId, Event: EventMarker_1.failEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId, ElapsedTimeInMilliseconds: stopWatch.stop() }, additionalProperties); | ||
(_a = this.telemetry) === null || _a === void 0 ? void 0 : _a.error(properties, this.scenarioType); | ||
@@ -77,3 +81,3 @@ }; | ||
this.telemetryEvents.delete(event); | ||
var properties = __assign({ Event: EventMarker_1.completeEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId, ElapsedTimeInMilliseconds: stopWatch.stop() }, additionalProperties); | ||
var properties = __assign({ ChatSDKRuntimeId: this.runtimeId, Event: EventMarker_1.completeEvent(event), OrgId: this.omnichannelConfig.orgId, OrgUrl: this.omnichannelConfig.orgUrl, WidgetId: this.omnichannelConfig.widgetId, ElapsedTimeInMilliseconds: stopWatch.stop() }, additionalProperties); | ||
(_a = this.telemetry) === null || _a === void 0 ? void 0 : _a.info(properties, this.scenarioType); | ||
@@ -80,0 +84,0 @@ }; |
export declare const getLocaleStringFromId: (id: string) => string; | ||
export declare const getLocaleIdFromString: (value: string) => string; | ||
export declare const defaultLocaleId: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLocaleIdFromString = exports.getLocaleStringFromId = void 0; | ||
exports.defaultLocaleId = exports.getLocaleIdFromString = exports.getLocaleStringFromId = void 0; | ||
var localeList = { | ||
@@ -59,2 +59,3 @@ "1025": "ar-sa", | ||
}; | ||
exports.defaultLocaleId = exports.getLocaleIdFromString("en-us"); | ||
//# sourceMappingURL=locale.js.map |
@@ -9,2 +9,3 @@ import LogLevel from "../telemetry/LogLevel"; | ||
private debug; | ||
private runtimeId; | ||
private requestId; | ||
@@ -15,2 +16,3 @@ private chatId; | ||
setDebug(flag: boolean): void; | ||
setRuntimeId(runtimeId: string): void; | ||
setRequestId(requestId: string): void; | ||
@@ -24,2 +26,3 @@ setChatId(chatId: string): void; | ||
private debug; | ||
private runtimeId; | ||
private requestId; | ||
@@ -30,2 +33,3 @@ private chatId; | ||
setDebug(flag: boolean): void; | ||
setRuntimeId(runtimeId: string): void; | ||
setRequestId(requestId: string): void; | ||
@@ -39,2 +43,3 @@ setChatId(chatId: string): void; | ||
private debug; | ||
private runtimeId; | ||
private requestId; | ||
@@ -46,2 +51,3 @@ private chatId; | ||
setDebug(flag: boolean): void; | ||
setRuntimeId(runtimeId: string): void; | ||
setRequestId(requestId: string): void; | ||
@@ -58,2 +64,3 @@ setChatId(chatId: string): void; | ||
private debug; | ||
private runtimeId; | ||
private requestId; | ||
@@ -65,2 +72,3 @@ private chatId; | ||
setDebug(flag: boolean): void; | ||
setRuntimeId(runtimeId: string): void; | ||
setRequestId(requestId: string): void; | ||
@@ -67,0 +75,0 @@ setChatId(chatId: string): void; |
@@ -22,2 +22,3 @@ "use strict"; | ||
this.debug = false; | ||
this.runtimeId = ''; | ||
this.requestId = ''; | ||
@@ -32,2 +33,5 @@ this.chatId = ''; | ||
}; | ||
IC3ClientLogger.prototype.setRuntimeId = function (runtimeId) { | ||
this.runtimeId = runtimeId; | ||
}; | ||
IC3ClientLogger.prototype.setRequestId = function (requestId) { | ||
@@ -51,2 +55,3 @@ this.requestId = requestId; | ||
var baseProperties = { | ||
ChatSDKRuntimeId: this.runtimeId, | ||
OrgId: this.omnichannelConfig.orgId, | ||
@@ -82,2 +87,3 @@ OrgUrl: this.omnichannelConfig.orgUrl, | ||
this.debug = false; | ||
this.runtimeId = ''; | ||
this.requestId = ''; | ||
@@ -92,2 +98,5 @@ this.chatId = ''; | ||
}; | ||
OCSDKLogger.prototype.setRuntimeId = function (runtimeId) { | ||
this.runtimeId = runtimeId; | ||
}; | ||
OCSDKLogger.prototype.setRequestId = function (requestId) { | ||
@@ -111,2 +120,3 @@ this.requestId = requestId; | ||
var baseProperties = { | ||
ChatSDKRuntimeId: this.runtimeId, | ||
OrgId: this.omnichannelConfig.orgId, | ||
@@ -142,2 +152,3 @@ OrgUrl: this.omnichannelConfig.orgUrl, | ||
this.debug = false; | ||
this.runtimeId = ''; | ||
this.requestId = ''; | ||
@@ -157,2 +168,7 @@ this.chatId = ''; | ||
}; | ||
ACSClientLogger.prototype.setRuntimeId = function (runtimeId) { | ||
var _a; | ||
this.runtimeId = runtimeId; | ||
(_a = this.scenarioMarker) === null || _a === void 0 ? void 0 : _a.setRuntimeId(runtimeId); | ||
}; | ||
ACSClientLogger.prototype.setRequestId = function (requestId) { | ||
@@ -178,2 +194,3 @@ this.requestId = requestId; | ||
var baseProperties = { | ||
ChatSDKRuntimeId: this.runtimeId, | ||
OrgId: this.omnichannelConfig.orgId, | ||
@@ -236,2 +253,3 @@ OrgUrl: this.omnichannelConfig.orgUrl, | ||
this.debug = false; | ||
this.runtimeId = ''; | ||
this.requestId = ''; | ||
@@ -251,2 +269,7 @@ this.chatId = ''; | ||
}; | ||
ACSAdapterLogger.prototype.setRuntimeId = function (runtimeId) { | ||
var _a; | ||
this.runtimeId = runtimeId; | ||
(_a = this.scenarioMarker) === null || _a === void 0 ? void 0 : _a.setRuntimeId(this.runtimeId); | ||
}; | ||
ACSAdapterLogger.prototype.setRequestId = function (requestId) { | ||
@@ -272,2 +295,3 @@ this.requestId = requestId; | ||
var baseProperties = { | ||
ChatSDKRuntimeId: this.runtimeId, | ||
OrgId: this.omnichannelConfig.orgId, | ||
@@ -274,0 +298,0 @@ OrgUrl: this.omnichannelConfig.orgUrl, |
declare const loadScript: (scriptUrl: string, callbackOnload?: CallableFunction, callbackError?: CallableFunction) => Promise<void>; | ||
declare const removeElementById: (id: string) => void; | ||
declare const _default: { | ||
loadScript: (scriptUrl: string, callbackOnload?: CallableFunction, callbackError?: CallableFunction) => Promise<void>; | ||
removeElementById: (id: string) => void; | ||
}; | ||
export default _default; | ||
export { loadScript }; | ||
export { loadScript, removeElementById }; |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadScript = void 0; | ||
exports.removeElementById = exports.loadScript = void 0; | ||
var loadScript = function (scriptUrl, callbackOnload, callbackError) { | ||
@@ -93,5 +93,11 @@ if (callbackOnload === void 0) { callbackOnload = function () { return void (0); }; } | ||
exports.loadScript = loadScript; | ||
var removeElementById = function (id) { | ||
var _a; | ||
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.remove(); | ||
}; | ||
exports.removeElementById = removeElementById; | ||
exports.default = { | ||
loadScript: loadScript | ||
loadScript: loadScript, | ||
removeElementById: removeElementById | ||
}; | ||
//# sourceMappingURL=WebUtils.js.map |
{ | ||
"name": "@microsoft/omnichannel-chat-sdk", | ||
"version": "1.0.1-main.90a4f94", | ||
"version": "1.0.1-main.9e71fa6", | ||
"description": "Microsoft Omnichannel Chat SDK", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -134,3 +134,3 @@ # Omnichannel Chat SDK | ||
| OmnichannelChatSDK.downloadFileAttachment() | Download file attachment | | | ||
| OmnichannelChatSDK.createChatAdapter() | Get IC3Adapter | **Web only** | | ||
| OmnichannelChatSDK.createChatAdapter() | Get Chat Adapter | **Web only** | | ||
| OmnichannelChatSDK.getVoiceVideoCalling() | Get VoiceVideoCall SDK for Escalation to Voice & Video | **Web only** | | ||
@@ -339,4 +339,3 @@ | OmnichannelChatSDK.getPostChatSurveyContext() | Get post chat survey link, survey locale, and whether an agent has joined the survey | | | ||
emailAddress: 'contoso@microsoft.com', | ||
attachmentMessage: 'Attachment Message', | ||
locale: 'en-us' | ||
attachmentMessage: 'Attachment Message' | ||
}; | ||
@@ -343,0 +342,0 @@ await chatSDK.emailLiveChatTranscript(body); |
Sorry, the diff of this file is not supported yet
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
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
1209702
252
11793
748