@webex/contact-center 3.12.0 → 3.13.0-next.10
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/.repo-context.json +704 -0
- package/.sdd/manifest.json +1613 -0
- package/AGENTS.md +969 -0
- package/dist/cc.js +1102 -47
- package/dist/cc.js.map +1 -1
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +46 -3
- package/dist/constants.js.map +1 -1
- package/dist/index.js +86 -17
- 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 +211 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +58 -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 +369 -14
- 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/WebCallingService.js +287 -37
- package/dist/services/WebCallingService.js.map +1 -1
- package/dist/services/WebexCrossClientService.js +225 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +111 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +48 -48
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +57 -79
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +100 -226
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +100 -40
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js +19 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +131 -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 +17 -11
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +9 -1
- package/dist/services/core/constants.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +26 -6
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/connection-service.js +3 -1
- package/dist/services/core/websocket/connection-service.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +6 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/Task.js +955 -0
- package/dist/services/task/Task.js.map +1 -0
- package/dist/services/task/TaskFactory.js +50 -0
- package/dist/services/task/TaskFactory.js.map +1 -0
- package/dist/services/task/TaskManager.js +1275 -504
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +221 -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 +22 -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 +259 -5
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +1504 -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/wxAppOfferObservability.js +145 -0
- package/dist/services/task/voice/wxAppOfferObservability.js.map +1 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js +395 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
- package/dist/services/wxAppDiagnosticLogging.js +159 -0
- package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
- package/dist/services/wxAppTelephonyUtils.js +19 -0
- package/dist/services/wxAppTelephonyUtils.js.map +1 -0
- package/dist/types/cc.d.ts +222 -10
- package/dist/types/config.d.ts +13 -0
- package/dist/types/constants.d.ts +40 -1
- package/dist/types/index.d.ts +58 -22
- package/dist/types/metrics/MetricsManager.d.ts +6 -0
- package/dist/types/metrics/constants.d.ts +52 -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 +67 -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/Util.d.ts +4 -8
- package/dist/types/services/config/constants.d.ts +49 -76
- package/dist/types/services/config/index.d.ts +16 -64
- package/dist/types/services/config/types.d.ts +252 -114
- package/dist/types/services/constants.d.ts +16 -0
- package/dist/types/services/core/Err.d.ts +6 -0
- package/dist/types/services/core/Utils.d.ts +43 -13
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/constants.d.ts +7 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +2 -0
- package/dist/types/services/core/websocket/types.d.ts +1 -1
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/services/task/Task.d.ts +186 -0
- package/dist/types/services/task/TaskFactory.d.ts +14 -0
- package/dist/types/services/task/TaskUtils.d.ts +54 -2
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +20 -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 +23 -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 +790 -66
- package/dist/types/services/task/voice/Voice.d.ts +241 -0
- package/dist/types/services/task/voice/WebRTC.d.ts +54 -0
- package/dist/types/services/task/voice/wxAppOfferObservability.d.ts +39 -0
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +68 -0
- package/dist/types/services/wxAppDiagnosticLogging.d.ts +63 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +258 -11
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types/webex.d.ts +1 -0
- package/dist/types.js +204 -6
- 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/docs/adr/0001-spec-source-policy.md +97 -0
- package/docs/adr/0002-consult-transfer-list-policy.md +345 -0
- package/docs/adr/0003-repo-standards-migration.md +104 -0
- package/docs/adr/index.md +35 -0
- package/docs/architecture.md +460 -0
- package/docs/getting-started.md +142 -0
- package/docs/index.md +53 -0
- package/docs/specs/README.md +98 -0
- package/package.json +17 -12
- package/schemas/repo-context.schema.json +796 -0
- package/src/cc.ts +1439 -105
- package/src/config.ts +13 -0
- package/src/constants.ts +53 -1
- package/src/docs/README.md +727 -0
- package/src/index.ts +72 -16
- package/src/metrics/MetricsManager.ts +16 -0
- package/src/metrics/behavioral-events.ts +218 -0
- package/src/metrics/constants.ts +63 -4
- package/src/metrics/docs/README.md +710 -0
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +239 -0
- package/src/services/ApiAiAssistant.ts +494 -15
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/UserPreference.ts +509 -0
- package/src/services/WebCallingService.ts +362 -40
- package/src/services/WebexCrossClientService.ts +298 -0
- package/src/services/WxAppTelephonyMercurySync.ts +142 -0
- package/src/services/agent/docs/README.md +673 -0
- package/src/services/config/Util.ts +54 -84
- package/src/services/config/constants.ts +64 -86
- package/src/services/config/docs/README.md +530 -0
- package/src/services/config/index.ts +116 -277
- package/src/services/config/types.ts +238 -125
- package/src/services/constants.ts +18 -0
- package/src/services/core/Err.ts +3 -0
- package/src/services/core/Utils.ts +151 -37
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/aqm-reqs.ts +18 -12
- package/src/services/core/constants.ts +8 -0
- package/src/services/core/docs/README.md +993 -0
- package/src/services/core/types.ts +33 -1
- package/src/services/core/websocket/WebSocketManager.ts +37 -8
- package/src/services/core/websocket/connection-service.ts +5 -1
- package/src/services/core/websocket/types.ts +1 -1
- package/src/services/docs/README.md +765 -0
- package/src/services/index.ts +4 -0
- package/src/services/task/Task.ts +1211 -0
- package/src/services/task/TaskFactory.ts +82 -0
- package/src/services/task/TaskManager.ts +1551 -584
- package/src/services/task/TaskUtils.ts +316 -25
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/constants.ts +21 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/dialer.ts +80 -0
- package/src/services/task/digital/Digital.ts +102 -0
- package/src/services/task/docs/README.md +1569 -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/constants.ts +172 -0
- package/src/services/task/state-machine/docs/README.md +1388 -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 +974 -70
- package/src/services/task/voice/Voice.ts +1878 -0
- package/src/services/task/voice/WebRTC.ts +194 -0
- package/src/services/task/voice/wxAppOfferObservability.ts +204 -0
- package/src/services/task/voice/wxAppVoiceMethods.ts +575 -0
- package/src/services/wxAppDiagnosticLogging.ts +286 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +323 -13
- package/src/utils/AGENTS.md +291 -0
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/docs/README.md +413 -0
- package/src/webex.js +10 -0
- package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
- package/test/unit/spec/cc.ts +4046 -181
- package/test/unit/spec/index.ts +891 -0
- 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 +442 -23
- 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 +484 -49
- package/test/unit/spec/services/WebexCrossClientService.ts +509 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
- package/test/unit/spec/services/config/Util.ts +501 -0
- package/test/unit/spec/services/config/index.ts +318 -548
- package/test/unit/spec/services/core/Utils.ts +447 -8
- package/test/unit/spec/services/core/WebexRequest.ts +8 -7
- package/test/unit/spec/services/core/aqm-reqs.ts +142 -1
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +132 -56
- package/test/unit/spec/services/core/websocket/connection-service.ts +3 -1
- package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
- package/test/unit/spec/services/task/Task.ts +2723 -0
- package/test/unit/spec/services/task/TaskFactory.ts +116 -0
- package/test/unit/spec/services/task/TaskManager.ts +4800 -1586
- package/test/unit/spec/services/task/TaskUtils.ts +307 -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 +2355 -0
- package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
- package/test/unit/spec/services/task/voice/wxAppOfferObservability.ts +361 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +719 -0
- package/test/unit/spec/services/wxAppDiagnosticLogging.ts +179 -0
- package/test/unit/spec/wellnessSampleUtils.ts +288 -0
- package/typedoc.md +1 -1
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
- 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/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CallingClientConfig } from '@webex/calling';
|
|
2
2
|
import * as Agent from './services/agent/types';
|
|
3
|
-
import { Profile } from './services/config/types';
|
|
3
|
+
import { Entity, Profile } from './services/config/types';
|
|
4
4
|
import { PaginatedResponse, BaseSearchParams } from './utils/PageCache';
|
|
5
5
|
/**
|
|
6
6
|
* HTTP methods supported by WebexRequest.
|
|
@@ -52,6 +52,8 @@ export type WebexRequestPayload = {
|
|
|
52
52
|
uri?: string;
|
|
53
53
|
/** Whether to add authorization header */
|
|
54
54
|
addAuthHeader?: boolean;
|
|
55
|
+
/** Request timeout in milliseconds */
|
|
56
|
+
timeout?: number;
|
|
55
57
|
/** Custom headers to include in request */
|
|
56
58
|
headers?: {
|
|
57
59
|
[key: string]: string | null;
|
|
@@ -106,6 +108,10 @@ export interface CCPluginConfig {
|
|
|
106
108
|
};
|
|
107
109
|
/** Configuration for the calling client */
|
|
108
110
|
callingClientConfig: CallingClientConfig;
|
|
111
|
+
/** Whether to skip Mobius/WebRTC registration for browser login flows */
|
|
112
|
+
disableWebRTCRegistration?: boolean;
|
|
113
|
+
/** Whether wxApp Better Together (telephony REST + usersub) is enabled at init (WXCC-6026) */
|
|
114
|
+
enableWxBetterTogether?: boolean;
|
|
109
115
|
}
|
|
110
116
|
/**
|
|
111
117
|
* Logger interface for standardized logging throughout the plugin.
|
|
@@ -229,6 +235,45 @@ export interface WebexSDK {
|
|
|
229
235
|
/** Logger instance */
|
|
230
236
|
logger: Logger;
|
|
231
237
|
}
|
|
238
|
+
/** Current browser voice availability. @public */
|
|
239
|
+
export declare enum VOICE_CONNECTION_STATUS {
|
|
240
|
+
READY = "ready",
|
|
241
|
+
UNAVAILABLE = "unavailable",
|
|
242
|
+
NOT_REQUIRED = "not-required"
|
|
243
|
+
}
|
|
244
|
+
/** Stable error codes for browser voice availability failures. @public */
|
|
245
|
+
export declare enum VOICE_CONNECTION_ERROR {
|
|
246
|
+
NOT_READY = "BROWSER_VOICE_NOT_READY"
|
|
247
|
+
}
|
|
248
|
+
/** Browser voice line registration states. @public */
|
|
249
|
+
export declare enum VoiceLineStatus {
|
|
250
|
+
UNKNOWN = "unknown",
|
|
251
|
+
CONNECTING = "connecting",
|
|
252
|
+
REGISTERED = "registered",
|
|
253
|
+
RECONNECTING = "reconnecting",
|
|
254
|
+
RECONNECTED = "reconnected",
|
|
255
|
+
UNREGISTERED = "unregistered",
|
|
256
|
+
ERROR = "error"
|
|
257
|
+
}
|
|
258
|
+
/** Mobius socket states reported by the Calling SDK. @public */
|
|
259
|
+
export declare enum VoiceMobiusSocketStatus {
|
|
260
|
+
UNKNOWN = "unknown",
|
|
261
|
+
NOT_IN_USE = "not-in-use",
|
|
262
|
+
CONNECTED = "connected",
|
|
263
|
+
DISCONNECTED = "disconnected"
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Current browser voice availability and the underlying line and Mobius states.
|
|
267
|
+
* Mobius socket state is separate from Contact Center WebSocket health.
|
|
268
|
+
* @public
|
|
269
|
+
*/
|
|
270
|
+
export type VoiceConnectionState = {
|
|
271
|
+
status: VOICE_CONNECTION_STATUS;
|
|
272
|
+
lineStatus: VoiceLineStatus;
|
|
273
|
+
mobiusSocketStatus: VoiceMobiusSocketStatus;
|
|
274
|
+
reason?: string;
|
|
275
|
+
retryable?: boolean;
|
|
276
|
+
};
|
|
232
277
|
/**
|
|
233
278
|
* An interface for the `ContactCenter` class.
|
|
234
279
|
* The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.
|
|
@@ -249,6 +294,14 @@ export interface IContactCenter {
|
|
|
249
294
|
* cc.register().then(profile => { ... });
|
|
250
295
|
*/
|
|
251
296
|
register(): Promise<Profile>;
|
|
297
|
+
/** Returns the system-managed WellbeingBreak idle code for the registered session. */
|
|
298
|
+
getWellbeingBreakIdleCode(): Promise<Entity>;
|
|
299
|
+
/**
|
|
300
|
+
* Returns the current browser voice availability snapshot.
|
|
301
|
+
* @returns Current browser voice state, including line and Mobius socket status
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
304
|
+
getVoiceConnectionState(): VoiceConnectionState;
|
|
252
305
|
}
|
|
253
306
|
/**
|
|
254
307
|
* Generic HTTP response structure.
|
|
@@ -364,26 +417,29 @@ export type AgentLogin = {
|
|
|
364
417
|
export type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;
|
|
365
418
|
/**
|
|
366
419
|
* Represents the options to fetch buddy agents for the logged in agent.
|
|
367
|
-
* Buddy agents are other agents who can be consulted or
|
|
420
|
+
* Buddy agents are other agents who can be consulted or transferred to.
|
|
368
421
|
* @public
|
|
369
422
|
* @example
|
|
370
423
|
* const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
|
|
371
|
-
* @ignore
|
|
372
424
|
*/
|
|
373
425
|
export type BuddyAgents = {
|
|
374
426
|
/**
|
|
375
|
-
* The media type channel to filter buddy agents.
|
|
376
|
-
* Determines which channel capability the returned agents must have.
|
|
427
|
+
* The media type channel to filter buddy agents. Defaults to telephony when omitted.
|
|
377
428
|
*/
|
|
378
|
-
mediaType
|
|
429
|
+
mediaType?: 'telephony' | 'chat' | 'social' | 'email';
|
|
379
430
|
/**
|
|
380
431
|
* Optional filter for agent state.
|
|
381
432
|
* If specified, returns only agents in that state.
|
|
382
433
|
* If omitted, returns both available and idle agents.
|
|
383
434
|
*/
|
|
384
435
|
state?: 'Available' | 'Idle';
|
|
436
|
+
/**
|
|
437
|
+
* Applies the default state policy for the operation. An explicit state takes precedence.
|
|
438
|
+
*/
|
|
439
|
+
action?: 'Consult' | 'Transfer';
|
|
385
440
|
};
|
|
386
441
|
/**
|
|
442
|
+
|
|
387
443
|
* Generic error structure for Contact Center SDK errors.
|
|
388
444
|
* Contains detailed information about the error context.
|
|
389
445
|
* @public
|
|
@@ -461,10 +517,12 @@ export interface AddressBookEntrySearchParams extends BaseSearchParams {
|
|
|
461
517
|
export interface EntryPointRecord {
|
|
462
518
|
id: string;
|
|
463
519
|
name: string;
|
|
520
|
+
/** Dialled number mapped to this entry point when included in the list response. */
|
|
521
|
+
number?: string;
|
|
464
522
|
description?: string;
|
|
465
|
-
type
|
|
466
|
-
isActive
|
|
467
|
-
orgId
|
|
523
|
+
type?: string;
|
|
524
|
+
isActive?: boolean;
|
|
525
|
+
orgId?: string;
|
|
468
526
|
createdAt?: string;
|
|
469
527
|
updatedAt?: string;
|
|
470
528
|
settings?: Record<string, any>;
|
|
@@ -612,32 +670,221 @@ export type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;
|
|
|
612
670
|
* function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }
|
|
613
671
|
*/
|
|
614
672
|
export type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;
|
|
673
|
+
/**
|
|
674
|
+
* Supported transcript control actions for AI Assistant events.
|
|
675
|
+
* @public
|
|
676
|
+
* @example
|
|
677
|
+
* const action: TranscriptAction = 'START';
|
|
678
|
+
* @ignore
|
|
679
|
+
*/
|
|
615
680
|
export type TranscriptAction = 'START' | 'STOP';
|
|
681
|
+
/**
|
|
682
|
+
* Parameters used to request AI Assistant real-time assistance.
|
|
683
|
+
* @public
|
|
684
|
+
* @example
|
|
685
|
+
* const params: RealTimeAssistanceParams = {
|
|
686
|
+
* interactionId: 'interaction-123',
|
|
687
|
+
* context: 'Need help with credit card payment due date',
|
|
688
|
+
* };
|
|
689
|
+
*/
|
|
690
|
+
export type RealTimeAssistanceParams = {
|
|
691
|
+
/** Agent identifier */
|
|
692
|
+
agentId: string;
|
|
693
|
+
/** Interaction identifier for which assistance should be generated */
|
|
694
|
+
interactionId: string;
|
|
695
|
+
/** Optional additional context that should refine the assistance */
|
|
696
|
+
context?: string;
|
|
697
|
+
/** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */
|
|
698
|
+
languageCode?: string;
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* Supported user actions on an AI Assistant real-time assistance adaptive card.
|
|
702
|
+
* @public
|
|
703
|
+
*/
|
|
704
|
+
export declare const RealTimeAssistanceUserActionId: {
|
|
705
|
+
/** User liked the real-time assistance response */
|
|
706
|
+
readonly LIKE: "likeButton";
|
|
707
|
+
/** User disliked the real-time assistance response */
|
|
708
|
+
readonly DISLIKE: "dislikeButton";
|
|
709
|
+
/** User copied the real-time assistance response */
|
|
710
|
+
readonly COPY: "copyButton";
|
|
711
|
+
};
|
|
712
|
+
/**
|
|
713
|
+
* Union type of supported real-time assistance user actions.
|
|
714
|
+
* @public
|
|
715
|
+
*/
|
|
716
|
+
export type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;
|
|
717
|
+
/**
|
|
718
|
+
* Parameters used to send user action feedback for a real-time assistance adaptive card.
|
|
719
|
+
* @public
|
|
720
|
+
* @example
|
|
721
|
+
* const params: RealTimeAssistanceUserActionParams = {
|
|
722
|
+
* agentId: 'agent-123',
|
|
723
|
+
* interactionId: 'interaction-123',
|
|
724
|
+
* adaptiveCardId: 'adaptive-card-123',
|
|
725
|
+
* actionId: RealTimeAssistanceUserActionId.LIKE,
|
|
726
|
+
* };
|
|
727
|
+
*/
|
|
728
|
+
export type RealTimeAssistanceUserActionParams = {
|
|
729
|
+
/** Agent identifier */
|
|
730
|
+
agentId: string;
|
|
731
|
+
/** Interaction identifier associated with the real-time assistance response */
|
|
732
|
+
interactionId: string;
|
|
733
|
+
/** Adaptive card identifier from the real-time assistance payload */
|
|
734
|
+
adaptiveCardId: string;
|
|
735
|
+
/** User action performed on the adaptive card */
|
|
736
|
+
actionId: RealTimeAssistanceUserActionId;
|
|
737
|
+
/** Optional language code. Defaults to 'en'. */
|
|
738
|
+
languageCode?: string;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Wellness notification actions delivered by the Contact Center notification service.
|
|
742
|
+
* @public
|
|
743
|
+
*/
|
|
744
|
+
export declare const WELLNESS_BREAK_NOTIFICATION_ACTIONS: {
|
|
745
|
+
readonly PROVIDE_WELLNESS_BREAK: "PROVIDE_WELLNESS_BREAK";
|
|
746
|
+
readonly SUGGEST_WELLNESS_BREAK: "SUGGEST_WELLNESS_BREAK";
|
|
747
|
+
readonly WELLNESS_BREAK_NOT_ALLOWED: "WELLNESS_BREAK_NOT_ALLOWED";
|
|
748
|
+
};
|
|
749
|
+
/** Union of supported wellness notification actions. @public */
|
|
750
|
+
export type WellnessBreakNotificationAction = Enum<typeof WELLNESS_BREAK_NOTIFICATION_ACTIONS>;
|
|
751
|
+
/**
|
|
752
|
+
* Agent actions accepted by the wellness action API.
|
|
753
|
+
* @public
|
|
754
|
+
*/
|
|
755
|
+
export declare const WELLNESS_BREAK_USER_ACTIONS: {
|
|
756
|
+
readonly REQUESTED: "REQUESTED";
|
|
757
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
758
|
+
readonly REJECTED: "REJECTED";
|
|
759
|
+
readonly NO_RESPONSE: "NO_RESPONSE";
|
|
760
|
+
};
|
|
761
|
+
/** Union of supported wellness action API values. @public */
|
|
762
|
+
export type WellnessBreakUserAction = Enum<typeof WELLNESS_BREAK_USER_ACTIONS>;
|
|
763
|
+
/**
|
|
764
|
+
* Validated, agent-scoped wellness notification emitted by Contact Center.
|
|
765
|
+
* @public
|
|
766
|
+
*/
|
|
767
|
+
export interface WellnessBreakEvent {
|
|
768
|
+
/** Agent identifier */
|
|
769
|
+
agentId: string;
|
|
770
|
+
/** Organization identifier */
|
|
771
|
+
orgId: string;
|
|
772
|
+
/** Session identifier supplied by the notification; it may differ from the consumer's active session */
|
|
773
|
+
agentSessionId: string;
|
|
774
|
+
/** Backend wellness action */
|
|
775
|
+
actionEvent: WellnessBreakNotificationAction;
|
|
776
|
+
/** Optional untrusted plain-text message supplied by the backend */
|
|
777
|
+
actionText?: string;
|
|
778
|
+
/** Optional normalized interaction diagnostic */
|
|
779
|
+
interactionId?: string;
|
|
780
|
+
/** Notification diagnostic only; never an action-request correlation identifier */
|
|
781
|
+
trackingId?: string;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Parameters for responding to a backend-provided wellness offer.
|
|
785
|
+
* @public
|
|
786
|
+
*/
|
|
787
|
+
export interface RespondToWellnessBreakParams {
|
|
788
|
+
/** Agent response; REQUESTED is available only through requestWellnessBreak */
|
|
789
|
+
action: Exclude<WellnessBreakUserAction, typeof WELLNESS_BREAK_USER_ACTIONS.REQUESTED>;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Supported AI Assistant event categories.
|
|
793
|
+
* @public
|
|
794
|
+
* @example
|
|
795
|
+
* const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;
|
|
796
|
+
* @ignore
|
|
797
|
+
*/
|
|
616
798
|
export declare const AIAssistantEventType: {
|
|
799
|
+
/** Custom AI Assistant event */
|
|
617
800
|
readonly CUSTOM_EVENT: "CUSTOM_EVENT";
|
|
801
|
+
/** CTI-backed AI Assistant event */
|
|
618
802
|
readonly CTI_EVENT: "CTI_EVENT";
|
|
619
803
|
};
|
|
804
|
+
/**
|
|
805
|
+
* Union type of AI Assistant event categories.
|
|
806
|
+
* @public
|
|
807
|
+
* @example
|
|
808
|
+
* function send(type: AIAssistantEventType) { ... }
|
|
809
|
+
* @ignore
|
|
810
|
+
*/
|
|
620
811
|
export type AIAssistantEventType = Enum<typeof AIAssistantEventType>;
|
|
812
|
+
/**
|
|
813
|
+
* Supported AI Assistant event names.
|
|
814
|
+
* @public
|
|
815
|
+
* @example
|
|
816
|
+
* const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;
|
|
817
|
+
* @ignore
|
|
818
|
+
*/
|
|
621
819
|
export declare const AIAssistantEventName: {
|
|
820
|
+
/** Request transcript streaming for an interaction */
|
|
622
821
|
readonly GET_TRANSCRIPTS: "GET_TRANSCRIPTS";
|
|
623
|
-
|
|
822
|
+
/** Request a suggested response for an interaction */
|
|
823
|
+
readonly GET_SUGGESTIONS: "GET_SUGGESTIONS";
|
|
824
|
+
/** Add extra context to refine a suggested response */
|
|
825
|
+
readonly ADD_SUGGESTIONS_EXTRA_CONTEXT: "ADD_SUGGESTIONS_EXTRA_CONTEXT";
|
|
826
|
+
/** Request post-call summary generation */
|
|
624
827
|
readonly GET_POST_CALL_SUMMARY: "GET_POST_CALL_SUMMARY";
|
|
625
|
-
|
|
828
|
+
/** Request consult mid-call summary generation */
|
|
829
|
+
readonly GET_MID_CALL_CONSULT_SUMMARY: "GET_MID_CALL_CONSULT_SUMMARY";
|
|
830
|
+
/** Request transfer mid-call summary generation */
|
|
831
|
+
readonly GET_MID_CALL_TRANSFER_SUMMARY: "GET_MID_CALL_TRANSFER_SUMMARY";
|
|
832
|
+
/** Post-call summary response event */
|
|
626
833
|
readonly POST_CALL_SUMMARY_RESPONSE: "POST_CALL_SUMMARY_RESPONSE";
|
|
834
|
+
/** Consult mid-call summary response event */
|
|
835
|
+
readonly MID_CALL_CONSULT_SUMMARY_RESPONSE: "MID_CALL_CONSULT_SUMMARY_RESPONSE";
|
|
836
|
+
/** Transfer mid-call summary response event */
|
|
837
|
+
readonly MID_CALL_TRANSFER_SUMMARY_RESPONSE: "MID_CALL_TRANSFER_SUMMARY_RESPONSE";
|
|
838
|
+
/** Suggested digital response event */
|
|
627
839
|
readonly SUGGESTED_RESPONSES_DIGITAL: "SUGGESTED_RESPONSES_DIGITAL";
|
|
840
|
+
/** User action on a suggested response adaptive card */
|
|
841
|
+
readonly SUGGESTED_RESPONSES_USER_ACTION: "SUGGESTED_RESPONSES_USER_ACTION";
|
|
842
|
+
/** Agent Wellness Break request/response action */
|
|
843
|
+
readonly WELLNESS_BREAK_ACTION: "WellnessBreakAction";
|
|
628
844
|
};
|
|
845
|
+
/**
|
|
846
|
+
* Union type of AI Assistant event names.
|
|
847
|
+
* @public
|
|
848
|
+
* @example
|
|
849
|
+
* function handle(name: AIAssistantEventName) { ... }
|
|
850
|
+
* @ignore
|
|
851
|
+
*/
|
|
629
852
|
export type AIAssistantEventName = Enum<typeof AIAssistantEventName>;
|
|
853
|
+
/**
|
|
854
|
+
* A single transcript message entry returned by AI Assistant APIs.
|
|
855
|
+
* @public
|
|
856
|
+
* @example
|
|
857
|
+
* const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };
|
|
858
|
+
*
|
|
859
|
+
*/
|
|
630
860
|
export type TranscriptMessage = {
|
|
861
|
+
/** Speaker role for this message */
|
|
631
862
|
role: string;
|
|
863
|
+
/** Transcript chunk content */
|
|
632
864
|
content: string;
|
|
865
|
+
/** Unique message identifier */
|
|
633
866
|
messageId: string;
|
|
867
|
+
/** Message publish timestamp (epoch milliseconds) */
|
|
634
868
|
publishTimestamp: number;
|
|
635
869
|
};
|
|
870
|
+
/**
|
|
871
|
+
* Response payload for historic transcripts API.
|
|
872
|
+
* @public
|
|
873
|
+
* @example
|
|
874
|
+
* const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };
|
|
875
|
+
*
|
|
876
|
+
*/
|
|
636
877
|
export type HistoricTranscriptsResponse = {
|
|
878
|
+
/** Organization identifier */
|
|
637
879
|
orgId: string;
|
|
880
|
+
/** Agent identifier */
|
|
638
881
|
agentId: string;
|
|
882
|
+
/** Conversation identifier when available */
|
|
639
883
|
conversationId: string | null;
|
|
884
|
+
/** Interaction identifier */
|
|
640
885
|
interactionId: string;
|
|
886
|
+
/** Data source identifier */
|
|
641
887
|
source: string;
|
|
888
|
+
/** Transcript messages */
|
|
642
889
|
data: TranscriptMessage[];
|
|
643
890
|
};
|
|
@@ -90,6 +90,12 @@ export interface CacheValidationParams {
|
|
|
90
90
|
attributes?: string;
|
|
91
91
|
/** Sort by parameter */
|
|
92
92
|
sortBy?: string;
|
|
93
|
+
/** Desktop-profile filtering changes the returned result set */
|
|
94
|
+
desktopProfileFilter?: boolean;
|
|
95
|
+
/** Provisioning-view filtering changes the returned result set */
|
|
96
|
+
provisioningView?: boolean;
|
|
97
|
+
/** Single-object response mode changes the response shape */
|
|
98
|
+
singleObjectResponse?: boolean;
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
95
101
|
* Page cache utility class for managing paginated API response caching.
|
|
@@ -103,8 +109,18 @@ export interface CacheValidationParams {
|
|
|
103
109
|
* // Create a cache instance for a specific data type
|
|
104
110
|
* const cache = new PageCache<AddressBookEntry>('AddressBook');
|
|
105
111
|
*
|
|
106
|
-
* // Check if we can use cache
|
|
107
|
-
* if (
|
|
112
|
+
* // Check if we can use cache for the complete result/response-shape input set
|
|
113
|
+
* if (
|
|
114
|
+
* cache.canUseCache({
|
|
115
|
+
* search,
|
|
116
|
+
* filter,
|
|
117
|
+
* attributes,
|
|
118
|
+
* sortBy,
|
|
119
|
+
* desktopProfileFilter,
|
|
120
|
+
* provisioningView,
|
|
121
|
+
* singleObjectResponse,
|
|
122
|
+
* })
|
|
123
|
+
* ) {
|
|
108
124
|
* const cacheKey = cache.buildCacheKey(orgId, page, pageSize);
|
|
109
125
|
* const cachedPage = cache.getCachedPage(cacheKey);
|
|
110
126
|
*
|
|
@@ -128,7 +144,8 @@ export declare class PageCache<T> {
|
|
|
128
144
|
constructor(apiName: string);
|
|
129
145
|
/**
|
|
130
146
|
* Checks if cache can be used for the given parameters.
|
|
131
|
-
* Cache is only used for simple pagination without
|
|
147
|
+
* Cache is only used for simple pagination without query variants or enabled
|
|
148
|
+
* result/response-shape flags.
|
|
132
149
|
* @param {CacheValidationParams} params - Parameters to validate
|
|
133
150
|
* @returns {boolean} True if cache can be used
|
|
134
151
|
* @public
|
package/dist/types/webex.d.ts
CHANGED
package/dist/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.LoginOption = exports.LOGGING_LEVEL = exports.HTTP_METHODS = exports.AIAssistantEventType = exports.AIAssistantEventName = void 0;
|
|
6
|
+
exports.WELLNESS_BREAK_USER_ACTIONS = exports.WELLNESS_BREAK_NOTIFICATION_ACTIONS = exports.VoiceMobiusSocketStatus = exports.VoiceLineStatus = exports.VOICE_CONNECTION_STATUS = exports.VOICE_CONNECTION_ERROR = exports.RealTimeAssistanceUserActionId = exports.LoginOption = exports.LOGGING_LEVEL = exports.HTTP_METHODS = exports.AIAssistantEventType = exports.AIAssistantEventName = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Generic type for converting a const enum object into a union type of its values.
|
|
9
9
|
* @template T The enum object type
|
|
@@ -58,6 +58,12 @@ const HTTP_METHODS = exports.HTTP_METHODS = {
|
|
|
58
58
|
* @ignore
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Mercury event handler callback.
|
|
63
|
+
* @internal
|
|
64
|
+
* @ignore
|
|
65
|
+
*/
|
|
66
|
+
|
|
61
67
|
/**
|
|
62
68
|
* Event listener removal function type.
|
|
63
69
|
* @internal
|
|
@@ -149,6 +155,42 @@ let LOGGING_LEVEL = exports.LOGGING_LEVEL = /*#__PURE__*/function (LOGGING_LEVEL
|
|
|
149
155
|
* sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });
|
|
150
156
|
* @ignore
|
|
151
157
|
*/
|
|
158
|
+
/** Current browser voice availability. @public */
|
|
159
|
+
let VOICE_CONNECTION_STATUS = exports.VOICE_CONNECTION_STATUS = /*#__PURE__*/function (VOICE_CONNECTION_STATUS) {
|
|
160
|
+
VOICE_CONNECTION_STATUS["READY"] = "ready";
|
|
161
|
+
VOICE_CONNECTION_STATUS["UNAVAILABLE"] = "unavailable";
|
|
162
|
+
VOICE_CONNECTION_STATUS["NOT_REQUIRED"] = "not-required";
|
|
163
|
+
return VOICE_CONNECTION_STATUS;
|
|
164
|
+
}({});
|
|
165
|
+
/** Stable error codes for browser voice availability failures. @public */
|
|
166
|
+
let VOICE_CONNECTION_ERROR = exports.VOICE_CONNECTION_ERROR = /*#__PURE__*/function (VOICE_CONNECTION_ERROR) {
|
|
167
|
+
VOICE_CONNECTION_ERROR["NOT_READY"] = "BROWSER_VOICE_NOT_READY";
|
|
168
|
+
return VOICE_CONNECTION_ERROR;
|
|
169
|
+
}({});
|
|
170
|
+
/** Browser voice line registration states. @public */
|
|
171
|
+
let VoiceLineStatus = exports.VoiceLineStatus = /*#__PURE__*/function (VoiceLineStatus) {
|
|
172
|
+
VoiceLineStatus["UNKNOWN"] = "unknown";
|
|
173
|
+
VoiceLineStatus["CONNECTING"] = "connecting";
|
|
174
|
+
VoiceLineStatus["REGISTERED"] = "registered";
|
|
175
|
+
VoiceLineStatus["RECONNECTING"] = "reconnecting";
|
|
176
|
+
VoiceLineStatus["RECONNECTED"] = "reconnected";
|
|
177
|
+
VoiceLineStatus["UNREGISTERED"] = "unregistered";
|
|
178
|
+
VoiceLineStatus["ERROR"] = "error";
|
|
179
|
+
return VoiceLineStatus;
|
|
180
|
+
}({});
|
|
181
|
+
/** Mobius socket states reported by the Calling SDK. @public */
|
|
182
|
+
let VoiceMobiusSocketStatus = exports.VoiceMobiusSocketStatus = /*#__PURE__*/function (VoiceMobiusSocketStatus) {
|
|
183
|
+
VoiceMobiusSocketStatus["UNKNOWN"] = "unknown";
|
|
184
|
+
VoiceMobiusSocketStatus["NOT_IN_USE"] = "not-in-use";
|
|
185
|
+
VoiceMobiusSocketStatus["CONNECTED"] = "connected";
|
|
186
|
+
VoiceMobiusSocketStatus["DISCONNECTED"] = "disconnected";
|
|
187
|
+
return VoiceMobiusSocketStatus;
|
|
188
|
+
}({});
|
|
189
|
+
/**
|
|
190
|
+
* Current browser voice availability and the underlying line and Mobius states.
|
|
191
|
+
* Mobius socket state is separate from Contact Center WebSocket health.
|
|
192
|
+
* @public
|
|
193
|
+
*/
|
|
152
194
|
/**
|
|
153
195
|
* An interface for the `ContactCenter` class.
|
|
154
196
|
* The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.
|
|
@@ -228,14 +270,20 @@ const LoginOption = exports.LoginOption = {
|
|
|
228
270
|
|
|
229
271
|
/**
|
|
230
272
|
* Represents the options to fetch buddy agents for the logged in agent.
|
|
231
|
-
* Buddy agents are other agents who can be consulted or
|
|
273
|
+
* Buddy agents are other agents who can be consulted or transferred to.
|
|
232
274
|
* @public
|
|
233
275
|
* @example
|
|
234
276
|
* const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
|
|
235
|
-
* @ignore
|
|
236
277
|
*/
|
|
237
278
|
|
|
238
279
|
/**
|
|
280
|
+
* Holds the configuration flags for the Agent.
|
|
281
|
+
* These flags determine the availability of certain features in the Agent UI.
|
|
282
|
+
* @internal
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
|
|
239
287
|
* Generic error structure for Contact Center SDK errors.
|
|
240
288
|
* Contains detailed information about the error context.
|
|
241
289
|
* @public
|
|
@@ -312,16 +360,166 @@ const LoginOption = exports.LoginOption = {
|
|
|
312
360
|
* function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }
|
|
313
361
|
*/
|
|
314
362
|
|
|
363
|
+
/**
|
|
364
|
+
* Supported transcript control actions for AI Assistant events.
|
|
365
|
+
* @public
|
|
366
|
+
* @example
|
|
367
|
+
* const action: TranscriptAction = 'START';
|
|
368
|
+
* @ignore
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Parameters used to request AI Assistant real-time assistance.
|
|
373
|
+
* @public
|
|
374
|
+
* @example
|
|
375
|
+
* const params: RealTimeAssistanceParams = {
|
|
376
|
+
* interactionId: 'interaction-123',
|
|
377
|
+
* context: 'Need help with credit card payment due date',
|
|
378
|
+
* };
|
|
379
|
+
*/
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Supported user actions on an AI Assistant real-time assistance adaptive card.
|
|
383
|
+
* @public
|
|
384
|
+
*/
|
|
385
|
+
const RealTimeAssistanceUserActionId = exports.RealTimeAssistanceUserActionId = {
|
|
386
|
+
/** User liked the real-time assistance response */
|
|
387
|
+
LIKE: 'likeButton',
|
|
388
|
+
/** User disliked the real-time assistance response */
|
|
389
|
+
DISLIKE: 'dislikeButton',
|
|
390
|
+
/** User copied the real-time assistance response */
|
|
391
|
+
COPY: 'copyButton'
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Union type of supported real-time assistance user actions.
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Parameters used to send user action feedback for a real-time assistance adaptive card.
|
|
401
|
+
* @public
|
|
402
|
+
* @example
|
|
403
|
+
* const params: RealTimeAssistanceUserActionParams = {
|
|
404
|
+
* agentId: 'agent-123',
|
|
405
|
+
* interactionId: 'interaction-123',
|
|
406
|
+
* adaptiveCardId: 'adaptive-card-123',
|
|
407
|
+
* actionId: RealTimeAssistanceUserActionId.LIKE,
|
|
408
|
+
* };
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Wellness notification actions delivered by the Contact Center notification service.
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
415
|
+
const WELLNESS_BREAK_NOTIFICATION_ACTIONS = exports.WELLNESS_BREAK_NOTIFICATION_ACTIONS = {
|
|
416
|
+
PROVIDE_WELLNESS_BREAK: 'PROVIDE_WELLNESS_BREAK',
|
|
417
|
+
SUGGEST_WELLNESS_BREAK: 'SUGGEST_WELLNESS_BREAK',
|
|
418
|
+
WELLNESS_BREAK_NOT_ALLOWED: 'WELLNESS_BREAK_NOT_ALLOWED'
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
/** Union of supported wellness notification actions. @public */
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Agent actions accepted by the wellness action API.
|
|
425
|
+
* @public
|
|
426
|
+
*/
|
|
427
|
+
const WELLNESS_BREAK_USER_ACTIONS = exports.WELLNESS_BREAK_USER_ACTIONS = {
|
|
428
|
+
REQUESTED: 'REQUESTED',
|
|
429
|
+
ACCEPTED: 'ACCEPTED',
|
|
430
|
+
REJECTED: 'REJECTED',
|
|
431
|
+
NO_RESPONSE: 'NO_RESPONSE'
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
/** Union of supported wellness action API values. @public */
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Validated, agent-scoped wellness notification emitted by Contact Center.
|
|
438
|
+
* @public
|
|
439
|
+
*/
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Parameters for responding to a backend-provided wellness offer.
|
|
443
|
+
* @public
|
|
444
|
+
*/
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Supported AI Assistant event categories.
|
|
448
|
+
* @public
|
|
449
|
+
* @example
|
|
450
|
+
* const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;
|
|
451
|
+
* @ignore
|
|
452
|
+
*/
|
|
315
453
|
const AIAssistantEventType = exports.AIAssistantEventType = {
|
|
454
|
+
/** Custom AI Assistant event */
|
|
316
455
|
CUSTOM_EVENT: 'CUSTOM_EVENT',
|
|
456
|
+
/** CTI-backed AI Assistant event */
|
|
317
457
|
CTI_EVENT: 'CTI_EVENT'
|
|
318
458
|
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Union type of AI Assistant event categories.
|
|
462
|
+
* @public
|
|
463
|
+
* @example
|
|
464
|
+
* function send(type: AIAssistantEventType) { ... }
|
|
465
|
+
* @ignore
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Supported AI Assistant event names.
|
|
470
|
+
* @public
|
|
471
|
+
* @example
|
|
472
|
+
* const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;
|
|
473
|
+
* @ignore
|
|
474
|
+
*/
|
|
319
475
|
const AIAssistantEventName = exports.AIAssistantEventName = {
|
|
476
|
+
/** Request transcript streaming for an interaction */
|
|
320
477
|
GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',
|
|
321
|
-
|
|
478
|
+
/** Request a suggested response for an interaction */
|
|
479
|
+
GET_SUGGESTIONS: 'GET_SUGGESTIONS',
|
|
480
|
+
/** Add extra context to refine a suggested response */
|
|
481
|
+
ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',
|
|
482
|
+
/** Request post-call summary generation */
|
|
322
483
|
GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',
|
|
323
|
-
|
|
484
|
+
/** Request consult mid-call summary generation */
|
|
485
|
+
GET_MID_CALL_CONSULT_SUMMARY: 'GET_MID_CALL_CONSULT_SUMMARY',
|
|
486
|
+
/** Request transfer mid-call summary generation */
|
|
487
|
+
GET_MID_CALL_TRANSFER_SUMMARY: 'GET_MID_CALL_TRANSFER_SUMMARY',
|
|
488
|
+
/** Post-call summary response event */
|
|
324
489
|
POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',
|
|
325
|
-
|
|
490
|
+
/** Consult mid-call summary response event */
|
|
491
|
+
MID_CALL_CONSULT_SUMMARY_RESPONSE: 'MID_CALL_CONSULT_SUMMARY_RESPONSE',
|
|
492
|
+
/** Transfer mid-call summary response event */
|
|
493
|
+
MID_CALL_TRANSFER_SUMMARY_RESPONSE: 'MID_CALL_TRANSFER_SUMMARY_RESPONSE',
|
|
494
|
+
/** Suggested digital response event */
|
|
495
|
+
SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',
|
|
496
|
+
/** User action on a suggested response adaptive card */
|
|
497
|
+
SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',
|
|
498
|
+
/** Agent Wellness Break request/response action */
|
|
499
|
+
WELLNESS_BREAK_ACTION: 'WellnessBreakAction'
|
|
326
500
|
};
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Union type of AI Assistant event names.
|
|
504
|
+
* @public
|
|
505
|
+
* @example
|
|
506
|
+
* function handle(name: AIAssistantEventName) { ... }
|
|
507
|
+
* @ignore
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* A single transcript message entry returned by AI Assistant APIs.
|
|
512
|
+
* @public
|
|
513
|
+
* @example
|
|
514
|
+
* const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };
|
|
515
|
+
*
|
|
516
|
+
*/
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Response payload for historic transcripts API.
|
|
520
|
+
* @public
|
|
521
|
+
* @example
|
|
522
|
+
* const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };
|
|
523
|
+
*
|
|
524
|
+
*/
|
|
327
525
|
//# sourceMappingURL=types.js.map
|