@webex/cc-store 1.28.0-next.19 → 1.28.0-next.20

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,7 +1,3 @@
1
- /*!
2
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file
3
- */
4
-
5
1
  /*!
6
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
7
3
  */
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-next.19",
5
+ "version": "1.28.0-next.20",
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.12.0-next.42",
26
+ "@webex/contact-center": "3.12.0-next.74",
27
27
  "mobx": "6.13.5",
28
28
  "typescript": "5.6.3"
29
29
  },
@@ -38,6 +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/event-dictionary-ts": "^1.0.2191",
41
42
  "@webex/test-fixtures": "0.0.0-next.1",
42
43
  "babel-jest": "29.7.0",
43
44
  "babel-loader": "9.2.1",
@@ -1,25 +0,0 @@
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";
@@ -1,4 +0,0 @@
1
- import store from './storeEventsWrapper';
2
- export * from './store.types';
3
- export * from './task-utils';
4
- export default store;
@@ -1,46 +0,0 @@
1
- import { ITask } from '@webex/contact-center';
2
- import { IContactCenter, Team, IdleCode, InitParams, IStore, ILogger, IWrapupCode, ICustomState, AgentLoginProfile, WithWebex, RealTimeTranscriptionData } from './store.types';
3
- declare class Store implements IStore {
4
- private static instance;
5
- teams: Team[];
6
- loginOptions: string[];
7
- cc: IContactCenter;
8
- logger: ILogger;
9
- idleCodes: IdleCode[];
10
- agentId: string;
11
- currentTheme: string;
12
- wrapupCodes: IWrapupCode[];
13
- currentTask: ITask;
14
- isAgentLoggedIn: boolean;
15
- deviceType: string;
16
- teamId: string;
17
- taskList: Record<string, ITask>;
18
- dialNumber: string;
19
- currentState: string;
20
- customState: ICustomState;
21
- isQueueConsultInProgress: boolean;
22
- isDeclineButtonEnabled: boolean;
23
- currentConsultQueueId: string;
24
- consultStartTimeStamp: any;
25
- lastStateChangeTimestamp?: number;
26
- lastIdleCodeChangeTimestamp?: number;
27
- showMultipleLoginAlert: boolean;
28
- callControlAudio: MediaStream | null;
29
- featureFlags: {
30
- [key: string]: boolean;
31
- };
32
- isEndConsultEnabled: boolean;
33
- isAddressBookEnabled: boolean;
34
- allowConsultToQueue: boolean;
35
- agentProfile: AgentLoginProfile;
36
- isMuted: boolean;
37
- isDigitalChannelsInitialized: boolean;
38
- dataCenter: string;
39
- realtimeTranscriptionData: Partial<RealTimeTranscriptionData>[];
40
- acceptedCampaignIds: Set<string>;
41
- constructor();
42
- static getInstance(): Store;
43
- registerCC(webex?: WithWebex['webex']): Promise<void>;
44
- init(options: InitParams, setupEventListeners: any): Promise<void>;
45
- }
46
- export default Store;
@@ -1,288 +0,0 @@
1
- import { AgentLogin, Profile, BuddyDetails, ContactServiceQueue, ITask, BuddyAgents, BuddyAgentsResponse, StateChange, Logout, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, AddressBook, TaskResponse } from '@webex/contact-center';
2
- import { OutdialAniEntriesResponse, OutdialAniParams } from 'node_modules/@webex/contact-center/dist/types/services/config/types';
3
- import { DestinationType, PreviewContactPayload } from 'node_modules/@webex/contact-center/dist/types/services/task/types';
4
- import { AgentProfileUpdate, LogContext, SetStateResponse, StationLoginResponse, StationLogoutResponse, Team, UpdateDeviceTypeResponse } from 'node_modules/@webex/contact-center/dist/types/types';
5
- interface IContactCenter {
6
- on: (event: string, callback: (data: any) => void) => void;
7
- off: (event: string, callback?: (data: any) => void) => void;
8
- updateAgentProfile(data: AgentProfileUpdate): Promise<UpdateDeviceTypeResponse>;
9
- stationLogin(data: AgentLogin): Promise<StationLoginResponse>;
10
- deregister(): Promise<void>;
11
- stationLogout(data: Logout): Promise<StationLogoutResponse>;
12
- LoggerProxy: ILogger;
13
- register(): Promise<Profile>;
14
- taskManager: {
15
- getAllTasks: () => Record<string, ITask>;
16
- };
17
- getBuddyAgents(data: BuddyAgents): Promise<BuddyAgentsResponse>;
18
- getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
19
- getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
20
- addressBook: AddressBook;
21
- agentConfig?: {
22
- regexUS: RegExp | string;
23
- agentId: string;
24
- outdialANIId: string;
25
- };
26
- setAgentState(data: StateChange): Promise<SetStateResponse>;
27
- getOutdialAniEntries(params: OutdialAniParams): Promise<OutdialAniEntriesResponse>;
28
- getAccessToken(): Promise<string>;
29
- acceptPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
30
- skipPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
31
- removePreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
32
- }
33
- type IWebex = {
34
- cc: IContactCenter;
35
- once: (event: string, callback: (data: any) => void) => void;
36
- };
37
- type ILogger = {
38
- log: (message: string, context?: LogContext) => void;
39
- info: (message: string, context?: LogContext) => void;
40
- warn: (message: string, context?: LogContext) => void;
41
- trace: (message: string, context?: LogContext) => void;
42
- error: (message: string, context?: LogContext) => void;
43
- };
44
- type WithWebex = {
45
- webex: {
46
- cc: IContactCenter;
47
- logger: ILogger;
48
- };
49
- };
50
- type WithWebexConfig = {
51
- webexConfig: any;
52
- access_token: string;
53
- };
54
- type InitParams = WithWebex | WithWebexConfig;
55
- type IdleCode = {
56
- name: string;
57
- id: string;
58
- isSystem: boolean;
59
- isDefault: boolean;
60
- };
61
- type RealTimeTranscriptionData = {
62
- content: string;
63
- conversationId: string;
64
- isFinal: boolean;
65
- languageCode?: string;
66
- messageId: string;
67
- orgId: string;
68
- publishTimestamp: number | string;
69
- role: string;
70
- trackingId: string;
71
- utteranceId: string;
72
- };
73
- type RealTimeTranscriptionEventPayload = {
74
- agentId: string;
75
- data: RealTimeTranscriptionData;
76
- notifDetails: {
77
- actionEvent?: string;
78
- };
79
- notifType: string;
80
- orgId: string;
81
- };
82
- interface IStore {
83
- featureFlags: {
84
- [key: string]: boolean;
85
- };
86
- teams: Team[];
87
- loginOptions: string[];
88
- cc: IContactCenter;
89
- idleCodes: IdleCode[];
90
- agentId: string;
91
- logger: ILogger;
92
- wrapupCodes: IWrapupCode[];
93
- currentTask: ITask;
94
- taskList: Record<string, ITask>;
95
- isAgentLoggedIn: boolean;
96
- deviceType: string;
97
- teamId: string;
98
- dialNumber: string;
99
- currentState: string;
100
- lastStateChangeTimestamp?: number;
101
- lastIdleCodeChangeTimestamp?: number;
102
- showMultipleLoginAlert: boolean;
103
- currentTheme: string;
104
- customState: ICustomState;
105
- isQueueConsultInProgress: boolean;
106
- isDeclineButtonEnabled: boolean;
107
- currentConsultQueueId: string;
108
- consultStartTimeStamp?: number;
109
- callControlAudio: MediaStream | null;
110
- isEndConsultEnabled: boolean;
111
- allowConsultToQueue: boolean;
112
- agentProfile: AgentLoginProfile;
113
- isMuted: boolean;
114
- isAddressBookEnabled: boolean;
115
- isDigitalChannelsInitialized: boolean;
116
- dataCenter: string;
117
- realtimeTranscriptionData: Partial<RealTimeTranscriptionData>[];
118
- acceptedCampaignIds: Set<string>;
119
- init(params: InitParams, callback: (ccSDK: IContactCenter) => void): Promise<void>;
120
- registerCC(webex?: WithWebex['webex']): Promise<void>;
121
- }
122
- interface IStoreWrapper extends IStore {
123
- store: IStore;
124
- onErrorCallback?: (widgetName: string, error: Error) => void;
125
- setCurrentTask(task: ITask): void;
126
- refreshTaskList(): void;
127
- getBuddyAgents(mediaType?: string): Promise<BuddyDetails[]>;
128
- getQueues(mediaType?: string, params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
129
- getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
130
- getAddressBookEntries(params?: AddressBookEntrySearchParams): Promise<AddressBookEntriesResponse>;
131
- setDeviceType(option: string): void;
132
- setDialNumber(input: string): void;
133
- setCurrentState(state: string): void;
134
- setLastStateChangeTimestamp(timestamp: number): void;
135
- setLastIdleCodeChangeTimestamp(timestamp: number): void;
136
- setShowMultipleLoginAlert(value: boolean): void;
137
- setCurrentTheme(theme: string): void;
138
- setIsAgentLoggedIn(value: boolean): void;
139
- setWrapupCodes(wrapupCodes: IWrapupCode[]): void;
140
- setState(state: IdleCode | ICustomState): void;
141
- setConsultStartTimeStamp(timestamp: number): void;
142
- setAgentProfile(profile: Profile): void;
143
- setTeamId(id: string): void;
144
- setIsMuted(value: boolean): void;
145
- setIsDeclineButtonEnabled(value: boolean): void;
146
- setDigitalChannelsInitialized(value: boolean): void;
147
- setOnError(callback: (widgetName: string, error: Error) => void): void;
148
- setDataCenter(value: string): void;
149
- getAccessToken(): Promise<string>;
150
- addAcceptedCampaign(interactionId: string): void;
151
- removeAcceptedCampaign(interactionId: string): void;
152
- }
153
- interface IWrapupCode {
154
- id: string;
155
- name: string;
156
- }
157
- declare enum TASK_EVENTS {
158
- TASK_INCOMING = "task:incoming",
159
- TASK_ASSIGNED = "task:assigned",
160
- TASK_MEDIA = "task:media",
161
- TASK_HOLD = "task:hold",
162
- TASK_UNHOLD = "task:unhold",
163
- TASK_CONSULT = "task:consult",
164
- TASK_CONSULT_END = "task:consultEnd",
165
- TASK_CONSULT_ACCEPTED = "task:consultAccepted",
166
- TASK_PAUSE = "task:pause",
167
- TASK_RESUME = "task:resume",
168
- TASK_END = "task:end",
169
- TASK_WRAPUP = "task:wrapup",
170
- TASK_REJECT = "task:rejected",
171
- TASK_HYDRATE = "task:hydrate",
172
- TASK_CONSULTING = "task:consulting",
173
- TASK_CONSULT_QUEUE_CANCELLED = "task:consultQueueCancelled",
174
- AGENT_CONTACT_ASSIGNED = "AgentContactAssigned",
175
- CONTACT_RECORDING_PAUSED = "ContactRecordingPaused",
176
- CONTACT_RECORDING_RESUMED = "ContactRecordingResumed",
177
- AGENT_WRAPPEDUP = "AgentWrappedUp",
178
- AGENT_OFFER_CONTACT = "AgentOfferContact",
179
- AGENT_CONSULT_CREATED = "AgentConsultCreated",
180
- TASK_RECORDING_PAUSED = "task:recordingPaused",
181
- TASK_RECORDING_RESUMED = "task:recordingResumed",
182
- TASK_OFFER_CONSULT = "task:offerConsult",
183
- TASK_AUTO_ANSWERED = "task:autoAnswered",
184
- TASK_CONFERENCE_ESTABLISHING = "task:conferenceEstablishing",
185
- TASK_CONFERENCE_STARTED = "task:conferenceStarted",
186
- TASK_CONFERENCE_FAILED = "task:conferenceFailed",
187
- TASK_CONFERENCE_ENDED = "task:conferenceEnded",
188
- TASK_PARTICIPANT_JOINED = "task:participantJoined",
189
- TASK_PARTICIPANT_LEFT = "task:participantLeft",
190
- TASK_CONFERENCE_TRANSFERRED = "task:conferenceTransferred",
191
- TASK_CONFERENCE_TRANSFER_FAILED = "task:conferenceTransferFailed",
192
- TASK_CONFERENCE_END_FAILED = "task:conferenceEndFailed",
193
- TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
194
- TASK_MERGED = "task:merged",
195
- TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
196
- TASK_OUTDIAL_FAILED = "task:outdialFailed",
197
- REAL_TIME_TRANSCRIPTION = "REAL_TIME_TRANSCRIPTION",
198
- TASK_CAMPAIGN_PREVIEW_RESERVATION = "task:campaignPreviewReservation",
199
- TASK_CAMPAIGN_CONTACT_UPDATED = "task:campaignContactUpdated"
200
- }
201
- declare enum CC_EVENTS {
202
- AGENT_DN_REGISTERED = "agent:dnRegistered",
203
- AGENT_LOGOUT_SUCCESS = "agent:logoutSuccess",
204
- AGENT_STATION_LOGIN_SUCCESS = "agent:stationLoginSuccess",
205
- AGENT_MULTI_LOGIN = "agent:multiLogin",
206
- AGENT_STATE_CHANGE = "agent:stateChange",
207
- AGENT_RELOGIN_SUCCESS = "agent:reloginSuccess",
208
- AGENT_OFFER_CONSULT = "AgentOfferConsult"
209
- }
210
- interface ICustomStateSet {
211
- name: string;
212
- developerName: string;
213
- }
214
- interface ICustomStateReset {
215
- reset: boolean;
216
- }
217
- type ICustomState = ICustomStateSet | ICustomStateReset;
218
- declare const ENGAGED_LABEL = "ENGAGED";
219
- declare const ENGAGED_USERNAME = "Engaged";
220
- declare const RESERVED_LABEL = "RESERVED";
221
- declare const RESERVED_USERNAME = "Reserved";
222
- type AgentLoginProfile = {
223
- agentName?: string;
224
- orgId?: string;
225
- profileType?: string;
226
- deviceType?: string;
227
- roles?: Array<string>;
228
- mmProfile?: {
229
- chat: number;
230
- email: number;
231
- social: number;
232
- telephony: number;
233
- };
234
- isTimeoutDesktopInactivityEnabled?: boolean;
235
- timeoutDesktopInactivityMins?: number;
236
- };
237
- type PaginatedListParams = {
238
- page: number;
239
- pageSize: number;
240
- search?: string;
241
- };
242
- type FetchPaginatedList<T> = (params: PaginatedListParams) => Promise<{
243
- data: T[];
244
- meta?: {
245
- page?: number;
246
- totalPages?: number;
247
- };
248
- }>;
249
- type TransformPaginatedData<T, U> = (item: T, page: number, index: number) => U;
250
- declare const DIAL_NUMBER: string;
251
- declare const EXTENSION: string;
252
- declare const DESKTOP: string;
253
- declare const MEDIA_TYPE_TELEPHONY_LOWER = "telephony";
254
- declare const MEDIA_TYPE_TELEPHONY_UPPER = "TELEPHONY";
255
- declare const DEVICE_TYPE_BROWSER = "BROWSER";
256
- declare const AGENT_STATE_AVAILABLE = "Available";
257
- declare const LoginOptions: {
258
- [key: string]: string;
259
- };
260
- declare const ERROR_TRIGGERING_IDLE_CODES: {
261
- INVALID_NUMBER: string;
262
- UNAVAILABLE: string;
263
- DECLINED: string;
264
- BUSY: string;
265
- CHANNEL_FAILURE: string;
266
- RONA: string;
267
- };
268
- 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, RealTimeTranscriptionData, RealTimeTranscriptionEventPayload, };
269
- export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME, RESERVED_LABEL, RESERVED_USERNAME, DIAL_NUMBER, EXTENSION, DESKTOP, MEDIA_TYPE_TELEPHONY_LOWER, MEDIA_TYPE_TELEPHONY_UPPER, DEVICE_TYPE_BROWSER, AGENT_STATE_AVAILABLE, LoginOptions, ERROR_TRIGGERING_IDLE_CODES, };
270
- /** Outbound type values that identify a campaign preview task. */
271
- export declare const CAMPAIGN_PREVIEW_OUTBOUND_TYPES: string[];
272
- /** Campaign type values (from callProcessingDetails) that identify a campaign preview task. */
273
- export declare const CAMPAIGN_PREVIEW_CAMPAIGN_TYPES: string[];
274
- export declare enum ConsultStatus {
275
- NO_CONSULTATION_IN_PROGRESS = "No consultation in progress",
276
- BEING_CONSULTED = "beingConsulted",
277
- CONSULT_INITIATED = "consultInitiated",
278
- BEING_CONSULTED_ACCEPTED = "beingConsultedAccepted",
279
- CONSULT_ACCEPTED = "consultAccepted",
280
- CONNECTED = "connected",
281
- CONFERENCE = "conference",
282
- CONSULT_COMPLETED = "consultCompleted"
283
- }
284
- export type Participant = {
285
- id: string;
286
- pType: 'Customer' | 'Agent' | string;
287
- name?: string;
288
- };
@@ -1,151 +0,0 @@
1
- import { IStoreWrapper, IStore, InitParams, TASK_EVENTS, CC_EVENTS, IWrapupCode, WithWebex, ICustomState, IdleCode, IContactCenter, ITask, BuddyDetails, ContactServiceQueue, ContactServiceQueueSearchParams, EntryPointListResponse, EntryPointSearchParams, AddressBookEntriesResponse, AddressBookEntrySearchParams, AgentLoginProfile, RealTimeTranscriptionEventPayload } from './store.types';
2
- declare class StoreWrapper implements IStoreWrapper {
3
- store: IStore;
4
- onIncomingTask: ({ task }: {
5
- task: ITask;
6
- }) => void;
7
- onTaskRejected?: (task: ITask, reason: string) => void;
8
- onOutdialFailed?: (reason: string) => void;
9
- onTaskAssigned?: (task: ITask) => void;
10
- onTaskSelected?: (task: ITask, isClicked: boolean) => void;
11
- onErrorCallback?: (widgetName: string, error: Error) => void;
12
- private realtimeTranscriptionListeners;
13
- constructor();
14
- get featureFlags(): {
15
- [key: string]: boolean;
16
- };
17
- get teams(): import("node_modules/@webex/contact-center/dist/types/types").Team[];
18
- get loginOptions(): string[];
19
- get cc(): IContactCenter;
20
- get logger(): import("./store.types").ILogger;
21
- get idleCodes(): IdleCode[];
22
- get agentId(): string;
23
- get deviceType(): string;
24
- get teamId(): string;
25
- get dialNumber(): string;
26
- get wrapupCodes(): IWrapupCode[];
27
- get currentTask(): ITask;
28
- get isAgentLoggedIn(): boolean;
29
- get taskList(): Record<string, ITask>;
30
- get currentState(): string;
31
- get lastStateChangeTimestamp(): number;
32
- get lastIdleCodeChangeTimestamp(): number;
33
- get showMultipleLoginAlert(): boolean;
34
- get currentTheme(): string;
35
- get customState(): ICustomState;
36
- get consultStartTimeStamp(): number;
37
- get callControlAudio(): MediaStream;
38
- get isQueueConsultInProgress(): boolean;
39
- get isDeclineButtonEnabled(): boolean;
40
- get isDigitalChannelsInitialized(): boolean;
41
- get dataCenter(): string;
42
- get realtimeTranscriptionData(): Partial<import("./store.types").RealTimeTranscriptionData>[];
43
- get acceptedCampaignIds(): Set<string>;
44
- setDataCenter: (value: string) => void;
45
- get currentConsultQueueId(): string;
46
- get isEndConsultEnabled(): boolean;
47
- get allowConsultToQueue(): boolean;
48
- get agentProfile(): AgentLoginProfile;
49
- get isMuted(): boolean;
50
- get isAddressBookEnabled(): boolean;
51
- setDigitalChannelsInitialized: (value: boolean) => void;
52
- setIsMuted: (value: boolean) => void;
53
- setCurrentTheme: (theme: string) => void;
54
- setShowMultipleLoginAlert: (value: boolean) => void;
55
- setDeviceType: (option: string) => void;
56
- setTeamId: (id: string) => void;
57
- setDialNumber: (input: string) => void;
58
- setCurrentState: (state: string) => void;
59
- setLastStateChangeTimestamp: (timestamp: number) => void;
60
- setLastIdleCodeChangeTimestamp: (timestamp: number) => void;
61
- setIsAgentLoggedIn: (value: boolean) => void;
62
- setCurrentTask: (task: ITask | null, isClicked?: boolean) => void;
63
- setOnError: (callback: (widgetName: string, error: Error) => void) => void;
64
- refreshTaskList: () => void;
65
- setWrapupCodes: (wrapupCodes: IWrapupCode[]) => void;
66
- setConsultStartTimeStamp: (timestamp: number) => void;
67
- setCallControlAudio: (audio: MediaStream | null) => void;
68
- setIsQueueConsultInProgress: (value: boolean) => void;
69
- setIsDeclineButtonEnabled: (value: boolean) => void;
70
- setCurrentConsultQueueId: (queueId: string | null) => void;
71
- setState: (state: ICustomState | IdleCode) => void;
72
- setIncomingTaskCb: (callback: ({ task }: {
73
- task: ITask;
74
- }) => void) => void;
75
- setTaskRejected: (callback: ((task: ITask, reason: string) => void) | undefined) => void;
76
- setOutdialFailed: (callback: ((reason: string) => void) | undefined) => void;
77
- setTaskAssigned: (callback: ((task: ITask) => void) | undefined) => void;
78
- setTaskSelected: (callback: ((task: ITask, isClicked?: boolean) => void) | undefined) => void;
79
- setCCCallback: (event: CC_EVENTS | TASK_EVENTS, callback: any) => void;
80
- setTaskCallback: (event: TASK_EVENTS, callback: any, taskId: string) => void;
81
- setAgentProfile: (profile: AgentLoginProfile) => void;
82
- removeCCCallback: (event: CC_EVENTS) => void;
83
- removeTaskCallback: (event: TASK_EVENTS, callback: any, taskId: string) => void;
84
- init(options: InitParams): Promise<void>;
85
- registerCC: (webex?: WithWebex["webex"]) => Promise<void>;
86
- handleTaskRemove: (taskToRemove: ITask) => void;
87
- handleTaskMuteState: (task: ITask) => void;
88
- /**
89
- * Checks if a task is a campaign preview interaction.
90
- * Matches agent desktop logic that checks both outboundType and campaignType.
91
- */
92
- private isCampaignPreview;
93
- /**
94
- * Handles the campaign preview reservation event (agent accepted the preview).
95
- * Transitions state from RESERVED to ENGAGED, matching agent desktop behavior.
96
- */
97
- addAcceptedCampaign: (interactionId: string) => void;
98
- removeAcceptedCampaign: (interactionId: string) => void;
99
- handleCampaignPreviewReservation: (event: ITask) => void;
100
- handleTaskEnd: () => void;
101
- handleTaskAssigned: (event: any) => void;
102
- handleTaskMedia: (track: any) => void;
103
- handleConsultCreated: () => void;
104
- handleConsulting: () => void;
105
- handleConsultEnd: () => void;
106
- handleConsultOffer: () => void;
107
- handleAutoAnswer: () => void;
108
- handleConsultAccepted: (event: any) => void;
109
- handleConsultQueueCancelled: () => void;
110
- handleConferenceStarted: () => void;
111
- handleConferenceEnded: () => void;
112
- /**
113
- * Register all task event listeners
114
- * @param task - The task to register event listeners for
115
- */
116
- private registerTaskEventListeners;
117
- handleIncomingTask: (event: any) => void;
118
- /**
119
- * Handles the initial arrival of a campaign task.
120
- * The SDK emits TASK_CAMPAIGN_PREVIEW_RESERVATION for all campaign types.
121
- * Only standard and direct preview campaigns should enter RESERVED state
122
- * (the agent must explicitly accept/skip the preview contact).
123
- * Predictive and progressive campaigns go straight to the regular flow —
124
- * they will transition directly to ENGAGED via handleTaskAssigned.
125
- */
126
- handleIncomingCampaignPreview: (event: ITask) => void;
127
- handleStateChange: (data: any) => void;
128
- handleMultiLoginCloseSession: (data: any) => void;
129
- handleTaskMerged: (event: any) => void;
130
- handleTaskHydrate: (event: any) => void;
131
- handleTaskReject: (task: ITask, reason: string) => void;
132
- handleOutdialFailed: (reason: string) => void;
133
- handleRealtimeTranscription: (payload: RealTimeTranscriptionEventPayload) => void;
134
- getBuddyAgents: (mediaType?: string) => Promise<Array<BuddyDetails>>;
135
- getQueues: (mediaType?: string, params?: ContactServiceQueueSearchParams) => Promise<{
136
- data: ContactServiceQueue[];
137
- meta: {
138
- page: number;
139
- pageSize: number;
140
- total: number;
141
- totalPages: number;
142
- };
143
- }>;
144
- getEntryPoints: (params?: EntryPointSearchParams) => Promise<EntryPointListResponse>;
145
- getAddressBookEntries: (params?: AddressBookEntrySearchParams) => Promise<AddressBookEntriesResponse>;
146
- getAccessToken: () => Promise<string>;
147
- cleanUpStore: () => void;
148
- setupIncomingTaskHandler: (ccSDK: IContactCenter) => void;
149
- }
150
- declare const storeWrapper: StoreWrapper;
151
- export default storeWrapper;
@@ -1,57 +0,0 @@
1
- import { ITask, Participant } from './store.types';
2
- /**
3
- * Determines if a task is an incoming task
4
- * @param task - The task object
5
- * @returns Whether the task is incoming
6
- */
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;
49
- /**
50
- * Finds the hold timestamp for a specific media type (mainCall, consult, etc.)
51
- * Used for timer alignment in Consult & Conference scenarios to match Agent Desktop behavior.
52
- *
53
- * @param task - The task object containing interaction data
54
- * @param mType - The media type to search for ('mainCall', 'consult', 'conference')
55
- * @returns The hold timestamp in milliseconds or null if not on hold
56
- */
57
- export declare const findHoldTimestamp: (task: ITask, mType: string) => number | null;
@@ -1,2 +0,0 @@
1
- import { Profile } from './store.types';
2
- export declare function getFeatureFlags(agentProfile: Profile): {};