@webex/contact-center 3.12.0-webex-services-ready.4 → 3.13.0
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 +19 -3
- package/ai-docs/SECURITY.md +1 -1
- package/ai-docs/SERVICE_STATE.md +4 -0
- package/ai-docs/contact-center-spec.md +50 -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 +757 -22
- package/dist/cc.js.map +1 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +23 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js +34 -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 +10 -2
- 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 +51 -18
- 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 +102 -8
- package/dist/types/config.d.ts +7 -0
- package/dist/types/constants.d.ts +21 -0
- package/dist/types/index.d.ts +34 -15
- 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 +146 -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 +80 -13
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types.js +54 -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 +969 -38
- package/src/config.ts +7 -0
- package/src/constants.ts +24 -0
- package/src/index.ts +39 -10
- 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 +16 -2
- 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 +10 -10
- 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 +140 -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 +108 -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 +3408 -152
- package/test/unit/spec/index.ts +885 -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 +38 -0
- 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,uBAAA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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
|
@@ -9,7 +9,7 @@ import { WebexPlugin } from '@webex/webex-core';
|
|
|
9
9
|
import { SetStateResponse, IContactCenter, AgentLogin, AgentProfileUpdate, StationLoginResponse, StationLogoutResponse, BuddyAgentsResponse, BuddyAgents, UploadLogsResponse, UpdateDeviceTypeResponse } 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
|
|
@@ -332,6 +361,9 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
332
361
|
* @param {ITask} task The campaign reservation task
|
|
333
362
|
*/
|
|
334
363
|
private handleCampaignPreviewReservation;
|
|
364
|
+
private trackInvalidWellnessEvent;
|
|
365
|
+
private normalizeWellnessBreakEvent;
|
|
366
|
+
private handleWellnessBreakWebsocketPayload;
|
|
335
367
|
private handleRTDWebsocketMessage;
|
|
336
368
|
/**
|
|
337
369
|
* Sets up event listeners for incoming tasks and task hydration
|
|
@@ -367,12 +399,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
367
399
|
*
|
|
368
400
|
* console.log('Agent ID:', profile.agentId);
|
|
369
401
|
* console.log('Default DN:', profile.defaultDn);
|
|
370
|
-
* console.log('Teams:', profile.teams.map(t => t.
|
|
402
|
+
* console.log('Teams:', profile.teams.map(t => t.id));
|
|
371
403
|
* console.log('WebRTC Enabled:', profile.webRtcEnabled);
|
|
372
404
|
* console.log('Supported Login Options:', profile.loginVoiceOptions);
|
|
373
405
|
*
|
|
374
406
|
* // Now you can proceed with station login, state changes, etc.
|
|
375
|
-
* await cc.stationLogin({ teamId: profile.teams[0].
|
|
407
|
+
* await cc.stationLogin({ teamId: profile.teams[0].id, loginOption: 'BROWSER' });
|
|
376
408
|
* ```
|
|
377
409
|
*/
|
|
378
410
|
register(): Promise<Profile>;
|
|
@@ -555,6 +587,16 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
555
587
|
* ```
|
|
556
588
|
*/
|
|
557
589
|
setAgentState(data: StateChange): Promise<SetStateResponse>;
|
|
590
|
+
/**
|
|
591
|
+
* Returns the system-managed `WellbeingBreak` idle code for the current registration.
|
|
592
|
+
* The value is fetched outside Desktop Profile filtering and cached until deregistration.
|
|
593
|
+
* @returns The normalized system idle-code entity
|
|
594
|
+
* @throws Structured Contact Center error when wellness is disabled or the code is unavailable
|
|
595
|
+
* @example
|
|
596
|
+
* const idleCode = await webex.cc.getWellbeingBreakIdleCode();
|
|
597
|
+
* @public
|
|
598
|
+
*/
|
|
599
|
+
getWellbeingBreakIdleCode(): Promise<Entity>;
|
|
558
600
|
/**
|
|
559
601
|
* Processes incoming websocket messages and emits corresponding events
|
|
560
602
|
* Handles various event types including agent state changes, login events,
|
|
@@ -574,6 +616,58 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
574
616
|
* @private
|
|
575
617
|
*/
|
|
576
618
|
private validatePluginConfig;
|
|
619
|
+
/**
|
|
620
|
+
* Whether wxApp thick-client answer is enabled for this SDK instance.
|
|
621
|
+
* @public
|
|
622
|
+
*/
|
|
623
|
+
isWxBetterTogetherEnabled(): boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Current station login option (Extension, Dial Number, or Browser/Desktop).
|
|
626
|
+
* Prefer webCallingService — updated on every stationLogin before wxApp hooks run.
|
|
627
|
+
* @private
|
|
628
|
+
*/
|
|
629
|
+
private getCurrentStationLoginOption;
|
|
630
|
+
/**
|
|
631
|
+
* wxApp thick-client answer is supported for Extension and Dial Number station login only —
|
|
632
|
+
* not Browser/Desktop (WebRTC) login.
|
|
633
|
+
* @private
|
|
634
|
+
*/
|
|
635
|
+
private assertWxAppStationLoginSupportedForEnable;
|
|
636
|
+
/**
|
|
637
|
+
* Clears runtime wxApp config after logout/deregister so stale flags do not apply on relogin.
|
|
638
|
+
* @private
|
|
639
|
+
*/
|
|
640
|
+
private resetEnableWxBetterTogetherConfig;
|
|
641
|
+
private getWxAppTelephonyTaskType;
|
|
642
|
+
private ensureWxAppPostStationLogin;
|
|
643
|
+
private clearWxAppFalsePublishRetryTimer;
|
|
644
|
+
private scheduleForcedFalsePublishRetry;
|
|
645
|
+
/**
|
|
646
|
+
* Retries compensating false publish after rollback failure, regardless of enabled flag.
|
|
647
|
+
* @private
|
|
648
|
+
*/
|
|
649
|
+
private scheduleCompensatingFalsePublishRetry;
|
|
650
|
+
private scheduleFalsePublishRetry;
|
|
651
|
+
/**
|
|
652
|
+
* Best-effort rollback when usersub true was published but wxApp setup did not complete.
|
|
653
|
+
* @private
|
|
654
|
+
*/
|
|
655
|
+
private revertWxAppCrossClientPublish;
|
|
656
|
+
private ensureWxAppDeviceRegistered;
|
|
657
|
+
private ensureWxAppMercuryConnected;
|
|
658
|
+
/**
|
|
659
|
+
* Disconnects Mercury and unregisters the device when wxApp mute sync opened them.
|
|
660
|
+
* @private
|
|
661
|
+
*/
|
|
662
|
+
private releaseWxAppMercuryResources;
|
|
663
|
+
/**
|
|
664
|
+
* Clears wxApp runtime state and feature-owned resources. Publish failures are logged;
|
|
665
|
+
* optional rethrow for deregister when callers need to surface usersub errors.
|
|
666
|
+
* @private
|
|
667
|
+
*/
|
|
668
|
+
private teardownWxAppLocalState;
|
|
669
|
+
private ensureWxAppMercuryAndSubscribe;
|
|
670
|
+
private publishAnswerOnWebexCrossClientState;
|
|
577
671
|
/**
|
|
578
672
|
* Initializes event listeners for the Contact Center service
|
|
579
673
|
* Sets up handlers for connection state changes and other core events
|
|
@@ -880,14 +974,14 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
880
974
|
*/
|
|
881
975
|
updateAgentProfile(data: AgentProfileUpdate): Promise<UpdateDeviceTypeResponse>;
|
|
882
976
|
/**
|
|
883
|
-
* Returns paginated entry points
|
|
884
|
-
*
|
|
977
|
+
* Returns paginated entry points using the EntryPoint service defaults.
|
|
978
|
+
* Existing request parameters can override those defaults.
|
|
885
979
|
* @public
|
|
886
980
|
*/
|
|
887
981
|
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
888
982
|
/**
|
|
889
|
-
* Returns paginated contact service queues
|
|
890
|
-
*
|
|
983
|
+
* Returns paginated contact service queues using the Queue service defaults.
|
|
984
|
+
* Existing request parameters can override those defaults.
|
|
891
985
|
* @public
|
|
892
986
|
*/
|
|
893
987
|
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}
|
|
@@ -7,12 +7,14 @@ export declare const LOG_PREFIX = "PLUGIN_CC";
|
|
|
7
7
|
export declare const WEB_CALLING_SERVICE_FILE = "WebCallingService";
|
|
8
8
|
export declare const CONFIG_FILE_NAME = "config-index";
|
|
9
9
|
export declare const CC_FILE = "cc";
|
|
10
|
+
export declare const WELLNESS_BREAK_HANDLER = "Wellness_Break_Handler";
|
|
10
11
|
export declare const CONNECTION_SERVICE_FILE = "connection-service";
|
|
11
12
|
export declare const WEB_SOCKET_MANAGER_FILE = "WebSocketManager";
|
|
12
13
|
export declare const AQM_REQS_FILE = "aqm-reqs";
|
|
13
14
|
export declare const WEBEX_REQUEST_FILE = "WebexRequest";
|
|
14
15
|
export declare const TASK_MANAGER_FILE = "TaskManager";
|
|
15
16
|
export declare const TASK_FILE = "Task";
|
|
17
|
+
export declare const INBOUND_DIRECTION = "INBOUND";
|
|
16
18
|
export declare const OUTDIAL_DIRECTION = "OUTBOUND";
|
|
17
19
|
export declare const ATTRIBUTES: {};
|
|
18
20
|
export declare const OUTDIAL_MEDIA_TYPE = "telephony";
|
|
@@ -50,9 +52,11 @@ export declare const METHODS: {
|
|
|
50
52
|
TRANSFER_CALL: string;
|
|
51
53
|
CONSULT_TRANSFER: string;
|
|
52
54
|
CONSULT_CONFERENCE: string;
|
|
55
|
+
DROP_CONFERENCE_PARTICIPANT: string;
|
|
53
56
|
EXIT_CONFERENCE: string;
|
|
54
57
|
TRANSFER_CONFERENCE: string;
|
|
55
58
|
TOGGLE_MUTE: string;
|
|
59
|
+
TRANSMIT_DTMF: string;
|
|
56
60
|
COMPLETE_TRANSFER: string;
|
|
57
61
|
GET_OUTDIAL_ANI_ENTRIES: string;
|
|
58
62
|
ACCEPT_PREVIEW_CONTACT: string;
|
|
@@ -63,4 +67,21 @@ export declare const METHODS: {
|
|
|
63
67
|
GET_REAL_TIME_ASSISTANCE: string;
|
|
64
68
|
SEND_REAL_TIME_ASSISTANCE_USER_ACTION: string;
|
|
65
69
|
FETCH_HISTORIC_TRANSCRIPTS: string;
|
|
70
|
+
REQUEST_WELLNESS_BREAK: string;
|
|
71
|
+
RESPOND_TO_WELLNESS_BREAK: string;
|
|
72
|
+
GET_WELLBEING_BREAK_IDLE_CODE: string;
|
|
73
|
+
SET_MANAGE_WEBEX_CALLING_IN_WXCC: string;
|
|
74
|
+
IS_WX_BETTER_TOGETHER_ENABLED: string;
|
|
75
|
+
SYNC_WXAPP_MUTE_FROM_MERCURY: string;
|
|
76
|
+
GET_CALL_DETAILS_ON_WEBEX: string;
|
|
77
|
+
ENSURE_WXAPP_MERCURY_CONNECTED: string;
|
|
66
78
|
};
|
|
79
|
+
export declare const AI_SUMMARY_ERROR_CODES: {
|
|
80
|
+
readonly POST_CALL_SUMMARY_DISABLED: "POST_CALL_SUMMARY_DISABLED";
|
|
81
|
+
readonly MID_CALL_SUMMARY_DISABLED: "MID_CALL_SUMMARY_DISABLED";
|
|
82
|
+
readonly AI_ASSISTANT_BASE_URL_NOT_AVAILABLE: "AI_ASSISTANT_BASE_URL_NOT_AVAILABLE";
|
|
83
|
+
readonly POST_CALL_SUMMARY_TIMEOUT: "POST_CALL_SUMMARY_TIMEOUT";
|
|
84
|
+
readonly MID_CALL_SUMMARY_TIMEOUT: "MID_CALL_SUMMARY_TIMEOUT";
|
|
85
|
+
};
|
|
86
|
+
export declare const AI_SUMMARY_INVALID_RESPONSE_PAYLOAD = "AI_SUMMARY_INVALID_RESPONSE_PAYLOAD";
|
|
87
|
+
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
|
*/
|
|
@@ -90,7 +91,15 @@ UpdateDeviceTypeResponse,
|
|
|
90
91
|
/** Generic error interface */
|
|
91
92
|
GenericError,
|
|
92
93
|
/** Set state response */
|
|
93
|
-
SetStateResponse,
|
|
94
|
+
SetStateResponse,
|
|
95
|
+
/** Wellness notification action */
|
|
96
|
+
WellnessBreakNotificationAction,
|
|
97
|
+
/** Wellness action API value */
|
|
98
|
+
WellnessBreakUserAction,
|
|
99
|
+
/** Validated agent-scoped wellness notification */
|
|
100
|
+
WellnessBreakEvent,
|
|
101
|
+
/** Wellness offer-response parameters */
|
|
102
|
+
RespondToWellnessBreakParams, } from './types';
|
|
94
103
|
/** Task related types */
|
|
95
104
|
export type { AgentContact,
|
|
96
105
|
/** Event emitter contract for task consumers (no @types/node needed) */
|
|
@@ -98,11 +107,13 @@ IEventEmitter,
|
|
|
98
107
|
/** Task interface */
|
|
99
108
|
ITask, Interaction, TaskData,
|
|
100
109
|
/** Task response */
|
|
101
|
-
TaskResponse,
|
|
110
|
+
TaskResponse,
|
|
111
|
+
/** Conference participant drop request */
|
|
112
|
+
DropConferenceParticipantPayload, ConsultPayload, ConsultEndPayload, ConsultTransferPayLoad,
|
|
102
113
|
/** Dialer payload */
|
|
103
114
|
DialerPayload, TransferPayLoad, ResumeRecordingPayload, WrapupPayLoad,
|
|
104
115
|
/** UI control types for task buttons */
|
|
105
|
-
InteractionUIControls, TaskUILeg, TaskUIControls, TaskUIControlState, } from './services/task/types';
|
|
116
|
+
InteractionUIControls, TaskUILeg, TaskUIControls, TaskUIControlState, AISummaryAction, AISummaryFeedback, AISummaryState, AISummarySections, AISummary, AISummaryFeatureEnablement, AISummaryResponse, } from './services/task/types';
|
|
106
117
|
/** UI controls utilities */
|
|
107
118
|
export { getDefaultUIControls } from './services/task/state-machine/uiControlsComputer';
|
|
108
119
|
/** Agent related types */
|
|
@@ -137,10 +148,14 @@ BuddyAgentsSuccess, } from './services/agent/types';
|
|
|
137
148
|
export type {
|
|
138
149
|
/** Profile interface */
|
|
139
150
|
Profile,
|
|
140
|
-
/**
|
|
151
|
+
/** Aggregated organization configuration from getOrgDesktopLoginConfig */
|
|
152
|
+
OrgDesktopLoginResponse,
|
|
153
|
+
/** Aggregated user configuration from getUserDesktopLoginConfig */
|
|
154
|
+
UserDesktopLoginResponse,
|
|
155
|
+
/** Agent identity, the `user` section of the user desktop-login aggregate */
|
|
141
156
|
AgentResponse,
|
|
142
|
-
/**
|
|
143
|
-
|
|
157
|
+
/** Desktop Profile settings, the `agentProfile` section of the user desktop-login aggregate */
|
|
158
|
+
AgentProfile,
|
|
144
159
|
/** Response from getMultimediaProfileById */
|
|
145
160
|
MultimediaProfileResponse,
|
|
146
161
|
/** Response from getListOfTeams */
|
|
@@ -149,14 +164,18 @@ ListTeamsResponse,
|
|
|
149
164
|
ListAuxCodesResponse,
|
|
150
165
|
/** Response from getSiteInfo */
|
|
151
166
|
SiteInfo,
|
|
152
|
-
/**
|
|
167
|
+
/** Organization identity, the `organization` section of the org desktop-login aggregate */
|
|
153
168
|
OrgInfo,
|
|
154
|
-
/**
|
|
169
|
+
/** Organization settings, the `organizationSetting` section of the org desktop-login aggregate */
|
|
155
170
|
OrgSettings,
|
|
156
|
-
/**
|
|
171
|
+
/** Tenant configuration, the `tenantConfiguration` section of the org desktop-login aggregate */
|
|
157
172
|
TenantData,
|
|
158
|
-
/**
|
|
159
|
-
|
|
173
|
+
/** Microsoft Teams integration configuration, from the org desktop-login aggregate */
|
|
174
|
+
MicrosoftConfig,
|
|
175
|
+
/** Webex integration configuration, from the org desktop-login aggregate */
|
|
176
|
+
WebexConfig,
|
|
177
|
+
/** External integration URLs, the `urlMappings` section of the org desktop-login aggregate */
|
|
178
|
+
OrgUrlMappings,
|
|
160
179
|
/** Response from getDialPlanData */
|
|
161
180
|
DialPlanEntity,
|
|
162
181
|
/** 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.
|
|
@@ -124,10 +124,28 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
124
124
|
readonly TASK_CONFERENCE_TRANSFER_FAILED: "Task Conference Transfer Failed";
|
|
125
125
|
readonly TASK_CONFERENCE_EXIT_SUCCESS: "Task Conference Exit Success";
|
|
126
126
|
readonly TASK_CONFERENCE_EXIT_FAILED: "Task Conference Exit Failed";
|
|
127
|
+
readonly TASK_CONFERENCE_PARTICIPANT_DROP_SUCCESS: "Task Conference Participant Drop Success";
|
|
128
|
+
readonly TASK_CONFERENCE_PARTICIPANT_DROP_FAILED: "Task Conference Participant Drop Failed";
|
|
127
129
|
readonly TASK_SWITCH_CALL_SUCCESS: "Task Switch Call Success";
|
|
128
130
|
readonly TASK_SWITCH_CALL_FAILED: "Task Switch Call Failed";
|
|
129
131
|
readonly TASK_OUTDIAL_SUCCESS: "Task Outdial Success";
|
|
130
132
|
readonly TASK_OUTDIAL_FAILED: "Task Outdial Failed";
|
|
133
|
+
readonly WXAPP_TASK_MUTE_SUCCESS: "WxApp Task Mute Success";
|
|
134
|
+
readonly WXAPP_TASK_MUTE_FAILED: "WxApp Task Mute Failed";
|
|
135
|
+
readonly WXAPP_TASK_DTMF_SUCCESS: "WxApp Task Dtmf Success";
|
|
136
|
+
readonly WXAPP_TASK_DTMF_FAILED: "WxApp Task Dtmf Failed";
|
|
137
|
+
readonly WXAPP_TASK_ACCEPT_SUCCESS: "WxApp Task Accept Success";
|
|
138
|
+
readonly WXAPP_TASK_ACCEPT_FAILED: "WxApp Task Accept Failed";
|
|
139
|
+
readonly WXAPP_TASK_DECLINE_SUCCESS: "WxApp Task Decline Success";
|
|
140
|
+
readonly WXAPP_TASK_DECLINE_FAILED: "WxApp Task Decline Failed";
|
|
141
|
+
readonly WXAPP_SESSION_INIT_SUCCESS: "WxApp Session Init Success";
|
|
142
|
+
readonly WXAPP_SESSION_INIT_FAILED: "WxApp Session Init Failed";
|
|
143
|
+
readonly WXAPP_SESSION_SKIPPED: "WxApp Session Skipped";
|
|
144
|
+
readonly WXAPP_USERSUB_PUBLISH_SUCCESS: "WxApp Usersub Publish Success";
|
|
145
|
+
readonly WXAPP_USERSUB_PUBLISH_FAILED: "WxApp Usersub Publish Failed";
|
|
146
|
+
readonly WXAPP_MERCURY_SUBSCRIBE_SUCCESS: "WxApp Mercury Subscribe Success";
|
|
147
|
+
readonly WXAPP_MERCURY_SUBSCRIBE_FAILED: "WxApp Mercury Subscribe Failed";
|
|
148
|
+
readonly WXAPP_OFFER_PARTICIPANT_FIELDS_MISSING: "WxApp Offer Participant Fields Missing";
|
|
131
149
|
readonly UPLOAD_LOGS_SUCCESS: "Upload Logs Success";
|
|
132
150
|
readonly UPLOAD_LOGS_FAILED: "Upload Logs Failed";
|
|
133
151
|
readonly WEBSOCKET_DEREGISTER_SUCCESS: "Websocket Deregister Success";
|
|
@@ -157,6 +175,19 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
157
175
|
readonly AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_FAILED: "AI Assistant Send Real Time Assistance User Action Failed";
|
|
158
176
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_SUCCESS: "AI Assistant Fetch Historic Transcripts Success";
|
|
159
177
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_FAILED: "AI Assistant Fetch Historic Transcripts Failed";
|
|
178
|
+
readonly AI_ASSISTANT_WELLNESS_ACTION_ACCEPTED: "AI Assistant Wellness Action Accepted";
|
|
179
|
+
readonly AI_ASSISTANT_WELLNESS_ACTION_FAILED: "AI Assistant Wellness Action Failed";
|
|
180
|
+
readonly AI_ASSISTANT_WELLNESS_EVENT_INVALID: "AI Assistant Wellness Event Invalid";
|
|
181
|
+
readonly WELLBEING_BREAK_IDLE_CODE_FETCH_SUCCESS: "Wellbeing Break Idle Code Fetch Success";
|
|
182
|
+
readonly WELLBEING_BREAK_IDLE_CODE_FETCH_FAILED: "Wellbeing Break Idle Code Fetch Failed";
|
|
183
|
+
readonly AI_SUMMARY_GET_POST_CALL_SUCCESS: "Post Call Summary Get Success";
|
|
184
|
+
readonly AI_SUMMARY_GET_POST_CALL_FAILED: "Post Call Summary Get Failed";
|
|
185
|
+
readonly AI_SUMMARY_GET_MID_CALL_SUCCESS: "Mid Call Summary Get Success";
|
|
186
|
+
readonly AI_SUMMARY_GET_MID_CALL_FAILED: "Mid Call Summary Get Failed";
|
|
187
|
+
readonly AI_SUMMARY_POST_CALL_RESPONSE_SUCCESS: "Post Call Summary Response Success";
|
|
188
|
+
readonly AI_SUMMARY_POST_CALL_RESPONSE_FAILED: "Post Call Summary Response Failed";
|
|
189
|
+
readonly AI_SUMMARY_MID_CALL_RESPONSE_SUCCESS: "Mid Call Summary Response Success";
|
|
190
|
+
readonly AI_SUMMARY_MID_CALL_RESPONSE_FAILED: "Mid Call Summary Response Failed";
|
|
160
191
|
readonly USER_PREFERENCE_GET_SUCCESS: "User Preference Get Success";
|
|
161
192
|
readonly USER_PREFERENCE_GET_FAILED: "User Preference Get Failed";
|
|
162
193
|
readonly USER_PREFERENCE_CREATE_SUCCESS: "User Preference Create Success";
|
|
@@ -52,7 +52,8 @@ export declare class AddressBook {
|
|
|
52
52
|
constructor(webex: WebexSDK, getAddressBookId: () => string);
|
|
53
53
|
/**
|
|
54
54
|
* Fetches address book entries for a specific address book using the entry API
|
|
55
|
-
* @param {AddressBookEntrySearchParams} [params] - Search and
|
|
55
|
+
* @param {AddressBookEntrySearchParams} [params] - Search, pagination, and optional sort parameters
|
|
56
|
+
* including addressBookId. Sorting defaults to name ascending.
|
|
56
57
|
* @returns {Promise<AddressBookEntriesResponse>} Promise resolving to address book entries
|
|
57
58
|
* @throws {Error} If the API call fails
|
|
58
59
|
* @public
|