@webex/contact-center 3.12.0-next.13 → 3.12.0-next.130
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 +884 -0
- package/AGENTS.md +94 -0
- package/ai-docs/ARCHITECTURE.md +168 -0
- package/ai-docs/CONTRACTS.md +53 -0
- package/ai-docs/GETTING_STARTED.md +168 -0
- package/ai-docs/GLOSSARY.md +43 -0
- package/ai-docs/README.md +138 -0
- package/ai-docs/REVIEW_CHECKLIST.md +41 -0
- package/ai-docs/RULES.md +444 -0
- package/ai-docs/SECURITY.md +52 -0
- package/ai-docs/SERVICE_STATE.md +52 -0
- package/ai-docs/SPEC_INDEX.md +65 -0
- package/ai-docs/adr/0001-spec-source-policy.md +55 -0
- package/ai-docs/adr/README.md +8 -0
- package/ai-docs/adr/_adr-template.md +31 -0
- package/ai-docs/contact-center-spec.md +382 -0
- 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/ai-docs/features/generated-spec-conformance-fidelity-remediation/spec/feature-spec.md +117 -0
- package/ai-docs/features/residual-warning-coverage-completion/spec/feature-spec.md +203 -0
- package/ai-docs/features/validator-code-fidelity-drift-fix/spec/feature-spec.md +315 -0
- package/ai-docs/patterns/event-driven-patterns.md +485 -0
- package/ai-docs/patterns/testing-patterns.md +480 -0
- package/ai-docs/patterns/typescript-patterns.md +365 -0
- package/ai-docs/templates/README.md +102 -0
- package/ai-docs/templates/documentation/create-agents-md.md +240 -0
- package/ai-docs/templates/documentation/create-architecture-md.md +295 -0
- package/ai-docs/templates/existing-service/bug-fix.md +254 -0
- package/ai-docs/templates/existing-service/feature-enhancement.md +450 -0
- package/ai-docs/templates/new-method/00-master.md +80 -0
- package/ai-docs/templates/new-method/01-requirements.md +232 -0
- package/ai-docs/templates/new-method/02-implementation.md +295 -0
- package/ai-docs/templates/new-method/03-tests.md +201 -0
- package/ai-docs/templates/new-method/04-validation.md +141 -0
- package/ai-docs/templates/new-service/00-master.md +109 -0
- package/ai-docs/templates/new-service/01-pre-questions.md +159 -0
- package/ai-docs/templates/new-service/02-code-generation.md +346 -0
- package/ai-docs/templates/new-service/03-integration.md +178 -0
- package/ai-docs/templates/new-service/04-test-generation.md +205 -0
- package/ai-docs/templates/new-service/05-validation.md +145 -0
- package/dist/cc.js +971 -42
- package/dist/cc.js.map +1 -1
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +31 -3
- package/dist/constants.js.map +1 -1
- package/dist/index.js +45 -15
- 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 +205 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +48 -4
- 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 +269 -9
- 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/UserPreference.js +427 -0
- package/dist/services/UserPreference.js.map +1 -0
- package/dist/services/WebexCrossClientService.js +222 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +108 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +11 -4
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +41 -7
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +51 -0
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +57 -12
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +111 -32
- 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 +28 -14
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +2 -1
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/Task.js +754 -0
- package/dist/services/task/Task.js.map +1 -0
- package/dist/services/task/TaskFactory.js +49 -0
- package/dist/services/task/TaskFactory.js.map +1 -0
- package/dist/services/task/TaskManager.js +1172 -521
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +211 -27
- 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 +12 -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/dialer.js +78 -0
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/digital/Digital.js +78 -0
- package/dist/services/task/digital/Digital.js.map +1 -0
- package/dist/services/task/state-machine/TaskStateMachine.js +982 -0
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
- package/dist/services/task/state-machine/actions.js +572 -0
- package/dist/services/task/state-machine/actions.js.map +1 -0
- package/dist/services/task/state-machine/constants.js +161 -0
- package/dist/services/task/state-machine/constants.js.map +1 -0
- package/dist/services/task/state-machine/guards.js +379 -0
- package/dist/services/task/state-machine/guards.js.map +1 -0
- package/dist/services/task/state-machine/index.js +53 -0
- package/dist/services/task/state-machine/index.js.map +1 -0
- package/dist/services/task/state-machine/types.js +54 -0
- package/dist/services/task/state-machine/types.js.map +1 -0
- package/dist/services/task/state-machine/uiControlsComputer.js +703 -0
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -0
- package/dist/services/task/taskDataNormalizer.js +99 -0
- package/dist/services/task/taskDataNormalizer.js.map +1 -0
- package/dist/services/task/types.js +228 -5
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +1485 -0
- package/dist/services/task/voice/Voice.js.map +1 -0
- package/dist/services/task/voice/WebRTC.js +152 -0
- package/dist/services/task/voice/WebRTC.js.map +1 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js +354 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
- package/dist/services/wxAppDiagnosticLogging.js +122 -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 +193 -6
- package/dist/types/config.d.ts +13 -0
- package/dist/types/constants.d.ts +29 -1
- package/dist/types/index.d.ts +35 -8
- package/dist/types/metrics/MetricsManager.d.ts +6 -0
- package/dist/types/metrics/constants.d.ts +43 -1
- 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 +56 -5
- package/dist/types/services/EntryPoint.d.ts +7 -5
- package/dist/types/services/Queue.d.ts +5 -3
- package/dist/types/services/UserPreference.d.ts +118 -0
- package/dist/types/services/WebexCrossClientService.d.ts +32 -0
- package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
- package/dist/types/services/config/constants.d.ts +34 -5
- package/dist/types/services/config/types.d.ts +197 -12
- package/dist/types/services/core/Err.d.ts +6 -0
- package/dist/types/services/core/Utils.d.ts +35 -13
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +1 -0
- package/dist/types/services/core/websocket/types.d.ts +1 -1
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/services/task/Task.d.ts +175 -0
- package/dist/types/services/task/TaskFactory.d.ts +13 -0
- package/dist/types/services/task/TaskUtils.d.ts +48 -2
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +10 -0
- package/dist/types/services/task/contact.d.ts +4 -0
- package/dist/types/services/task/dialer.d.ts +30 -0
- package/dist/types/services/task/digital/Digital.d.ts +22 -0
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1442 -0
- package/dist/types/services/task/state-machine/actions.d.ts +10 -0
- package/dist/types/services/task/state-machine/constants.d.ts +107 -0
- package/dist/types/services/task/state-machine/guards.d.ts +103 -0
- package/dist/types/services/task/state-machine/index.d.ts +13 -0
- package/dist/types/services/task/state-machine/types.d.ts +277 -0
- package/dist/types/services/task/state-machine/uiControlsComputer.d.ts +9 -0
- package/dist/types/services/task/taskDataNormalizer.d.ts +10 -0
- package/dist/types/services/task/types.d.ts +680 -66
- package/dist/types/services/task/voice/Voice.d.ts +227 -0
- package/dist/types/services/task/voice/WebRTC.d.ts +53 -0
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +55 -0
- package/dist/types/services/wxAppDiagnosticLogging.d.ts +51 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +205 -9
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types/webex.d.ts +1 -0
- package/dist/types.js +162 -4
- 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 +22 -2
- package/dist/webex.js.map +1 -1
- package/package.json +16 -12
- package/src/cc.ts +1289 -112
- package/src/config.ts +13 -0
- package/src/constants.ts +29 -1
- package/src/index.ts +36 -5
- package/src/metrics/MetricsManager.ts +16 -0
- package/src/metrics/ai-docs/AGENTS.md +350 -0
- package/src/metrics/ai-docs/ARCHITECTURE.md +338 -0
- package/src/metrics/ai-docs/metrics-spec.md +921 -0
- package/src/metrics/behavioral-events.ts +212 -0
- package/src/metrics/constants.ts +52 -4
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +239 -0
- package/src/services/ApiAiAssistant.ts +356 -9
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/UserPreference.ts +509 -0
- package/src/services/WebexCrossClientService.ts +293 -0
- package/src/services/WxAppTelephonyMercurySync.ts +142 -0
- package/src/services/agent/ai-docs/AGENTS.md +240 -0
- package/src/services/agent/ai-docs/ARCHITECTURE.md +304 -0
- package/src/services/agent/ai-docs/agent-spec.md +505 -0
- package/src/services/ai-docs/AGENTS.md +386 -0
- package/src/services/ai-docs/services-spec.md +505 -0
- package/src/services/config/Util.ts +12 -3
- package/src/services/config/ai-docs/AGENTS.md +255 -0
- package/src/services/config/ai-docs/ARCHITECTURE.md +426 -0
- package/src/services/config/ai-docs/config-spec.md +686 -0
- package/src/services/config/constants.ts +46 -6
- package/src/services/config/index.ts +65 -0
- package/src/services/config/types.ts +197 -13
- package/src/services/core/Err.ts +3 -0
- package/src/services/core/Utils.ts +127 -37
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/ai-docs/AGENTS.md +381 -0
- package/src/services/core/ai-docs/ARCHITECTURE.md +698 -0
- package/src/services/core/ai-docs/core-spec.md +787 -0
- package/src/services/core/aqm-reqs.ts +30 -15
- package/src/services/core/types.ts +2 -0
- package/src/services/core/websocket/WebSocketManager.ts +2 -0
- package/src/services/core/websocket/types.ts +1 -1
- package/src/services/index.ts +1 -1
- package/src/services/task/Task.ts +908 -0
- package/src/services/task/TaskFactory.ts +60 -0
- package/src/services/task/TaskManager.ts +1419 -608
- package/src/services/task/TaskUtils.ts +303 -25
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/ai-docs/AGENTS.md +457 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +595 -0
- package/src/services/task/ai-docs/task-spec.md +1474 -0
- package/src/services/task/constants.ts +10 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/dialer.ts +80 -0
- package/src/services/task/digital/Digital.ts +97 -0
- package/src/services/task/state-machine/TaskStateMachine.ts +1320 -0
- package/src/services/task/state-machine/actions.ts +741 -0
- package/src/services/task/state-machine/ai-docs/AGENTS.md +460 -0
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1156 -0
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +2247 -0
- package/src/services/task/state-machine/constants.ts +172 -0
- package/src/services/task/state-machine/guards.ts +442 -0
- package/src/services/task/state-machine/index.ts +28 -0
- package/src/services/task/state-machine/types.ts +258 -0
- package/src/services/task/state-machine/uiControlsComputer.ts +1135 -0
- package/src/services/task/taskDataNormalizer.ts +137 -0
- package/src/services/task/types.ts +819 -70
- package/src/services/task/voice/Voice.ts +1851 -0
- package/src/services/task/voice/WebRTC.ts +191 -0
- package/src/services/task/voice/wxAppVoiceMethods.ts +516 -0
- package/src/services/wxAppDiagnosticLogging.ts +174 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +262 -11
- package/src/utils/AGENTS.md +289 -0
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/ai-docs/utils-spec.md +391 -0
- package/src/webex.js +10 -0
- package/test/unit/spec/cc.ts +2210 -119
- package/test/unit/spec/logger-proxy.ts +70 -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 +311 -21
- package/test/unit/spec/services/EntryPoint.ts +87 -40
- package/test/unit/spec/services/Queue.ts +123 -12
- package/test/unit/spec/services/UserPreference.ts +401 -0
- package/test/unit/spec/services/WebCallingService.ts +7 -1
- package/test/unit/spec/services/WebexCrossClientService.ts +467 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
- package/test/unit/spec/services/config/Util.ts +129 -0
- package/test/unit/spec/services/config/index.ts +97 -29
- package/test/unit/spec/services/core/Utils.ts +425 -8
- package/test/unit/spec/services/core/WebexRequest.ts +3 -1
- package/test/unit/spec/services/core/aqm-reqs.ts +113 -1
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +66 -40
- package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
- package/test/unit/spec/services/task/Task.ts +745 -0
- package/test/unit/spec/services/task/TaskFactory.ts +99 -0
- package/test/unit/spec/services/task/TaskManager.ts +2518 -1494
- package/test/unit/spec/services/task/TaskUtils.ts +235 -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/dialer.ts +190 -0
- package/test/unit/spec/services/task/digital/Digital.ts +105 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +4060 -0
- package/test/unit/spec/services/task/state-machine/guards.ts +839 -0
- package/test/unit/spec/services/task/state-machine/types.ts +18 -0
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +3101 -0
- package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
- package/test/unit/spec/services/task/voice/Voice.ts +2061 -0
- package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +603 -0
- package/test/unit/spec/services/wxAppDiagnosticLogging.ts +143 -0
- package/test/unit/spec/wellnessSampleUtils.ts +288 -0
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
- package/dist/services/task/index.js +0 -1525
- package/dist/services/task/index.js.map +0 -1
- package/dist/types/services/task/index.d.ts +0 -650
- package/src/services/task/index.ts +0 -1801
- package/test/unit/spec/services/task/index.ts +0 -2184
package/dist/types/cc.d.ts
CHANGED
|
@@ -9,10 +9,12 @@ 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
|
+
import { Queue } from './services/Queue';
|
|
15
16
|
import { ApiAIAssistant } from './services/ApiAiAssistant';
|
|
17
|
+
import { UserPreference } from './services/UserPreference';
|
|
16
18
|
import type { EntryPointListResponse, EntryPointSearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from './types';
|
|
17
19
|
/**
|
|
18
20
|
* The main Contact Center plugin class that enables integration with Webex Contact Center.
|
|
@@ -161,6 +163,28 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
161
163
|
* @private
|
|
162
164
|
*/
|
|
163
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?;
|
|
164
188
|
/**
|
|
165
189
|
* Core service managers for Contact Center operations
|
|
166
190
|
* Includes agent, connection, and configuration services
|
|
@@ -189,6 +213,13 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
189
213
|
* @private
|
|
190
214
|
*/
|
|
191
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;
|
|
192
223
|
/**
|
|
193
224
|
* API instance for managing Webex Contact Center entry points
|
|
194
225
|
* Provides functionality to fetch entry points with caching support
|
|
@@ -250,7 +281,37 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
250
281
|
* });
|
|
251
282
|
* ```
|
|
252
283
|
*/
|
|
253
|
-
|
|
284
|
+
queue: Queue;
|
|
285
|
+
/**
|
|
286
|
+
* API instance for managing Webex Contact Center user preferences
|
|
287
|
+
* Provides functionality to get, create, update, and delete user preferences
|
|
288
|
+
* @type {UserPreference}
|
|
289
|
+
* @public
|
|
290
|
+
* @example
|
|
291
|
+
* ```typescript
|
|
292
|
+
* const cc = webex.cc;
|
|
293
|
+
* await cc.register();
|
|
294
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
295
|
+
*
|
|
296
|
+
* // Get user preferences for current user
|
|
297
|
+
* const preferences = await cc.userPreference.getUserPreference();
|
|
298
|
+
*
|
|
299
|
+
* // Create new user preferences
|
|
300
|
+
* const newPrefs = await cc.userPreference.createUserPreference({
|
|
301
|
+
* userId: 'user123',
|
|
302
|
+
* preferences: { e911Reminder: true }
|
|
303
|
+
* });
|
|
304
|
+
*
|
|
305
|
+
* // Update user preferences
|
|
306
|
+
* const updatedPrefs = await cc.userPreference.updateUserPreference('user123', {
|
|
307
|
+
* preferences: { e911Reminder: false }
|
|
308
|
+
* });
|
|
309
|
+
*
|
|
310
|
+
* // Delete user preferences
|
|
311
|
+
* await cc.userPreference.deleteUserPreference('user123');
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
userPreference: UserPreference;
|
|
254
315
|
/**
|
|
255
316
|
* API instance for AI Assistant operations such as transcript controls.
|
|
256
317
|
* @type {ApiAIAssistant}
|
|
@@ -282,6 +343,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
282
343
|
* @param {ITask} task The task object to be hydrated with additional data
|
|
283
344
|
*/
|
|
284
345
|
private handleTaskHydrate;
|
|
346
|
+
/**
|
|
347
|
+
* Handles multi-login hydrate events for SDK instances without Mobius registration
|
|
348
|
+
* @private
|
|
349
|
+
* @param {ITask} task The task object associated with the multi-login hydrate
|
|
350
|
+
*/
|
|
351
|
+
private handleTaskMultiLoginHydrate;
|
|
285
352
|
/**
|
|
286
353
|
* Handles task merged events when tasks are combined eg: EPDN merge/transfer
|
|
287
354
|
* @private
|
|
@@ -294,6 +361,9 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
294
361
|
* @param {ITask} task The campaign reservation task
|
|
295
362
|
*/
|
|
296
363
|
private handleCampaignPreviewReservation;
|
|
364
|
+
private trackInvalidWellnessEvent;
|
|
365
|
+
private normalizeWellnessBreakEvent;
|
|
366
|
+
private handleWellnessBreakWebsocketPayload;
|
|
297
367
|
private handleRTDWebsocketMessage;
|
|
298
368
|
/**
|
|
299
369
|
* Sets up event listeners for incoming tasks and task hydration
|
|
@@ -517,6 +587,16 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
517
587
|
* ```
|
|
518
588
|
*/
|
|
519
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>;
|
|
520
600
|
/**
|
|
521
601
|
* Processes incoming websocket messages and emits corresponding events
|
|
522
602
|
* Handles various event types including agent state changes, login events,
|
|
@@ -525,6 +605,69 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
525
605
|
* @param {string} event The raw websocket event message
|
|
526
606
|
*/
|
|
527
607
|
private handleWebsocketMessage;
|
|
608
|
+
/**
|
|
609
|
+
* Checks whether Mobius/WebRTC registration should be skipped by config
|
|
610
|
+
* @returns {boolean} True when browser WebRTC registration is disabled
|
|
611
|
+
* @private
|
|
612
|
+
*/
|
|
613
|
+
private isWebRTCRegistrationDisabled;
|
|
614
|
+
/**
|
|
615
|
+
* Validates contact-center plugin configuration before service initialization
|
|
616
|
+
* @private
|
|
617
|
+
*/
|
|
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;
|
|
528
671
|
/**
|
|
529
672
|
* Initializes event listeners for the Contact Center service
|
|
530
673
|
* Sets up handlers for connection state changes and other core events
|
|
@@ -689,6 +832,50 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
689
832
|
* ```
|
|
690
833
|
*/
|
|
691
834
|
acceptPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
835
|
+
/**
|
|
836
|
+
* Skips a campaign preview contact, requesting the next contact from the campaign.
|
|
837
|
+
*
|
|
838
|
+
* When a campaign manager reserves a contact for an agent, the agent receives an
|
|
839
|
+
* `AgentOfferCampaignReservation` event. Instead of accepting, the agent can skip the
|
|
840
|
+
* preview contact to move to the next contact in the campaign.
|
|
841
|
+
*
|
|
842
|
+
* @param {PreviewContactPayload} payload - The preview contact payload containing interactionId and campaignId (campaign name, not UUID).
|
|
843
|
+
* @returns {Promise<TaskResponse>} Promise resolving with agent contact on success.
|
|
844
|
+
* @throws {Error} If the operation fails (network error, etc.)
|
|
845
|
+
*
|
|
846
|
+
* @example
|
|
847
|
+
* ```typescript
|
|
848
|
+
* webex.cc.on('task:campaignPreviewReservation', async (task) => {
|
|
849
|
+
* const { interactionId } = task.data;
|
|
850
|
+
* const campaignId = task.data.interaction.callProcessingDetails.campaignId;
|
|
851
|
+
*
|
|
852
|
+
* const result = await webex.cc.skipPreviewContact({ interactionId, campaignId });
|
|
853
|
+
* });
|
|
854
|
+
* ```
|
|
855
|
+
*/
|
|
856
|
+
skipPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
857
|
+
/**
|
|
858
|
+
* Removes a campaign preview contact from the campaign list entirely.
|
|
859
|
+
*
|
|
860
|
+
* When a campaign manager reserves a contact for an agent, the agent receives an
|
|
861
|
+
* `AgentOfferCampaignReservation` event. Instead of accepting or skipping, the agent can
|
|
862
|
+
* remove the preview contact to permanently take it out of the campaign contact list.
|
|
863
|
+
*
|
|
864
|
+
* @param {PreviewContactPayload} payload - The preview contact payload containing interactionId and campaignId (campaign name, not UUID).
|
|
865
|
+
* @returns {Promise<TaskResponse>} Promise resolving with agent contact on success.
|
|
866
|
+
* @throws {Error} If the operation fails (network error, etc.)
|
|
867
|
+
*
|
|
868
|
+
* @example
|
|
869
|
+
* ```typescript
|
|
870
|
+
* webex.cc.on('task:campaignPreviewReservation', async (task) => {
|
|
871
|
+
* const { interactionId } = task.data;
|
|
872
|
+
* const campaignId = task.data.interaction.callProcessingDetails.campaignId;
|
|
873
|
+
*
|
|
874
|
+
* const result = await webex.cc.removePreviewContact({ interactionId, campaignId });
|
|
875
|
+
* });
|
|
876
|
+
* ```
|
|
877
|
+
*/
|
|
878
|
+
removePreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
692
879
|
/**
|
|
693
880
|
* Fetches outdial ANI (Automatic Number Identification) entries for an outdial ANI ID.
|
|
694
881
|
*
|
|
@@ -787,14 +974,14 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
787
974
|
*/
|
|
788
975
|
updateAgentProfile(data: AgentProfileUpdate): Promise<UpdateDeviceTypeResponse>;
|
|
789
976
|
/**
|
|
790
|
-
* Returns paginated entry points
|
|
791
|
-
*
|
|
977
|
+
* Returns paginated entry points using the EntryPoint service defaults.
|
|
978
|
+
* Existing request parameters can override those defaults.
|
|
792
979
|
* @public
|
|
793
980
|
*/
|
|
794
981
|
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
795
982
|
/**
|
|
796
|
-
* Returns paginated contact service queues
|
|
797
|
-
*
|
|
983
|
+
* Returns paginated contact service queues using the Queue service defaults.
|
|
984
|
+
* Existing request parameters can override those defaults.
|
|
798
985
|
* @public
|
|
799
986
|
*/
|
|
800
987
|
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -25,6 +25,19 @@ declare const _default: {
|
|
|
25
25
|
* @default true
|
|
26
26
|
*/
|
|
27
27
|
allowAutomatedRelogin: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to skip Mobius/WebRTC registration for browser login flows.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
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;
|
|
28
41
|
/**
|
|
29
42
|
* The type of client making the connection.
|
|
30
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";
|
|
@@ -36,15 +38,41 @@ export declare const METHODS: {
|
|
|
36
38
|
HANDLE_DEVICE_TYPE: string;
|
|
37
39
|
START_OUTDIAL: string;
|
|
38
40
|
GET_QUEUES: string;
|
|
39
|
-
GET_OUTDIAL_ANI_ENTRIES: string;
|
|
40
41
|
UPLOAD_LOGS: string;
|
|
41
42
|
UPDATE_AGENT_PROFILE: string;
|
|
42
43
|
GET_DEVICE_ID: string;
|
|
43
44
|
HANDLE_INCOMING_TASK: string;
|
|
44
45
|
HANDLE_TASK_HYDRATE: string;
|
|
45
46
|
INCOMING_TASK_LISTENER: string;
|
|
47
|
+
ACCEPT: string;
|
|
48
|
+
REJECT: string;
|
|
49
|
+
HOLD: string;
|
|
50
|
+
RESUME: string;
|
|
51
|
+
HOLD_RESUME: string;
|
|
52
|
+
TRANSFER_CALL: string;
|
|
53
|
+
CONSULT_TRANSFER: string;
|
|
54
|
+
CONSULT_CONFERENCE: string;
|
|
55
|
+
DROP_CONFERENCE_PARTICIPANT: string;
|
|
56
|
+
EXIT_CONFERENCE: string;
|
|
57
|
+
TRANSFER_CONFERENCE: string;
|
|
58
|
+
TOGGLE_MUTE: string;
|
|
59
|
+
TRANSMIT_DTMF: string;
|
|
60
|
+
COMPLETE_TRANSFER: string;
|
|
61
|
+
GET_OUTDIAL_ANI_ENTRIES: string;
|
|
46
62
|
ACCEPT_PREVIEW_CONTACT: string;
|
|
63
|
+
SKIP_PREVIEW_CONTACT: string;
|
|
64
|
+
REMOVE_PREVIEW_CONTACT: string;
|
|
47
65
|
GET_BASE_URL: string;
|
|
48
66
|
SEND_EVENT: string;
|
|
67
|
+
GET_REAL_TIME_ASSISTANCE: string;
|
|
68
|
+
SEND_REAL_TIME_ASSISTANCE_USER_ACTION: string;
|
|
49
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;
|
|
50
78
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,17 +10,20 @@ import ContactCenter from './cc';
|
|
|
10
10
|
*/
|
|
11
11
|
export { default as ContactCenter } from './cc';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Agent routing service for Contact Center operations
|
|
14
14
|
* @category Services
|
|
15
15
|
*/
|
|
16
|
-
export { default as
|
|
16
|
+
export { default as routingAgent } from './services/agent';
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Task class represents a contact center task that can be managed by an agent
|
|
19
19
|
* @category Services
|
|
20
20
|
*/
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as Task } from './services/task/Task';
|
|
22
22
|
export { default as AddressBook } from './services/AddressBook';
|
|
23
23
|
export { default as ApiAIAssistant } from './services/ApiAiAssistant';
|
|
24
|
+
export { default as UserPreference } from './services/UserPreference';
|
|
25
|
+
/** Agent Wellness Break notification and action wire values. */
|
|
26
|
+
export { WELLNESS_BREAK_NOTIFICATION_ACTIONS, WELLNESS_BREAK_USER_ACTIONS } from './types';
|
|
24
27
|
/** EntryPoint API types */
|
|
25
28
|
export type { EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, ContactServiceQueue, } from './types';
|
|
26
29
|
/**
|
|
@@ -89,15 +92,31 @@ UpdateDeviceTypeResponse,
|
|
|
89
92
|
/** Generic error interface */
|
|
90
93
|
GenericError,
|
|
91
94
|
/** Set state response */
|
|
92
|
-
SetStateResponse,
|
|
95
|
+
SetStateResponse,
|
|
96
|
+
/** Wellness notification action */
|
|
97
|
+
WellnessBreakNotificationAction,
|
|
98
|
+
/** Wellness action API value */
|
|
99
|
+
WellnessBreakUserAction,
|
|
100
|
+
/** Validated agent-scoped wellness notification */
|
|
101
|
+
WellnessBreakEvent,
|
|
102
|
+
/** Wellness offer-response parameters */
|
|
103
|
+
RespondToWellnessBreakParams, } from './types';
|
|
93
104
|
/** Task related types */
|
|
94
105
|
export type { AgentContact,
|
|
106
|
+
/** Event emitter contract for task consumers (no @types/node needed) */
|
|
107
|
+
IEventEmitter,
|
|
95
108
|
/** Task interface */
|
|
96
109
|
ITask, Interaction, TaskData,
|
|
97
110
|
/** Task response */
|
|
98
|
-
TaskResponse,
|
|
111
|
+
TaskResponse,
|
|
112
|
+
/** Conference participant drop request */
|
|
113
|
+
DropConferenceParticipantPayload, ConsultPayload, ConsultEndPayload, ConsultTransferPayLoad,
|
|
99
114
|
/** Dialer payload */
|
|
100
|
-
DialerPayload, TransferPayLoad, ResumeRecordingPayload, WrapupPayLoad,
|
|
115
|
+
DialerPayload, TransferPayLoad, ResumeRecordingPayload, WrapupPayLoad,
|
|
116
|
+
/** UI control types for task buttons */
|
|
117
|
+
InteractionUIControls, TaskUILeg, TaskUIControls, TaskUIControlState, } from './services/task/types';
|
|
118
|
+
/** UI controls utilities */
|
|
119
|
+
export { getDefaultUIControls } from './services/task/state-machine/uiControlsComputer';
|
|
101
120
|
/** Agent related types */
|
|
102
121
|
export type {
|
|
103
122
|
/** State change interface */
|
|
@@ -167,7 +186,15 @@ Entity,
|
|
|
167
186
|
/** Dial plan configuration */
|
|
168
187
|
DialPlan,
|
|
169
188
|
/** Auxiliary code type (IDLE_CODE or WRAP_UP_CODE) */
|
|
170
|
-
AuxCodeType,
|
|
189
|
+
AuxCodeType,
|
|
190
|
+
/** User preference data structure */
|
|
191
|
+
UserPreference as UserPreferenceData,
|
|
192
|
+
/** Request payload for creating user preferences */
|
|
193
|
+
CreateUserPreferenceRequest,
|
|
194
|
+
/** Request payload for updating user preferences */
|
|
195
|
+
UpdateUserPreferenceRequest,
|
|
196
|
+
/** Query parameters for fetching user preferences */
|
|
197
|
+
GetUserPreferenceParams, } from './services/config/types';
|
|
171
198
|
/**
|
|
172
199
|
* Idle code constant
|
|
173
200
|
* @constant {string}
|
|
@@ -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.
|
|
@@ -122,15 +122,36 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
122
122
|
readonly TASK_CONFERENCE_END_FAILED: "Task Conference End Failed";
|
|
123
123
|
readonly TASK_CONFERENCE_TRANSFER_SUCCESS: "Task Conference Transfer Success";
|
|
124
124
|
readonly TASK_CONFERENCE_TRANSFER_FAILED: "Task Conference Transfer Failed";
|
|
125
|
+
readonly TASK_CONFERENCE_EXIT_SUCCESS: "Task Conference Exit Success";
|
|
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";
|
|
129
|
+
readonly TASK_SWITCH_CALL_SUCCESS: "Task Switch Call Success";
|
|
130
|
+
readonly TASK_SWITCH_CALL_FAILED: "Task Switch Call Failed";
|
|
125
131
|
readonly TASK_OUTDIAL_SUCCESS: "Task Outdial Success";
|
|
126
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";
|
|
127
148
|
readonly UPLOAD_LOGS_SUCCESS: "Upload Logs Success";
|
|
128
149
|
readonly UPLOAD_LOGS_FAILED: "Upload Logs Failed";
|
|
129
150
|
readonly WEBSOCKET_DEREGISTER_SUCCESS: "Websocket Deregister Success";
|
|
130
151
|
readonly WEBSOCKET_DEREGISTER_FAIL: "Websocket Deregister Failed";
|
|
131
|
-
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
132
152
|
readonly AGENT_DEVICE_TYPE_UPDATE_SUCCESS: "Agent Device Type Update Success";
|
|
133
153
|
readonly AGENT_DEVICE_TYPE_UPDATE_FAILED: "Agent Device Type Update Failed";
|
|
154
|
+
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
134
155
|
readonly ENTRYPOINT_FETCH_SUCCESS: "Entrypoint Fetch Success";
|
|
135
156
|
readonly ENTRYPOINT_FETCH_FAILED: "Entrypoint Fetch Failed";
|
|
136
157
|
readonly ADDRESSBOOK_FETCH_SUCCESS: "AddressBook Fetch Success";
|
|
@@ -141,10 +162,31 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
141
162
|
readonly OUTDIAL_ANI_EP_FETCH_FAILED: "Outdial ANI Entries Fetch Failed";
|
|
142
163
|
readonly CAMPAIGN_PREVIEW_ACCEPT_SUCCESS: "Campaign Preview Accept Success";
|
|
143
164
|
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "Campaign Preview Accept Failed";
|
|
165
|
+
readonly CAMPAIGN_PREVIEW_SKIP_SUCCESS: "Campaign Preview Skip Success";
|
|
166
|
+
readonly CAMPAIGN_PREVIEW_SKIP_FAILED: "Campaign Preview Skip Failed";
|
|
167
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_SUCCESS: "Campaign Preview Remove Success";
|
|
168
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_FAILED: "Campaign Preview Remove Failed";
|
|
144
169
|
readonly AI_ASSISTANT_SEND_EVENT_SUCCESS: "AI Assistant Send Event Success";
|
|
145
170
|
readonly AI_ASSISTANT_SEND_EVENT_FAILED: "AI Assistant Send Event Failed";
|
|
171
|
+
readonly AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_SUCCESS: "AI Assistant Get Real Time Assistance Success";
|
|
172
|
+
readonly AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_FAILED: "AI Assistant Get Real Time Assistance Failed";
|
|
173
|
+
readonly AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_SUCCESS: "AI Assistant Send Real Time Assistance User Action Success";
|
|
174
|
+
readonly AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_FAILED: "AI Assistant Send Real Time Assistance User Action Failed";
|
|
146
175
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_SUCCESS: "AI Assistant Fetch Historic Transcripts Success";
|
|
147
176
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_FAILED: "AI Assistant Fetch Historic Transcripts Failed";
|
|
177
|
+
readonly AI_ASSISTANT_WELLNESS_ACTION_ACCEPTED: "AI Assistant Wellness Action Accepted";
|
|
178
|
+
readonly AI_ASSISTANT_WELLNESS_ACTION_FAILED: "AI Assistant Wellness Action Failed";
|
|
179
|
+
readonly AI_ASSISTANT_WELLNESS_EVENT_INVALID: "AI Assistant Wellness Event Invalid";
|
|
180
|
+
readonly WELLBEING_BREAK_IDLE_CODE_FETCH_SUCCESS: "Wellbeing Break Idle Code Fetch Success";
|
|
181
|
+
readonly WELLBEING_BREAK_IDLE_CODE_FETCH_FAILED: "Wellbeing Break Idle Code Fetch Failed";
|
|
182
|
+
readonly USER_PREFERENCE_GET_SUCCESS: "User Preference Get Success";
|
|
183
|
+
readonly USER_PREFERENCE_GET_FAILED: "User Preference Get Failed";
|
|
184
|
+
readonly USER_PREFERENCE_CREATE_SUCCESS: "User Preference Create Success";
|
|
185
|
+
readonly USER_PREFERENCE_CREATE_FAILED: "User Preference Create Failed";
|
|
186
|
+
readonly USER_PREFERENCE_UPDATE_SUCCESS: "User Preference Update Success";
|
|
187
|
+
readonly USER_PREFERENCE_UPDATE_FAILED: "User Preference Update Failed";
|
|
188
|
+
readonly USER_PREFERENCE_DELETE_SUCCESS: "User Preference Delete Success";
|
|
189
|
+
readonly USER_PREFERENCE_DELETE_FAILED: "User Preference Delete Failed";
|
|
148
190
|
};
|
|
149
191
|
/**
|
|
150
192
|
* Represents the possible metric event names used within the metrics system.
|
|
@@ -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
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IHttpResponse, WebexSDK } from '../types';
|
|
2
|
+
export type WxAppTelephonyError = Error & {
|
|
3
|
+
isWxAppTelephonyError: true;
|
|
4
|
+
trackingId?: string;
|
|
5
|
+
status?: number | string;
|
|
6
|
+
};
|
|
7
|
+
export type AnswerCallParams = {
|
|
8
|
+
callId: string;
|
|
9
|
+
endpointId: string;
|
|
10
|
+
lineOwnerId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type CallIdParams = {
|
|
13
|
+
callId: string;
|
|
14
|
+
lineOwnerId?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TransmitDtmfParams = CallIdParams & {
|
|
17
|
+
dtmf: string;
|
|
18
|
+
};
|
|
19
|
+
export type CallDetailsResponse = {
|
|
20
|
+
muted?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* REST telephony client for wxApp thick-client answer (WXCC-6026).
|
|
24
|
+
* Separate from WebCallingService (WebRTC/Mobius).
|
|
25
|
+
*/
|
|
26
|
+
export default class AnswerCallOnWebexService {
|
|
27
|
+
private webex;
|
|
28
|
+
constructor(webex: WebexSDK);
|
|
29
|
+
private getTelephonyBaseUrl;
|
|
30
|
+
private extractTrackingId;
|
|
31
|
+
private telephonyRequest;
|
|
32
|
+
answerCall(params: AnswerCallParams): Promise<IHttpResponse>;
|
|
33
|
+
rejectCall(params: CallIdParams): Promise<IHttpResponse>;
|
|
34
|
+
muteCall(params: CallIdParams): Promise<IHttpResponse>;
|
|
35
|
+
unmuteCall(params: CallIdParams): Promise<IHttpResponse>;
|
|
36
|
+
transmitDtmf(params: TransmitDtmfParams): Promise<IHttpResponse>;
|
|
37
|
+
getCallDetails(params: CallIdParams): Promise<CallDetailsResponse>;
|
|
38
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { WebexSDK,
|
|
1
|
+
import { WebexSDK, AIAssistantEventType, AIAssistantEventName, HistoricTranscriptsResponse, RealTimeAssistanceParams, RealTimeAssistanceUserActionParams, RespondToWellnessBreakParams } from '../types';
|
|
2
2
|
import { AIFeatureFlags } from './config/types';
|
|
3
|
+
type WellnessBreakContextProvider = () => {
|
|
4
|
+
isWellnessBreakEnabled: boolean;
|
|
5
|
+
agentId?: string;
|
|
6
|
+
agentSessionId?: string;
|
|
7
|
+
};
|
|
3
8
|
/**
|
|
4
9
|
* ApiAIAssistant provides AI Assistant APIs for transcript controls.
|
|
5
10
|
* @public
|
|
@@ -7,9 +12,37 @@ import { AIFeatureFlags } from './config/types';
|
|
|
7
12
|
export declare class ApiAIAssistant {
|
|
8
13
|
private webex;
|
|
9
14
|
private metricsManager;
|
|
10
|
-
aiFeature
|
|
11
|
-
|
|
15
|
+
private aiFeature;
|
|
16
|
+
private readonly wellnessContextProvider?;
|
|
17
|
+
private createWellnessError;
|
|
18
|
+
constructor(webex: WebexSDK, wellnessContextProvider?: WellnessBreakContextProvider);
|
|
12
19
|
setAIFeatureFlags(aiFeature: AIFeatureFlags): void;
|
|
20
|
+
private sendWellnessBreakAction;
|
|
21
|
+
/**
|
|
22
|
+
* Requests an Agent Wellness Break.
|
|
23
|
+
* The promise resolves when the HTTP request is accepted with status 202; the later
|
|
24
|
+
* approval or denial is delivered independently through a wellness notification.
|
|
25
|
+
* @returns A promise that resolves with no value after HTTP acceptance
|
|
26
|
+
* @throws Structured Contact Center error when disabled, stale, invalid, or delivery fails
|
|
27
|
+
* @example
|
|
28
|
+
* await webex.cc.apiAIAssistant.requestWellnessBreak();
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
requestWellnessBreak(): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Responds to a backend-provided Agent Wellness Break offer.
|
|
34
|
+
* The promise resolves when the HTTP request is accepted with status 202 and does not
|
|
35
|
+
* wait for a WebSocket completion event.
|
|
36
|
+
* @param params - ACCEPTED, REJECTED, or NO_RESPONSE
|
|
37
|
+
* @returns A promise that resolves with no value after HTTP acceptance
|
|
38
|
+
* @throws Structured Contact Center error when disabled, stale, invalid, or delivery fails
|
|
39
|
+
* @example
|
|
40
|
+
* await webex.cc.apiAIAssistant.respondToWellnessBreak({
|
|
41
|
+
* action: WELLNESS_BREAK_USER_ACTIONS.ACCEPTED,
|
|
42
|
+
* });
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
respondToWellnessBreak(params: RespondToWellnessBreakParams): Promise<void>;
|
|
13
46
|
private getBaseUrl;
|
|
14
47
|
/**
|
|
15
48
|
* Sends an event to the AI Assistant service.
|
|
@@ -17,9 +50,27 @@ export declare class ApiAIAssistant {
|
|
|
17
50
|
* @param interactionId - interaction/conversation identifier
|
|
18
51
|
* @param eventType - the type of event (e.g. 'CUSTOM_EVENT')
|
|
19
52
|
* @param eventName - the name of the event (e.g. 'GET_TRANSCRIPTS')
|
|
20
|
-
* @param
|
|
53
|
+
* @param eventMetaData - event-specific fields to include in eventDetails.data
|
|
54
|
+
* @param languageCode - language code within eventDetails.data
|
|
55
|
+
* @param trackingId - tracking identifier within eventDetails.data
|
|
56
|
+
*/
|
|
57
|
+
sendEvent(agentId: string, interactionId: string, eventType: AIAssistantEventType, eventName: AIAssistantEventName, eventMetaData?: Record<string, unknown>, languageCode?: string, trackingId?: string): Promise<Record<string, unknown>>;
|
|
58
|
+
/**
|
|
59
|
+
* Requests real-time assistance for an interaction.
|
|
60
|
+
*
|
|
61
|
+
* @param params - Real-time assistance request parameters
|
|
62
|
+
* @returns HTTP response body from the AI Assistant event API
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
getRealTimeAssistance(params: RealTimeAssistanceParams): Promise<Record<string, unknown>>;
|
|
66
|
+
/**
|
|
67
|
+
* Sends user action feedback for a real-time assistance adaptive card.
|
|
68
|
+
*
|
|
69
|
+
* @param params - Real-time assistance user action parameters
|
|
70
|
+
* @returns HTTP response body from the AI Assistant event API
|
|
71
|
+
* @public
|
|
21
72
|
*/
|
|
22
|
-
|
|
73
|
+
sendRealTimeAssistanceUserAction(params: RealTimeAssistanceUserActionParams): Promise<Record<string, unknown>>;
|
|
23
74
|
/**
|
|
24
75
|
* Fetches historic transcripts for an interaction.
|
|
25
76
|
* This API is allowed only when real-time transcription feature is enabled.
|