@webex/cc-store 1.28.0-rtt.1 → 1.28.0-task-refactor.1
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.
|
@@ -1,13 +1,3 @@
|
|
|
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
1
|
export declare const RELATIONSHIP_TYPE_CONSULT = "consult";
|
|
12
2
|
export declare const AGENT = "Agent";
|
|
13
3
|
export declare const CUSTOMER = "Customer";
|
package/dist/types/store.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ declare class Store implements IStore {
|
|
|
21
21
|
isQueueConsultInProgress: boolean;
|
|
22
22
|
isDeclineButtonEnabled: boolean;
|
|
23
23
|
currentConsultQueueId: string;
|
|
24
|
+
lastConsultDestination: {
|
|
25
|
+
to: string;
|
|
26
|
+
destinationType: string;
|
|
27
|
+
} | null;
|
|
24
28
|
consultStartTimeStamp: any;
|
|
25
29
|
lastStateChangeTimestamp?: number;
|
|
26
30
|
lastIdleCodeChangeTimestamp?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentLogin, Profile, BuddyDetails, ContactServiceQueue, ITask, BuddyAgents, BuddyAgentsResponse, StateChange, Logout, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, AddressBook } from '@webex/contact-center';
|
|
1
|
+
import { AgentLogin, Profile, BuddyDetails, ContactServiceQueue, ITask, BuddyAgents, BuddyAgentsResponse, StateChange, Logout, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, AddressBook, TASK_EVENTS, TaskUIControls, TaskUIControlState, InteractionUIControls, TaskUILeg, getDefaultUIControls } from '@webex/contact-center';
|
|
2
2
|
import { OutdialAniEntriesResponse, OutdialAniParams } from 'node_modules/@webex/contact-center/dist/types/services/config/types';
|
|
3
3
|
import { DestinationType } from 'node_modules/@webex/contact-center/dist/types/services/task/types';
|
|
4
4
|
import { AgentProfileUpdate, LogContext, SetStateResponse, StationLoginResponse, StationLogoutResponse, Team, UpdateDeviceTypeResponse } from 'node_modules/@webex/contact-center/dist/types/types';
|
|
@@ -81,6 +81,10 @@ interface IStore {
|
|
|
81
81
|
isQueueConsultInProgress: boolean;
|
|
82
82
|
isDeclineButtonEnabled: boolean;
|
|
83
83
|
currentConsultQueueId: string;
|
|
84
|
+
lastConsultDestination: {
|
|
85
|
+
to: string;
|
|
86
|
+
destinationType: DestinationType;
|
|
87
|
+
} | null;
|
|
84
88
|
consultStartTimeStamp?: number;
|
|
85
89
|
callControlAudio: MediaStream | null;
|
|
86
90
|
isEndConsultEnabled: boolean;
|
|
@@ -126,47 +130,6 @@ interface IWrapupCode {
|
|
|
126
130
|
id: string;
|
|
127
131
|
name: string;
|
|
128
132
|
}
|
|
129
|
-
declare enum TASK_EVENTS {
|
|
130
|
-
TASK_INCOMING = "task:incoming",
|
|
131
|
-
TASK_ASSIGNED = "task:assigned",
|
|
132
|
-
TASK_MEDIA = "task:media",
|
|
133
|
-
TASK_HOLD = "task:hold",
|
|
134
|
-
TASK_UNHOLD = "task:unhold",
|
|
135
|
-
TASK_CONSULT = "task:consult",
|
|
136
|
-
TASK_CONSULT_END = "task:consultEnd",
|
|
137
|
-
TASK_CONSULT_ACCEPTED = "task:consultAccepted",
|
|
138
|
-
TASK_PAUSE = "task:pause",
|
|
139
|
-
TASK_RESUME = "task:resume",
|
|
140
|
-
TASK_END = "task:end",
|
|
141
|
-
TASK_WRAPUP = "task:wrapup",
|
|
142
|
-
TASK_REJECT = "task:rejected",
|
|
143
|
-
TASK_HYDRATE = "task:hydrate",
|
|
144
|
-
TASK_CONSULTING = "task:consulting",
|
|
145
|
-
TASK_CONSULT_QUEUE_CANCELLED = "task:consultQueueCancelled",
|
|
146
|
-
AGENT_CONTACT_ASSIGNED = "AgentContactAssigned",
|
|
147
|
-
CONTACT_RECORDING_PAUSED = "ContactRecordingPaused",
|
|
148
|
-
CONTACT_RECORDING_RESUMED = "ContactRecordingResumed",
|
|
149
|
-
AGENT_WRAPPEDUP = "AgentWrappedUp",
|
|
150
|
-
AGENT_OFFER_CONTACT = "AgentOfferContact",
|
|
151
|
-
AGENT_CONSULT_CREATED = "AgentConsultCreated",
|
|
152
|
-
TASK_RECORDING_PAUSED = "task:recordingPaused",
|
|
153
|
-
TASK_RECORDING_RESUMED = "task:recordingResumed",
|
|
154
|
-
TASK_OFFER_CONSULT = "task:offerConsult",
|
|
155
|
-
TASK_AUTO_ANSWERED = "task:autoAnswered",
|
|
156
|
-
TASK_CONFERENCE_ESTABLISHING = "task:conferenceEstablishing",
|
|
157
|
-
TASK_CONFERENCE_STARTED = "task:conferenceStarted",
|
|
158
|
-
TASK_CONFERENCE_FAILED = "task:conferenceFailed",
|
|
159
|
-
TASK_CONFERENCE_ENDED = "task:conferenceEnded",
|
|
160
|
-
TASK_PARTICIPANT_JOINED = "task:participantJoined",
|
|
161
|
-
TASK_PARTICIPANT_LEFT = "task:participantLeft",
|
|
162
|
-
TASK_CONFERENCE_TRANSFERRED = "task:conferenceTransferred",
|
|
163
|
-
TASK_CONFERENCE_TRANSFER_FAILED = "task:conferenceTransferFailed",
|
|
164
|
-
TASK_CONFERENCE_END_FAILED = "task:conferenceEndFailed",
|
|
165
|
-
TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
|
|
166
|
-
TASK_MERGED = "task:merged",
|
|
167
|
-
TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
|
|
168
|
-
TASK_OUTDIAL_FAILED = "task:outdialFailed"
|
|
169
|
-
}
|
|
170
133
|
declare enum CC_EVENTS {
|
|
171
134
|
AGENT_DN_REGISTERED = "agent:dnRegistered",
|
|
172
135
|
AGENT_LOGOUT_SUCCESS = "agent:logoutSuccess",
|
|
@@ -198,6 +161,7 @@ type AgentLoginProfile = {
|
|
|
198
161
|
social: number;
|
|
199
162
|
telephony: number;
|
|
200
163
|
};
|
|
164
|
+
agentProfileID?: string;
|
|
201
165
|
};
|
|
202
166
|
type PaginatedListParams = {
|
|
203
167
|
page: number;
|
|
@@ -230,18 +194,8 @@ declare const ERROR_TRIGGERING_IDLE_CODES: {
|
|
|
230
194
|
CHANNEL_FAILURE: string;
|
|
231
195
|
RONA: string;
|
|
232
196
|
};
|
|
233
|
-
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, };
|
|
234
|
-
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, };
|
|
235
|
-
export declare enum ConsultStatus {
|
|
236
|
-
NO_CONSULTATION_IN_PROGRESS = "No consultation in progress",
|
|
237
|
-
BEING_CONSULTED = "beingConsulted",
|
|
238
|
-
CONSULT_INITIATED = "consultInitiated",
|
|
239
|
-
BEING_CONSULTED_ACCEPTED = "beingConsultedAccepted",
|
|
240
|
-
CONSULT_ACCEPTED = "consultAccepted",
|
|
241
|
-
CONNECTED = "connected",
|
|
242
|
-
CONFERENCE = "conference",
|
|
243
|
-
CONSULT_COMPLETED = "consultCompleted"
|
|
244
|
-
}
|
|
197
|
+
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, TaskUIControls, TaskUIControlState, InteractionUIControls, TaskUILeg, };
|
|
198
|
+
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, getDefaultUIControls, };
|
|
245
199
|
export type Participant = {
|
|
246
200
|
id: string;
|
|
247
201
|
pType: 'Customer' | 'Agent' | string;
|
|
@@ -40,6 +40,10 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
40
40
|
get dataCenter(): string;
|
|
41
41
|
setDataCenter: (value: string) => void;
|
|
42
42
|
get currentConsultQueueId(): string;
|
|
43
|
+
get lastConsultDestination(): {
|
|
44
|
+
to: string;
|
|
45
|
+
destinationType: import("node_modules/@webex/contact-center/dist/types/services/task/types").DestinationType;
|
|
46
|
+
};
|
|
43
47
|
get isEndConsultEnabled(): boolean;
|
|
44
48
|
get allowConsultToQueue(): boolean;
|
|
45
49
|
get agentProfile(): AgentLoginProfile;
|
|
@@ -65,6 +69,10 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
65
69
|
setIsQueueConsultInProgress: (value: boolean) => void;
|
|
66
70
|
setIsDeclineButtonEnabled: (value: boolean) => void;
|
|
67
71
|
setCurrentConsultQueueId: (queueId: string | null) => void;
|
|
72
|
+
setLastConsultDestination: (destination: {
|
|
73
|
+
to: string;
|
|
74
|
+
destinationType: string;
|
|
75
|
+
} | null) => void;
|
|
68
76
|
setState: (state: ICustomState | IdleCode) => void;
|
|
69
77
|
setIncomingTaskCb: (callback: ({ task }: {
|
|
70
78
|
task: ITask;
|
|
@@ -98,6 +106,8 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
98
106
|
* Register all task event listeners
|
|
99
107
|
* @param task - The task to register event listeners for
|
|
100
108
|
*/
|
|
109
|
+
handleUIControlsUpdated: () => void;
|
|
110
|
+
handleSwitchCall: () => void;
|
|
101
111
|
private registerTaskEventListeners;
|
|
102
112
|
handleIncomingTask: (event: any) => void;
|
|
103
113
|
handleStateChange: (data: any) => void;
|
|
@@ -5,7 +5,6 @@ import { ITask, Participant } from './store.types';
|
|
|
5
5
|
* @returns Whether the task is incoming
|
|
6
6
|
*/
|
|
7
7
|
export declare const isIncomingTask: (task: ITask, agentId: string) => boolean;
|
|
8
|
-
export declare function getConsultMPCState(task: ITask, agentId: string): string;
|
|
9
8
|
/**
|
|
10
9
|
* Checks if the current agent is a secondary agent in a consultation scenario.
|
|
11
10
|
* Secondary agents are those who were consulted (not the original call owner).
|
|
@@ -16,13 +15,8 @@ export declare function isSecondaryAgent(task: ITask): boolean;
|
|
|
16
15
|
/**
|
|
17
16
|
* Checks if the current agent is a secondary EP-DN (Entry Point Dial Number) agent.
|
|
18
17
|
* 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
18
|
*/
|
|
22
19
|
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
20
|
/**
|
|
27
21
|
* Retrieves the list of active conference participants excluding the current agent
|
|
28
22
|
* Filters out customers, supervisors, VVAs, and participants who have left
|
|
@@ -32,20 +26,9 @@ export declare function getIsConferenceInProgress(task: ITask): boolean;
|
|
|
32
26
|
* @returns Array of active agent participants in the conference
|
|
33
27
|
*/
|
|
34
28
|
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
29
|
export declare function isInteractionOnHold(task: ITask): boolean;
|
|
46
30
|
export declare const setmTypeForEPDN: (task: ITask, mType: string) => string;
|
|
47
31
|
export declare const findMediaResourceId: (task: ITask, mType: string) => string;
|
|
48
|
-
export declare const findHoldStatus: (task: ITask, mType: string, agentId: string) => boolean;
|
|
49
32
|
/**
|
|
50
33
|
* Finds the hold timestamp for a specific media type (mainCall, consult, etc.)
|
|
51
34
|
* Used for timer alignment in Consult & Conference scenarios to match Agent Desktop behavior.
|
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-
|
|
5
|
+
"version": "1.28.0-task-refactor.1",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"publishConfig": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"deploy:npm": "yarn npm publish"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@webex/contact-center": "3.
|
|
26
|
+
"@webex/contact-center": "3.12.0-task-refactor.7",
|
|
27
27
|
"mobx": "6.13.5",
|
|
28
28
|
"typescript": "5.6.3"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@testing-library/react": "16.0.1",
|
|
39
39
|
"@types/jest": "29.5.14",
|
|
40
40
|
"@types/react-test-renderer": "18",
|
|
41
|
-
"@webex/test-fixtures": "0.0.0-
|
|
41
|
+
"@webex/test-fixtures": "0.0.0-task-refactor.1",
|
|
42
42
|
"babel-jest": "29.7.0",
|
|
43
43
|
"babel-loader": "9.2.1",
|
|
44
44
|
"eslint": "^9.20.1",
|