@webex/cc-store 1.28.0-ccwidgets.122 → 1.28.0-ccwidgets.124
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/index.js +1 -1
- package/dist/types/constants.d.ts +25 -0
- package/dist/types/store.d.ts +0 -4
- package/dist/types/store.types.d.ts +30 -10
- package/dist/types/storeEventsWrapper.d.ts +11 -12
- package/dist/types/task-utils.d.ts +43 -2
- package/package.json +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const TASK_STATE_CONSULT = "consult";
|
|
2
|
+
export declare const TASK_STATE_CONSULTING = "consulting";
|
|
3
|
+
export declare const TASK_STATE_CONSULT_COMPLETED = "consultCompleted";
|
|
4
|
+
export declare const INTERACTION_STATE_WRAPUP = "wrapUp";
|
|
5
|
+
export declare const INTERACTION_STATE_POST_CALL = "post_call";
|
|
6
|
+
export declare const INTERACTION_STATE_CONNECTED = "connected";
|
|
7
|
+
export declare const INTERACTION_STATE_CONFERENCE = "conference";
|
|
8
|
+
export declare const CONSULT_STATE_INITIATED = "consultInitiated";
|
|
9
|
+
export declare const CONSULT_STATE_COMPLETED = "consultCompleted";
|
|
10
|
+
export declare const CONSULT_STATE_CONFERENCING = "conferencing";
|
|
11
|
+
export declare const RELATIONSHIP_TYPE_CONSULT = "consult";
|
|
12
|
+
export declare const AGENT = "Agent";
|
|
13
|
+
export declare const CUSTOMER = "Customer";
|
|
14
|
+
export declare const SUPERVISOR = "Supervisor";
|
|
15
|
+
/**
|
|
16
|
+
* Virtual Voice Assistant (VVA) - Automated participant type
|
|
17
|
+
* Used to identify bot/automated participants in interactions
|
|
18
|
+
*/
|
|
19
|
+
export declare const VVA = "VVA";
|
|
20
|
+
/**
|
|
21
|
+
* Participant types to exclude from active agent participant counts
|
|
22
|
+
* Used for filtering conference participants and consult operations
|
|
23
|
+
*/
|
|
24
|
+
export declare const EXCLUDED_PARTICIPANT_TYPES: string[];
|
|
25
|
+
export declare const MEDIA_TYPE_CONSULT = "consult";
|
package/dist/types/store.d.ts
CHANGED
|
@@ -18,9 +18,6 @@ declare class Store implements IStore {
|
|
|
18
18
|
dialNumber: string;
|
|
19
19
|
currentState: string;
|
|
20
20
|
customState: ICustomState;
|
|
21
|
-
consultCompleted: boolean;
|
|
22
|
-
consultInitiated: boolean;
|
|
23
|
-
consultAccepted: boolean;
|
|
24
21
|
isQueueConsultInProgress: boolean;
|
|
25
22
|
currentConsultQueueId: string;
|
|
26
23
|
consultStartTimeStamp: any;
|
|
@@ -28,7 +25,6 @@ declare class Store implements IStore {
|
|
|
28
25
|
lastIdleCodeChangeTimestamp?: number;
|
|
29
26
|
showMultipleLoginAlert: boolean;
|
|
30
27
|
callControlAudio: MediaStream | null;
|
|
31
|
-
consultOfferReceived: boolean;
|
|
32
28
|
featureFlags: {
|
|
33
29
|
[key: string]: boolean;
|
|
34
30
|
};
|
|
@@ -77,14 +77,10 @@ interface IStore {
|
|
|
77
77
|
showMultipleLoginAlert: boolean;
|
|
78
78
|
currentTheme: string;
|
|
79
79
|
customState: ICustomState;
|
|
80
|
-
consultCompleted: boolean;
|
|
81
|
-
consultInitiated: boolean;
|
|
82
|
-
consultAccepted: boolean;
|
|
83
80
|
isQueueConsultInProgress: boolean;
|
|
84
81
|
currentConsultQueueId: string;
|
|
85
82
|
consultStartTimeStamp?: number;
|
|
86
83
|
callControlAudio: MediaStream | null;
|
|
87
|
-
consultOfferReceived: boolean;
|
|
88
84
|
isEndConsultEnabled: boolean;
|
|
89
85
|
allowConsultToQueue: boolean;
|
|
90
86
|
agentProfile: AgentLoginProfile;
|
|
@@ -112,9 +108,6 @@ interface IStoreWrapper extends IStore {
|
|
|
112
108
|
setIsAgentLoggedIn(value: boolean): void;
|
|
113
109
|
setWrapupCodes(wrapupCodes: IWrapupCode[]): void;
|
|
114
110
|
setState(state: IdleCode | ICustomState): void;
|
|
115
|
-
setConsultCompleted(value: boolean): void;
|
|
116
|
-
setConsultInitiated(value: boolean): void;
|
|
117
|
-
setConsultAccepted(value: boolean): void;
|
|
118
111
|
setConsultStartTimeStamp(timestamp: number): void;
|
|
119
112
|
setAgentProfile(profile: Profile): void;
|
|
120
113
|
setTeamId(id: string): void;
|
|
@@ -150,7 +143,19 @@ declare enum TASK_EVENTS {
|
|
|
150
143
|
AGENT_CONSULT_CREATED = "AgentConsultCreated",
|
|
151
144
|
TASK_RECORDING_PAUSED = "task:recordingPaused",
|
|
152
145
|
TASK_RECORDING_RESUMED = "task:recordingResumed",
|
|
153
|
-
TASK_OFFER_CONSULT = "task:offerConsult"
|
|
146
|
+
TASK_OFFER_CONSULT = "task:offerConsult",
|
|
147
|
+
TASK_CONFERENCE_ESTABLISHING = "task:conferenceEstablishing",
|
|
148
|
+
TASK_CONFERENCE_STARTED = "task:conferenceStarted",
|
|
149
|
+
TASK_CONFERENCE_FAILED = "task:conferenceFailed",
|
|
150
|
+
TASK_CONFERENCE_ENDED = "task:conferenceEnded",
|
|
151
|
+
TASK_PARTICIPANT_JOINED = "task:participantJoined",
|
|
152
|
+
TASK_PARTICIPANT_LEFT = "task:participantLeft",
|
|
153
|
+
TASK_CONFERENCE_TRANSFERRED = "task:conferenceTransferred",
|
|
154
|
+
TASK_CONFERENCE_TRANSFER_FAILED = "task:conferenceTransferFailed",
|
|
155
|
+
TASK_CONFERENCE_END_FAILED = "task:conferenceEndFailed",
|
|
156
|
+
TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
|
|
157
|
+
TASK_MERGED = "task:merged",
|
|
158
|
+
TASK_POST_CALL_ACTIVITY = "task:postCallActivity"
|
|
154
159
|
}
|
|
155
160
|
declare enum CC_EVENTS {
|
|
156
161
|
AGENT_DN_REGISTERED = "agent:dnRegistered",
|
|
@@ -197,7 +202,7 @@ type FetchPaginatedList<T> = (params: PaginatedListParams) => Promise<{
|
|
|
197
202
|
};
|
|
198
203
|
}>;
|
|
199
204
|
type TransformPaginatedData<T, U> = (item: T, page: number, index: number) => U;
|
|
200
|
-
declare const
|
|
205
|
+
declare const DIAL_NUMBER: string;
|
|
201
206
|
declare const EXTENSION: string;
|
|
202
207
|
declare const DESKTOP: string;
|
|
203
208
|
declare const MEDIA_TYPE_TELEPHONY_LOWER = "telephony";
|
|
@@ -216,4 +221,19 @@ declare const ERROR_TRIGGERING_IDLE_CODES: {
|
|
|
216
221
|
RONA: string;
|
|
217
222
|
};
|
|
218
223
|
export type { IContactCenter, ITask, Profile, Team, AgentLogin, WithWebex, IdleCode, InitParams, IStore, ILogger, IWrapupCode, IStoreWrapper, ICustomState, DestinationType, BuddyDetails, ContactServiceQueue, AgentLoginProfile, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, IWebex, PaginatedListParams, FetchPaginatedList, TransformPaginatedData, };
|
|
219
|
-
export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME,
|
|
224
|
+
export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME, DIAL_NUMBER, EXTENSION, DESKTOP, MEDIA_TYPE_TELEPHONY_LOWER, MEDIA_TYPE_TELEPHONY_UPPER, DEVICE_TYPE_BROWSER, AGENT_STATE_AVAILABLE, LoginOptions, ERROR_TRIGGERING_IDLE_CODES, };
|
|
225
|
+
export declare enum ConsultStatus {
|
|
226
|
+
NO_CONSULTATION_IN_PROGRESS = "No consultation in progress",
|
|
227
|
+
BEING_CONSULTED = "beingConsulted",
|
|
228
|
+
CONSULT_INITIATED = "consultInitiated",
|
|
229
|
+
BEING_CONSULTED_ACCEPTED = "beingConsultedAccepted",
|
|
230
|
+
CONSULT_ACCEPTED = "consultAccepted",
|
|
231
|
+
CONNECTED = "connected",
|
|
232
|
+
CONFERENCE = "conference",
|
|
233
|
+
CONSULT_COMPLETED = "consultCompleted"
|
|
234
|
+
}
|
|
235
|
+
export type Participant = {
|
|
236
|
+
id: string;
|
|
237
|
+
pType: 'Customer' | 'Agent' | string;
|
|
238
|
+
name?: string;
|
|
239
|
+
};
|
|
@@ -31,12 +31,8 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
31
31
|
get showMultipleLoginAlert(): boolean;
|
|
32
32
|
get currentTheme(): string;
|
|
33
33
|
get customState(): ICustomState;
|
|
34
|
-
get consultCompleted(): boolean;
|
|
35
|
-
get consultInitiated(): boolean;
|
|
36
|
-
get consultAccepted(): boolean;
|
|
37
34
|
get consultStartTimeStamp(): number;
|
|
38
35
|
get callControlAudio(): MediaStream;
|
|
39
|
-
get consultOfferReceived(): boolean;
|
|
40
36
|
get isQueueConsultInProgress(): boolean;
|
|
41
37
|
get currentConsultQueueId(): string;
|
|
42
38
|
get isEndConsultEnabled(): boolean;
|
|
@@ -58,10 +54,6 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
58
54
|
setOnError: (callback: (widgetName: string, error: Error) => void) => void;
|
|
59
55
|
refreshTaskList: () => void;
|
|
60
56
|
setWrapupCodes: (wrapupCodes: IWrapupCode[]) => void;
|
|
61
|
-
setConsultCompleted: (value: boolean) => void;
|
|
62
|
-
setConsultInitiated: (value: boolean) => void;
|
|
63
|
-
setConsultAccepted: (value: boolean) => void;
|
|
64
|
-
setConsultOfferReceived: (value: boolean) => void;
|
|
65
57
|
setConsultStartTimeStamp: (timestamp: number) => void;
|
|
66
58
|
setCallControlAudio: (audio: MediaStream | null) => void;
|
|
67
59
|
setIsQueueConsultInProgress: (value: boolean) => void;
|
|
@@ -80,21 +72,28 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
80
72
|
removeTaskCallback: (event: TASK_EVENTS, callback: any, taskId: string) => void;
|
|
81
73
|
init(options: InitParams): Promise<void>;
|
|
82
74
|
registerCC: (webex?: WithWebex["webex"]) => Promise<void>;
|
|
83
|
-
handleTaskRemove: (
|
|
75
|
+
handleTaskRemove: (taskToRemove: ITask) => void;
|
|
84
76
|
handleTaskMuteState: (task: ITask) => void;
|
|
85
77
|
handleTaskEnd: () => void;
|
|
86
78
|
handleTaskAssigned: (event: any) => void;
|
|
87
|
-
handleTaskWrapUp: (task: any) => void;
|
|
88
79
|
handleTaskMedia: (track: any) => void;
|
|
89
80
|
handleConsultCreated: () => void;
|
|
90
|
-
handleConsulting: (
|
|
91
|
-
handleConsultEnd: (
|
|
81
|
+
handleConsulting: () => void;
|
|
82
|
+
handleConsultEnd: () => void;
|
|
92
83
|
handleConsultOffer: () => void;
|
|
93
84
|
handleConsultAccepted: (event: any) => void;
|
|
94
85
|
handleConsultQueueCancelled: () => void;
|
|
86
|
+
handleConferenceStarted: () => void;
|
|
87
|
+
handleConferenceEnded: () => void;
|
|
88
|
+
/**
|
|
89
|
+
* Register all task event listeners
|
|
90
|
+
* @param task - The task to register event listeners for
|
|
91
|
+
*/
|
|
92
|
+
private registerTaskEventListeners;
|
|
95
93
|
handleIncomingTask: (event: any) => void;
|
|
96
94
|
handleStateChange: (data: any) => void;
|
|
97
95
|
handleMultiLoginCloseSession: (data: any) => void;
|
|
96
|
+
handleTaskMerged: (event: any) => void;
|
|
98
97
|
handleTaskHydrate: (event: any) => void;
|
|
99
98
|
handleTaskReject: (task: ITask, reason: string) => void;
|
|
100
99
|
getBuddyAgents: (mediaType?: string) => Promise<Array<BuddyDetails>>;
|
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
import { ITask } from './store.types';
|
|
1
|
+
import { ITask, Participant } from './store.types';
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a task is an incoming task
|
|
4
4
|
* @param task - The task object
|
|
5
5
|
* @returns Whether the task is incoming
|
|
6
6
|
*/
|
|
7
|
-
export declare const isIncomingTask: (task: ITask) => boolean;
|
|
7
|
+
export declare const isIncomingTask: (task: ITask, agentId: string) => boolean;
|
|
8
|
+
export declare function getConsultMPCState(task: ITask, agentId: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the current agent is a secondary agent in a consultation scenario.
|
|
11
|
+
* Secondary agents are those who were consulted (not the original call owner).
|
|
12
|
+
* @param {Object} task - The task object containing interaction details
|
|
13
|
+
* @returns {boolean} True if this is a secondary agent (consulted party)
|
|
14
|
+
*/
|
|
15
|
+
export declare function isSecondaryAgent(task: ITask): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the current agent is a secondary EP-DN (Entry Point Dial Number) agent.
|
|
18
|
+
* This is specifically for telephony consultations to external numbers/entry points.
|
|
19
|
+
* @param {Object} task - The task object containing interaction details
|
|
20
|
+
* @returns {boolean} True if this is a secondary EP-DN agent in telephony consultation
|
|
21
|
+
*/
|
|
22
|
+
export declare function isSecondaryEpDnAgent(task: ITask): boolean;
|
|
23
|
+
export declare function getTaskStatus(task: ITask, agentId: string): string;
|
|
24
|
+
export declare function getConsultStatus(task: ITask, agentId: string): string;
|
|
25
|
+
export declare function getIsConferenceInProgress(task: ITask): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the list of active conference participants excluding the current agent
|
|
28
|
+
* Filters out customers, supervisors, VVAs, and participants who have left
|
|
29
|
+
*
|
|
30
|
+
* @param task - The task object containing interaction data
|
|
31
|
+
* @param agentId - The ID of the current agent to exclude from results
|
|
32
|
+
* @returns Array of active agent participants in the conference
|
|
33
|
+
*/
|
|
34
|
+
export declare const getConferenceParticipants: (task: ITask, agentId: string) => Participant[];
|
|
35
|
+
/**
|
|
36
|
+
* Counts the number of active agent participants in the conference
|
|
37
|
+
* Excludes customers, supervisors, VVAs, and participants who have left
|
|
38
|
+
*
|
|
39
|
+
* @param task - The task object containing interaction data
|
|
40
|
+
* @returns Count of active agent participants
|
|
41
|
+
*/
|
|
42
|
+
export declare function getConferenceParticipantsCount(task: ITask): number;
|
|
43
|
+
export declare function getIsCustomerInCall(task: ITask): boolean;
|
|
44
|
+
export declare function getIsConsultInProgress(task: ITask): boolean;
|
|
45
|
+
export declare function isInteractionOnHold(task: ITask): boolean;
|
|
46
|
+
export declare const setmTypeForEPDN: (task: ITask, mType: string) => string;
|
|
47
|
+
export declare const findMediaResourceId: (task: ITask, mType: string) => string;
|
|
48
|
+
export declare const findHoldStatus: (task: ITask, mType: string, agentId: string) => boolean;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@webex/cc-store",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Widgets Store",
|
|
4
4
|
"license": "Cisco's General Terms (https://www.cisco.com/site/us/en/about/legal/contract-experience/index.html)",
|
|
5
|
-
"version": "1.28.0-ccwidgets.
|
|
5
|
+
"version": "1.28.0-ccwidgets.124",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test:styles": "eslint"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@webex/contact-center": "3.
|
|
25
|
+
"@webex/contact-center": "3.10.0-next.8",
|
|
26
26
|
"mobx": "6.13.5",
|
|
27
27
|
"typescript": "5.6.3"
|
|
28
28
|
},
|