@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
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CallId } from '@webex/calling/dist/types/common/types';
|
|
3
|
-
import EventEmitter from 'events';
|
|
1
|
+
import { TaskEventPayload } from './state-machine';
|
|
4
2
|
import { Msg } from '../core/GlobalTypes';
|
|
5
3
|
import AutoWrapup from './AutoWrapup';
|
|
6
4
|
/**
|
|
@@ -8,6 +6,10 @@ import AutoWrapup from './AutoWrapup';
|
|
|
8
6
|
* @public
|
|
9
7
|
*/
|
|
10
8
|
export type TaskId = string;
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for a call in the Webex calling system
|
|
11
|
+
*/
|
|
12
|
+
export type CallId = string;
|
|
11
13
|
/**
|
|
12
14
|
* Defines the valid destination types for routing tasks within the contact center
|
|
13
15
|
* Used to specify where a task should be directed
|
|
@@ -20,7 +22,7 @@ export declare const DESTINATION_TYPE: {
|
|
|
20
22
|
DIALNUMBER: string;
|
|
21
23
|
/** Route task to a specific agent */
|
|
22
24
|
AGENT: string;
|
|
23
|
-
/** Route task to an entry point
|
|
25
|
+
/** Route task to an entry point */
|
|
24
26
|
ENTRYPOINT: string;
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
@@ -77,6 +79,22 @@ export declare const MEDIA_CHANNEL: {
|
|
|
77
79
|
* @public
|
|
78
80
|
*/
|
|
79
81
|
export type MEDIA_CHANNEL = Enum<typeof MEDIA_CHANNEL>;
|
|
82
|
+
/**
|
|
83
|
+
* Supported task channel types for UI control configuration
|
|
84
|
+
*/
|
|
85
|
+
export declare const TASK_CHANNEL_TYPE: {
|
|
86
|
+
readonly VOICE: "voice";
|
|
87
|
+
readonly DIGITAL: "digital";
|
|
88
|
+
};
|
|
89
|
+
export type TaskChannelType = Enum<typeof TASK_CHANNEL_TYPE>;
|
|
90
|
+
/**
|
|
91
|
+
* Voice channel variants that toggle PSTN/WebRTC specific behaviors
|
|
92
|
+
*/
|
|
93
|
+
export declare const VOICE_VARIANT: {
|
|
94
|
+
readonly PSTN: "pstn";
|
|
95
|
+
readonly WEBRTC: "webrtc";
|
|
96
|
+
};
|
|
97
|
+
export type VoiceVariant = Enum<typeof VOICE_VARIANT>;
|
|
80
98
|
/**
|
|
81
99
|
* Enumeration of all task-related events that can occur in the contact center system
|
|
82
100
|
* These events represent different states and actions in the task lifecycle
|
|
@@ -181,6 +199,14 @@ export declare enum TASK_EVENTS {
|
|
|
181
199
|
* ```
|
|
182
200
|
*/
|
|
183
201
|
TASK_CONSULT_QUEUE_FAILED = "task:consultQueueFailed",
|
|
202
|
+
/**
|
|
203
|
+
* Triggered whenever task UI controls are recalculated
|
|
204
|
+
*/
|
|
205
|
+
TASK_UI_CONTROLS_UPDATED = "task:ui-controls-updated",
|
|
206
|
+
/**
|
|
207
|
+
* Triggered when wxApp mute state changes from Webex App (Mercury sync or call details).
|
|
208
|
+
*/
|
|
209
|
+
TASK_WXAPP_MUTE_STATE_UPDATED = "task:wxapp-mute-state-updated",
|
|
184
210
|
/**
|
|
185
211
|
* Triggered when a consultation request is accepted
|
|
186
212
|
* @example
|
|
@@ -258,6 +284,16 @@ export declare enum TASK_EVENTS {
|
|
|
258
284
|
* ```
|
|
259
285
|
*/
|
|
260
286
|
TASK_WRAPPEDUP = "task:wrappedup",
|
|
287
|
+
/**
|
|
288
|
+
* Triggered when recording is started
|
|
289
|
+
* @example
|
|
290
|
+
* ```typescript
|
|
291
|
+
* task.on(TASK_EVENTS.TASK_RECORDING_STARTED, (task: ITask) => {
|
|
292
|
+
* console.log('Recording started:', task.data.interactionId);
|
|
293
|
+
* });
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
TASK_RECORDING_STARTED = "task:recordingStarted",
|
|
261
297
|
/**
|
|
262
298
|
* Triggered when recording is paused
|
|
263
299
|
* @example
|
|
@@ -471,6 +507,40 @@ export declare enum TASK_EVENTS {
|
|
|
471
507
|
* ```
|
|
472
508
|
*/
|
|
473
509
|
TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
|
|
510
|
+
/**
|
|
511
|
+
* Triggered when agent initiates exit from conference
|
|
512
|
+
* @example
|
|
513
|
+
* ```typescript
|
|
514
|
+
* task.on(TASK_EVENTS.TASK_EXIT_CONFERENCE, (task: ITask) => {
|
|
515
|
+
* console.log('Exiting conference:', task.data.interactionId);
|
|
516
|
+
* // Handle conference exit initiation
|
|
517
|
+
* });
|
|
518
|
+
* ```
|
|
519
|
+
*/
|
|
520
|
+
TASK_EXIT_CONFERENCE = "task:exitConference",
|
|
521
|
+
/**
|
|
522
|
+
* Triggered when agent initiates conference transfer
|
|
523
|
+
* @example
|
|
524
|
+
* ```typescript
|
|
525
|
+
* task.on(TASK_EVENTS.TASK_TRANSFER_CONFERENCE, (task: ITask) => {
|
|
526
|
+
* console.log('Transferring conference:', task.data.interactionId);
|
|
527
|
+
* // Handle conference transfer initiation
|
|
528
|
+
* });
|
|
529
|
+
* ```
|
|
530
|
+
*/
|
|
531
|
+
TASK_TRANSFER_CONFERENCE = "task:transferConference",
|
|
532
|
+
/**
|
|
533
|
+
* Triggered when agent switches between consult call and main call.
|
|
534
|
+
* Use task.uiControls to determine current state and button visibility.
|
|
535
|
+
* @example
|
|
536
|
+
* ```typescript
|
|
537
|
+
* task.on(TASK_EVENTS.TASK_SWITCH_CALL, (task: ITask) => {
|
|
538
|
+
* console.log('Call switched:', task.data.interactionId);
|
|
539
|
+
* // Update UI based on task.uiControls.main.switch / task.uiControls.consult.switch
|
|
540
|
+
* });
|
|
541
|
+
* ```
|
|
542
|
+
*/
|
|
543
|
+
TASK_SWITCH_CALL = "task:switchCall",
|
|
474
544
|
/**
|
|
475
545
|
* Triggered when a contact is merged
|
|
476
546
|
* @example
|
|
@@ -493,6 +563,16 @@ export declare enum TASK_EVENTS {
|
|
|
493
563
|
* ```
|
|
494
564
|
*/
|
|
495
565
|
TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
|
|
566
|
+
/**
|
|
567
|
+
* Triggered when a multi-login task update should hydrate SDK instances without Mobius registration.
|
|
568
|
+
* @example
|
|
569
|
+
* ```typescript
|
|
570
|
+
* task.on(TASK_EVENTS.TASK_MULTI_LOGIN_HYDRATE, (task: ITask) => {
|
|
571
|
+
* console.log('Multi-login hydrate:', task.data.interactionId);
|
|
572
|
+
* });
|
|
573
|
+
* ```
|
|
574
|
+
*/
|
|
575
|
+
TASK_MULTI_LOGIN_HYDRATE = "task:multiLoginHydrate",
|
|
496
576
|
/**
|
|
497
577
|
* Triggered when a campaign preview contact is offered to the agent
|
|
498
578
|
* @example
|
|
@@ -503,13 +583,190 @@ export declare enum TASK_EVENTS {
|
|
|
503
583
|
* });
|
|
504
584
|
* ```
|
|
505
585
|
*/
|
|
506
|
-
TASK_CAMPAIGN_PREVIEW_RESERVATION = "task:campaignPreviewReservation"
|
|
586
|
+
TASK_CAMPAIGN_PREVIEW_RESERVATION = "task:campaignPreviewReservation",
|
|
587
|
+
/**
|
|
588
|
+
* Triggered when accepting a campaign preview contact fails
|
|
589
|
+
* @example
|
|
590
|
+
* ```typescript
|
|
591
|
+
* task.on(TASK_EVENTS.TASK_CAMPAIGN_PREVIEW_ACCEPT_FAILED, (task: ITask) => {
|
|
592
|
+
* console.log('Campaign preview accept failed:', task.data.interactionId);
|
|
593
|
+
* // Handle accept failure
|
|
594
|
+
* });
|
|
595
|
+
* ```
|
|
596
|
+
*/
|
|
597
|
+
TASK_CAMPAIGN_PREVIEW_ACCEPT_FAILED = "task:campaignPreviewAcceptFailed",
|
|
598
|
+
/**
|
|
599
|
+
* Triggered when skipping a campaign preview contact fails
|
|
600
|
+
* @example
|
|
601
|
+
* ```typescript
|
|
602
|
+
* task.on(TASK_EVENTS.TASK_CAMPAIGN_PREVIEW_SKIP_FAILED, (task: ITask) => {
|
|
603
|
+
* console.log('Campaign preview skip failed:', task.data.interactionId);
|
|
604
|
+
* // Handle skip failure
|
|
605
|
+
* });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
TASK_CAMPAIGN_PREVIEW_SKIP_FAILED = "task:campaignPreviewSkipFailed",
|
|
609
|
+
/**
|
|
610
|
+
* Triggered when removing a campaign preview contact fails
|
|
611
|
+
* @example
|
|
612
|
+
* ```typescript
|
|
613
|
+
* task.on(TASK_EVENTS.TASK_CAMPAIGN_PREVIEW_REMOVE_FAILED, (task: ITask) => {
|
|
614
|
+
* console.log('Campaign preview remove failed:', task.data.interactionId);
|
|
615
|
+
* // Handle remove failure
|
|
616
|
+
* });
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
TASK_CAMPAIGN_PREVIEW_REMOVE_FAILED = "task:campaignPreviewRemoveFailed",
|
|
620
|
+
/**
|
|
621
|
+
* Triggered when a campaign contact is updated (e.g., after skip or remove, when the next contact is offered)
|
|
622
|
+
* @example
|
|
623
|
+
* ```typescript
|
|
624
|
+
* task.on(TASK_EVENTS.TASK_CAMPAIGN_CONTACT_UPDATED, (task: ITask) => {
|
|
625
|
+
* console.log('Campaign contact updated:', task.data.interactionId);
|
|
626
|
+
* // Handle updated campaign contact (e.g., display next contact)
|
|
627
|
+
* });
|
|
628
|
+
* ```
|
|
629
|
+
*/
|
|
630
|
+
TASK_CAMPAIGN_CONTACT_UPDATED = "task:campaignContactUpdated"
|
|
507
631
|
}
|
|
508
632
|
/**
|
|
509
633
|
* Represents a customer interaction within the contact center system
|
|
510
634
|
* Contains comprehensive details about an ongoing customer interaction
|
|
511
635
|
* @public
|
|
512
636
|
*/
|
|
637
|
+
export interface CallAssociatedDatum {
|
|
638
|
+
/** Whether the field can be edited by the agent */
|
|
639
|
+
agentEditable: boolean;
|
|
640
|
+
/** Whether the field is visible to the agent */
|
|
641
|
+
agentViewable: boolean;
|
|
642
|
+
/** Display name for the field */
|
|
643
|
+
displayName: string;
|
|
644
|
+
/** Whether the field is global */
|
|
645
|
+
global: boolean;
|
|
646
|
+
/** Whether the field is secure */
|
|
647
|
+
isSecure: boolean;
|
|
648
|
+
/** Internal field name */
|
|
649
|
+
name: string;
|
|
650
|
+
/** Whether the field is reportable */
|
|
651
|
+
reportable: boolean;
|
|
652
|
+
/** Secure key identifier */
|
|
653
|
+
secureKeyId: string;
|
|
654
|
+
/** Secure key version */
|
|
655
|
+
secureKeyVersion: number;
|
|
656
|
+
/** Data type of the field */
|
|
657
|
+
type: string;
|
|
658
|
+
/** Field value */
|
|
659
|
+
value: string;
|
|
660
|
+
}
|
|
661
|
+
export type CallAssociatedData = Record<string, CallAssociatedDatum>;
|
|
662
|
+
export type CallAssociatedDetails = Record<string, string>;
|
|
663
|
+
export interface FlowParameter {
|
|
664
|
+
/** Parameter name */
|
|
665
|
+
name?: string;
|
|
666
|
+
/** Additional qualifier */
|
|
667
|
+
qualifier?: string;
|
|
668
|
+
/** Description of the parameter */
|
|
669
|
+
description?: string;
|
|
670
|
+
/** Data type of the value */
|
|
671
|
+
valueDataType?: string;
|
|
672
|
+
/** Value associated with the parameter */
|
|
673
|
+
value?: string;
|
|
674
|
+
}
|
|
675
|
+
export interface InteractionParticipant {
|
|
676
|
+
/** Unique participant identifier */
|
|
677
|
+
id: string;
|
|
678
|
+
/** Participant type label used by backend */
|
|
679
|
+
pType: string;
|
|
680
|
+
/** Friendly participant type */
|
|
681
|
+
type: string;
|
|
682
|
+
/** Whether the participant has joined */
|
|
683
|
+
hasJoined: boolean;
|
|
684
|
+
/** Whether the participant has left */
|
|
685
|
+
hasLeft: boolean;
|
|
686
|
+
/** Whether the participant is still in pre-dial */
|
|
687
|
+
isInPredial: boolean;
|
|
688
|
+
/** Optional caller identifier */
|
|
689
|
+
callerId?: string | null;
|
|
690
|
+
/** Whether auto-answer is enabled */
|
|
691
|
+
autoAnswerEnabled?: boolean;
|
|
692
|
+
/** Backchannel/bnr details */
|
|
693
|
+
bnrDetails?: unknown;
|
|
694
|
+
/** Channel identifier for the participant */
|
|
695
|
+
channelId?: string;
|
|
696
|
+
/** Current consult state */
|
|
697
|
+
consultState?: string | null;
|
|
698
|
+
/** Timestamp when consult started */
|
|
699
|
+
consultTimestamp?: number | null;
|
|
700
|
+
/** Current participant state */
|
|
701
|
+
currentState?: string | null;
|
|
702
|
+
/** Timestamp of the current state */
|
|
703
|
+
currentStateTimestamp?: number | null;
|
|
704
|
+
/** Device call identifier */
|
|
705
|
+
deviceCallId?: string | null;
|
|
706
|
+
/** Device identifier */
|
|
707
|
+
deviceId?: string | null;
|
|
708
|
+
/** Device type (AGENT_DN, BROWSER, etc.) */
|
|
709
|
+
deviceType?: string | null;
|
|
710
|
+
/** Dial number associated with participant */
|
|
711
|
+
dn?: string | null;
|
|
712
|
+
/** Whether participant is currently consulted */
|
|
713
|
+
isConsulted?: boolean;
|
|
714
|
+
/** Whether participant offer is active */
|
|
715
|
+
isOffered?: boolean;
|
|
716
|
+
/** Whether participant is in wrap-up */
|
|
717
|
+
isWrapUp?: boolean;
|
|
718
|
+
/** Whether participant completed wrap-up */
|
|
719
|
+
isWrappedUp?: boolean;
|
|
720
|
+
/** Timestamp of when participant joined */
|
|
721
|
+
joinTimestamp?: number | null;
|
|
722
|
+
/** Last updated timestamp */
|
|
723
|
+
lastUpdated?: number | null;
|
|
724
|
+
/** Friendly name of participant */
|
|
725
|
+
name?: string | null;
|
|
726
|
+
/** Queue identifier associated with participant */
|
|
727
|
+
queueId?: string;
|
|
728
|
+
/** Queue manager identifier */
|
|
729
|
+
queueMgrId?: string;
|
|
730
|
+
/** Session identifier */
|
|
731
|
+
sessionId?: string;
|
|
732
|
+
/** Site identifier */
|
|
733
|
+
siteId?: string;
|
|
734
|
+
/** Skill identifier */
|
|
735
|
+
skillId?: string | null;
|
|
736
|
+
/** Skill name */
|
|
737
|
+
skillName?: string | null;
|
|
738
|
+
/** Skill list for participant */
|
|
739
|
+
skills?: string[];
|
|
740
|
+
/** Team identifier */
|
|
741
|
+
teamId?: string;
|
|
742
|
+
/** Team name */
|
|
743
|
+
teamName?: string;
|
|
744
|
+
/** Timestamp for wrap-up */
|
|
745
|
+
wrapUpTimestamp?: number | null;
|
|
746
|
+
/** Additional metadata */
|
|
747
|
+
[key: string]: unknown;
|
|
748
|
+
}
|
|
749
|
+
export type InteractionParticipants = Record<string, InteractionParticipant>;
|
|
750
|
+
/**
|
|
751
|
+
* Media entry type from interaction.media
|
|
752
|
+
* Used for media state tracking in consult and conference scenarios
|
|
753
|
+
*/
|
|
754
|
+
export type MediaEntry = {
|
|
755
|
+
/** Unique identifier for the media resource */
|
|
756
|
+
mediaResourceId: string;
|
|
757
|
+
/** Type of media channel */
|
|
758
|
+
mediaType: MEDIA_CHANNEL;
|
|
759
|
+
/** Media manager handling this media */
|
|
760
|
+
mediaMgr: string;
|
|
761
|
+
/** List of participant identifiers */
|
|
762
|
+
participants: string[];
|
|
763
|
+
/** Type of media (e.g., 'mainCall', 'consult') */
|
|
764
|
+
mType: string;
|
|
765
|
+
/** Indicates if media is on hold */
|
|
766
|
+
isHold: boolean;
|
|
767
|
+
/** Timestamp when media was put on hold */
|
|
768
|
+
holdTimestamp: number | null;
|
|
769
|
+
};
|
|
513
770
|
export type Interaction = {
|
|
514
771
|
/** Indicates if the interaction is managed by Flow Control */
|
|
515
772
|
isFcManaged: boolean;
|
|
@@ -524,7 +781,11 @@ export type Interaction = {
|
|
|
524
781
|
/** Current virtual team handling the interaction */
|
|
525
782
|
currentVTeam: string;
|
|
526
783
|
/** List of participants in the interaction */
|
|
527
|
-
participants:
|
|
784
|
+
participants: InteractionParticipants;
|
|
785
|
+
/** Detailed call associated data */
|
|
786
|
+
callAssociatedData?: CallAssociatedData;
|
|
787
|
+
/** Simplified call associated key/value pairs */
|
|
788
|
+
callAssociatedDetails?: CallAssociatedDetails;
|
|
528
789
|
/** Unique identifier for the interaction */
|
|
529
790
|
interactionId: string;
|
|
530
791
|
/** Organization identifier */
|
|
@@ -533,7 +794,18 @@ export type Interaction = {
|
|
|
533
794
|
createdTimestamp?: number;
|
|
534
795
|
/** Indicates if wrap-up assistance is enabled */
|
|
535
796
|
isWrapUpAssist?: boolean;
|
|
536
|
-
/**
|
|
797
|
+
/** Identifier of parent interaction if applicable */
|
|
798
|
+
parentInteractionId?: string;
|
|
799
|
+
/** Indicates if media is forked for this interaction */
|
|
800
|
+
isMediaForked?: boolean;
|
|
801
|
+
/** Retroactive flow properties returned by backend */
|
|
802
|
+
flowProperties?: Record<string, unknown> | null;
|
|
803
|
+
/** Media specific properties returned by backend */
|
|
804
|
+
mediaProperties?: Record<string, unknown> | null;
|
|
805
|
+
/**
|
|
806
|
+
* Detailed call processing information and metadata.
|
|
807
|
+
* Mirrors the callProcessingDetails section described in Webex Contact Center Agent Contact payloads.
|
|
808
|
+
*/
|
|
537
809
|
callProcessingDetails: {
|
|
538
810
|
/** Name of the Queue Manager handling this interaction */
|
|
539
811
|
QMgrName: string;
|
|
@@ -551,20 +823,24 @@ export type Interaction = {
|
|
|
551
823
|
QueueId: string;
|
|
552
824
|
/** Virtual team identifier */
|
|
553
825
|
vteamId: string;
|
|
554
|
-
/**
|
|
555
|
-
pauseResumeEnabled?:
|
|
826
|
+
/** Agent capability for pause/resume on this interaction */
|
|
827
|
+
pauseResumeEnabled?: boolean;
|
|
556
828
|
/** Duration of pause in seconds */
|
|
557
829
|
pauseDuration?: string;
|
|
558
|
-
/**
|
|
559
|
-
isPaused?:
|
|
560
|
-
/**
|
|
561
|
-
recordInProgress?:
|
|
562
|
-
/**
|
|
563
|
-
recordingStarted?:
|
|
830
|
+
/** Legacy pause indicator (recordInProgress=false is the active pause signal) */
|
|
831
|
+
isPaused?: boolean;
|
|
832
|
+
/** Recording is actively capturing audio right now */
|
|
833
|
+
recordInProgress?: boolean;
|
|
834
|
+
/** Recording was started for this interaction (may be paused) */
|
|
835
|
+
recordingStarted?: boolean;
|
|
836
|
+
/** Customer geographic region */
|
|
837
|
+
customerRegion?: string;
|
|
838
|
+
/** Flow tag identifier */
|
|
839
|
+
flowTagId?: string;
|
|
564
840
|
/** Indicates if Consult to Queue is in progress */
|
|
565
|
-
ctqInProgress?:
|
|
841
|
+
ctqInProgress?: boolean;
|
|
566
842
|
/** Indicates if outdial transfer to queue is enabled */
|
|
567
|
-
outdialTransferToQueueEnabled?:
|
|
843
|
+
outdialTransferToQueueEnabled?: boolean;
|
|
568
844
|
/** IVR conversation transcript */
|
|
569
845
|
convIvrTranscript?: string;
|
|
570
846
|
/** Customer's name */
|
|
@@ -651,59 +927,67 @@ export type Interaction = {
|
|
|
651
927
|
fcDesktopView?: string;
|
|
652
928
|
/** Agent ID who initiated the outdial call */
|
|
653
929
|
outdialAgentId?: string;
|
|
930
|
+
/** Indicates if the customer has left the call during an active consult */
|
|
931
|
+
hasCustomerLeft?: string;
|
|
932
|
+
/** Indicates if the skip action is disabled for campaign preview contacts */
|
|
933
|
+
campaignPreviewSkipDisabled?: string;
|
|
934
|
+
/** Indicates if the remove action is disabled for campaign preview contacts */
|
|
935
|
+
campaignPreviewRemoveDisabled?: string;
|
|
936
|
+
/** Auto-action to perform when campaign preview offer times out (ACCEPT, SKIP, REMOVE) */
|
|
937
|
+
campaignPreviewAutoAction?: string;
|
|
938
|
+
/** Timestamp (ms) when the campaign preview offer expires */
|
|
939
|
+
campaignPreviewOfferTimeout?: string;
|
|
654
940
|
};
|
|
655
941
|
/** Main interaction identifier for related interactions */
|
|
656
942
|
mainInteractionId?: string;
|
|
943
|
+
/** Timestamp when interaction entered queue */
|
|
944
|
+
queuedTimestamp?: number | null;
|
|
657
945
|
/** Media-specific information for the interaction */
|
|
658
|
-
media: Record<string,
|
|
659
|
-
/** Unique identifier for the media resource */
|
|
660
|
-
mediaResourceId: string;
|
|
661
|
-
/** Type of media channel */
|
|
662
|
-
mediaType: MEDIA_CHANNEL;
|
|
663
|
-
/** Media manager handling this media */
|
|
664
|
-
mediaMgr: string;
|
|
665
|
-
/** List of participant identifiers */
|
|
666
|
-
participants: string[];
|
|
667
|
-
/** Type of media */
|
|
668
|
-
mType: string;
|
|
669
|
-
/** Indicates if media is on hold */
|
|
670
|
-
isHold: boolean;
|
|
671
|
-
/** Timestamp when media was put on hold */
|
|
672
|
-
holdTimestamp: number | null;
|
|
673
|
-
}>;
|
|
946
|
+
media: Record<string, MediaEntry>;
|
|
674
947
|
/** Owner of the interaction */
|
|
675
948
|
owner: string;
|
|
676
949
|
/** Primary media channel for the interaction */
|
|
677
|
-
mediaChannel:
|
|
950
|
+
mediaChannel: string;
|
|
678
951
|
/** Direction information for the contact */
|
|
679
952
|
contactDirection: {
|
|
680
953
|
type: string;
|
|
681
954
|
};
|
|
682
955
|
/** Type of outbound interaction */
|
|
683
956
|
outboundType?: string;
|
|
957
|
+
/** Optional workflow manager identifier */
|
|
958
|
+
workflowManager?: string | null;
|
|
684
959
|
/** Parameters passed through the call flow */
|
|
685
|
-
callFlowParams
|
|
686
|
-
/** Name of the parameter */
|
|
687
|
-
name: string;
|
|
688
|
-
/** Qualifier for the parameter */
|
|
689
|
-
qualifier: string;
|
|
690
|
-
/** Description of the parameter */
|
|
691
|
-
description: string;
|
|
692
|
-
/** Data type of the parameter value */
|
|
693
|
-
valueDataType: string;
|
|
694
|
-
/** Value of the parameter */
|
|
695
|
-
value: string;
|
|
696
|
-
}>;
|
|
960
|
+
callFlowParams?: Record<string, FlowParameter>;
|
|
697
961
|
};
|
|
698
962
|
/**
|
|
699
|
-
* Task payload
|
|
700
|
-
*
|
|
963
|
+
* Task payload mirroring the Agent Contact event payload from Webex Contact Center
|
|
964
|
+
* (developer.webex.com). Arrives on AGENT_* websocket events and is the source of truth
|
|
965
|
+
* for UI/state machine updates.
|
|
701
966
|
* @public
|
|
702
967
|
*/
|
|
968
|
+
export type RealtimeTranscription = {
|
|
969
|
+
agentId: string;
|
|
970
|
+
orgId: string;
|
|
971
|
+
notifType: string;
|
|
972
|
+
notifDetails: {
|
|
973
|
+
actionEvent: string;
|
|
974
|
+
};
|
|
975
|
+
data: {
|
|
976
|
+
role: 'AGENT' | 'CALLER';
|
|
977
|
+
utteranceId: string;
|
|
978
|
+
conversationId: string;
|
|
979
|
+
publishTimestamp: number;
|
|
980
|
+
messageId: string;
|
|
981
|
+
isFinal: boolean;
|
|
982
|
+
languageCode: string;
|
|
983
|
+
orgId: string;
|
|
984
|
+
content: string;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
703
987
|
export type TaskData = {
|
|
704
|
-
/**
|
|
988
|
+
/** Primary media resource identifier for the active leg (matches interaction.media[].mediaResourceId) */
|
|
705
989
|
mediaResourceId: string;
|
|
706
|
-
/**
|
|
990
|
+
/** Agent event name from the websocket stream (e.g., AGENT_CONTACT_ASSIGNED) */
|
|
707
991
|
eventType: string;
|
|
708
992
|
/** Timestamp when the event occurred */
|
|
709
993
|
eventTime?: number;
|
|
@@ -713,7 +997,7 @@ export type TaskData = {
|
|
|
713
997
|
destAgentId: string;
|
|
714
998
|
/** Unique tracking identifier for the task */
|
|
715
999
|
trackingId: string;
|
|
716
|
-
/** Media resource identifier for consultation
|
|
1000
|
+
/** Media resource identifier for consultation leg when present */
|
|
717
1001
|
consultMediaResourceId: string;
|
|
718
1002
|
/** Detailed interaction information */
|
|
719
1003
|
interaction: Interaction;
|
|
@@ -725,7 +1009,7 @@ export type TaskData = {
|
|
|
725
1009
|
toOwner?: boolean;
|
|
726
1010
|
/** Identifier for child interaction in consult/transfer scenarios */
|
|
727
1011
|
childInteractionId?: string;
|
|
728
|
-
/**
|
|
1012
|
+
/** Interaction/contact identifier from backend (same as interaction.interactionId) */
|
|
729
1013
|
interactionId: string;
|
|
730
1014
|
/** Organization identifier */
|
|
731
1015
|
orgId: string;
|
|
@@ -735,7 +1019,7 @@ export type TaskData = {
|
|
|
735
1019
|
queueMgr: string;
|
|
736
1020
|
/** Name of the queue where task is queued */
|
|
737
1021
|
queueName?: string;
|
|
738
|
-
/**
|
|
1022
|
+
/** Task/interaction type returned by the platform (routing/monitoring/etc.) */
|
|
739
1023
|
type: string;
|
|
740
1024
|
/** Timeout value for RONA (Redirection on No Answer) in seconds */
|
|
741
1025
|
ronaTimeout?: number;
|
|
@@ -771,11 +1055,114 @@ export type TaskData = {
|
|
|
771
1055
|
reservedAgentChannelId?: string;
|
|
772
1056
|
/** Indicates if wrap-up is required for this task */
|
|
773
1057
|
wrapUpRequired?: boolean;
|
|
1058
|
+
/** SDK-internal: skip task:outdialFailed when non-wxApp agent-terminated outdial still needs wrapup */
|
|
1059
|
+
suppressOutdialFailedPopup?: boolean;
|
|
1060
|
+
/**
|
|
1061
|
+
* Current consultation status derived from state machine
|
|
1062
|
+
* Values: CONSULT_INITIATED, CONSULT_ACCEPTED, BEING_CONSULTED,
|
|
1063
|
+
* BEING_CONSULTED_ACCEPTED, CONNECTED, CONFERENCE, CONSULT_COMPLETED
|
|
1064
|
+
*/
|
|
1065
|
+
consultStatus?: string;
|
|
1066
|
+
/**
|
|
1067
|
+
* Indicates if consultation is in progress (state machine: CONSULTING)
|
|
1068
|
+
*/
|
|
1069
|
+
isConsultInProgress?: boolean;
|
|
1070
|
+
/**
|
|
1071
|
+
* Indicates if the task is incoming for the active agent
|
|
1072
|
+
*/
|
|
1073
|
+
isIncomingTask?: boolean;
|
|
1074
|
+
/**
|
|
1075
|
+
* Indicates if the task is on hold (state machine: HELD)
|
|
1076
|
+
*/
|
|
1077
|
+
isOnHold?: boolean;
|
|
1078
|
+
/**
|
|
1079
|
+
* Indicates if customer is currently in the call
|
|
1080
|
+
* Derived from participants in main media
|
|
1081
|
+
*/
|
|
1082
|
+
isCustomerInCall?: boolean;
|
|
1083
|
+
/**
|
|
1084
|
+
* Count of conference participants (agents only)
|
|
1085
|
+
* Used for determining if max participants reached
|
|
1086
|
+
*/
|
|
1087
|
+
conferenceParticipantsCount?: number;
|
|
1088
|
+
/**
|
|
1089
|
+
* Indicates if this is a secondary agent (consulted party)
|
|
1090
|
+
*/
|
|
1091
|
+
isSecondaryAgent?: boolean;
|
|
1092
|
+
/**
|
|
1093
|
+
* Indicates if this is a secondary EP-DN agent (telephony consult to external)
|
|
1094
|
+
*/
|
|
1095
|
+
isSecondaryEpDnAgent?: boolean;
|
|
1096
|
+
/**
|
|
1097
|
+
* Task state for MPC (Multi-Party Conference) scenarios
|
|
1098
|
+
* Maps participant consultState to task state
|
|
1099
|
+
*/
|
|
1100
|
+
mpcState?: string;
|
|
774
1101
|
/** Indicates if auto-answer is in progress for this task */
|
|
775
1102
|
isAutoAnswering?: boolean;
|
|
776
1103
|
/** Indicates if wrap-up is required for this task */
|
|
777
1104
|
agentsPendingWrapUp?: string[];
|
|
778
1105
|
};
|
|
1106
|
+
export type TaskUIControlState = {
|
|
1107
|
+
isVisible: boolean;
|
|
1108
|
+
isEnabled: boolean;
|
|
1109
|
+
};
|
|
1110
|
+
/**
|
|
1111
|
+
* UI control representation for a single interaction leg.
|
|
1112
|
+
*/
|
|
1113
|
+
export type InteractionUIControls = {
|
|
1114
|
+
accept: TaskUIControlState;
|
|
1115
|
+
decline: TaskUIControlState;
|
|
1116
|
+
hold: TaskUIControlState;
|
|
1117
|
+
transfer: TaskUIControlState;
|
|
1118
|
+
consult: TaskUIControlState;
|
|
1119
|
+
end: TaskUIControlState;
|
|
1120
|
+
recording: TaskUIControlState;
|
|
1121
|
+
mute: TaskUIControlState;
|
|
1122
|
+
consultTransfer: TaskUIControlState;
|
|
1123
|
+
endConsult: TaskUIControlState;
|
|
1124
|
+
conference: TaskUIControlState;
|
|
1125
|
+
exitConference: TaskUIControlState;
|
|
1126
|
+
transferConference: TaskUIControlState;
|
|
1127
|
+
mergeToConference: TaskUIControlState;
|
|
1128
|
+
wrapup: TaskUIControlState;
|
|
1129
|
+
switch: TaskUIControlState;
|
|
1130
|
+
keypad?: TaskUIControlState;
|
|
1131
|
+
};
|
|
1132
|
+
/** Options for {@link ITask.toggleMute} — wxApp engaged calls use `muted` for target state. */
|
|
1133
|
+
export type TaskToggleMuteOptions = {
|
|
1134
|
+
muted?: boolean;
|
|
1135
|
+
lineOwnerId?: string;
|
|
1136
|
+
};
|
|
1137
|
+
/** Options for {@link ITask.transmitDtmf} — wxApp engaged in-call DTMF. */
|
|
1138
|
+
export type TaskTransmitDtmfOptions = {
|
|
1139
|
+
dtmf: string;
|
|
1140
|
+
lineOwnerId?: string;
|
|
1141
|
+
};
|
|
1142
|
+
export type TaskUILeg = 'main' | 'consult';
|
|
1143
|
+
/**
|
|
1144
|
+
* UI controls surfaced to task consumers.
|
|
1145
|
+
* Consumers should read controls from the per-leg surfaces and use `activeLeg`
|
|
1146
|
+
* to determine which one is currently interactive.
|
|
1147
|
+
*/
|
|
1148
|
+
export type TaskUIControls = {
|
|
1149
|
+
main: InteractionUIControls;
|
|
1150
|
+
consult: InteractionUIControls;
|
|
1151
|
+
activeLeg: TaskUILeg;
|
|
1152
|
+
/**
|
|
1153
|
+
* Ordered destination categories available for each action.
|
|
1154
|
+
* The first category is the default for consumers that render a destination picker.
|
|
1155
|
+
*/
|
|
1156
|
+
consultTransferDestinations: {
|
|
1157
|
+
consult: ConsultTransferDestinationType[];
|
|
1158
|
+
transfer: ConsultTransferDestinationType[];
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
/**
|
|
1162
|
+
* Helper class for managing task action control state
|
|
1163
|
+
* Tracks visibility and enabled state for task actions that can be executed
|
|
1164
|
+
* @public
|
|
1165
|
+
*/
|
|
779
1166
|
/**
|
|
780
1167
|
* Type representing an agent contact message within the contact center system
|
|
781
1168
|
* Contains comprehensive interaction and task related details for agent operations
|
|
@@ -986,6 +1373,14 @@ export type TransferPayload = {
|
|
|
986
1373
|
/** Type of the transfer destination */
|
|
987
1374
|
destinationType: DestinationType;
|
|
988
1375
|
};
|
|
1376
|
+
/**
|
|
1377
|
+
* Options for configuring transfer behavior
|
|
1378
|
+
* @public
|
|
1379
|
+
*/
|
|
1380
|
+
export type TransferOptions = {
|
|
1381
|
+
/** Additional transfer configuration options */
|
|
1382
|
+
[key: string]: unknown;
|
|
1383
|
+
};
|
|
989
1384
|
/**
|
|
990
1385
|
* API payload for ending a consultation
|
|
991
1386
|
* This is the actual payload that is sent to the developer API
|
|
@@ -1101,6 +1496,19 @@ export type ContactCleanupData = {
|
|
|
1101
1496
|
type: string;
|
|
1102
1497
|
};
|
|
1103
1498
|
};
|
|
1499
|
+
/**
|
|
1500
|
+
* Boolean-like fields in callProcessingDetails that may arrive as strings.
|
|
1501
|
+
* Used by taskDataNormalizer to coerce payloads to actual booleans.
|
|
1502
|
+
*/
|
|
1503
|
+
export type CallProcessingBooleanKey = 'recordingStarted' | 'recordInProgress' | 'isPaused' | 'pauseResumeEnabled' | 'ctqInProgress' | 'outdialTransferToQueueEnabled' | 'taskToBeSelfServiced' | 'CONTINUE_RECORDING_ON_TRANSFER' | 'isParked' | 'participantInviteTimeout' | 'checkAgentAvailability';
|
|
1504
|
+
/**
|
|
1505
|
+
* Interaction-level boolean fields that may arrive as strings from backend payloads.
|
|
1506
|
+
*/
|
|
1507
|
+
export type InteractionBooleanKey = 'isFcManaged' | 'isMediaForked' | 'isTerminated';
|
|
1508
|
+
/**
|
|
1509
|
+
* Participant boolean fields that may arrive as strings and need normalization.
|
|
1510
|
+
*/
|
|
1511
|
+
export type ParticipantBooleanKey = 'autoAnswerEnabled' | 'hasJoined' | 'hasLeft' | 'isConsulted' | 'isInPredial' | 'isOffered' | 'isWrapUp' | 'isWrappedUp';
|
|
1104
1512
|
/**
|
|
1105
1513
|
* Response type for task public methods
|
|
1106
1514
|
* Can be an {@link AgentContact} object containing updated task state,
|
|
@@ -1108,11 +1516,40 @@ export type ContactCleanupData = {
|
|
|
1108
1516
|
* @public
|
|
1109
1517
|
*/
|
|
1110
1518
|
export type TaskResponse = AgentContact | Error | void;
|
|
1519
|
+
/**
|
|
1520
|
+
* Request payload for removing a supported participant from an active conference.
|
|
1521
|
+
* @public
|
|
1522
|
+
*/
|
|
1523
|
+
export type DropConferenceParticipantPayload = {
|
|
1524
|
+
/** Participant identifier supplied by the current task roster. */
|
|
1525
|
+
participantId: string;
|
|
1526
|
+
};
|
|
1527
|
+
/**
|
|
1528
|
+
* Payload shape used by consult conference helper utilities.
|
|
1529
|
+
*/
|
|
1530
|
+
export type consultConferencePayloadData = {
|
|
1531
|
+
agentId?: string;
|
|
1532
|
+
destinationType?: string;
|
|
1533
|
+
destAgentId?: string;
|
|
1534
|
+
};
|
|
1535
|
+
/**
|
|
1536
|
+
* Minimal event-emitter contract exposed to SDK consumers.
|
|
1537
|
+
* Defined here so that consumers do NOT need `@types/node` in their tsconfig.
|
|
1538
|
+
* The runtime Task class still extends Node's EventEmitter (via ampersand-events),
|
|
1539
|
+
* which satisfies this interface at runtime.
|
|
1540
|
+
* @public
|
|
1541
|
+
*/
|
|
1542
|
+
export interface IEventEmitter {
|
|
1543
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
1544
|
+
off(event: string, listener: (...args: any[]) => void): this;
|
|
1545
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
1546
|
+
emit(event: string, ...args: any[]): boolean;
|
|
1547
|
+
}
|
|
1111
1548
|
/**
|
|
1112
1549
|
* Interface for managing task-related operations in the contact center
|
|
1113
|
-
* Extends
|
|
1550
|
+
* Extends IEventEmitter to support event-driven task updates
|
|
1114
1551
|
*/
|
|
1115
|
-
export interface ITask extends
|
|
1552
|
+
export interface ITask extends IEventEmitter {
|
|
1116
1553
|
/**
|
|
1117
1554
|
* Event data received in the Contact Center events.
|
|
1118
1555
|
* Contains detailed task information including interaction details, media resources,
|
|
@@ -1129,6 +1566,21 @@ export interface ITask extends EventEmitter {
|
|
|
1129
1566
|
* as defined in {@link AutoWrapup}
|
|
1130
1567
|
*/
|
|
1131
1568
|
autoWrapup?: AutoWrapup;
|
|
1569
|
+
/**
|
|
1570
|
+
* Latest UI controls derived from the state machine.
|
|
1571
|
+
* Each control has `isVisible` and `isEnabled` flags computed from current task state.
|
|
1572
|
+
* Subscribe to {@link TASK_EVENTS.TASK_UI_CONTROLS_UPDATED} for change notifications.
|
|
1573
|
+
*/
|
|
1574
|
+
readonly uiControls: TaskUIControls;
|
|
1575
|
+
/**
|
|
1576
|
+
* Current wxApp mute state for engaged telephony (Voice tasks only).
|
|
1577
|
+
*/
|
|
1578
|
+
getWxAppMuted?(): boolean;
|
|
1579
|
+
/**
|
|
1580
|
+
* Re-seed wxApp mute from GET telephony/calls/{callId}. Resolves to muted state when known.
|
|
1581
|
+
*/
|
|
1582
|
+
syncWxAppMuteFromCallDetails?(): Promise<boolean | undefined>;
|
|
1583
|
+
state?: any;
|
|
1132
1584
|
/**
|
|
1133
1585
|
* Cancels the auto-wrapup timer for the task.
|
|
1134
1586
|
* This method stops the auto-wrapup process if it is currently active.
|
|
@@ -1148,7 +1600,7 @@ export interface ITask extends EventEmitter {
|
|
|
1148
1600
|
* @returns Updated task instance
|
|
1149
1601
|
* @ignore
|
|
1150
1602
|
*/
|
|
1151
|
-
updateTaskData(newData: TaskData):
|
|
1603
|
+
updateTaskData(newData: TaskData): void;
|
|
1152
1604
|
/**
|
|
1153
1605
|
* Answers or accepts an incoming task.
|
|
1154
1606
|
* Once accepted, the task will be assigned to the agent and trigger a {@link TASK_EVENTS.TASK_ASSIGNED} event.
|
|
@@ -1269,26 +1721,27 @@ export interface ITask extends EventEmitter {
|
|
|
1269
1721
|
* await task.transfer({ to: "queueId", destinationType: "queue" });
|
|
1270
1722
|
* ```
|
|
1271
1723
|
*/
|
|
1272
|
-
transfer(transferPayload: TransferPayLoad): Promise<TaskResponse>;
|
|
1724
|
+
transfer(transferPayload: TransferPayLoad, options?: TransferOptions): Promise<TaskResponse>;
|
|
1273
1725
|
/**
|
|
1274
|
-
*
|
|
1275
|
-
* @param consultTransferPayload - Details for consult transfer (optional)
|
|
1726
|
+
* Initiates a consult conference (merge consult call with main call).
|
|
1276
1727
|
* @returns Promise<TaskResponse>
|
|
1277
1728
|
* @example
|
|
1278
1729
|
* ```typescript
|
|
1279
|
-
* await task.
|
|
1730
|
+
* await task.consultConference();
|
|
1280
1731
|
* ```
|
|
1281
1732
|
*/
|
|
1282
|
-
|
|
1733
|
+
consultConference(): Promise<TaskResponse>;
|
|
1283
1734
|
/**
|
|
1284
|
-
*
|
|
1735
|
+
* Removes a supported participant from the active conference.
|
|
1736
|
+
* Resolves after the correlated ParticipantLeftConference routing event.
|
|
1737
|
+
* @param payload - Participant identifier to remove
|
|
1285
1738
|
* @returns Promise<TaskResponse>
|
|
1286
1739
|
* @example
|
|
1287
1740
|
* ```typescript
|
|
1288
|
-
* await task.
|
|
1741
|
+
* await task.dropConferenceParticipant({participantId: 'participant-id'});
|
|
1289
1742
|
* ```
|
|
1290
1743
|
*/
|
|
1291
|
-
|
|
1744
|
+
dropConferenceParticipant(payload: DropConferenceParticipantPayload): Promise<TaskResponse>;
|
|
1292
1745
|
/**
|
|
1293
1746
|
* Exits from an ongoing conference.
|
|
1294
1747
|
* @returns Promise<TaskResponse>
|
|
@@ -1308,12 +1761,173 @@ export interface ITask extends EventEmitter {
|
|
|
1308
1761
|
*/
|
|
1309
1762
|
transferConference(): Promise<TaskResponse>;
|
|
1310
1763
|
/**
|
|
1311
|
-
* Toggles
|
|
1764
|
+
* Toggles between consult call and main call during consulting.
|
|
1765
|
+
* If on consult leg, switches to main call (holds consult).
|
|
1766
|
+
* If on main call, switches to consult (resumes consult).
|
|
1767
|
+
* Only available when in CONSULTING state.
|
|
1768
|
+
* @returns Promise<TaskResponse>
|
|
1769
|
+
* @example
|
|
1770
|
+
* ```typescript
|
|
1771
|
+
* await task.switchCall();
|
|
1772
|
+
* ```
|
|
1773
|
+
*/
|
|
1774
|
+
switchCall(): Promise<TaskResponse>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Toggles mute/unmute for the active call.
|
|
1777
|
+
* WebRTC tasks toggle the local stream; wxApp engaged tasks route to telephony mute REST when
|
|
1778
|
+
* `enableWxBetterTogether` is active.
|
|
1779
|
+
* @param options - Optional target mute state (`muted`) for wxApp; ignored for WebRTC toggle.
|
|
1312
1780
|
* @returns Promise<void>
|
|
1313
1781
|
* @example
|
|
1314
1782
|
* ```typescript
|
|
1315
1783
|
* await task.toggleMute();
|
|
1784
|
+
* await task.toggleMute({ muted: true });
|
|
1785
|
+
* ```
|
|
1786
|
+
*/
|
|
1787
|
+
toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
|
|
1788
|
+
/**
|
|
1789
|
+
* Sends in-call DTMF tones for wxApp engaged telephony tasks when `enableWxBetterTogether` is active.
|
|
1790
|
+
* @param options - DTMF digit(s) and optional shared-line owner id.
|
|
1791
|
+
* @returns Promise<void>
|
|
1792
|
+
* @example
|
|
1793
|
+
* ```typescript
|
|
1794
|
+
* await task.transmitDtmf({ dtmf: '5' });
|
|
1795
|
+
* ```
|
|
1796
|
+
*/
|
|
1797
|
+
transmitDtmf(options: TaskTransmitDtmfOptions): Promise<void>;
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* Interface for managing digital channel task operations in the contact center
|
|
1801
|
+
* Digital channels (chat, email, social, SMS) have a simpler interface than voice
|
|
1802
|
+
* Extends ITask but overrides updateTaskData to return IDigital
|
|
1803
|
+
* @public
|
|
1804
|
+
*/
|
|
1805
|
+
export interface IDigital extends Omit<ITask, 'updateTaskData'> {
|
|
1806
|
+
/**
|
|
1807
|
+
* Updates the task data
|
|
1808
|
+
* @param newData - Updated task data
|
|
1809
|
+
* @param shouldOverwrite - Whether to completely replace existing data
|
|
1810
|
+
* @returns Updated Digital task instance
|
|
1811
|
+
*/
|
|
1812
|
+
updateTaskData(newData: TaskData, shouldOverwrite?: boolean): IDigital;
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Interface for managing voice/telephony task operations in the contact center
|
|
1816
|
+
* Extends ITask with voice-specific functionality for hold/resume operations
|
|
1817
|
+
* @public
|
|
1818
|
+
*/
|
|
1819
|
+
export interface IVoice extends ITask {
|
|
1820
|
+
/**
|
|
1821
|
+
* Toggles hold/resume state for a voice task.
|
|
1822
|
+
* If the task is currently on hold, it will be resumed.
|
|
1823
|
+
* If the task is active, it will be placed on hold.
|
|
1824
|
+
* @returns Promise<TaskResponse>
|
|
1825
|
+
* @example
|
|
1826
|
+
* ```typescript
|
|
1827
|
+
* await voiceTask.holdResume();
|
|
1828
|
+
* ```
|
|
1829
|
+
*/
|
|
1830
|
+
holdResume(): Promise<TaskResponse>;
|
|
1831
|
+
/** @see wxAppVoiceMethods — WXCC-6026 */
|
|
1832
|
+
isWebexAppCallingOffer(): boolean;
|
|
1833
|
+
/** @see wxAppVoiceMethods — WXCC-6026 */
|
|
1834
|
+
getCallingDeviceDetails(): import('./WebexCallingUtils').WebexCallingDeviceDetails | undefined;
|
|
1835
|
+
/** @see wxAppVoiceMethods — WXCC-6026 */
|
|
1836
|
+
getWebexCallingCallId(): string | null;
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Configuration options for voice task UI controls
|
|
1840
|
+
*/
|
|
1841
|
+
export type VoiceUIControlOptions = {
|
|
1842
|
+
isEndTaskEnabled?: boolean;
|
|
1843
|
+
isEndConsultEnabled?: boolean;
|
|
1844
|
+
voiceVariant?: VoiceVariant;
|
|
1845
|
+
isRecordingEnabled?: boolean;
|
|
1846
|
+
enableWxBetterTogether?: boolean;
|
|
1847
|
+
consultTransferConfig?: ConsultTransferDestinationConfig;
|
|
1848
|
+
answerCallOnWebexService?: import('../AnswerCallOnWebexService').default;
|
|
1849
|
+
};
|
|
1850
|
+
/**
|
|
1851
|
+
* Participant information for UI display
|
|
1852
|
+
*/
|
|
1853
|
+
export type Participant = {
|
|
1854
|
+
id: string;
|
|
1855
|
+
name?: string;
|
|
1856
|
+
pType?: string;
|
|
1857
|
+
};
|
|
1858
|
+
/**
|
|
1859
|
+
* @deprecated Use Participant instead
|
|
1860
|
+
*/
|
|
1861
|
+
export type TaskAccessorParticipant = Participant;
|
|
1862
|
+
export interface IWebRTC extends IVoice {
|
|
1863
|
+
/**
|
|
1864
|
+
* This method is used to mute/unmute the call.
|
|
1865
|
+
* @returns Promise<void>
|
|
1866
|
+
* @example
|
|
1867
|
+
* ```typescript
|
|
1868
|
+
* task.toggleMute();
|
|
1869
|
+
* ```
|
|
1870
|
+
*/
|
|
1871
|
+
toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
|
|
1872
|
+
/**
|
|
1873
|
+
* Decline the incoming task for Browser Login
|
|
1874
|
+
*
|
|
1875
|
+
* @example
|
|
1876
|
+
* ```
|
|
1877
|
+
* task.decline();
|
|
1878
|
+
* ```
|
|
1879
|
+
*/
|
|
1880
|
+
decline(): Promise<TaskResponse>;
|
|
1881
|
+
/**
|
|
1882
|
+
* This method is used to unregister the web call listeners.
|
|
1883
|
+
* @returns void
|
|
1884
|
+
* @example
|
|
1885
|
+
* ```typescript
|
|
1886
|
+
* task.unregisterWebCallListeners();
|
|
1316
1887
|
* ```
|
|
1317
1888
|
*/
|
|
1318
|
-
|
|
1889
|
+
unregisterWebCallListeners(): void;
|
|
1890
|
+
}
|
|
1891
|
+
export type WebSocketPayload = TaskData & {
|
|
1892
|
+
type: string;
|
|
1893
|
+
mediaResourceId?: string;
|
|
1894
|
+
reason?: string;
|
|
1895
|
+
/** ContactEnded: party that ended the contact (e.g. 'Agent', 'Customer') */
|
|
1896
|
+
terminatingParty?: string;
|
|
1897
|
+
/**
|
|
1898
|
+
* Optional real-time transcript chunk payload.
|
|
1899
|
+
* Present on REAL_TIME_TRANSCRIPTION notifications.
|
|
1900
|
+
*/
|
|
1901
|
+
data?: RealtimeTranscription['data'];
|
|
1902
|
+
};
|
|
1903
|
+
export type WebSocketMessage = {
|
|
1904
|
+
keepalive?: 'true' | 'false' | boolean;
|
|
1905
|
+
type?: string;
|
|
1906
|
+
data: WebSocketPayload;
|
|
1907
|
+
};
|
|
1908
|
+
/**
|
|
1909
|
+
* Actions to be performed after handling an event
|
|
1910
|
+
*
|
|
1911
|
+
* These actions represent TaskManager-level concerns (task collection lifecycle,
|
|
1912
|
+
* resource cleanup) rather than task-level state machine concerns. The separation
|
|
1913
|
+
* ensures proper responsibility:
|
|
1914
|
+
* - TaskManager: Collection management, metrics, cleanup
|
|
1915
|
+
* - State Machine: Task state transitions, event emissions, UI controls
|
|
1916
|
+
*/
|
|
1917
|
+
export interface TaskEventActions {
|
|
1918
|
+
task?: ITask;
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Context for processing an event
|
|
1922
|
+
*
|
|
1923
|
+
* Contains all information needed to process a WebSocket event:
|
|
1924
|
+
* - Event type and payload from the backend
|
|
1925
|
+
* - Task instance (if exists)
|
|
1926
|
+
* - Pre-mapped state machine event (if applicable)
|
|
1927
|
+
*/
|
|
1928
|
+
export interface EventContext {
|
|
1929
|
+
eventType: string;
|
|
1930
|
+
payload: WebSocketPayload;
|
|
1931
|
+
task?: ITask;
|
|
1932
|
+
stateMachineEvent?: TaskEventPayload | null;
|
|
1319
1933
|
}
|