@webex/contact-center 3.12.0-llmrefactor.2 → 3.12.0-llmrefactor.4
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 +5 -4
- package/ai-docs/ARCHITECTURE.md +1 -1
- package/ai-docs/CONTRACTS.md +6 -2
- package/ai-docs/SECURITY.md +1 -1
- package/ai-docs/contact-center-spec.md +22 -4
- package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
- package/dist/cc.js +440 -10
- package/dist/cc.js.map +1 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +10 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/behavioral-events.js +13 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +2 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +18 -15
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/AnswerCallOnWebexService.js +174 -0
- package/dist/services/AnswerCallOnWebexService.js.map +1 -0
- 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/WebexCrossClientService.js +171 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +93 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +3 -0
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +10 -6
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/types.js +4 -0
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Err.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/task/Task.js +73 -7
- package/dist/services/task/Task.js.map +1 -1
- package/dist/services/task/TaskFactory.js +8 -4
- package/dist/services/task/TaskFactory.js.map +1 -1
- package/dist/services/task/TaskManager.js +353 -21
- package/dist/services/task/TaskManager.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 +4 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +29 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/digital/Digital.js +3 -2
- package/dist/services/task/digital/Digital.js.map +1 -1
- package/dist/services/task/state-machine/TaskStateMachine.js +135 -37
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -1
- package/dist/services/task/state-machine/actions.js +6 -1
- package/dist/services/task/state-machine/actions.js.map +1 -1
- package/dist/services/task/state-machine/guards.js +38 -11
- package/dist/services/task/state-machine/guards.js.map +1 -1
- package/dist/services/task/state-machine/types.js.map +1 -1
- package/dist/services/task/state-machine/uiControlsComputer.js +118 -18
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -1
- package/dist/services/task/types.js +16 -1
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +350 -14
- package/dist/services/task/voice/Voice.js.map +1 -1
- package/dist/services/task/voice/WebRTC.js +4 -1
- package/dist/services/task/voice/WebRTC.js.map +1 -1
- package/dist/services/task/voice/wxAppVoiceMethods.js +201 -0
- package/dist/services/task/voice/wxAppVoiceMethods.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 +77 -4
- package/dist/types/config.d.ts +7 -0
- package/dist/types/constants.d.ts +8 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/types/services/AddressBook.d.ts +2 -1
- package/dist/types/services/AnswerCallOnWebexService.d.ts +37 -0
- package/dist/types/services/EntryPoint.d.ts +7 -5
- package/dist/types/services/Queue.d.ts +5 -3
- package/dist/types/services/WebexCrossClientService.d.ts +28 -0
- package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
- package/dist/types/services/config/constants.d.ts +8 -5
- package/dist/types/services/config/types.d.ts +17 -4
- package/dist/types/services/core/Err.d.ts +2 -0
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/task/Task.d.ts +20 -2
- package/dist/types/services/task/TaskFactory.d.ts +2 -1
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +3 -0
- package/dist/types/services/task/contact.d.ts +4 -0
- package/dist/types/services/task/digital/Digital.d.ts +2 -2
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +260 -56
- package/dist/types/services/task/state-machine/guards.d.ts +6 -5
- package/dist/types/services/task/state-machine/types.d.ts +9 -1
- package/dist/types/services/task/types.d.ts +81 -4
- package/dist/types/services/task/voice/Voice.d.ts +48 -9
- package/dist/types/services/task/voice/WebRTC.d.ts +2 -2
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +52 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +14 -8
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types.js +7 -2
- 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 +1 -1
- package/package.json +9 -9
- package/src/cc.ts +506 -9
- package/src/config.ts +7 -0
- package/src/constants.ts +8 -0
- package/src/index.ts +2 -0
- package/src/metrics/ai-docs/metrics-spec.md +9 -3
- package/src/metrics/behavioral-events.ts +14 -0
- package/src/metrics/constants.ts +2 -0
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +206 -0
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/WebexCrossClientService.ts +212 -0
- package/src/services/WxAppTelephonyMercurySync.ts +115 -0
- package/src/services/ai-docs/AGENTS.md +10 -10
- package/src/services/ai-docs/services-spec.md +6 -1
- package/src/services/config/Util.ts +3 -0
- package/src/services/config/ai-docs/AGENTS.md +1 -1
- package/src/services/config/ai-docs/ARCHITECTURE.md +2 -2
- package/src/services/config/ai-docs/config-spec.md +6 -0
- package/src/services/config/constants.ts +10 -6
- package/src/services/config/types.ts +16 -4
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/ai-docs/core-spec.md +5 -1
- package/src/services/core/aqm-reqs.ts +30 -15
- package/src/services/core/types.ts +2 -0
- package/src/services/task/Task.ts +79 -8
- package/src/services/task/TaskFactory.ts +8 -3
- package/src/services/task/TaskManager.ts +522 -16
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +1 -0
- package/src/services/task/ai-docs/task-spec.md +152 -2
- package/src/services/task/constants.ts +3 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/digital/Digital.ts +4 -2
- package/src/services/task/state-machine/TaskStateMachine.ts +210 -63
- package/src/services/task/state-machine/actions.ts +5 -2
- package/src/services/task/state-machine/ai-docs/AGENTS.md +8 -4
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +17 -8
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +56 -24
- package/src/services/task/state-machine/guards.ts +64 -11
- package/src/services/task/state-machine/types.ts +16 -1
- package/src/services/task/state-machine/uiControlsComputer.ts +206 -32
- package/src/services/task/types.ts +114 -4
- package/src/services/task/voice/Voice.ts +462 -12
- package/src/services/task/voice/WebRTC.ts +5 -1
- package/src/services/task/voice/wxAppVoiceMethods.ts +307 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +33 -9
- package/src/utils/AGENTS.md +21 -10
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/ai-docs/utils-spec.md +21 -11
- package/test/unit/spec/cc.ts +1274 -0
- package/test/unit/spec/metrics/behavioral-events.ts +18 -0
- package/test/unit/spec/services/AddressBook.ts +37 -6
- package/test/unit/spec/services/AnswerCallOnWebexService.ts +223 -0
- package/test/unit/spec/services/EntryPoint.ts +87 -40
- package/test/unit/spec/services/Queue.ts +123 -12
- package/test/unit/spec/services/WebexCrossClientService.ts +261 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +113 -0
- package/test/unit/spec/services/config/Util.ts +85 -0
- 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/task/Task.ts +200 -0
- package/test/unit/spec/services/task/TaskFactory.ts +39 -2
- package/test/unit/spec/services/task/TaskManager.ts +1294 -1
- package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
- package/test/unit/spec/services/task/contact.ts +33 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +854 -72
- package/test/unit/spec/services/task/state-machine/guards.ts +210 -8
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +445 -7
- package/test/unit/spec/services/task/voice/Voice.ts +874 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +459 -0
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -22,7 +22,7 @@ export declare const DESTINATION_TYPE: {
|
|
|
22
22
|
DIALNUMBER: string;
|
|
23
23
|
/** Route task to a specific agent */
|
|
24
24
|
AGENT: string;
|
|
25
|
-
/** Route task to an entry point
|
|
25
|
+
/** Route task to an entry point */
|
|
26
26
|
ENTRYPOINT: string;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
@@ -203,6 +203,10 @@ export declare enum TASK_EVENTS {
|
|
|
203
203
|
* Triggered whenever task UI controls are recalculated
|
|
204
204
|
*/
|
|
205
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",
|
|
206
210
|
/**
|
|
207
211
|
* Triggered when a consultation request is accepted
|
|
208
212
|
* @example
|
|
@@ -1051,6 +1055,8 @@ export type TaskData = {
|
|
|
1051
1055
|
reservedAgentChannelId?: string;
|
|
1052
1056
|
/** Indicates if wrap-up is required for this task */
|
|
1053
1057
|
wrapUpRequired?: boolean;
|
|
1058
|
+
/** SDK-internal: skip task:outdialFailed when non-wxApp agent-terminated outdial still needs wrapup */
|
|
1059
|
+
suppressOutdialFailedPopup?: boolean;
|
|
1054
1060
|
/**
|
|
1055
1061
|
* Current consultation status derived from state machine
|
|
1056
1062
|
* Values: CONSULT_INITIATED, CONSULT_ACCEPTED, BEING_CONSULTED,
|
|
@@ -1121,6 +1127,17 @@ export type InteractionUIControls = {
|
|
|
1121
1127
|
mergeToConference: TaskUIControlState;
|
|
1122
1128
|
wrapup: TaskUIControlState;
|
|
1123
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;
|
|
1124
1141
|
};
|
|
1125
1142
|
export type TaskUILeg = 'main' | 'consult';
|
|
1126
1143
|
/**
|
|
@@ -1132,6 +1149,14 @@ export type TaskUIControls = {
|
|
|
1132
1149
|
main: InteractionUIControls;
|
|
1133
1150
|
consult: InteractionUIControls;
|
|
1134
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
|
+
};
|
|
1135
1160
|
};
|
|
1136
1161
|
/**
|
|
1137
1162
|
* Helper class for managing task action control state
|
|
@@ -1491,6 +1516,14 @@ export type ParticipantBooleanKey = 'autoAnswerEnabled' | 'hasJoined' | 'hasLeft
|
|
|
1491
1516
|
* @public
|
|
1492
1517
|
*/
|
|
1493
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
|
+
};
|
|
1494
1527
|
/**
|
|
1495
1528
|
* Payload shape used by consult conference helper utilities.
|
|
1496
1529
|
*/
|
|
@@ -1539,6 +1572,14 @@ export interface ITask extends IEventEmitter {
|
|
|
1539
1572
|
* Subscribe to {@link TASK_EVENTS.TASK_UI_CONTROLS_UPDATED} for change notifications.
|
|
1540
1573
|
*/
|
|
1541
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>;
|
|
1542
1583
|
state?: any;
|
|
1543
1584
|
/**
|
|
1544
1585
|
* Cancels the auto-wrapup timer for the task.
|
|
@@ -1690,6 +1731,17 @@ export interface ITask extends IEventEmitter {
|
|
|
1690
1731
|
* ```
|
|
1691
1732
|
*/
|
|
1692
1733
|
consultConference(): Promise<TaskResponse>;
|
|
1734
|
+
/**
|
|
1735
|
+
* Removes a supported participant from the active conference.
|
|
1736
|
+
* Resolves after the correlated ParticipantLeftConference routing event.
|
|
1737
|
+
* @param payload - Participant identifier to remove
|
|
1738
|
+
* @returns Promise<TaskResponse>
|
|
1739
|
+
* @example
|
|
1740
|
+
* ```typescript
|
|
1741
|
+
* await task.dropConferenceParticipant({participantId: 'participant-id'});
|
|
1742
|
+
* ```
|
|
1743
|
+
*/
|
|
1744
|
+
dropConferenceParticipant(payload: DropConferenceParticipantPayload): Promise<TaskResponse>;
|
|
1693
1745
|
/**
|
|
1694
1746
|
* Exits from an ongoing conference.
|
|
1695
1747
|
* @returns Promise<TaskResponse>
|
|
@@ -1721,14 +1773,28 @@ export interface ITask extends IEventEmitter {
|
|
|
1721
1773
|
*/
|
|
1722
1774
|
switchCall(): Promise<TaskResponse>;
|
|
1723
1775
|
/**
|
|
1724
|
-
* Toggles mute/unmute for the
|
|
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.
|
|
1725
1780
|
* @returns Promise<void>
|
|
1726
1781
|
* @example
|
|
1727
1782
|
* ```typescript
|
|
1728
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' });
|
|
1729
1795
|
* ```
|
|
1730
1796
|
*/
|
|
1731
|
-
|
|
1797
|
+
transmitDtmf(options: TaskTransmitDtmfOptions): Promise<void>;
|
|
1732
1798
|
}
|
|
1733
1799
|
/**
|
|
1734
1800
|
* Interface for managing digital channel task operations in the contact center
|
|
@@ -1762,6 +1828,12 @@ export interface IVoice extends ITask {
|
|
|
1762
1828
|
* ```
|
|
1763
1829
|
*/
|
|
1764
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;
|
|
1765
1837
|
}
|
|
1766
1838
|
/**
|
|
1767
1839
|
* Configuration options for voice task UI controls
|
|
@@ -1771,6 +1843,9 @@ export type VoiceUIControlOptions = {
|
|
|
1771
1843
|
isEndConsultEnabled?: boolean;
|
|
1772
1844
|
voiceVariant?: VoiceVariant;
|
|
1773
1845
|
isRecordingEnabled?: boolean;
|
|
1846
|
+
enableWxBetterTogether?: boolean;
|
|
1847
|
+
consultTransferConfig?: ConsultTransferDestinationConfig;
|
|
1848
|
+
answerCallOnWebexService?: import('../AnswerCallOnWebexService').default;
|
|
1774
1849
|
};
|
|
1775
1850
|
/**
|
|
1776
1851
|
* Participant information for UI display
|
|
@@ -1793,7 +1868,7 @@ export interface IWebRTC extends IVoice {
|
|
|
1793
1868
|
* task.toggleMute();
|
|
1794
1869
|
* ```
|
|
1795
1870
|
*/
|
|
1796
|
-
toggleMute(): Promise<void>;
|
|
1871
|
+
toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
|
|
1797
1872
|
/**
|
|
1798
1873
|
* Decline the incoming task for Browser Login
|
|
1799
1874
|
*
|
|
@@ -1817,6 +1892,8 @@ export type WebSocketPayload = TaskData & {
|
|
|
1817
1892
|
type: string;
|
|
1818
1893
|
mediaResourceId?: string;
|
|
1819
1894
|
reason?: string;
|
|
1895
|
+
/** ContactEnded: party that ended the contact (e.g. 'Agent', 'Customer') */
|
|
1896
|
+
terminatingParty?: string;
|
|
1820
1897
|
/**
|
|
1821
1898
|
* Optional real-time transcript chunk payload.
|
|
1822
1899
|
* Present on REAL_TIME_TRANSCRIPTION notifications.
|
|
@@ -1,25 +1,57 @@
|
|
|
1
1
|
import routingContact from '../contact';
|
|
2
|
-
import { ConsultPayload, ConsultEndPayload, ResumeRecordingPayload, TaskData, TaskResponse, IVoice, VoiceUIControlOptions, TransferPayLoad } from '../types';
|
|
2
|
+
import { ConsultPayload, ConsultEndPayload, ResumeRecordingPayload, TaskData, TaskResponse, DropConferenceParticipantPayload, IVoice, VoiceUIControlOptions, TaskToggleMuteOptions, TaskTransmitDtmfOptions, TransferPayLoad } from '../types';
|
|
3
3
|
import Task from '../Task';
|
|
4
4
|
import { TaskActionArgs } from '../state-machine';
|
|
5
5
|
import { WrapupData } from '../../config/types';
|
|
6
6
|
export default class Voice extends Task implements IVoice {
|
|
7
|
+
private static readonly WXAPP_MUTE_SYNC_RETRY_DELAY_MS;
|
|
8
|
+
private static readonly WXAPP_MUTE_SYNC_MAX_RETRIES;
|
|
9
|
+
private answerCallOnWebexService?;
|
|
10
|
+
private enableWxBetterTogether;
|
|
11
|
+
private wxAppMuted;
|
|
12
|
+
private wxAppAnswerPending;
|
|
13
|
+
private wxAppAcceptInFlight;
|
|
14
|
+
private wxAppMuteSyncInFlight?;
|
|
15
|
+
private wxAppMuteToggleInFlight?;
|
|
7
16
|
constructor(contact: ReturnType<typeof routingContact>, data: TaskData, callOptions?: VoiceUIControlOptions, wrapupData?: WrapupData, agentId?: string);
|
|
17
|
+
private getWxAppVoiceDependencies;
|
|
18
|
+
/** @deprecated Use {@link Voice.getWxAppVoiceDependencies} */
|
|
19
|
+
private getWxAppVoiceDeps;
|
|
20
|
+
isWebexAppCallingOffer(): boolean;
|
|
21
|
+
isWebexAppInboundCallingOffer(): boolean;
|
|
22
|
+
private setWxAppAnswerPending;
|
|
23
|
+
private setWxAppAcceptInFlight;
|
|
24
|
+
setEnableWxBetterTogether(enabled: boolean): void;
|
|
25
|
+
applyWxAppMuteStateFromSync(incomingCallId: string, muted: boolean): void;
|
|
26
|
+
getWxAppMuted(): boolean;
|
|
27
|
+
private static delay;
|
|
28
|
+
private canRetryWxAppMuteSync;
|
|
29
|
+
private shouldSkipWxAppMuteSync;
|
|
30
|
+
private applyWxAppMuteFromBackfill;
|
|
31
|
+
syncWxAppMuteFromCallDetails(retryAttempt?: number): Promise<boolean | undefined>;
|
|
32
|
+
private performWxAppMuteSync;
|
|
33
|
+
protected onTaskAssigned(): void;
|
|
34
|
+
protected onTaskHydrated(): void;
|
|
35
|
+
getCallingDeviceDetails(): import("../WebexCallingUtils").WebexCallingDeviceDetails;
|
|
36
|
+
getWebexCallingCallId(): string | null;
|
|
37
|
+
private createWxAppLifecycle;
|
|
8
38
|
private getStateMachineSnapshot;
|
|
9
39
|
/**
|
|
10
|
-
*
|
|
11
|
-
* It is expected to be overridden by child classes.
|
|
12
|
-
* @returns Promise<TaskResponse>
|
|
13
|
-
* @throws Error
|
|
40
|
+
* Accepts the task. Routes to wxApp telephony answer when `enableWxBetterTogether` and wxApp offer.
|
|
14
41
|
*/
|
|
15
42
|
accept(): Promise<TaskResponse>;
|
|
16
43
|
/**
|
|
17
|
-
*
|
|
18
|
-
* It is expected to be overridden by child classes.
|
|
19
|
-
* @returns Promise<TaskResponse>
|
|
20
|
-
* @throws Error
|
|
44
|
+
* Declines the task. Routes wxApp inbound to telephony reject; wxApp outdial offer to cancelTask.
|
|
21
45
|
*/
|
|
22
46
|
decline(): Promise<TaskResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Toggles mute for wxApp engaged telephony when `enableWxBetterTogether` is active.
|
|
49
|
+
*/
|
|
50
|
+
toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Sends in-call DTMF for wxApp engaged telephony when `enableWxBetterTogether` is active.
|
|
53
|
+
*/
|
|
54
|
+
transmitDtmf(options: TaskTransmitDtmfOptions): Promise<void>;
|
|
23
55
|
/**
|
|
24
56
|
* This is used to hold the task.
|
|
25
57
|
* @returns Promise<TaskResponse>
|
|
@@ -121,6 +153,13 @@ export default class Voice extends Task implements IVoice {
|
|
|
121
153
|
* Start a consult conference, merging main and consult calls.
|
|
122
154
|
*/
|
|
123
155
|
consultConference(): Promise<TaskResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Removes another participant from an active conference.
|
|
158
|
+
* Completion is correlated with ParticipantLeftConference by the AQM request layer.
|
|
159
|
+
* @param payload - Participant identifier to remove
|
|
160
|
+
* @returns Promise<TaskResponse>
|
|
161
|
+
*/
|
|
162
|
+
dropConferenceParticipant(payload: DropConferenceParticipantPayload): Promise<TaskResponse>;
|
|
124
163
|
/**
|
|
125
164
|
* Exit from a conference call.
|
|
126
165
|
* Per conference-spec.md:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import routingContact from '../contact';
|
|
2
|
-
import { TaskData, TaskResponse, IWebRTC, VoiceUIControlOptions } from '../types';
|
|
2
|
+
import { TaskData, TaskResponse, IWebRTC, VoiceUIControlOptions, TaskToggleMuteOptions } from '../types';
|
|
3
3
|
import Voice from './Voice';
|
|
4
4
|
import WebCallingService from '../../WebCallingService';
|
|
5
5
|
import { WrapupData } from '../../config/types';
|
|
@@ -49,5 +49,5 @@ export default class WebRTC extends Voice implements IWebRTC {
|
|
|
49
49
|
* task.toggleMute().then(()=>{}).catch(()=>{})
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
toggleMute(): Promise<void>;
|
|
52
|
+
toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
|
|
53
53
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import AnswerCallOnWebexService from '../../AnswerCallOnWebexService';
|
|
2
|
+
import { TaskData, TaskToggleMuteOptions, TaskTransmitDtmfOptions } from '../types';
|
|
3
|
+
import { TaskState } from '../state-machine';
|
|
4
|
+
import { WebexCallingDeviceDetails } from '../WebexCallingUtils';
|
|
5
|
+
export type WxAppVoiceDependencies = {
|
|
6
|
+
enableWxBetterTogether: boolean;
|
|
7
|
+
answerCallOnWebexService?: AnswerCallOnWebexService;
|
|
8
|
+
agentId?: string;
|
|
9
|
+
getTaskData: () => TaskData;
|
|
10
|
+
getTaskState: () => TaskState | undefined;
|
|
11
|
+
getWxAppMuted: () => boolean;
|
|
12
|
+
setWxAppMuted: (muted: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
/** @deprecated Use {@link WxAppVoiceDependencies} */
|
|
15
|
+
export type WxAppVoiceDeps = WxAppVoiceDependencies;
|
|
16
|
+
export type WxAppVoiceLifecycle = {
|
|
17
|
+
setWxAppAcceptInFlight: (inFlight: boolean) => void;
|
|
18
|
+
setWxAppAnswerPending: (pending: boolean) => void;
|
|
19
|
+
resetWxAppMuted: () => void;
|
|
20
|
+
syncWxAppMuteFromCallDetails: () => Promise<boolean | undefined>;
|
|
21
|
+
mapWxAppVoiceError: (error: unknown, method: string) => never;
|
|
22
|
+
};
|
|
23
|
+
export declare function getCallingDeviceDetails(deps: WxAppVoiceDependencies): WebexCallingDeviceDetails | undefined;
|
|
24
|
+
export declare function isWebexAppCallingOffer(deps: WxAppVoiceDependencies): boolean;
|
|
25
|
+
/** Inbound wxApp offer only — outdial decline uses CC routing, not telephony reject. */
|
|
26
|
+
export declare function isWebexAppInboundCallingOffer(deps: WxAppVoiceDependencies): boolean;
|
|
27
|
+
export declare function getWebexCallingCallId(deps: WxAppVoiceDependencies): string | null;
|
|
28
|
+
export declare function getWxAppLineOwnerId(deps: WxAppVoiceDependencies): string | undefined;
|
|
29
|
+
export declare function resolveWxAppLineOwnerId(deps: WxAppVoiceDependencies, override?: string): string | undefined;
|
|
30
|
+
export declare function acceptOnWebex(deps: WxAppVoiceDependencies, options?: {
|
|
31
|
+
lineOwnerId?: string;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
export declare function rejectOnWebex(deps: WxAppVoiceDependencies, options?: {
|
|
34
|
+
lineOwnerId?: string;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
export declare function toggleMuteOnWebex(deps: WxAppVoiceDependencies, options?: {
|
|
37
|
+
lineOwnerId?: string;
|
|
38
|
+
muted?: boolean;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
export declare function transmitDtmfOnWebex(deps: WxAppVoiceDependencies, options: {
|
|
41
|
+
dtmf: string;
|
|
42
|
+
lineOwnerId?: string;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
export declare function runWxAppAccept(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: {
|
|
45
|
+
lineOwnerId?: string;
|
|
46
|
+
}): Promise<void>;
|
|
47
|
+
export declare function runWxAppReject(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: {
|
|
48
|
+
lineOwnerId?: string;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
export declare function runWxAppToggleMute(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: TaskToggleMuteOptions): Promise<void>;
|
|
51
|
+
export declare function runWxAppTransmitDtmf(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options: TaskTransmitDtmfOptions): Promise<void>;
|
|
52
|
+
export declare function mapWxAppVoiceError(error: unknown, method: string, module: string): never;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -108,6 +108,8 @@ export interface CCPluginConfig {
|
|
|
108
108
|
callingClientConfig: CallingClientConfig;
|
|
109
109
|
/** Whether to skip Mobius/WebRTC registration for browser login flows */
|
|
110
110
|
disableWebRTCRegistration?: boolean;
|
|
111
|
+
/** Whether wxApp Better Together (telephony REST + usersub) is enabled at init (WXCC-6026) */
|
|
112
|
+
enableWxBetterTogether?: boolean;
|
|
111
113
|
}
|
|
112
114
|
/**
|
|
113
115
|
* Logger interface for standardized logging throughout the plugin.
|
|
@@ -366,24 +368,26 @@ export type AgentLogin = {
|
|
|
366
368
|
export type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;
|
|
367
369
|
/**
|
|
368
370
|
* Represents the options to fetch buddy agents for the logged in agent.
|
|
369
|
-
* Buddy agents are other agents who can be consulted or
|
|
371
|
+
* Buddy agents are other agents who can be consulted or transferred to.
|
|
370
372
|
* @public
|
|
371
373
|
* @example
|
|
372
374
|
* const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
|
|
373
|
-
* @ignore
|
|
374
375
|
*/
|
|
375
376
|
export type BuddyAgents = {
|
|
376
377
|
/**
|
|
377
|
-
* The media type channel to filter buddy agents.
|
|
378
|
-
* Determines which channel capability the returned agents must have.
|
|
378
|
+
* The media type channel to filter buddy agents. Defaults to telephony when omitted.
|
|
379
379
|
*/
|
|
380
|
-
mediaType
|
|
380
|
+
mediaType?: 'telephony' | 'chat' | 'social' | 'email';
|
|
381
381
|
/**
|
|
382
382
|
* Optional filter for agent state.
|
|
383
383
|
* If specified, returns only agents in that state.
|
|
384
384
|
* If omitted, returns both available and idle agents.
|
|
385
385
|
*/
|
|
386
386
|
state?: 'Available' | 'Idle';
|
|
387
|
+
/**
|
|
388
|
+
* Applies the default state policy for the operation. An explicit state takes precedence.
|
|
389
|
+
*/
|
|
390
|
+
action?: 'Consult' | 'Transfer';
|
|
387
391
|
};
|
|
388
392
|
/**
|
|
389
393
|
|
|
@@ -464,10 +468,12 @@ export interface AddressBookEntrySearchParams extends BaseSearchParams {
|
|
|
464
468
|
export interface EntryPointRecord {
|
|
465
469
|
id: string;
|
|
466
470
|
name: string;
|
|
471
|
+
/** Dialled number mapped to this entry point when included in the list response. */
|
|
472
|
+
number?: string;
|
|
467
473
|
description?: string;
|
|
468
|
-
type
|
|
469
|
-
isActive
|
|
470
|
-
orgId
|
|
474
|
+
type?: string;
|
|
475
|
+
isActive?: boolean;
|
|
476
|
+
orgId?: string;
|
|
471
477
|
createdAt?: string;
|
|
472
478
|
updatedAt?: string;
|
|
473
479
|
settings?: Record<string, any>;
|
|
@@ -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.js
CHANGED
|
@@ -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
|
|
@@ -228,11 +234,10 @@ const LoginOption = exports.LoginOption = {
|
|
|
228
234
|
|
|
229
235
|
/**
|
|
230
236
|
* Represents the options to fetch buddy agents for the logged in agent.
|
|
231
|
-
* Buddy agents are other agents who can be consulted or
|
|
237
|
+
* Buddy agents are other agents who can be consulted or transferred to.
|
|
232
238
|
* @public
|
|
233
239
|
* @example
|
|
234
240
|
* const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
|
|
235
|
-
* @ignore
|
|
236
241
|
*/
|
|
237
242
|
|
|
238
243
|
/**
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","RealTimeAssistanceUserActionId","LIKE","DISLIKE","COPY","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL","SUGGESTED_RESPONSES_USER_ACTION"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {\n AIFeatureFlags,\n Profile,\n CreateUserPreferenceRequest,\n UpdateUserPreferenceRequest,\n} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n /** Whether to skip Mobius/WebRTC registration for browser login flows */\n disableWebRTCRegistration?: boolean;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Check if current environment is INT (integration) */\n isIntegrationEnvironment: () => boolean;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload\n | Contact.PreviewContactPayload\n | CreateUserPreferenceRequest\n | UpdateUserPreferenceRequest;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transfered to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n * @ignore\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents.\n * Determines which channel capability the returned agents must have.\n */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n description?: string;\n type: string;\n isActive: boolean;\n orgId: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request AI Assistant real-time assistance.\n * @public\n * @example\n * const params: RealTimeAssistanceParams = {\n * interactionId: 'interaction-123',\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type RealTimeAssistanceParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which assistance should be generated */\n interactionId: string;\n /** Optional additional context that should refine the assistance */\n context?: string;\n /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported user actions on an AI Assistant real-time assistance adaptive card.\n * @public\n */\nexport const RealTimeAssistanceUserActionId = {\n /** User liked the real-time assistance response */\n LIKE: 'likeButton',\n /** User disliked the real-time assistance response */\n DISLIKE: 'dislikeButton',\n /** User copied the real-time assistance response */\n COPY: 'copyButton',\n} as const;\n\n/**\n * Union type of supported real-time assistance user actions.\n * @public\n */\nexport type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;\n\n/**\n * Parameters used to send user action feedback for a real-time assistance adaptive card.\n * @public\n * @example\n * const params: RealTimeAssistanceUserActionParams = {\n * agentId: 'agent-123',\n * interactionId: 'interaction-123',\n * adaptiveCardId: 'adaptive-card-123',\n * actionId: RealTimeAssistanceUserActionId.LIKE,\n * };\n */\nexport type RealTimeAssistanceUserActionParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier associated with the real-time assistance response */\n interactionId: string;\n /** Adaptive card identifier from the real-time assistance payload */\n adaptiveCardId: string;\n /** User action performed on the adaptive card */\n actionId: RealTimeAssistanceUserActionId;\n /** Optional language code. Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n /** User action on a suggested response adaptive card */\n SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAuFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAgBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACO,MAAMC,8BAA8B,GAAAX,OAAA,CAAAW,8BAAA,GAAG;EAC5C;EACAC,IAAI,EAAE,YAAY;EAClB;EACAC,OAAO,EAAE,eAAe;EACxB;EACAC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAf,OAAA,CAAAe,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAlB,OAAA,CAAAkB,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE,6BAA6B;EAC1D;EACAC,+BAA+B,EAAE;AACnC,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","RealTimeAssistanceUserActionId","LIKE","DISLIKE","COPY","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL","SUGGESTED_RESPONSES_USER_ACTION"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {\n AIFeatureFlags,\n Profile,\n CreateUserPreferenceRequest,\n UpdateUserPreferenceRequest,\n} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Mercury event handler callback.\n * @internal\n * @ignore\n */\ntype MercuryEventHandler = (data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string, handler?: MercuryEventHandler) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n /** Whether to skip Mobius/WebRTC registration for browser login flows */\n disableWebRTCRegistration?: boolean;\n /** Whether wxApp Better Together (telephony REST + usersub) is enabled at init (WXCC-6026) */\n enableWxBetterTogether?: boolean;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n /** Whether the device is registered with WDM */\n registered?: boolean;\n /** Register the device with WDM */\n register?: () => Promise<void>;\n /** Unregister the device from WDM */\n unregister?: () => Promise<void>;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Check if current environment is INT (integration) */\n isIntegrationEnvironment: () => boolean;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload\n | Contact.PreviewContactPayload\n | CreateUserPreferenceRequest\n | UpdateUserPreferenceRequest;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transferred to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents. Defaults to telephony when omitted.\n */\n mediaType?: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n\n /**\n * Applies the default state policy for the operation. An explicit state takes precedence.\n */\n action?: 'Consult' | 'Transfer';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /** Agent-profile policy used to derive task consult/transfer destination controls. */\n consultTransfer?: Contact.ConsultTransferDestinationConfig;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n /** Whether wxApp thick-client answer controls/APIs are enabled (WXCC-6026) */\n enableWxBetterTogether?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n /** Dialled number mapped to this entry point when included in the list response. */\n number?: string;\n description?: string;\n type?: string;\n isActive?: boolean;\n orgId?: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request AI Assistant real-time assistance.\n * @public\n * @example\n * const params: RealTimeAssistanceParams = {\n * interactionId: 'interaction-123',\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type RealTimeAssistanceParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which assistance should be generated */\n interactionId: string;\n /** Optional additional context that should refine the assistance */\n context?: string;\n /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported user actions on an AI Assistant real-time assistance adaptive card.\n * @public\n */\nexport const RealTimeAssistanceUserActionId = {\n /** User liked the real-time assistance response */\n LIKE: 'likeButton',\n /** User disliked the real-time assistance response */\n DISLIKE: 'dislikeButton',\n /** User copied the real-time assistance response */\n COPY: 'copyButton',\n} as const;\n\n/**\n * Union type of supported real-time assistance user actions.\n * @public\n */\nexport type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;\n\n/**\n * Parameters used to send user action feedback for a real-time assistance adaptive card.\n * @public\n * @example\n * const params: RealTimeAssistanceUserActionParams = {\n * agentId: 'agent-123',\n * interactionId: 'interaction-123',\n * adaptiveCardId: 'adaptive-card-123',\n * actionId: RealTimeAssistanceUserActionId.LIKE,\n * };\n */\nexport type RealTimeAssistanceUserActionParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier associated with the real-time assistance response */\n interactionId: string;\n /** Adaptive card identifier from the real-time assistance payload */\n adaptiveCardId: string;\n /** User action performed on the adaptive card */\n actionId: RealTimeAssistanceUserActionId;\n /** Optional language code. Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n /** User action on a suggested response adaptive card */\n SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AA6FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAkBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACO,MAAMC,8BAA8B,GAAAX,OAAA,CAAAW,8BAAA,GAAG;EAC5C;EACAC,IAAI,EAAE,YAAY;EAClB;EACAC,OAAO,EAAE,eAAe;EACxB;EACAC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAf,OAAA,CAAAe,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAlB,OAAA,CAAAkB,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE,6BAA6B;EAC1D;EACAC,+BAA+B,EAAE;AACnC,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|