@webex/contact-center 3.12.0-webex-services-ready.4 → 3.13.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +24 -13
- package/ai-docs/ARCHITECTURE.md +1 -1
- package/ai-docs/CONTRACTS.md +21 -3
- package/ai-docs/SECURITY.md +1 -1
- package/ai-docs/SERVICE_STATE.md +4 -0
- package/ai-docs/contact-center-spec.md +53 -6
- package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
- package/ai-docs/features/contact-owner-change-refactor.md +78 -0
- package/dist/cc.js +816 -26
- package/dist/cc.js.map +1 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +29 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js +66 -12
- package/dist/index.js.map +1 -1
- package/dist/metrics/MetricsManager.js +16 -0
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +110 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +33 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +18 -15
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/AnswerCallOnWebexService.js +202 -0
- package/dist/services/AnswerCallOnWebexService.js.map +1 -0
- package/dist/services/ApiAiAssistant.js +221 -11
- package/dist/services/ApiAiAssistant.js.map +1 -1
- package/dist/services/EntryPoint.js +46 -68
- package/dist/services/EntryPoint.js.map +1 -1
- package/dist/services/Queue.js +27 -22
- package/dist/services/Queue.js.map +1 -1
- package/dist/services/WebCallingService.js +287 -37
- package/dist/services/WebCallingService.js.map +1 -1
- package/dist/services/WebexCrossClientService.js +225 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +111 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +46 -46
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +34 -77
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +100 -226
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +55 -35
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js +11 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +25 -1
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/WebexRequest.js +6 -2
- package/dist/services/core/WebexRequest.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +17 -11
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +9 -1
- package/dist/services/core/constants.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +17 -1
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/task/Task.js +275 -8
- package/dist/services/task/Task.js.map +1 -1
- package/dist/services/task/TaskFactory.js +11 -6
- package/dist/services/task/TaskFactory.js.map +1 -1
- package/dist/services/task/TaskManager.js +590 -42
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +11 -1
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/WebexCallingUtils.js +70 -0
- package/dist/services/task/WebexCallingUtils.js.map +1 -0
- package/dist/services/task/constants.js +14 -2
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +29 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/digital/Digital.js +4 -3
- package/dist/services/task/digital/Digital.js.map +1 -1
- package/dist/services/task/state-machine/TaskStateMachine.js +162 -53
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -1
- package/dist/services/task/state-machine/actions.js +6 -1
- package/dist/services/task/state-machine/actions.js.map +1 -1
- package/dist/services/task/state-machine/guards.js +7 -10
- package/dist/services/task/state-machine/guards.js.map +1 -1
- package/dist/services/task/state-machine/types.js.map +1 -1
- package/dist/services/task/state-machine/uiControlsComputer.js +118 -18
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -1
- package/dist/services/task/types.js +47 -1
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +477 -17
- package/dist/services/task/voice/Voice.js.map +1 -1
- package/dist/services/task/voice/WebRTC.js +6 -3
- package/dist/services/task/voice/WebRTC.js.map +1 -1
- package/dist/services/task/voice/wxAppOfferObservability.js +145 -0
- package/dist/services/task/voice/wxAppOfferObservability.js.map +1 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js +395 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
- package/dist/services/wxAppDiagnosticLogging.js +159 -0
- package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
- package/dist/services/wxAppTelephonyUtils.js +19 -0
- package/dist/services/wxAppTelephonyUtils.js.map +1 -0
- package/dist/types/cc.d.ts +127 -9
- package/dist/types/config.d.ts +7 -0
- package/dist/types/constants.d.ts +23 -0
- package/dist/types/index.d.ts +38 -17
- package/dist/types/metrics/MetricsManager.d.ts +6 -0
- package/dist/types/metrics/constants.d.ts +31 -0
- package/dist/types/services/AddressBook.d.ts +2 -1
- package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
- package/dist/types/services/ApiAiAssistant.d.ts +48 -4
- package/dist/types/services/EntryPoint.d.ts +7 -5
- package/dist/types/services/Queue.d.ts +5 -3
- package/dist/types/services/WebexCrossClientService.d.ts +32 -0
- package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
- package/dist/types/services/config/Util.d.ts +4 -8
- package/dist/types/services/config/constants.d.ts +28 -76
- package/dist/types/services/config/index.d.ts +16 -64
- package/dist/types/services/config/types.d.ts +150 -173
- package/dist/types/services/constants.d.ts +9 -0
- package/dist/types/services/core/Err.d.ts +2 -0
- package/dist/types/services/core/Utils.d.ts +10 -0
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/constants.d.ts +7 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/task/Task.d.ts +34 -5
- package/dist/types/services/task/TaskFactory.d.ts +4 -2
- package/dist/types/services/task/TaskUtils.d.ts +6 -0
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +12 -0
- package/dist/types/services/task/contact.d.ts +4 -0
- package/dist/types/services/task/digital/Digital.d.ts +4 -3
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +304 -56
- package/dist/types/services/task/state-machine/guards.d.ts +6 -5
- package/dist/types/services/task/state-machine/types.d.ts +9 -1
- package/dist/types/services/task/types.d.ts +192 -5
- package/dist/types/services/task/voice/Voice.d.ts +68 -11
- package/dist/types/services/task/voice/WebRTC.d.ts +5 -4
- package/dist/types/services/task/voice/wxAppOfferObservability.d.ts +39 -0
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +68 -0
- package/dist/types/services/wxAppDiagnosticLogging.d.ts +63 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +125 -13
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types.js +90 -8
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +19 -5
- package/dist/utils/PageCache.js.map +1 -1
- package/dist/webex.js +9 -1
- package/dist/webex.js.map +1 -1
- package/package.json +10 -9
- package/src/cc.ts +1047 -48
- package/src/config.ts +7 -0
- package/src/constants.ts +36 -0
- package/src/index.ts +49 -11
- package/src/metrics/MetricsManager.ts +16 -0
- package/src/metrics/ai-docs/metrics-spec.md +138 -21
- package/src/metrics/behavioral-events.ts +112 -0
- package/src/metrics/constants.ts +36 -0
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +239 -0
- package/src/services/ApiAiAssistant.ts +297 -13
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/WebCallingService.ts +362 -40
- package/src/services/WebexCrossClientService.ts +298 -0
- package/src/services/WxAppTelephonyMercurySync.ts +142 -0
- package/src/services/agent/ai-docs/AGENTS.md +1 -1
- package/src/services/agent/ai-docs/agent-spec.md +1 -0
- package/src/services/ai-docs/AGENTS.md +11 -11
- package/src/services/ai-docs/services-spec.md +25 -5
- package/src/services/config/Util.ts +52 -82
- package/src/services/config/ai-docs/AGENTS.md +35 -40
- package/src/services/config/ai-docs/ARCHITECTURE.md +90 -103
- package/src/services/config/ai-docs/config-spec.md +132 -132
- package/src/services/config/constants.ts +39 -85
- package/src/services/config/index.ts +116 -277
- package/src/services/config/types.ts +145 -195
- package/src/services/constants.ts +10 -0
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/Utils.ts +28 -0
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/ai-docs/core-spec.md +25 -11
- package/src/services/core/aqm-reqs.ts +18 -12
- package/src/services/core/constants.ts +8 -0
- package/src/services/core/types.ts +33 -1
- package/src/services/core/websocket/WebSocketManager.ts +26 -2
- package/src/services/task/Task.ts +386 -12
- package/src/services/task/TaskFactory.ts +33 -6
- package/src/services/task/TaskManager.ts +857 -41
- package/src/services/task/TaskUtils.ts +13 -0
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +1 -0
- package/src/services/task/ai-docs/task-spec.md +190 -8
- package/src/services/task/constants.ts +13 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/digital/Digital.ts +11 -4
- package/src/services/task/state-machine/TaskStateMachine.ts +235 -81
- package/src/services/task/state-machine/actions.ts +5 -2
- package/src/services/task/state-machine/ai-docs/AGENTS.md +6 -4
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +35 -16
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +103 -33
- package/src/services/task/state-machine/guards.ts +7 -10
- package/src/services/task/state-machine/types.ts +16 -1
- package/src/services/task/state-machine/uiControlsComputer.ts +206 -32
- package/src/services/task/types.ts +269 -4
- package/src/services/task/voice/Voice.ts +625 -17
- package/src/services/task/voice/WebRTC.ts +11 -4
- package/src/services/task/voice/wxAppOfferObservability.ts +204 -0
- package/src/services/task/voice/wxAppVoiceMethods.ts +575 -0
- package/src/services/wxAppDiagnosticLogging.ts +286 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +159 -13
- package/src/utils/AGENTS.md +21 -10
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/ai-docs/utils-spec.md +21 -11
- package/src/webex.js +8 -0
- package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
- package/test/unit/spec/cc.ts +3595 -120
- package/test/unit/spec/index.ts +891 -0
- package/test/unit/spec/metrics/MetricsManager.ts +25 -0
- package/test/unit/spec/metrics/behavioral-events.ts +60 -0
- package/test/unit/spec/services/AddressBook.ts +37 -6
- package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
- package/test/unit/spec/services/ApiAiAssistant.ts +269 -8
- package/test/unit/spec/services/EntryPoint.ts +87 -40
- package/test/unit/spec/services/Queue.ts +123 -12
- package/test/unit/spec/services/WebCallingService.ts +483 -54
- package/test/unit/spec/services/WebexCrossClientService.ts +509 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
- package/test/unit/spec/services/config/Util.ts +501 -0
- package/test/unit/spec/services/config/index.ts +313 -543
- package/test/unit/spec/services/core/Utils.ts +22 -0
- package/test/unit/spec/services/core/WebexRequest.ts +8 -7
- package/test/unit/spec/services/core/aqm-reqs.ts +142 -1
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +64 -14
- package/test/unit/spec/services/task/Task.ts +2257 -11
- package/test/unit/spec/services/task/TaskFactory.ts +56 -2
- package/test/unit/spec/services/task/TaskManager.ts +5559 -1493
- package/test/unit/spec/services/task/TaskUtils.ts +72 -0
- package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
- package/test/unit/spec/services/task/contact.ts +33 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +1501 -92
- package/test/unit/spec/services/task/state-machine/guards.ts +210 -8
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +445 -7
- package/test/unit/spec/services/task/voice/Voice.ts +1710 -4
- package/test/unit/spec/services/task/voice/wxAppOfferObservability.ts +361 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +719 -0
- package/test/unit/spec/services/wxAppDiagnosticLogging.ts +179 -0
- package/test/unit/spec/wellnessSampleUtils.ts +288 -0
- package/typedoc.md +1 -1
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WXAPP_LOG_PREFIX = exports.WXAPP_LOG_FEATURE = void 0;
|
|
7
|
+
exports.callIdSuffix = callIdSuffix;
|
|
8
|
+
exports.deriveWxAppAcceptReason = deriveWxAppAcceptReason;
|
|
9
|
+
exports.logWxAppMercuryMuteSync = logWxAppMercuryMuteSync;
|
|
10
|
+
exports.logWxAppOfferDecision = logWxAppOfferDecision;
|
|
11
|
+
exports.logWxAppOfferParticipantMismatch = logWxAppOfferParticipantMismatch;
|
|
12
|
+
exports.logWxAppSessionReadiness = logWxAppSessionReadiness;
|
|
13
|
+
exports.logWxAppTelephonyAction = logWxAppTelephonyAction;
|
|
14
|
+
exports.logWxAppValidationFailure = logWxAppValidationFailure;
|
|
15
|
+
var _loggerProxy = _interopRequireDefault(require("../logger-proxy"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const WXAPP_LOG_FEATURE = exports.WXAPP_LOG_FEATURE = 'wxApp';
|
|
18
|
+
const WXAPP_LOG_PREFIX = exports.WXAPP_LOG_PREFIX = '[CC wxApp]';
|
|
19
|
+
/** Last 8 chars of callId for correlation without logging full id. */
|
|
20
|
+
function callIdSuffix(callId) {
|
|
21
|
+
if (!callId) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return callId.length <= 8 ? callId : callId.slice(-8);
|
|
25
|
+
}
|
|
26
|
+
function formatLogSuffix(data, keys) {
|
|
27
|
+
const entries = keys ? keys.map(key => [key, data[key]]) : Object.entries(data).filter(([key]) => key !== 'feature' && key !== 'event');
|
|
28
|
+
const parts = entries.filter(([, value]) => value !== undefined && value !== null && value !== '').map(([key, value]) => `${key}=${String(value)}`);
|
|
29
|
+
return parts.length > 0 ? ` ${parts.join(' ')}` : '';
|
|
30
|
+
}
|
|
31
|
+
function logWxApp(message, method, data, suffixKeys) {
|
|
32
|
+
const suffix = formatLogSuffix(data, suffixKeys);
|
|
33
|
+
_loggerProxy.default.log(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {
|
|
34
|
+
module: 'wxAppDiagnosticLogging',
|
|
35
|
+
method,
|
|
36
|
+
data: {
|
|
37
|
+
feature: WXAPP_LOG_FEATURE,
|
|
38
|
+
...data
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function logWxAppWarn(message, method, data, suffixKeys) {
|
|
43
|
+
const suffix = formatLogSuffix(data, suffixKeys);
|
|
44
|
+
_loggerProxy.default.warn(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {
|
|
45
|
+
module: 'wxAppDiagnosticLogging',
|
|
46
|
+
method,
|
|
47
|
+
data: {
|
|
48
|
+
feature: WXAPP_LOG_FEATURE,
|
|
49
|
+
...data
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function logWxAppError(message, method, data, suffixKeys) {
|
|
54
|
+
const suffix = formatLogSuffix(data, suffixKeys);
|
|
55
|
+
_loggerProxy.default.error(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {
|
|
56
|
+
module: 'wxAppDiagnosticLogging',
|
|
57
|
+
method,
|
|
58
|
+
data: {
|
|
59
|
+
feature: WXAPP_LOG_FEATURE,
|
|
60
|
+
...data
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function logWxAppSessionReadiness(params) {
|
|
65
|
+
const data = {
|
|
66
|
+
event: 'session_readiness',
|
|
67
|
+
enableWxBetterTogether: params.enableWxBetterTogether,
|
|
68
|
+
loginOption: params.loginOption,
|
|
69
|
+
wxAppHooksApplied: params.wxAppHooksApplied,
|
|
70
|
+
usersubPublished: params.usersubPublished,
|
|
71
|
+
mercurySubscribed: params.mercurySubscribed,
|
|
72
|
+
telephonyTaskType: params.telephonyTaskType,
|
|
73
|
+
skipReason: params.skipReason
|
|
74
|
+
};
|
|
75
|
+
logWxApp('session readiness', 'logWxAppSessionReadiness', data, ['usersubPublished', 'mercurySubscribed', 'loginOption', 'enableWxBetterTogether', 'telephonyTaskType', 'skipReason']);
|
|
76
|
+
}
|
|
77
|
+
function deriveWxAppAcceptReason(params) {
|
|
78
|
+
if (params.isWxAppInboundOffer || params.isWxAppOutdialOffer) {
|
|
79
|
+
if (params.wxAppAcceptInFlight) {
|
|
80
|
+
return 'wxApp_accept_in_flight';
|
|
81
|
+
}
|
|
82
|
+
if (params.wxAppAnswerPending) {
|
|
83
|
+
return 'wxApp_answer_pending';
|
|
84
|
+
}
|
|
85
|
+
return 'wxApp_offer_ready';
|
|
86
|
+
}
|
|
87
|
+
if (params.isWebrtc && !params.isOutdial) {
|
|
88
|
+
return 'browser_webrtc_offer';
|
|
89
|
+
}
|
|
90
|
+
if (params.isOutdial) {
|
|
91
|
+
return 'outdial_auto_answer';
|
|
92
|
+
}
|
|
93
|
+
if (params.enableWxBetterTogether && !params.hasDeviceCallId) {
|
|
94
|
+
return 'extension_non_wxApp_offer';
|
|
95
|
+
}
|
|
96
|
+
return 'extension_non_wxApp_offer';
|
|
97
|
+
}
|
|
98
|
+
function logWxAppOfferDecision(params) {
|
|
99
|
+
const data = {
|
|
100
|
+
event: 'offer_decision',
|
|
101
|
+
interactionId: params.interactionId,
|
|
102
|
+
acceptVisible: params.acceptVisible,
|
|
103
|
+
acceptEnabled: params.acceptEnabled,
|
|
104
|
+
acceptReason: params.acceptReason,
|
|
105
|
+
wxAppParticipantDeviceType: params.wxAppParticipantDeviceType,
|
|
106
|
+
hasDeviceCallId: params.hasDeviceCallId,
|
|
107
|
+
hasDeviceId: params.hasDeviceId,
|
|
108
|
+
usersubPublished: params.usersubPublished
|
|
109
|
+
};
|
|
110
|
+
logWxApp('offer decision', 'logWxAppOfferDecision', data, ['acceptReason', 'hasDeviceCallId', 'hasDeviceId', 'usersubPublished', 'interactionId', 'acceptVisible', 'acceptEnabled']);
|
|
111
|
+
}
|
|
112
|
+
function logWxAppOfferParticipantMismatch(params) {
|
|
113
|
+
const data = {
|
|
114
|
+
event: 'participant_fields_mismatch',
|
|
115
|
+
interactionId: params.interactionId,
|
|
116
|
+
usersubPublished: params.usersubPublished,
|
|
117
|
+
hasDeviceCallId: params.hasDeviceCallId,
|
|
118
|
+
hasDeviceId: params.hasDeviceId,
|
|
119
|
+
participantDeviceType: params.participantDeviceType ?? 'missing',
|
|
120
|
+
acceptVisible: params.acceptVisible,
|
|
121
|
+
acceptEnabled: params.acceptEnabled,
|
|
122
|
+
acceptReason: params.acceptReason
|
|
123
|
+
};
|
|
124
|
+
logWxAppWarn('participant fields mismatch', 'logWxAppOfferParticipantMismatch', data, ['usersubPublished', 'hasDeviceCallId', 'hasDeviceId', 'acceptReason', 'interactionId', 'participantDeviceType']);
|
|
125
|
+
}
|
|
126
|
+
function logWxAppTelephonyAction(params) {
|
|
127
|
+
const payload = {
|
|
128
|
+
event: 'telephony_action',
|
|
129
|
+
action: params.action,
|
|
130
|
+
phase: params.phase,
|
|
131
|
+
interactionId: params.interactionId,
|
|
132
|
+
trackingId: params.trackingId,
|
|
133
|
+
httpStatus: params.httpStatus,
|
|
134
|
+
failureReason: params.failureReason
|
|
135
|
+
};
|
|
136
|
+
if (params.phase === 'failed') {
|
|
137
|
+
logWxAppError(`telephony ${params.action} ${params.phase}`, 'logWxAppTelephonyAction', payload, ['interactionId', 'trackingId', 'httpStatus', 'failureReason']);
|
|
138
|
+
} else {
|
|
139
|
+
logWxApp(`telephony ${params.action} ${params.phase}`, 'logWxAppTelephonyAction', payload, ['interactionId', 'action', 'phase']);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function logWxAppValidationFailure(reason, interactionId) {
|
|
143
|
+
logWxAppError('validation failed', 'logWxAppValidationFailure', {
|
|
144
|
+
event: 'validation_failed',
|
|
145
|
+
reason,
|
|
146
|
+
interactionId
|
|
147
|
+
}, ['reason', 'interactionId']);
|
|
148
|
+
}
|
|
149
|
+
function logWxAppMercuryMuteSync(params) {
|
|
150
|
+
logWxApp(`mercury mute sync ${params.phase}`, 'logWxAppMercuryMuteSync', {
|
|
151
|
+
event: 'mercury_mute_sync',
|
|
152
|
+
phase: params.phase,
|
|
153
|
+
muted: params.muted,
|
|
154
|
+
callIdSuffix: params.callIdSuffix,
|
|
155
|
+
interactionId: params.interactionId,
|
|
156
|
+
dropReason: params.dropReason
|
|
157
|
+
}, ['phase', 'muted', 'callIdSuffix', 'interactionId', 'dropReason']);
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=wxAppDiagnosticLogging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","e","__esModule","default","WXAPP_LOG_FEATURE","exports","WXAPP_LOG_PREFIX","callIdSuffix","callId","undefined","length","slice","formatLogSuffix","data","keys","entries","map","key","Object","filter","parts","value","String","join","logWxApp","message","method","suffixKeys","suffix","LoggerProxy","log","module","feature","logWxAppWarn","warn","logWxAppError","error","logWxAppSessionReadiness","params","event","enableWxBetterTogether","loginOption","wxAppHooksApplied","usersubPublished","mercurySubscribed","telephonyTaskType","skipReason","deriveWxAppAcceptReason","isWxAppInboundOffer","isWxAppOutdialOffer","wxAppAcceptInFlight","wxAppAnswerPending","isWebrtc","isOutdial","hasDeviceCallId","logWxAppOfferDecision","interactionId","acceptVisible","acceptEnabled","acceptReason","wxAppParticipantDeviceType","hasDeviceId","logWxAppOfferParticipantMismatch","participantDeviceType","logWxAppTelephonyAction","payload","action","phase","trackingId","httpStatus","failureReason","logWxAppValidationFailure","reason","logWxAppMercuryMuteSync","muted","dropReason"],"sources":["wxAppDiagnosticLogging.ts"],"sourcesContent":["import LoggerProxy from '../logger-proxy';\n\nexport const WXAPP_LOG_FEATURE = 'wxApp';\nexport const WXAPP_LOG_PREFIX = '[CC wxApp]';\n\nexport type WxAppAcceptReason =\n | 'wxApp_offer_ready'\n | 'wxApp_answer_pending'\n | 'wxApp_accept_in_flight'\n | 'extension_non_wxApp_offer'\n | 'browser_webrtc_offer'\n | 'outdial_auto_answer';\n\nexport type WxAppSessionSkipReason =\n | 'unsupported_browser_login'\n | 'flag_disabled'\n | 'mercury_subscribe_failed'\n | 'publish_failed';\n\nexport type WxAppTelephonyAction = 'accept' | 'decline' | 'mute' | 'dtmf';\nexport type WxAppTelephonyPhase = 'started' | 'success' | 'failed';\n\ntype WxAppLogData = Record<string, string | boolean | number | undefined>;\n\n/** Last 8 chars of callId for correlation without logging full id. */\nexport function callIdSuffix(callId: string | null | undefined): string | undefined {\n if (!callId) {\n return undefined;\n }\n\n return callId.length <= 8 ? callId : callId.slice(-8);\n}\n\nfunction formatLogSuffix(data: WxAppLogData, keys?: string[]): string {\n const entries = keys\n ? keys.map((key) => [key, data[key]] as const)\n : Object.entries(data).filter(([key]) => key !== 'feature' && key !== 'event');\n\n const parts = entries\n .filter(([, value]) => value !== undefined && value !== null && value !== '')\n .map(([key, value]) => `${key}=${String(value)}`);\n\n return parts.length > 0 ? ` ${parts.join(' ')}` : '';\n}\n\nfunction logWxApp(\n message: string,\n method: string,\n data: WxAppLogData,\n suffixKeys?: string[]\n): void {\n const suffix = formatLogSuffix(data, suffixKeys);\n LoggerProxy.log(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {\n module: 'wxAppDiagnosticLogging',\n method,\n data: {feature: WXAPP_LOG_FEATURE, ...data},\n });\n}\n\nfunction logWxAppWarn(\n message: string,\n method: string,\n data: WxAppLogData,\n suffixKeys?: string[]\n): void {\n const suffix = formatLogSuffix(data, suffixKeys);\n LoggerProxy.warn(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {\n module: 'wxAppDiagnosticLogging',\n method,\n data: {feature: WXAPP_LOG_FEATURE, ...data},\n });\n}\n\nfunction logWxAppError(\n message: string,\n method: string,\n data: WxAppLogData,\n suffixKeys?: string[]\n): void {\n const suffix = formatLogSuffix(data, suffixKeys);\n LoggerProxy.error(`${WXAPP_LOG_PREFIX} ${message}${suffix}`, {\n module: 'wxAppDiagnosticLogging',\n method,\n data: {feature: WXAPP_LOG_FEATURE, ...data},\n });\n}\n\nexport function logWxAppSessionReadiness(params: {\n enableWxBetterTogether: boolean;\n loginOption: string | undefined;\n wxAppHooksApplied: boolean;\n usersubPublished: boolean;\n mercurySubscribed: boolean;\n telephonyTaskType: 'Voice' | 'WebRTC' | 'unknown';\n skipReason?: WxAppSessionSkipReason;\n}): void {\n const data: WxAppLogData = {\n event: 'session_readiness',\n enableWxBetterTogether: params.enableWxBetterTogether,\n loginOption: params.loginOption,\n wxAppHooksApplied: params.wxAppHooksApplied,\n usersubPublished: params.usersubPublished,\n mercurySubscribed: params.mercurySubscribed,\n telephonyTaskType: params.telephonyTaskType,\n skipReason: params.skipReason,\n };\n\n logWxApp('session readiness', 'logWxAppSessionReadiness', data, [\n 'usersubPublished',\n 'mercurySubscribed',\n 'loginOption',\n 'enableWxBetterTogether',\n 'telephonyTaskType',\n 'skipReason',\n ]);\n}\n\nexport function deriveWxAppAcceptReason(params: {\n isWxAppInboundOffer: boolean;\n isWxAppOutdialOffer: boolean;\n isWebrtc: boolean;\n isOutdial: boolean;\n wxAppAcceptInFlight: boolean;\n wxAppAnswerPending: boolean;\n enableWxBetterTogether: boolean;\n hasDeviceCallId: boolean;\n}): WxAppAcceptReason {\n if (params.isWxAppInboundOffer || params.isWxAppOutdialOffer) {\n if (params.wxAppAcceptInFlight) {\n return 'wxApp_accept_in_flight';\n }\n if (params.wxAppAnswerPending) {\n return 'wxApp_answer_pending';\n }\n\n return 'wxApp_offer_ready';\n }\n\n if (params.isWebrtc && !params.isOutdial) {\n return 'browser_webrtc_offer';\n }\n\n if (params.isOutdial) {\n return 'outdial_auto_answer';\n }\n\n if (params.enableWxBetterTogether && !params.hasDeviceCallId) {\n return 'extension_non_wxApp_offer';\n }\n\n return 'extension_non_wxApp_offer';\n}\n\nexport function logWxAppOfferDecision(params: {\n interactionId: string;\n acceptVisible: boolean;\n acceptEnabled: boolean;\n acceptReason: WxAppAcceptReason;\n wxAppParticipantDeviceType?: string;\n hasDeviceCallId: boolean;\n hasDeviceId?: boolean;\n usersubPublished?: boolean;\n}): void {\n const data: WxAppLogData = {\n event: 'offer_decision',\n interactionId: params.interactionId,\n acceptVisible: params.acceptVisible,\n acceptEnabled: params.acceptEnabled,\n acceptReason: params.acceptReason,\n wxAppParticipantDeviceType: params.wxAppParticipantDeviceType,\n hasDeviceCallId: params.hasDeviceCallId,\n hasDeviceId: params.hasDeviceId,\n usersubPublished: params.usersubPublished,\n };\n\n logWxApp('offer decision', 'logWxAppOfferDecision', data, [\n 'acceptReason',\n 'hasDeviceCallId',\n 'hasDeviceId',\n 'usersubPublished',\n 'interactionId',\n 'acceptVisible',\n 'acceptEnabled',\n ]);\n}\n\nexport function logWxAppOfferParticipantMismatch(params: {\n interactionId: string;\n usersubPublished: boolean;\n hasDeviceCallId: boolean;\n hasDeviceId: boolean;\n participantDeviceType?: string;\n acceptVisible: boolean;\n acceptEnabled: boolean;\n acceptReason: WxAppAcceptReason;\n}): void {\n const data: WxAppLogData = {\n event: 'participant_fields_mismatch',\n interactionId: params.interactionId,\n usersubPublished: params.usersubPublished,\n hasDeviceCallId: params.hasDeviceCallId,\n hasDeviceId: params.hasDeviceId,\n participantDeviceType: params.participantDeviceType ?? 'missing',\n acceptVisible: params.acceptVisible,\n acceptEnabled: params.acceptEnabled,\n acceptReason: params.acceptReason,\n };\n\n logWxAppWarn('participant fields mismatch', 'logWxAppOfferParticipantMismatch', data, [\n 'usersubPublished',\n 'hasDeviceCallId',\n 'hasDeviceId',\n 'acceptReason',\n 'interactionId',\n 'participantDeviceType',\n ]);\n}\n\nexport function logWxAppTelephonyAction(params: {\n action: WxAppTelephonyAction;\n phase: WxAppTelephonyPhase;\n interactionId?: string;\n trackingId?: string;\n httpStatus?: number | string;\n failureReason?: string;\n}): void {\n const payload: WxAppLogData = {\n event: 'telephony_action',\n action: params.action,\n phase: params.phase,\n interactionId: params.interactionId,\n trackingId: params.trackingId,\n httpStatus: params.httpStatus,\n failureReason: params.failureReason,\n };\n\n if (params.phase === 'failed') {\n logWxAppError(\n `telephony ${params.action} ${params.phase}`,\n 'logWxAppTelephonyAction',\n payload,\n ['interactionId', 'trackingId', 'httpStatus', 'failureReason']\n );\n } else {\n logWxApp(`telephony ${params.action} ${params.phase}`, 'logWxAppTelephonyAction', payload, [\n 'interactionId',\n 'action',\n 'phase',\n ]);\n }\n}\n\nexport function logWxAppValidationFailure(reason: string, interactionId?: string): void {\n logWxAppError(\n 'validation failed',\n 'logWxAppValidationFailure',\n {\n event: 'validation_failed',\n reason,\n interactionId,\n },\n ['reason', 'interactionId']\n );\n}\n\nexport function logWxAppMercuryMuteSync(params: {\n phase: 'received' | 'applied' | 'dropped';\n muted?: boolean;\n callIdSuffix?: string;\n interactionId?: string;\n dropReason?: string;\n}): void {\n logWxApp(\n `mercury mute sync ${params.phase}`,\n 'logWxAppMercuryMuteSync',\n {\n event: 'mercury_mute_sync',\n phase: params.phase,\n muted: params.muted,\n callIdSuffix: params.callIdSuffix,\n interactionId: params.interactionId,\n dropReason: params.dropReason,\n },\n ['phase', 'muted', 'callIdSuffix', 'interactionId', 'dropReason']\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,SAAAD,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
|
+
});
|
|
6
|
+
exports.isWxAppCallNotFoundError = isWxAppCallNotFoundError;
|
|
7
|
+
/**
|
|
8
|
+
* Expected Hydra responses when mute backfill races call creation (WXCC-6026).
|
|
9
|
+
* These must not be logged as errors — see task-spec wxApp mute backfill guard.
|
|
10
|
+
*/
|
|
11
|
+
function isWxAppCallNotFoundError(error) {
|
|
12
|
+
const err = error;
|
|
13
|
+
if (err?.status === 400 || err?.status === '400') {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
const message = String(err?.message ?? error ?? '');
|
|
17
|
+
return message.includes('Call not found') || message.includes('101002');
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=wxAppTelephonyUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWxAppCallNotFoundError","error","err","status","message","String","includes"],"sources":["wxAppTelephonyUtils.ts"],"sourcesContent":["/**\n * Expected Hydra responses when mute backfill races call creation (WXCC-6026).\n * These must not be logged as errors — see task-spec wxApp mute backfill guard.\n */\nexport function isWxAppCallNotFoundError(error: unknown): boolean {\n const err = error as {status?: number | string; message?: string};\n if (err?.status === 400 || err?.status === '400') {\n return true;\n }\n\n const message = String(err?.message ?? error ?? '');\n\n return message.includes('Call not found') || message.includes('101002');\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACO,SAASA,wBAAwBA,CAACC,KAAc,EAAW;EAChE,MAAMC,GAAG,GAAGD,KAAqD;EACjE,IAAIC,GAAG,EAAEC,MAAM,KAAK,GAAG,IAAID,GAAG,EAAEC,MAAM,KAAK,KAAK,EAAE;IAChD,OAAO,IAAI;EACb;EAEA,MAAMC,OAAO,GAAGC,MAAM,CAACH,GAAG,EAAEE,OAAO,IAAIH,KAAK,IAAI,EAAE,CAAC;EAEnD,OAAOG,OAAO,CAACE,QAAQ,CAAC,gBAAgB,CAAC,IAAIF,OAAO,CAACE,QAAQ,CAAC,QAAQ,CAAC;AACzE","ignoreList":[]}
|
package/dist/types/cc.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* with Webex Contact Center features through the WebexSDK.
|
|
7
7
|
*/
|
|
8
8
|
import { WebexPlugin } from '@webex/webex-core';
|
|
9
|
-
import { SetStateResponse, IContactCenter, AgentLogin, AgentProfileUpdate, StationLoginResponse, StationLogoutResponse, BuddyAgentsResponse, BuddyAgents, UploadLogsResponse, UpdateDeviceTypeResponse } from './types';
|
|
9
|
+
import { SetStateResponse, IContactCenter, AgentLogin, AgentProfileUpdate, StationLoginResponse, StationLogoutResponse, BuddyAgentsResponse, BuddyAgents, UploadLogsResponse, UpdateDeviceTypeResponse, VoiceConnectionState } from './types';
|
|
10
10
|
import LoggerProxy from './logger-proxy';
|
|
11
11
|
import { StateChange, Logout } from './services/agent/types';
|
|
12
|
-
import { Profile, OutdialAniEntriesResponse, OutdialAniParams } from './services/config/types';
|
|
12
|
+
import { Profile, OutdialAniEntriesResponse, OutdialAniParams, Entity } from './services/config/types';
|
|
13
13
|
import { TaskResponse, PreviewContactPayload } from './services/task/types';
|
|
14
14
|
import { AddressBook } from './services/AddressBook';
|
|
15
15
|
import { Queue } from './services/Queue';
|
|
@@ -99,7 +99,7 @@ import type { EntryPointListResponse, EntryPointSearchParams, ContactServiceQueu
|
|
|
99
99
|
*
|
|
100
100
|
* // Login with browser-based calling
|
|
101
101
|
* await cc.stationLogin({
|
|
102
|
-
* teamId: profile.teams[0].
|
|
102
|
+
* teamId: profile.teams[0].id,
|
|
103
103
|
* loginOption: 'BROWSER'
|
|
104
104
|
* });
|
|
105
105
|
*
|
|
@@ -163,6 +163,28 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
163
163
|
* @private
|
|
164
164
|
*/
|
|
165
165
|
private webCallingService;
|
|
166
|
+
/**
|
|
167
|
+
* REST telephony for wxApp thick-client answer (WXCC-6026)
|
|
168
|
+
* @private
|
|
169
|
+
*/
|
|
170
|
+
private answerCallOnWebexService;
|
|
171
|
+
/**
|
|
172
|
+
* usersub cross-client state for Webex App toast suppression
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
private webexCrossClientService;
|
|
176
|
+
/**
|
|
177
|
+
* Mercury telephony mute sync for wxApp thick-client answer
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
private wxAppTelephonyMercurySync;
|
|
181
|
+
/** True when wxApp mute sync opened Mercury (Extension/DN-only profiles). */
|
|
182
|
+
private wxAppMercuryConnectedByCc;
|
|
183
|
+
/** True when wxApp mute sync registered the Webex device. */
|
|
184
|
+
private wxAppDeviceRegisteredByCc;
|
|
185
|
+
private static readonly WXAPP_FALSE_PUBLISH_RETRY_DELAY_MS;
|
|
186
|
+
private static readonly WXAPP_FALSE_PUBLISH_MAX_RETRIES;
|
|
187
|
+
private wxAppFalsePublishRetryTimer?;
|
|
166
188
|
/**
|
|
167
189
|
* Core service managers for Contact Center operations
|
|
168
190
|
* Includes agent, connection, and configuration services
|
|
@@ -191,6 +213,13 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
191
213
|
* @private
|
|
192
214
|
*/
|
|
193
215
|
private metricsManager;
|
|
216
|
+
/** Current login/relogin session used for agent-scoped wellness validation. */
|
|
217
|
+
private currentAgentSessionId?;
|
|
218
|
+
/** Registered-session cache for the system WellbeingBreak idle code. */
|
|
219
|
+
private wellbeingBreakIdleCode?;
|
|
220
|
+
/** Registration generation that owns the wellness idle-code cache and in-flight lookups. */
|
|
221
|
+
private wellnessRegistrationGeneration;
|
|
222
|
+
private updateWellnessSession;
|
|
194
223
|
/**
|
|
195
224
|
* API instance for managing Webex Contact Center entry points
|
|
196
225
|
* Provides functionality to fetch entry points with caching support
|
|
@@ -308,6 +337,7 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
308
337
|
* @param {ITask} task The incoming task object containing task details
|
|
309
338
|
*/
|
|
310
339
|
private handleIncomingTask;
|
|
340
|
+
private handleVoiceConnectionStateChange;
|
|
311
341
|
/**
|
|
312
342
|
* Handles task hydration events for updating task data
|
|
313
343
|
* @private
|
|
@@ -332,6 +362,9 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
332
362
|
* @param {ITask} task The campaign reservation task
|
|
333
363
|
*/
|
|
334
364
|
private handleCampaignPreviewReservation;
|
|
365
|
+
private trackInvalidWellnessEvent;
|
|
366
|
+
private normalizeWellnessBreakEvent;
|
|
367
|
+
private handleWellnessBreakWebsocketPayload;
|
|
335
368
|
private handleRTDWebsocketMessage;
|
|
336
369
|
/**
|
|
337
370
|
* Sets up event listeners for incoming tasks and task hydration
|
|
@@ -367,12 +400,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
367
400
|
*
|
|
368
401
|
* console.log('Agent ID:', profile.agentId);
|
|
369
402
|
* console.log('Default DN:', profile.defaultDn);
|
|
370
|
-
* console.log('Teams:', profile.teams.map(t => t.
|
|
403
|
+
* console.log('Teams:', profile.teams.map(t => t.id));
|
|
371
404
|
* console.log('WebRTC Enabled:', profile.webRtcEnabled);
|
|
372
405
|
* console.log('Supported Login Options:', profile.loginVoiceOptions);
|
|
373
406
|
*
|
|
374
407
|
* // Now you can proceed with station login, state changes, etc.
|
|
375
|
-
* await cc.stationLogin({ teamId: profile.teams[0].
|
|
408
|
+
* await cc.stationLogin({ teamId: profile.teams[0].id, loginOption: 'BROWSER' });
|
|
376
409
|
* ```
|
|
377
410
|
*/
|
|
378
411
|
register(): Promise<Profile>;
|
|
@@ -555,6 +588,32 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
555
588
|
* ```
|
|
556
589
|
*/
|
|
557
590
|
setAgentState(data: StateChange): Promise<SetStateResponse>;
|
|
591
|
+
/**
|
|
592
|
+
* Returns the system-managed `WellbeingBreak` idle code for the current registration.
|
|
593
|
+
* The value is fetched outside Desktop Profile filtering and cached until deregistration.
|
|
594
|
+
* @returns The normalized system idle-code entity
|
|
595
|
+
* @throws Structured Contact Center error when wellness is disabled or the code is unavailable
|
|
596
|
+
* @example
|
|
597
|
+
* const idleCode = await webex.cc.getWellbeingBreakIdleCode();
|
|
598
|
+
* @public
|
|
599
|
+
*/
|
|
600
|
+
getWellbeingBreakIdleCode(): Promise<Entity>;
|
|
601
|
+
/**
|
|
602
|
+
* Returns the current browser voice connection state.
|
|
603
|
+
* Subscribe to `voice:connectionStateChange` to receive updates. The snapshot keeps line
|
|
604
|
+
* registration separate from Mobius socket connectivity and does not represent the Contact
|
|
605
|
+
* Center WebSocket connection.
|
|
606
|
+
*
|
|
607
|
+
* @returns {VoiceConnectionState} Current browser voice status and underlying connection states
|
|
608
|
+
* @fires voice:connectionStateChange When browser voice availability changes
|
|
609
|
+
* @public
|
|
610
|
+
* @example
|
|
611
|
+
* ```typescript
|
|
612
|
+
* cc.on('voice:connectionStateChange', onVoiceStateChange);
|
|
613
|
+
* const state = cc.getVoiceConnectionState();
|
|
614
|
+
* ```
|
|
615
|
+
*/
|
|
616
|
+
getVoiceConnectionState(): VoiceConnectionState;
|
|
558
617
|
/**
|
|
559
618
|
* Processes incoming websocket messages and emits corresponding events
|
|
560
619
|
* Handles various event types including agent state changes, login events,
|
|
@@ -569,11 +628,70 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
569
628
|
* @private
|
|
570
629
|
*/
|
|
571
630
|
private isWebRTCRegistrationDisabled;
|
|
631
|
+
/**
|
|
632
|
+
* Determines whether this local login should register a browser voice line.
|
|
633
|
+
* @param {LoginOption} loginOption Login device selected for this station login
|
|
634
|
+
* @returns {boolean} True when browser WebRTC registration is enabled
|
|
635
|
+
* @private
|
|
636
|
+
*/
|
|
637
|
+
private isBrowserVoiceRequired;
|
|
572
638
|
/**
|
|
573
639
|
* Validates contact-center plugin configuration before service initialization
|
|
574
640
|
* @private
|
|
575
641
|
*/
|
|
576
642
|
private validatePluginConfig;
|
|
643
|
+
/**
|
|
644
|
+
* Whether wxApp thick-client answer is enabled for this SDK instance.
|
|
645
|
+
* @public
|
|
646
|
+
*/
|
|
647
|
+
isWxBetterTogetherEnabled(): boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Current station login option (Extension, Dial Number, or Browser/Desktop).
|
|
650
|
+
* Prefer webCallingService — updated on every stationLogin before wxApp hooks run.
|
|
651
|
+
* @private
|
|
652
|
+
*/
|
|
653
|
+
private getCurrentStationLoginOption;
|
|
654
|
+
/**
|
|
655
|
+
* wxApp thick-client answer is supported for Extension and Dial Number station login only —
|
|
656
|
+
* not Browser/Desktop (WebRTC) login.
|
|
657
|
+
* @private
|
|
658
|
+
*/
|
|
659
|
+
private assertWxAppStationLoginSupportedForEnable;
|
|
660
|
+
/**
|
|
661
|
+
* Clears runtime wxApp config after logout/deregister so stale flags do not apply on relogin.
|
|
662
|
+
* @private
|
|
663
|
+
*/
|
|
664
|
+
private resetEnableWxBetterTogetherConfig;
|
|
665
|
+
private getWxAppTelephonyTaskType;
|
|
666
|
+
private ensureWxAppPostStationLogin;
|
|
667
|
+
private clearWxAppFalsePublishRetryTimer;
|
|
668
|
+
private scheduleForcedFalsePublishRetry;
|
|
669
|
+
/**
|
|
670
|
+
* Retries compensating false publish after rollback failure, regardless of enabled flag.
|
|
671
|
+
* @private
|
|
672
|
+
*/
|
|
673
|
+
private scheduleCompensatingFalsePublishRetry;
|
|
674
|
+
private scheduleFalsePublishRetry;
|
|
675
|
+
/**
|
|
676
|
+
* Best-effort rollback when usersub true was published but wxApp setup did not complete.
|
|
677
|
+
* @private
|
|
678
|
+
*/
|
|
679
|
+
private revertWxAppCrossClientPublish;
|
|
680
|
+
private ensureWxAppDeviceRegistered;
|
|
681
|
+
private ensureWxAppMercuryConnected;
|
|
682
|
+
/**
|
|
683
|
+
* Disconnects Mercury and unregisters the device when wxApp mute sync opened them.
|
|
684
|
+
* @private
|
|
685
|
+
*/
|
|
686
|
+
private releaseWxAppMercuryResources;
|
|
687
|
+
/**
|
|
688
|
+
* Clears wxApp runtime state and feature-owned resources. Publish failures are logged;
|
|
689
|
+
* optional rethrow for deregister when callers need to surface usersub errors.
|
|
690
|
+
* @private
|
|
691
|
+
*/
|
|
692
|
+
private teardownWxAppLocalState;
|
|
693
|
+
private ensureWxAppMercuryAndSubscribe;
|
|
694
|
+
private publishAnswerOnWebexCrossClientState;
|
|
577
695
|
/**
|
|
578
696
|
* Initializes event listeners for the Contact Center service
|
|
579
697
|
* Sets up handlers for connection state changes and other core events
|
|
@@ -880,14 +998,14 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
880
998
|
*/
|
|
881
999
|
updateAgentProfile(data: AgentProfileUpdate): Promise<UpdateDeviceTypeResponse>;
|
|
882
1000
|
/**
|
|
883
|
-
* Returns paginated entry points
|
|
884
|
-
*
|
|
1001
|
+
* Returns paginated entry points using the EntryPoint service defaults.
|
|
1002
|
+
* Existing request parameters can override those defaults.
|
|
885
1003
|
* @public
|
|
886
1004
|
*/
|
|
887
1005
|
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
888
1006
|
/**
|
|
889
|
-
* Returns paginated contact service queues
|
|
890
|
-
*
|
|
1007
|
+
* Returns paginated contact service queues using the Queue service defaults.
|
|
1008
|
+
* Existing request parameters can override those defaults.
|
|
891
1009
|
* @public
|
|
892
1010
|
*/
|
|
893
1011
|
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ declare const _default: {
|
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
33
|
disableWebRTCRegistration: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether wxApp Better Together is enabled at SDK init.
|
|
36
|
+
* Must be set before SDK init. Default false (WXCC-6026).
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
enableWxBetterTogether: boolean;
|
|
34
41
|
/**
|
|
35
42
|
* The type of client making the connection.
|
|
36
43
|
* @type {string}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VoiceConnectionState } from './types';
|
|
1
2
|
export declare const EVENT = "event";
|
|
2
3
|
export declare const READY = "ready";
|
|
3
4
|
export declare const TIMEOUT_DURATION = 20000;
|
|
@@ -7,18 +8,21 @@ export declare const LOG_PREFIX = "PLUGIN_CC";
|
|
|
7
8
|
export declare const WEB_CALLING_SERVICE_FILE = "WebCallingService";
|
|
8
9
|
export declare const CONFIG_FILE_NAME = "config-index";
|
|
9
10
|
export declare const CC_FILE = "cc";
|
|
11
|
+
export declare const WELLNESS_BREAK_HANDLER = "Wellness_Break_Handler";
|
|
10
12
|
export declare const CONNECTION_SERVICE_FILE = "connection-service";
|
|
11
13
|
export declare const WEB_SOCKET_MANAGER_FILE = "WebSocketManager";
|
|
12
14
|
export declare const AQM_REQS_FILE = "aqm-reqs";
|
|
13
15
|
export declare const WEBEX_REQUEST_FILE = "WebexRequest";
|
|
14
16
|
export declare const TASK_MANAGER_FILE = "TaskManager";
|
|
15
17
|
export declare const TASK_FILE = "Task";
|
|
18
|
+
export declare const INBOUND_DIRECTION = "INBOUND";
|
|
16
19
|
export declare const OUTDIAL_DIRECTION = "OUTBOUND";
|
|
17
20
|
export declare const ATTRIBUTES: {};
|
|
18
21
|
export declare const OUTDIAL_MEDIA_TYPE = "telephony";
|
|
19
22
|
export declare const OUTBOUND_TYPE = "OUTDIAL";
|
|
20
23
|
export declare const UNKNOWN_ERROR = "Unknown error";
|
|
21
24
|
export declare const MERCURY_DISCONNECTED_SUCCESS = "Mercury disconnected successfully";
|
|
25
|
+
export declare const DEFAULT_VOICE_CONNECTION_STATE: Readonly<VoiceConnectionState>;
|
|
22
26
|
export declare const METHODS: {
|
|
23
27
|
REGISTER: string;
|
|
24
28
|
DEREGISTER: string;
|
|
@@ -50,9 +54,11 @@ export declare const METHODS: {
|
|
|
50
54
|
TRANSFER_CALL: string;
|
|
51
55
|
CONSULT_TRANSFER: string;
|
|
52
56
|
CONSULT_CONFERENCE: string;
|
|
57
|
+
DROP_CONFERENCE_PARTICIPANT: string;
|
|
53
58
|
EXIT_CONFERENCE: string;
|
|
54
59
|
TRANSFER_CONFERENCE: string;
|
|
55
60
|
TOGGLE_MUTE: string;
|
|
61
|
+
TRANSMIT_DTMF: string;
|
|
56
62
|
COMPLETE_TRANSFER: string;
|
|
57
63
|
GET_OUTDIAL_ANI_ENTRIES: string;
|
|
58
64
|
ACCEPT_PREVIEW_CONTACT: string;
|
|
@@ -63,4 +69,21 @@ export declare const METHODS: {
|
|
|
63
69
|
GET_REAL_TIME_ASSISTANCE: string;
|
|
64
70
|
SEND_REAL_TIME_ASSISTANCE_USER_ACTION: string;
|
|
65
71
|
FETCH_HISTORIC_TRANSCRIPTS: string;
|
|
72
|
+
REQUEST_WELLNESS_BREAK: string;
|
|
73
|
+
RESPOND_TO_WELLNESS_BREAK: string;
|
|
74
|
+
GET_WELLBEING_BREAK_IDLE_CODE: string;
|
|
75
|
+
SET_MANAGE_WEBEX_CALLING_IN_WXCC: string;
|
|
76
|
+
IS_WX_BETTER_TOGETHER_ENABLED: string;
|
|
77
|
+
SYNC_WXAPP_MUTE_FROM_MERCURY: string;
|
|
78
|
+
GET_CALL_DETAILS_ON_WEBEX: string;
|
|
79
|
+
ENSURE_WXAPP_MERCURY_CONNECTED: string;
|
|
66
80
|
};
|
|
81
|
+
export declare const AI_SUMMARY_ERROR_CODES: {
|
|
82
|
+
readonly POST_CALL_SUMMARY_DISABLED: "POST_CALL_SUMMARY_DISABLED";
|
|
83
|
+
readonly MID_CALL_SUMMARY_DISABLED: "MID_CALL_SUMMARY_DISABLED";
|
|
84
|
+
readonly AI_ASSISTANT_BASE_URL_NOT_AVAILABLE: "AI_ASSISTANT_BASE_URL_NOT_AVAILABLE";
|
|
85
|
+
readonly POST_CALL_SUMMARY_TIMEOUT: "POST_CALL_SUMMARY_TIMEOUT";
|
|
86
|
+
readonly MID_CALL_SUMMARY_TIMEOUT: "MID_CALL_SUMMARY_TIMEOUT";
|
|
87
|
+
};
|
|
88
|
+
export declare const AI_SUMMARY_INVALID_RESPONSE_PAYLOAD = "AI_SUMMARY_INVALID_RESPONSE_PAYLOAD";
|
|
89
|
+
export declare const AI_ASSISTANT_CLIENT_TYPE: "WxCC";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import ContactCenter from './cc';
|
|
2
2
|
/**
|
|
3
3
|
* @module ContactCenterModule
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// Core exports
|
|
4
|
+
*/
|
|
7
5
|
/**
|
|
8
6
|
* ContactCenter is the main plugin class for Webex Contact Center integration
|
|
9
7
|
* @category Core
|
|
@@ -21,7 +19,10 @@ export { default as routingAgent } from './services/agent';
|
|
|
21
19
|
export { default as Task } from './services/task/Task';
|
|
22
20
|
export { default as AddressBook } from './services/AddressBook';
|
|
23
21
|
export { default as ApiAIAssistant } from './services/ApiAiAssistant';
|
|
22
|
+
export { AI_SUMMARY_ERROR_CODES } from './constants';
|
|
24
23
|
export { default as UserPreference } from './services/UserPreference';
|
|
24
|
+
/** Agent Wellness Break notification and action wire values. */
|
|
25
|
+
export { WELLNESS_BREAK_NOTIFICATION_ACTIONS, WELLNESS_BREAK_USER_ACTIONS } from './types';
|
|
25
26
|
/** EntryPoint API types */
|
|
26
27
|
export type { EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, ContactServiceQueue, } from './types';
|
|
27
28
|
/**
|
|
@@ -39,7 +40,7 @@ export type { TASK_EVENTS as TaskEvents } from './services/task/types';
|
|
|
39
40
|
export { AGENT_EVENTS } from './services/agent/types';
|
|
40
41
|
export type { AGENT_EVENTS as AgentEvents } from './services/agent/types';
|
|
41
42
|
/**
|
|
42
|
-
* Contact Center
|
|
43
|
+
* Contact Center task, realtime, and AI Assistant events
|
|
43
44
|
* @enum {string}
|
|
44
45
|
* @category Enums
|
|
45
46
|
*/
|
|
@@ -55,8 +56,10 @@ export { CC_AGENT_EVENTS } from './services/config/types';
|
|
|
55
56
|
* @enum {string}
|
|
56
57
|
* @category Enums
|
|
57
58
|
*/
|
|
58
|
-
export { CC_EVENTS } from './services/config/types';
|
|
59
|
+
export { CC_EVENTS, VOICE_CONNECTION_EVENTS } from './services/config/types';
|
|
59
60
|
export type { CC_EVENTS as ContactCenterEvents } from './services/config/types';
|
|
61
|
+
/** Browser voice connection state event and status values */
|
|
62
|
+
export { VOICE_CONNECTION_ERROR, VOICE_CONNECTION_STATUS, VoiceLineStatus, VoiceMobiusSocketStatus, } from './types';
|
|
60
63
|
/** Main types and interfaces for Contact Center functionality */
|
|
61
64
|
export type {
|
|
62
65
|
/** Interface for Contact Center plugin */
|
|
@@ -64,7 +67,7 @@ IContactCenter,
|
|
|
64
67
|
/** Configuration options for Contact Center plugin */
|
|
65
68
|
CCPluginConfig,
|
|
66
69
|
/** WebexSDK interface */
|
|
67
|
-
WebexSDK, } from './types';
|
|
70
|
+
WebexSDK, VoiceConnectionState, } from './types';
|
|
68
71
|
/** Agent related types */
|
|
69
72
|
export type {
|
|
70
73
|
/** Login options for agents */
|
|
@@ -90,7 +93,15 @@ UpdateDeviceTypeResponse,
|
|
|
90
93
|
/** Generic error interface */
|
|
91
94
|
GenericError,
|
|
92
95
|
/** Set state response */
|
|
93
|
-
SetStateResponse,
|
|
96
|
+
SetStateResponse,
|
|
97
|
+
/** Wellness notification action */
|
|
98
|
+
WellnessBreakNotificationAction,
|
|
99
|
+
/** Wellness action API value */
|
|
100
|
+
WellnessBreakUserAction,
|
|
101
|
+
/** Validated agent-scoped wellness notification */
|
|
102
|
+
WellnessBreakEvent,
|
|
103
|
+
/** Wellness offer-response parameters */
|
|
104
|
+
RespondToWellnessBreakParams, } from './types';
|
|
94
105
|
/** Task related types */
|
|
95
106
|
export type { AgentContact,
|
|
96
107
|
/** Event emitter contract for task consumers (no @types/node needed) */
|
|
@@ -98,11 +109,13 @@ IEventEmitter,
|
|
|
98
109
|
/** Task interface */
|
|
99
110
|
ITask, Interaction, TaskData,
|
|
100
111
|
/** Task response */
|
|
101
|
-
TaskResponse,
|
|
112
|
+
TaskResponse,
|
|
113
|
+
/** Conference participant drop request */
|
|
114
|
+
DropConferenceParticipantPayload, ConsultPayload, ConsultEndPayload, ConsultTransferPayLoad,
|
|
102
115
|
/** Dialer payload */
|
|
103
116
|
DialerPayload, TransferPayLoad, ResumeRecordingPayload, WrapupPayLoad,
|
|
104
117
|
/** UI control types for task buttons */
|
|
105
|
-
InteractionUIControls, TaskUILeg, TaskUIControls, TaskUIControlState, } from './services/task/types';
|
|
118
|
+
InteractionUIControls, TaskUILeg, TaskUIControls, TaskUIControlState, AISummaryAction, AISummaryFeedback, AISummaryState, AISummarySections, AISummary, AISummaryFeatureEnablement, AISummaryResponse, } from './services/task/types';
|
|
106
119
|
/** UI controls utilities */
|
|
107
120
|
export { getDefaultUIControls } from './services/task/state-machine/uiControlsComputer';
|
|
108
121
|
/** Agent related types */
|
|
@@ -137,10 +150,14 @@ BuddyAgentsSuccess, } from './services/agent/types';
|
|
|
137
150
|
export type {
|
|
138
151
|
/** Profile interface */
|
|
139
152
|
Profile,
|
|
140
|
-
/**
|
|
153
|
+
/** Aggregated organization configuration from getOrgDesktopLoginConfig */
|
|
154
|
+
OrgDesktopLoginResponse,
|
|
155
|
+
/** Aggregated user configuration from getUserDesktopLoginConfig */
|
|
156
|
+
UserDesktopLoginResponse,
|
|
157
|
+
/** Agent identity, the `user` section of the user desktop-login aggregate */
|
|
141
158
|
AgentResponse,
|
|
142
|
-
/**
|
|
143
|
-
|
|
159
|
+
/** Desktop Profile settings, the `agentProfile` section of the user desktop-login aggregate */
|
|
160
|
+
AgentProfile,
|
|
144
161
|
/** Response from getMultimediaProfileById */
|
|
145
162
|
MultimediaProfileResponse,
|
|
146
163
|
/** Response from getListOfTeams */
|
|
@@ -149,14 +166,18 @@ ListTeamsResponse,
|
|
|
149
166
|
ListAuxCodesResponse,
|
|
150
167
|
/** Response from getSiteInfo */
|
|
151
168
|
SiteInfo,
|
|
152
|
-
/**
|
|
169
|
+
/** Organization identity, the `organization` section of the org desktop-login aggregate */
|
|
153
170
|
OrgInfo,
|
|
154
|
-
/**
|
|
171
|
+
/** Organization settings, the `organizationSetting` section of the org desktop-login aggregate */
|
|
155
172
|
OrgSettings,
|
|
156
|
-
/**
|
|
173
|
+
/** Tenant configuration, the `tenantConfiguration` section of the org desktop-login aggregate */
|
|
157
174
|
TenantData,
|
|
158
|
-
/**
|
|
159
|
-
|
|
175
|
+
/** Microsoft Teams integration configuration, from the org desktop-login aggregate */
|
|
176
|
+
MicrosoftConfig,
|
|
177
|
+
/** Webex integration configuration, from the org desktop-login aggregate */
|
|
178
|
+
WebexConfig,
|
|
179
|
+
/** External integration URLs, the `urlMappings` section of the org desktop-login aggregate */
|
|
180
|
+
OrgUrlMappings,
|
|
160
181
|
/** Response from getDialPlanData */
|
|
161
182
|
DialPlanEntity,
|
|
162
183
|
/** Auxiliary code information */
|
|
@@ -178,6 +178,12 @@ export default class MetricsManager {
|
|
|
178
178
|
* MetricsManager.getInstance().timeEvent(['AGENT_LOGIN', 'AGENT_LOGOUT']);
|
|
179
179
|
*/
|
|
180
180
|
timeEvent(keys: string | string[]): void;
|
|
181
|
+
/**
|
|
182
|
+
* Clears a running timed event without emitting a metric.
|
|
183
|
+
* @param keys - A string or array of strings representing event keys (same as timeEvent).
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
cancelTimedEvent(keys: string | string[]): void;
|
|
181
187
|
/**
|
|
182
188
|
* Sets the Webex SDK instance and marks the manager as ready when the SDK is ready.
|
|
183
189
|
* @param webex - The Webex SDK instance.
|