@webex/contact-center 3.10.0-next.2 → 3.10.0-next.21
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/dist/cc.js +13 -1
- package/dist/cc.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/logger-proxy.js.map +1 -1
- package/dist/metrics/MetricsManager.js +2 -1
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +12 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +4 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +2 -3
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/EntryPoint.js +2 -3
- package/dist/services/EntryPoint.js.map +1 -1
- package/dist/services/Queue.js +2 -3
- package/dist/services/Queue.js.map +1 -1
- package/dist/services/WebCallingService.js +1 -1
- package/dist/services/WebCallingService.js.map +1 -1
- package/dist/services/agent/index.js +1 -2
- package/dist/services/agent/index.js.map +1 -1
- package/dist/services/agent/types.js +10 -0
- package/dist/services/agent/types.js.map +1 -1
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +1 -1
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +2 -2
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/GlobalTypes.js.map +1 -1
- package/dist/services/core/Utils.js +92 -74
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/WebexRequest.js +1 -2
- package/dist/services/core/WebexRequest.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +2 -3
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +17 -1
- package/dist/services/core/constants.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +1 -2
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/connection-service.js +1 -1
- package/dist/services/core/websocket/connection-service.js.map +1 -1
- package/dist/services/core/websocket/keepalive.worker.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/AutoWrapup.js +1 -1
- package/dist/services/task/AutoWrapup.js.map +1 -1
- package/dist/services/task/TaskManager.js +177 -56
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +122 -5
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +3 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +0 -2
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/index.js +46 -40
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +377 -4
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/services/config/types.d.ts +4 -4
- package/dist/types/services/core/Utils.d.ts +32 -17
- package/dist/types/services/core/constants.d.ts +14 -0
- package/dist/types/services/task/TaskUtils.d.ts +59 -3
- package/dist/types/services/task/constants.d.ts +2 -0
- package/dist/types/services/task/types.d.ts +57 -13
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +1 -1
- package/dist/utils/PageCache.js.map +1 -1
- package/dist/webex-config.js.map +1 -1
- package/dist/webex.js +2 -2
- package/dist/webex.js.map +1 -1
- package/package.json +8 -8
- package/src/cc.ts +12 -0
- package/src/index.ts +1 -0
- package/src/metrics/behavioral-events.ts +12 -0
- package/src/metrics/constants.ts +4 -0
- package/src/services/config/types.ts +2 -2
- package/src/services/core/Utils.ts +101 -85
- package/src/services/core/constants.ts +16 -0
- package/src/services/task/TaskManager.ts +204 -36
- package/src/services/task/TaskUtils.ts +145 -5
- package/src/services/task/constants.ts +2 -0
- package/src/services/task/index.ts +50 -63
- package/src/services/task/types.ts +60 -13
- package/test/unit/spec/cc.ts +1 -0
- package/test/unit/spec/metrics/behavioral-events.ts +14 -0
- package/test/unit/spec/services/core/Utils.ts +262 -31
- package/test/unit/spec/services/task/TaskManager.ts +748 -5
- package/test/unit/spec/services/task/TaskUtils.ts +311 -9
- package/test/unit/spec/services/task/index.ts +323 -68
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
package/dist/types/cc.d.ts
CHANGED
|
@@ -274,6 +274,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
274
274
|
* @param {ITask} task The task object to be hydrated with additional data
|
|
275
275
|
*/
|
|
276
276
|
private handleTaskHydrate;
|
|
277
|
+
/**
|
|
278
|
+
* Handles task merged events when tasks are combined eg: EPDN merge/transfer
|
|
279
|
+
* @private
|
|
280
|
+
* @param {ITask} task The task object that has been merged
|
|
281
|
+
*/
|
|
282
|
+
private handleTaskMerged;
|
|
277
283
|
/**
|
|
278
284
|
* Sets up event listeners for incoming tasks and task hydration
|
|
279
285
|
* Subscribes to task events from the task manager
|
package/dist/types/index.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ SetStateResponse, } from './types';
|
|
|
92
92
|
/** Task related types */
|
|
93
93
|
export type { AgentContact,
|
|
94
94
|
/** Task interface */
|
|
95
|
-
ITask, TaskData,
|
|
95
|
+
ITask, Interaction, TaskData,
|
|
96
96
|
/** Task response */
|
|
97
97
|
TaskResponse, ConsultPayload, ConsultEndPayload, ConsultTransferPayLoad,
|
|
98
98
|
/** Dialer payload */
|
|
@@ -48,6 +48,8 @@ type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
|
48
48
|
* @property {string} TASK_PAUSE_RECORDING_FAILED - Event name for failed pause of recording.
|
|
49
49
|
* @property {string} TASK_ACCEPT_CONSULT_SUCCESS - Event name for successful consult acceptance.
|
|
50
50
|
* @property {string} TASK_ACCEPT_CONSULT_FAILED - Event name for failed consult acceptance.
|
|
51
|
+
* @property {string} TASK_AUTO_ANSWER_SUCCESS - Event name for successful auto-answer.
|
|
52
|
+
* @property {string} TASK_AUTO_ANSWER_FAILED - Event name for failed auto-answer.
|
|
51
53
|
*
|
|
52
54
|
* @property {string} TASK_CONFERENCE_START_SUCCESS - Event name for successful conference start.
|
|
53
55
|
* @property {string} TASK_CONFERENCE_START_FAILED - Event name for failed conference start.
|
|
@@ -112,6 +114,8 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
112
114
|
readonly TASK_PAUSE_RECORDING_FAILED: "Task Pause Recording Failed";
|
|
113
115
|
readonly TASK_ACCEPT_CONSULT_SUCCESS: "Task Accept Consult Success";
|
|
114
116
|
readonly TASK_ACCEPT_CONSULT_FAILED: "Task Accept Consult Failed";
|
|
117
|
+
readonly TASK_AUTO_ANSWER_SUCCESS: "Task Auto Answer Success";
|
|
118
|
+
readonly TASK_AUTO_ANSWER_FAILED: "Task Auto Answer Failed";
|
|
115
119
|
readonly TASK_CONFERENCE_START_SUCCESS: "Task Conference Start Success";
|
|
116
120
|
readonly TASK_CONFERENCE_START_FAILED: "Task Conference Start Failed";
|
|
117
121
|
readonly TASK_CONFERENCE_END_SUCCESS: "Task Conference End Success";
|
|
@@ -56,8 +56,6 @@ export declare const CC_TASK_EVENTS: {
|
|
|
56
56
|
readonly AGENT_CONFERENCE_TRANSFERRED: "AgentConferenceTransferred";
|
|
57
57
|
/** Event emitted when conference transfer fails */
|
|
58
58
|
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
59
|
-
/** Event emitted when consulted participant is moving/being transferred */
|
|
60
|
-
readonly CONSULTED_PARTICIPANT_MOVING: "ConsultedParticipantMoving";
|
|
61
59
|
/** Event emitted for post-call activity by participant */
|
|
62
60
|
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
63
61
|
/** Event emitted when contact is blind transferred */
|
|
@@ -84,6 +82,8 @@ export declare const CC_TASK_EVENTS: {
|
|
|
84
82
|
readonly CONTACT_RECORDING_RESUME_FAILED: "ContactRecordingResumeFailed";
|
|
85
83
|
/** Event emitted when contact ends */
|
|
86
84
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
85
|
+
/** Event emitted when contact is merged */
|
|
86
|
+
readonly CONTACT_MERGED: "ContactMerged";
|
|
87
87
|
/** Event emitted when ending contact fails */
|
|
88
88
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
89
89
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -205,8 +205,6 @@ export declare const CC_EVENTS: {
|
|
|
205
205
|
readonly AGENT_CONFERENCE_TRANSFERRED: "AgentConferenceTransferred";
|
|
206
206
|
/** Event emitted when conference transfer fails */
|
|
207
207
|
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
208
|
-
/** Event emitted when consulted participant is moving/being transferred */
|
|
209
|
-
readonly CONSULTED_PARTICIPANT_MOVING: "ConsultedParticipantMoving";
|
|
210
208
|
/** Event emitted for post-call activity by participant */
|
|
211
209
|
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
212
210
|
/** Event emitted when contact is blind transferred */
|
|
@@ -233,6 +231,8 @@ export declare const CC_EVENTS: {
|
|
|
233
231
|
readonly CONTACT_RECORDING_RESUME_FAILED: "ContactRecordingResumeFailed";
|
|
234
232
|
/** Event emitted when contact ends */
|
|
235
233
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
234
|
+
/** Event emitted when contact is merged */
|
|
235
|
+
readonly CONTACT_MERGED: "ContactMerged";
|
|
236
236
|
/** Event emitted when ending contact fails */
|
|
237
237
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
238
238
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Err from './Err';
|
|
2
2
|
import { LoginOption, WebexRequestPayload } from '../../types';
|
|
3
3
|
import { Failure, AugmentedError } from './GlobalTypes';
|
|
4
|
-
import { TaskData, ConsultTransferPayLoad,
|
|
4
|
+
import { TaskData, ConsultTransferPayLoad, Interaction } from '../task/types';
|
|
5
5
|
export declare const isValidDialNumber: (input: string) => boolean;
|
|
6
6
|
export declare const getStationLoginErrorData: (failure: Failure, loginOption: LoginOption) => {
|
|
7
7
|
message: any;
|
|
@@ -51,25 +51,40 @@ export declare const generateTaskErrorObject: (error: any, methodName: string, m
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const createErrDetailsObject: (errObj: WebexRequestPayload) => Err.Details<"Service.reqs.generic.failure">;
|
|
53
53
|
/**
|
|
54
|
-
* Gets the
|
|
55
|
-
*
|
|
54
|
+
* Gets the consulted agent ID from the media object by finding the agent
|
|
55
|
+
* in the consult media participants (excluding the current agent).
|
|
56
56
|
*
|
|
57
|
-
* @param
|
|
57
|
+
* @param media - The media object from the interaction
|
|
58
58
|
* @param agentId - The current agent's ID to exclude from the search
|
|
59
|
-
* @returns The
|
|
59
|
+
* @returns The consulted agent ID, or empty string if none found
|
|
60
60
|
*/
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const deriveConsultTransferDestinationType: (taskData?: TaskData) => ConsultTransferPayLoad['destinationType'];
|
|
61
|
+
export declare const getConsultedAgentId: (media: Interaction['media'], agentId: string) => string;
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* Gets the destination agent ID for CBT (Capacity Based Team) scenarios.
|
|
64
|
+
* CBT refers to teams created in Control Hub with capacity-based routing
|
|
65
|
+
* (as opposed to agent-based routing). This handles cases where the consulted
|
|
66
|
+
* participant is not directly in participants but can be found by matching
|
|
67
|
+
* the dial number (dn).
|
|
66
68
|
*
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
69
|
-
* @returns
|
|
70
|
-
* @public
|
|
69
|
+
* @param interaction - The interaction object
|
|
70
|
+
* @param consultingAgent - The consulting agent identifier
|
|
71
|
+
* @returns The destination agent ID for CBT scenarios, or empty string if none found
|
|
71
72
|
*/
|
|
72
|
-
export declare const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
export declare const getDestAgentIdForCBT: (interaction: Interaction, consultingAgent: string) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Calculates the destination agent ID for consult operations.
|
|
76
|
+
*
|
|
77
|
+
* @param interaction - The interaction object
|
|
78
|
+
* @param agentId - The current agent's ID
|
|
79
|
+
* @returns The destination agent ID
|
|
80
|
+
*/
|
|
81
|
+
export declare const calculateDestAgentId: (interaction: Interaction, agentId: string) => string;
|
|
82
|
+
/**
|
|
83
|
+
* Calculates the destination agent ID for fetching destination type.
|
|
84
|
+
*
|
|
85
|
+
* @param interaction - The interaction object
|
|
86
|
+
* @param agentId - The current agent's ID
|
|
87
|
+
* @returns The destination agent ID for determining destination type
|
|
88
|
+
*/
|
|
89
|
+
export declare const calculateDestType: (interaction: Interaction, agentId: string) => string;
|
|
90
|
+
export declare const deriveConsultTransferDestinationType: (taskData?: TaskData) => ConsultTransferPayLoad['destinationType'];
|
|
@@ -53,6 +53,20 @@ export declare const CONNECTIVITY_CHECK_INTERVAL = 5000;
|
|
|
53
53
|
* @ignore
|
|
54
54
|
*/
|
|
55
55
|
export declare const CLOSE_SOCKET_TIMEOUT = 16000;
|
|
56
|
+
/**
|
|
57
|
+
* Constants for participant types, destination types, and interaction states
|
|
58
|
+
* @ignore
|
|
59
|
+
*/
|
|
60
|
+
export declare const PARTICIPANT_TYPES: {
|
|
61
|
+
/** Participant type for Entry Point Dial Number */
|
|
62
|
+
EP_DN: string;
|
|
63
|
+
/** Participant type for dial number */
|
|
64
|
+
DN: string;
|
|
65
|
+
/** Participant type for Agent */
|
|
66
|
+
AGENT: string;
|
|
67
|
+
};
|
|
68
|
+
/** Interaction state for consultation */
|
|
69
|
+
export declare const STATE_CONSULT = "consult";
|
|
56
70
|
export declare const METHODS: {
|
|
57
71
|
REQUEST: string;
|
|
58
72
|
UPLOAD_LOGS: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITask } from './types';
|
|
1
|
+
import { Interaction, ITask, TaskData } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Determines if the given agent is the primary agent (owner) of the task
|
|
4
4
|
* @param task - The task to check
|
|
@@ -22,7 +22,63 @@ export declare const isParticipantInMainInteraction: (task: ITask, agentId: stri
|
|
|
22
22
|
export declare const checkParticipantNotInInteraction: (task: ITask, agentId: string) => boolean;
|
|
23
23
|
/**
|
|
24
24
|
* Determines if a conference is currently in progress based on the number of active agent participants
|
|
25
|
-
* @param
|
|
25
|
+
* @param TaskData - The payLoad data to check for conference status
|
|
26
26
|
* @returns true if there are 2 or more active agent participants in the main call, false otherwise
|
|
27
27
|
*/
|
|
28
|
-
export declare const getIsConferenceInProgress: (
|
|
28
|
+
export declare const getIsConferenceInProgress: (data: TaskData) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Checks if the current agent is a secondary agent in a consultation scenario.
|
|
31
|
+
* Secondary agents are those who were consulted (not the original call owner).
|
|
32
|
+
* @param task - The task object containing interaction details
|
|
33
|
+
* @returns true if this is a secondary agent (consulted party), false otherwise
|
|
34
|
+
*/
|
|
35
|
+
export declare const isSecondaryAgent: (interaction: Interaction) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Checks if the current agent is a secondary EP-DN (Entry Point Dial Number) agent.
|
|
38
|
+
* This is specifically for telephony consultations to external numbers/entry points.
|
|
39
|
+
* @param task - The task object containing interaction details
|
|
40
|
+
* @returns true if this is a secondary EP-DN agent in telephony consultation, false otherwise
|
|
41
|
+
*/
|
|
42
|
+
export declare const isSecondaryEpDnAgent: (interaction: Interaction) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if auto-answer is enabled for the agent participant
|
|
45
|
+
* @param interaction - The interaction object
|
|
46
|
+
* @param agentId - Current agent ID
|
|
47
|
+
* @returns true if auto-answer is enabled, false otherwise
|
|
48
|
+
*/
|
|
49
|
+
export declare const isAutoAnswerEnabled: (interaction: Interaction, agentId: string) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Checks if the interaction is a WebRTC call eligible for auto-answer
|
|
52
|
+
* @param interaction - The interaction object
|
|
53
|
+
* @param loginOption - The agent's login option (BROWSER, AGENT_DN, etc.)
|
|
54
|
+
* @param webRtcEnabled - Whether WebRTC is enabled for the agent
|
|
55
|
+
* @returns true if this is a WebRTC call, false otherwise
|
|
56
|
+
*/
|
|
57
|
+
export declare const isWebRTCCall: (interaction: Interaction, loginOption: string, webRtcEnabled: boolean) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Checks if the interaction is a digital outbound (Email/SMS)
|
|
60
|
+
* @param interaction - The interaction object
|
|
61
|
+
* @returns true if this is a digital outbound, false otherwise
|
|
62
|
+
*/
|
|
63
|
+
export declare const isDigitalOutbound: (interaction: Interaction) => boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Checks if the outdial was initiated by the current agent
|
|
66
|
+
* @param interaction - The interaction object
|
|
67
|
+
* @param agentId - Current agent ID
|
|
68
|
+
* @returns true if agent initiated the outdial, false otherwise
|
|
69
|
+
*/
|
|
70
|
+
export declare const hasAgentInitiatedOutdial: (interaction: Interaction, agentId: string) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Determines if a task should be auto-answered based on interaction data
|
|
73
|
+
* Auto-answer logic handles:
|
|
74
|
+
* 1. WebRTC calls with auto-answer enabled in agent profile
|
|
75
|
+
* 2. Agent-initiated WebRTC outdial calls
|
|
76
|
+
* 3. Agent-initiated digital outbound (Email/SMS) without previous transfers
|
|
77
|
+
*
|
|
78
|
+
* @param taskData - The task data
|
|
79
|
+
* @param agentId - Current agent ID
|
|
80
|
+
* @param loginOption - Agent's login option
|
|
81
|
+
* @param webRtcEnabled - Whether WebRTC is enabled for the agent
|
|
82
|
+
* @returns true if task should be auto-answered, false otherwise
|
|
83
|
+
*/
|
|
84
|
+
export declare const shouldAutoAnswerTask: (taskData: TaskData, agentId: string, loginOption: string, webRtcEnabled: boolean) => boolean;
|
|
@@ -32,6 +32,8 @@ export declare const PRESERVED_TASK_DATA_FIELDS: {
|
|
|
32
32
|
WRAP_UP_REQUIRED: string;
|
|
33
33
|
/** Indicates if a conference is currently in progress (2+ active agents) */
|
|
34
34
|
IS_CONFERENCE_IN_PROGRESS: string;
|
|
35
|
+
/** Indicates if auto-answer is in progress for this task */
|
|
36
|
+
IS_AUTO_ANSWERING: string;
|
|
35
37
|
};
|
|
36
38
|
/**
|
|
37
39
|
* Array of task data field names that should not be deleted during reconciliation
|
|
@@ -313,6 +313,17 @@ export declare enum TASK_EVENTS {
|
|
|
313
313
|
* ```
|
|
314
314
|
*/
|
|
315
315
|
TASK_REJECT = "task:rejected",
|
|
316
|
+
/**
|
|
317
|
+
* Triggered when an outdial call fails
|
|
318
|
+
* @example
|
|
319
|
+
* ```typescript
|
|
320
|
+
* task.on(TASK_EVENTS.TASK_OUTDIAL_FAILED, (reason: string) => {
|
|
321
|
+
* console.log('Outdial failed:', reason);
|
|
322
|
+
* // Handle outdial failure
|
|
323
|
+
* });
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
326
|
+
TASK_OUTDIAL_FAILED = "task:outdialFailed",
|
|
316
327
|
/**
|
|
317
328
|
* Triggered when a task is populated with data
|
|
318
329
|
* @example
|
|
@@ -335,6 +346,21 @@ export declare enum TASK_EVENTS {
|
|
|
335
346
|
* ```
|
|
336
347
|
*/
|
|
337
348
|
TASK_OFFER_CONTACT = "task:offerContact",
|
|
349
|
+
/**
|
|
350
|
+
* Triggered when a task has been successfully auto-answered
|
|
351
|
+
* This event is emitted after the SDK automatically accepts a task due to:
|
|
352
|
+
* - WebRTC calls with auto-answer enabled
|
|
353
|
+
* - Agent-initiated outdial calls
|
|
354
|
+
* - Other auto-answer scenarios
|
|
355
|
+
* @example
|
|
356
|
+
* ```typescript
|
|
357
|
+
* task.on(TASK_EVENTS.TASK_AUTO_ANSWERED, (task: ITask) => {
|
|
358
|
+
* console.log('Task auto-answered:', task.data.interactionId);
|
|
359
|
+
* // Update UI - enable cancel button, etc.
|
|
360
|
+
* });
|
|
361
|
+
* ```
|
|
362
|
+
*/
|
|
363
|
+
TASK_AUTO_ANSWERED = "task:autoAnswered",
|
|
338
364
|
/**
|
|
339
365
|
* Triggered when a conference is being established
|
|
340
366
|
* @example
|
|
@@ -444,7 +470,29 @@ export declare enum TASK_EVENTS {
|
|
|
444
470
|
* });
|
|
445
471
|
* ```
|
|
446
472
|
*/
|
|
447
|
-
TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed"
|
|
473
|
+
TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
|
|
474
|
+
/**
|
|
475
|
+
* Triggered when a contact is merged
|
|
476
|
+
* @example
|
|
477
|
+
* ```typescript
|
|
478
|
+
* task.on(TASK_EVENTS.TASK_MERGED, (task: ITask) => {
|
|
479
|
+
* console.log('Contact merged:', task.data.interactionId);
|
|
480
|
+
* // Handle contact merge
|
|
481
|
+
* });
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
484
|
+
TASK_MERGED = "task:merged",
|
|
485
|
+
/**
|
|
486
|
+
* Triggered when a participant enters post-call activity state
|
|
487
|
+
* @example
|
|
488
|
+
* ```typescript
|
|
489
|
+
* task.on(TASK_EVENTS.TASK_POST_CALL_ACTIVITY, (task: ITask) => {
|
|
490
|
+
* console.log('Participant in post-call activity:', task.data.interactionId);
|
|
491
|
+
* // Handle post-call activity
|
|
492
|
+
* });
|
|
493
|
+
* ```
|
|
494
|
+
*/
|
|
495
|
+
TASK_POST_CALL_ACTIVITY = "task:postCallActivity"
|
|
448
496
|
}
|
|
449
497
|
/**
|
|
450
498
|
* Represents a customer interaction within the contact center system
|
|
@@ -590,6 +638,8 @@ export type Interaction = {
|
|
|
590
638
|
BLIND_TRANSFER_IN_PROGRESS?: boolean;
|
|
591
639
|
/** Desktop view configuration for Flow Control */
|
|
592
640
|
fcDesktopView?: string;
|
|
641
|
+
/** Agent ID who initiated the outdial call */
|
|
642
|
+
outdialAgentId?: string;
|
|
593
643
|
};
|
|
594
644
|
/** Main interaction identifier for related interactions */
|
|
595
645
|
mainInteractionId?: string;
|
|
@@ -706,8 +756,14 @@ export type TaskData = {
|
|
|
706
756
|
isWebCallMute?: boolean;
|
|
707
757
|
/** Identifier for reservation interaction */
|
|
708
758
|
reservationInteractionId?: string;
|
|
759
|
+
/** Identifier for the reserved agent channel (used for campaign tasks) */
|
|
760
|
+
reservedAgentChannelId?: string;
|
|
709
761
|
/** Indicates if wrap-up is required for this task */
|
|
710
762
|
wrapUpRequired?: boolean;
|
|
763
|
+
/** Indicates if auto-answer is in progress for this task */
|
|
764
|
+
isAutoAnswering?: boolean;
|
|
765
|
+
/** Indicates if wrap-up is required for this task */
|
|
766
|
+
agentsPendingWrapUp?: string[];
|
|
711
767
|
};
|
|
712
768
|
/**
|
|
713
769
|
* Type representing an agent contact message within the contact center system
|
|
@@ -940,18 +996,6 @@ export type ConsultConferenceData = {
|
|
|
940
996
|
/** Type of destination (e.g., 'agent', 'queue') */
|
|
941
997
|
destinationType: string;
|
|
942
998
|
};
|
|
943
|
-
/**
|
|
944
|
-
* Legacy consultation conference data type matching Agent Desktop
|
|
945
|
-
* @public
|
|
946
|
-
*/
|
|
947
|
-
export type consultConferencePayloadData = {
|
|
948
|
-
/** Identifier of the agent initiating consult/conference */
|
|
949
|
-
agentId: string;
|
|
950
|
-
/** Type of destination (e.g., 'agent', 'queue') */
|
|
951
|
-
destinationType: string;
|
|
952
|
-
/** Identifier of the destination agent */
|
|
953
|
-
destAgentId: string;
|
|
954
|
-
};
|
|
955
999
|
/**
|
|
956
1000
|
* Parameters required for cancelling a consult to queue operation
|
|
957
1001
|
* @public
|
package/dist/types.js
CHANGED
|
@@ -110,10 +110,15 @@ const HTTP_METHODS = exports.HTTP_METHODS = {
|
|
|
110
110
|
* @ignore
|
|
111
111
|
*/
|
|
112
112
|
let LOGGING_LEVEL = exports.LOGGING_LEVEL = /*#__PURE__*/function (LOGGING_LEVEL) {
|
|
113
|
+
/** Critical failures that require immediate attention */
|
|
113
114
|
LOGGING_LEVEL["error"] = "ERROR";
|
|
115
|
+
/** Important issues that don't prevent the system from working */
|
|
114
116
|
LOGGING_LEVEL["warn"] = "WARN";
|
|
117
|
+
/** General informational logs */
|
|
115
118
|
LOGGING_LEVEL["log"] = "LOG";
|
|
119
|
+
/** Detailed information about system operation */
|
|
116
120
|
LOGGING_LEVEL["info"] = "INFO";
|
|
121
|
+
/** Highly detailed diagnostic information */
|
|
117
122
|
LOGGING_LEVEL["trace"] = "TRACE";
|
|
118
123
|
return LOGGING_LEVEL;
|
|
119
124
|
}({});
|
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"],"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 {Profile} 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}\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 /** 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\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 * 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"],"mappings":";;;;;;AAWA;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;;AA8BA;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;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAqFA;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;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;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"}
|
|
1
|
+
{"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER"],"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 {Profile} 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}\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 /** 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\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 * 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"],"mappings":";;;;;;AAWA;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;;AA8BA;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;AAqFA;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;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;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","ignoreList":[]}
|
package/dist/utils/PageCache.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.PageCache = exports.PAGINATION_DEFAULTS = void 0;
|
|
7
7
|
var _loggerProxy = _interopRequireDefault(require("../logger-proxy"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
/**
|
|
10
10
|
* Common pagination metadata interface used across all APIs.
|
|
11
11
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","e","__esModule","default","PAGINATION_DEFAULTS","exports","PAGE","PAGE_SIZE","DEFAULT_CACHE_TTL_MINUTES","PageCache","cache","Map","constructor","apiName","canUseCache","params","search","filter","attributes","sortBy","buildCacheKey","orgId","page","pageSize","getCachedPage","cacheKey","cachedEntry","get","now","Date","cacheAge","timestamp","LoggerProxy","log","module","method","delete","cachePage","data","meta","cacheEntry","totalMeta","totalPages","totalRecords","totalItems","undefined","set","length","clearCache","cacheSize","size","clear","getCacheSize","_default"],"sources":["PageCache.ts"],"sourcesContent":["import LoggerProxy from '../logger-proxy';\n\n/**\n * Common pagination metadata interface used across all APIs.\n * @public\n * @template T - Additional metadata properties specific to the API\n */\nexport interface PaginationMeta {\n /** Organization ID */\n orgid?: string;\n /** Current page number */\n page?: number;\n /** Page size for current data set */\n pageSize?: number;\n /** Number of pages */\n totalPages?: number;\n /** Total number of items */\n totalRecords?: number;\n /** Total number of items (alias for compatibility) */\n totalItems?: number;\n /** Current page number (alias for compatibility) */\n currentPage?: number;\n /** Map of pagination links */\n links?: Record<string, string>;\n}\n\n/**\n * Common paginated response interface used across all APIs.\n * @public\n * @template T - The type of data items in the response\n */\nexport interface PaginatedResponse<T> {\n /** Array of data items */\n data: T[];\n /** Pagination metadata */\n meta: PaginationMeta;\n}\n\n/**\n * Common search and pagination parameters interface.\n * @public\n */\nexport interface BaseSearchParams {\n /** Search keyword */\n search?: string;\n /** Filter criteria using RSQL syntax */\n filter?: string;\n /** Attributes to be returned */\n attributes?: string;\n /** Page number (starts from 0) */\n page?: number;\n /** Number of items per page */\n pageSize?: number;\n /** Sort field */\n sortBy?: string;\n /** Sort direction */\n sortOrder?: 'asc' | 'desc';\n}\n\n/**\n * Default pagination constants used across all APIs.\n * @public\n */\nexport const PAGINATION_DEFAULTS = {\n /** Default page number */\n PAGE: 0,\n /** Default page size */\n PAGE_SIZE: 100,\n} as const;\n\n/**\n * Interface for cached page entry with metadata\n * @public\n */\nexport interface PageCacheEntry<T> {\n /** Cached data items for this page */\n data: T[];\n /** Timestamp when this page was cached */\n timestamp: number;\n /** Total metadata if available */\n totalMeta?: {\n totalPages?: number;\n totalRecords?: number;\n };\n}\n\n/**\n * Interface for cache validation parameters\n * @public\n */\nexport interface CacheValidationParams {\n /** Search query parameter */\n search?: string;\n /** Filter parameter */\n filter?: string;\n /** Attributes parameter */\n attributes?: string;\n /** Sort by parameter */\n sortBy?: string;\n}\n\n/**\n * Default cache TTL in minutes\n */\nconst DEFAULT_CACHE_TTL_MINUTES = 5;\n\n/**\n * Page cache utility class for managing paginated API response caching.\n * Provides consistent caching behavior across all Contact Center APIs.\n *\n * @class PageCache\n * @public\n * @template T - The type of data items being cached\n * @example\n * ```typescript\n * // Create a cache instance for a specific data type\n * const cache = new PageCache<AddressBookEntry>('AddressBook');\n *\n * // Check if we can use cache (no search/filter parameters)\n * if (cache.canUseCache({ search, filter })) {\n * const cacheKey = cache.buildCacheKey(orgId, page, pageSize);\n * const cachedPage = cache.getCachedPage(cacheKey);\n *\n * if (cachedPage) {\n * return cachedPage.data;\n * }\n * }\n *\n * // Cache API response\n * cache.cachePage(cacheKey, responseData, responseMeta);\n * ```\n */\nexport class PageCache<T> {\n private cache: Map<string, PageCacheEntry<T>> = new Map();\n private apiName: string;\n\n /**\n * Creates an instance of PageCache\n * @param {string} apiName - Name of the API using this cache (for logging)\n * @public\n */\n constructor(apiName: string) {\n this.apiName = apiName;\n }\n\n /**\n * Checks if cache can be used for the given parameters.\n * Cache is only used for simple pagination without search/filter/attributes/sort.\n * @param {CacheValidationParams} params - Parameters to validate\n * @returns {boolean} True if cache can be used\n * @public\n */\n public canUseCache(params: CacheValidationParams): boolean {\n const {search, filter, attributes, sortBy} = params;\n\n return !search && !filter && !attributes && !sortBy;\n }\n\n /**\n * Builds a cache key for the given parameters\n * @param {string} orgId - Organization ID\n * @param {number} page - Page number\n * @param {number} pageSize - Page size\n * @returns {string} Cache key\n * @public\n */\n public buildCacheKey(orgId: string, page: number, pageSize: number): string {\n return `${orgId}:${page}:${pageSize}`;\n }\n\n /**\n * Gets a cached page if it exists and is valid\n * @param {string} cacheKey - Cache key to look up\n * @returns {PageCacheEntry<T> | null} Cached page entry or null if not found/expired\n * @public\n */\n public getCachedPage(cacheKey: string): PageCacheEntry<T> | null {\n const cachedEntry = this.cache.get(cacheKey);\n\n if (!cachedEntry) {\n return null;\n }\n\n // Check if cache entry is expired\n const now = Date.now();\n const cacheAge = (now - cachedEntry.timestamp) / (1000 * 60); // in minutes\n\n if (cacheAge >= DEFAULT_CACHE_TTL_MINUTES) {\n LoggerProxy.log(`Cache entry expired for key: ${cacheKey}`, {\n module: this.apiName,\n method: 'getCachedPage',\n });\n this.cache.delete(cacheKey);\n\n return null;\n }\n\n return cachedEntry;\n }\n\n /**\n * Caches a page of data with metadata\n * @param {string} cacheKey - Cache key\n * @param {T[]} data - Data items to cache\n * @param {any} meta - Metadata from API response\n * @public\n */\n public cachePage(cacheKey: string, data: T[], meta?: any): void {\n const cacheEntry: PageCacheEntry<T> = {\n data,\n timestamp: Date.now(),\n totalMeta: meta\n ? {\n totalPages: meta.totalPages,\n totalRecords: meta.totalRecords || meta.totalItems,\n }\n : undefined,\n };\n\n this.cache.set(cacheKey, cacheEntry);\n\n LoggerProxy.log(`Cached page with ${data.length} items for key: ${cacheKey}`, {\n module: this.apiName,\n method: 'cachePage',\n });\n }\n\n /**\n * Clears all cached entries\n * @public\n */\n public clearCache(): void {\n const cacheSize = this.cache.size;\n this.cache.clear();\n\n LoggerProxy.log(`Cleared ${cacheSize} cache entries`, {\n module: this.apiName,\n method: 'clearCache',\n });\n }\n\n /**\n * Gets the current number of cached entries\n * @returns {number} Number of cached entries\n * @public\n */\n public getCacheSize(): number {\n return this.cache.size;\n }\n}\n\nexport default PageCache;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1C;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACO,MAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjC;EACAE,IAAI,EAAE,CAAC;EACP;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA,MAAMC,yBAAyB,GAAG,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,CAAI;EAChBC,KAAK,GAAmC,IAAIC,GAAG,CAAC,CAAC;EAGzD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,OAAe,EAAE;IAC3B,IAAI,CAACA,OAAO,GAAGA,OAAO;EACxB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACSC,WAAWA,CAACC,MAA6B,EAAW;IACzD,MAAM;MAACC,MAAM;MAAEC,MAAM;MAAEC,UAAU;MAAEC;IAAM,CAAC,GAAGJ,MAAM;IAEnD,OAAO,CAACC,MAAM,IAAI,CAACC,MAAM,IAAI,CAACC,UAAU,IAAI,CAACC,MAAM;EACrD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACSC,aAAaA,CAACC,KAAa,EAAEC,IAAY,EAAEC,QAAgB,EAAU;IAC1E,OAAO,GAAGF,KAAK,IAAIC,IAAI,IAAIC,QAAQ,EAAE;EACvC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACSC,aAAaA,CAACC,QAAgB,EAA4B;IAC/D,MAAMC,WAAW,GAAG,IAAI,CAAChB,KAAK,CAACiB,GAAG,CAACF,QAAQ,CAAC;IAE5C,IAAI,CAACC,WAAW,EAAE;MAChB,OAAO,IAAI;IACb;;IAEA;IACA,MAAME,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,CAAC;IACtB,MAAME,QAAQ,GAAG,CAACF,GAAG,GAAGF,WAAW,CAACK,SAAS,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;;IAE9D,IAAID,QAAQ,IAAItB,yBAAyB,EAAE;MACzCwB,oBAAW,CAACC,GAAG,CAAC,gCAAgCR,QAAQ,EAAE,EAAE;QAC1DS,MAAM,EAAE,IAAI,CAACrB,OAAO;QACpBsB,MAAM,EAAE;MACV,CAAC,CAAC;MACF,IAAI,CAACzB,KAAK,CAAC0B,MAAM,CAACX,QAAQ,CAAC;MAE3B,OAAO,IAAI;IACb;IAEA,OAAOC,WAAW;EACpB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACSW,SAASA,CAACZ,QAAgB,EAAEa,IAAS,EAAEC,IAAU,EAAQ;IAC9D,MAAMC,UAA6B,GAAG;MACpCF,IAAI;MACJP,SAAS,EAAEF,IAAI,CAACD,GAAG,CAAC,CAAC;MACrBa,SAAS,EAAEF,IAAI,GACX;QACEG,UAAU,EAAEH,IAAI,CAACG,UAAU;QAC3BC,YAAY,EAAEJ,IAAI,CAACI,YAAY,IAAIJ,IAAI,CAACK;MAC1C,CAAC,GACDC;IACN,CAAC;IAED,IAAI,CAACnC,KAAK,CAACoC,GAAG,CAACrB,QAAQ,EAAEe,UAAU,CAAC;IAEpCR,oBAAW,CAACC,GAAG,CAAC,oBAAoBK,IAAI,CAACS,MAAM,mBAAmBtB,QAAQ,EAAE,EAAE;MAC5ES,MAAM,EAAE,IAAI,CAACrB,OAAO;MACpBsB,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;EACSa,UAAUA,CAAA,EAAS;IACxB,MAAMC,SAAS,GAAG,IAAI,CAACvC,KAAK,CAACwC,IAAI;IACjC,IAAI,CAACxC,KAAK,CAACyC,KAAK,CAAC,CAAC;IAElBnB,oBAAW,CAACC,GAAG,CAAC,WAAWgB,SAAS,gBAAgB,EAAE;MACpDf,MAAM,EAAE,IAAI,CAACrB,OAAO;MACpBsB,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;AACA;EACSiB,YAAYA,CAAA,EAAW;IAC5B,OAAO,IAAI,CAAC1C,KAAK,CAACwC,IAAI;EACxB;AACF;AAAC7C,OAAA,CAAAI,SAAA,GAAAA,SAAA;AAAA,IAAA4C,QAAA,GAAAhD,OAAA,CAAAF,OAAA,GAEcM,SAAS","ignoreList":[]}
|
package/dist/webex-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_default","exports","default","hydra","process","env","HYDRA_SERVICE_URL","hydraServiceUrl","credentials","device","validateDomains","ephemeral","storage","boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["webex-config.ts"],"sourcesContent":["import {MemoryStoreAdapter} from '@webex/webex-core';\n\n/**\n * Default Webex SDK configuration for Contact Center integration.\n *\n * @public\n * @example\n * import webexConfig from './webex-config';\n * const hydraUrl = webexConfig.hydra;\n */\nexport default {\n /**\n * URL for the Hydra API service.\n * @type {string}\n * @public\n * @default process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'\n */\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n /**\n * Alias for the Hydra API service URL.\n * @type {string}\n * @public\n * @default process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'\n */\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n /**\n * Credentials configuration (empty by default).\n * @type {object}\n * @public\n */\n credentials: {},\n /**\n * Device configuration options.\n * @type {object}\n * @public\n * @property {boolean} validateDomains - Whether to validate device domains.\n * @property {boolean} ephemeral - Whether the device is ephemeral.\n */\n device: {\n validateDomains: true,\n ephemeral: true,\n },\n /**\n * Storage configuration for the SDK.\n * @type {object}\n * @public\n * @property {typeof MemoryStoreAdapter} boundedAdapter - Adapter for bounded storage.\n * @property {typeof MemoryStoreAdapter} unboundedAdapter - Adapter for unbounded storage.\n */\n storage: {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAQe;EACb;AACF;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACvE;AACF;AACA;AACA;AACA;AACA;EACEC,eAAe,EAAEH,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACjF;AACF;AACA;AACA;AACA;EACEE,WAAW,EAAE,CAAC,CAAC;EACf;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,MAAM,EAAE;IACNC,eAAe,EAAE,IAAI;IACrBC,SAAS,EAAE;EACb,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE;IACPC,cAAc,EAAEC,6BAAkB;IAClCC,gBAAgB,EAAED;EACpB;AACF,CAAC"}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_default","exports","default","hydra","process","env","HYDRA_SERVICE_URL","hydraServiceUrl","credentials","device","validateDomains","ephemeral","storage","boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["webex-config.ts"],"sourcesContent":["import {MemoryStoreAdapter} from '@webex/webex-core';\n\n/**\n * Default Webex SDK configuration for Contact Center integration.\n *\n * @public\n * @example\n * import webexConfig from './webex-config';\n * const hydraUrl = webexConfig.hydra;\n */\nexport default {\n /**\n * URL for the Hydra API service.\n * @type {string}\n * @public\n * @default process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'\n */\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n /**\n * Alias for the Hydra API service URL.\n * @type {string}\n * @public\n * @default process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'\n */\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n /**\n * Credentials configuration (empty by default).\n * @type {object}\n * @public\n */\n credentials: {},\n /**\n * Device configuration options.\n * @type {object}\n * @public\n * @property {boolean} validateDomains - Whether to validate device domains.\n * @property {boolean} ephemeral - Whether the device is ephemeral.\n */\n device: {\n validateDomains: true,\n ephemeral: true,\n },\n /**\n * Storage configuration for the SDK.\n * @type {object}\n * @public\n * @property {typeof MemoryStoreAdapter} boundedAdapter - Adapter for bounded storage.\n * @property {typeof MemoryStoreAdapter} unboundedAdapter - Adapter for unbounded storage.\n */\n storage: {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAQe;EACb;AACF;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACvE;AACF;AACA;AACA;AACA;AACA;EACEC,eAAe,EAAEH,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACjF;AACF;AACA;AACA;AACA;EACEE,WAAW,EAAE,CAAC,CAAC;EACf;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,MAAM,EAAE;IACNC,eAAe,EAAE,IAAI;IACrBC,SAAS,EAAE;EACb,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE;IACPC,cAAc,EAAEC,6BAAkB;IAClCC,gBAAgB,EAAED;EACpB;AACF,CAAC","ignoreList":[]}
|
package/dist/webex.js
CHANGED
|
@@ -13,7 +13,7 @@ require("@webex/plugin-logger");
|
|
|
13
13
|
require("@webex/internal-plugin-support");
|
|
14
14
|
require("./index");
|
|
15
15
|
var _webexConfig = _interopRequireDefault(require("./webex-config"));
|
|
16
|
-
function _interopRequireDefault(
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
/**
|
|
18
18
|
* Ensures global Buffer is defined, which is required for SDK functionality in some environments.
|
|
19
19
|
* @ignore
|
|
@@ -29,7 +29,7 @@ if (!global.Buffer) {
|
|
|
29
29
|
*/
|
|
30
30
|
const Webex = _webexCore.default.extend({
|
|
31
31
|
webex: true,
|
|
32
|
-
version: `3.10.0-next.
|
|
32
|
+
version: `3.10.0-next.21`
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
/**
|