@webex/cc-store 1.28.0-ccwidgets.8 → 1.28.0-ccwidgets.81
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 +2 -25130
- package/dist/index.js.LICENSE.txt +71 -0
- package/dist/types/cc-components/src/components/StationLogin/constants.d.ts +32 -0
- package/dist/types/{index.d.ts → store/src/index.d.ts} +1 -1
- package/dist/types/store/src/store.d.ts +43 -0
- package/dist/types/store/src/store.types.d.ts +147 -0
- package/dist/types/store/src/storeEventsWrapper.d.ts +98 -0
- package/dist/types/store/src/util.d.ts +2 -0
- package/package.json +18 -13
- package/dist/types/store.d.ts +0 -17
- package/dist/types/store.types.d.ts +0 -27
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*!
|
|
6
|
+
* Copyright (c) 2015-2024 Cisco Systems, Inc. See LICENSE file.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
* Platform.js v1.3.6
|
|
11
|
+
* Copyright 2014-2020 Benjamin Tan
|
|
12
|
+
* Copyright 2011-2013 John-David Dalton
|
|
13
|
+
* Available under MIT license
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/*!
|
|
17
|
+
* The buffer module from node.js, for the browser.
|
|
18
|
+
*
|
|
19
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/*!
|
|
24
|
+
* js-logger - http://github.com/jonnyreeves/js-logger
|
|
25
|
+
* Jonny Reeves, http://jonnyreeves.co.uk/
|
|
26
|
+
* js-logger may be freely distributed under the MIT license.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/*!
|
|
30
|
+
* urlsafe-base64
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/*! *****************************************************************************
|
|
34
|
+
Copyright (c) Microsoft Corporation.
|
|
35
|
+
|
|
36
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
37
|
+
purpose with or without fee is hereby granted.
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
40
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
41
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
42
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
43
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
44
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
45
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
46
|
+
***************************************************************************** */
|
|
47
|
+
|
|
48
|
+
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
49
|
+
|
|
50
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
51
|
+
|
|
52
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
53
|
+
|
|
54
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @license
|
|
58
|
+
* Lodash <https://lodash.com/>
|
|
59
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
60
|
+
* Released under MIT license <https://lodash.com/license>
|
|
61
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
62
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* core-decorators.js
|
|
67
|
+
* (c) 2017 Jay Phelps and contributors
|
|
68
|
+
* MIT Licensed
|
|
69
|
+
* https://github.com/jayphelps/core-decorators.js
|
|
70
|
+
* @license
|
|
71
|
+
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const StationLoginLabels: {
|
|
2
|
+
MULTIPLE_SIGN_IN_ALERT_MESSAGE: string;
|
|
3
|
+
MULTIPLE_SIGN_IN_ALERT_TITLE: string;
|
|
4
|
+
CONTINUE: string;
|
|
5
|
+
CANCEL: string;
|
|
6
|
+
SIGN_OUT: string;
|
|
7
|
+
LOGOUT: string;
|
|
8
|
+
SAVE_AND_CONTINUE: string;
|
|
9
|
+
CC_SIGN_OUT: string;
|
|
10
|
+
CC_SIGN_OUT_CONFIRM: string;
|
|
11
|
+
INTERACTION_PREFERENCES: string;
|
|
12
|
+
HANDLE_CALLS: string;
|
|
13
|
+
HANDLE_CALLS_TOOLTIP: string;
|
|
14
|
+
YOUR_TEAM: string;
|
|
15
|
+
IS_REQUIRED: string;
|
|
16
|
+
DN_FORMAT_ERROR: string;
|
|
17
|
+
DEFAULT_ERROR: string;
|
|
18
|
+
CONFIRM: string;
|
|
19
|
+
CONFIRM_INTERACTION_PREFERENCE_CHANGES_TITLE: string;
|
|
20
|
+
CONFIRM_INTERACTION_PREFERENCE_CHANGES_MESSAGE: string;
|
|
21
|
+
SAVE: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const SignInErrors: {
|
|
24
|
+
DUPLICATE_LOCATION: string;
|
|
25
|
+
};
|
|
26
|
+
declare const DIALNUMBER: string;
|
|
27
|
+
declare const EXTENSION: string;
|
|
28
|
+
declare const DESKTOP: string;
|
|
29
|
+
declare const LoginOptions: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
export { DIALNUMBER, EXTENSION, DESKTOP, LoginOptions };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IContactCenter, Team, WithWebex, IdleCode, InitParams, IStore, ILogger, IWrapupCode, ICustomState, AgentLoginProfile } from './store.types';
|
|
2
|
+
import { ITask } from '@webex/plugin-cc';
|
|
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
|
+
consultCompleted: boolean;
|
|
22
|
+
consultInitiated: boolean;
|
|
23
|
+
consultAccepted: boolean;
|
|
24
|
+
isQueueConsultInProgress: boolean;
|
|
25
|
+
currentConsultQueueId: string;
|
|
26
|
+
consultStartTimeStamp: any;
|
|
27
|
+
lastStateChangeTimestamp?: number;
|
|
28
|
+
lastIdleCodeChangeTimestamp?: number;
|
|
29
|
+
showMultipleLoginAlert: boolean;
|
|
30
|
+
callControlAudio: MediaStream | null;
|
|
31
|
+
consultOfferReceived: boolean;
|
|
32
|
+
featureFlags: {
|
|
33
|
+
[key: string]: boolean;
|
|
34
|
+
};
|
|
35
|
+
isEndConsultEnabled: boolean;
|
|
36
|
+
allowConsultToQueue: boolean;
|
|
37
|
+
agentProfile: AgentLoginProfile;
|
|
38
|
+
constructor();
|
|
39
|
+
static getInstance(): Store;
|
|
40
|
+
registerCC(webex?: WithWebex['webex']): Promise<void>;
|
|
41
|
+
init(options: InitParams, setupEventListeners: any): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
export default Store;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { AgentLogin, IContactCenter, Profile, Team, LogContext, BuddyDetails, DestinationType, ContactServiceQueue, ITask } from '@webex/plugin-cc';
|
|
2
|
+
type ILogger = {
|
|
3
|
+
log: (message: string, context?: LogContext) => void;
|
|
4
|
+
info: (message: string, context?: LogContext) => void;
|
|
5
|
+
warn: (message: string, context?: LogContext) => void;
|
|
6
|
+
trace: (message: string, context?: LogContext) => void;
|
|
7
|
+
error: (message: string, context?: LogContext) => void;
|
|
8
|
+
};
|
|
9
|
+
interface WithWebex {
|
|
10
|
+
webex: {
|
|
11
|
+
cc: IContactCenter;
|
|
12
|
+
logger: ILogger;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
interface WithWebexConfig {
|
|
16
|
+
webexConfig: any;
|
|
17
|
+
access_token: string;
|
|
18
|
+
}
|
|
19
|
+
type InitParams = WithWebex | WithWebexConfig;
|
|
20
|
+
type IdleCode = {
|
|
21
|
+
name: string;
|
|
22
|
+
id: string;
|
|
23
|
+
isSystem: boolean;
|
|
24
|
+
isDefault: boolean;
|
|
25
|
+
};
|
|
26
|
+
interface IStore {
|
|
27
|
+
featureFlags: {
|
|
28
|
+
[key: string]: boolean;
|
|
29
|
+
};
|
|
30
|
+
teams: Team[];
|
|
31
|
+
loginOptions: string[];
|
|
32
|
+
cc: IContactCenter;
|
|
33
|
+
idleCodes: IdleCode[];
|
|
34
|
+
agentId: string;
|
|
35
|
+
logger: ILogger;
|
|
36
|
+
wrapupCodes: IWrapupCode[];
|
|
37
|
+
currentTask: ITask;
|
|
38
|
+
taskList: Record<string, ITask>;
|
|
39
|
+
isAgentLoggedIn: boolean;
|
|
40
|
+
deviceType: string;
|
|
41
|
+
teamId: string;
|
|
42
|
+
dialNumber: string;
|
|
43
|
+
currentState: string;
|
|
44
|
+
lastStateChangeTimestamp?: number;
|
|
45
|
+
lastIdleCodeChangeTimestamp?: number;
|
|
46
|
+
showMultipleLoginAlert: boolean;
|
|
47
|
+
currentTheme: string;
|
|
48
|
+
customState: ICustomState;
|
|
49
|
+
consultCompleted: boolean;
|
|
50
|
+
consultInitiated: boolean;
|
|
51
|
+
consultAccepted: boolean;
|
|
52
|
+
isQueueConsultInProgress: boolean;
|
|
53
|
+
currentConsultQueueId: string;
|
|
54
|
+
consultStartTimeStamp?: number;
|
|
55
|
+
callControlAudio: MediaStream | null;
|
|
56
|
+
consultOfferReceived: boolean;
|
|
57
|
+
isEndConsultEnabled: boolean;
|
|
58
|
+
allowConsultToQueue: boolean;
|
|
59
|
+
agentProfile: AgentLoginProfile;
|
|
60
|
+
init(params: InitParams, callback: (ccSDK: IContactCenter) => void): Promise<void>;
|
|
61
|
+
registerCC(webex?: WithWebex['webex']): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
interface IStoreWrapper extends IStore {
|
|
64
|
+
store: IStore;
|
|
65
|
+
setCurrentTask(task: ITask): void;
|
|
66
|
+
refreshTaskList(): void;
|
|
67
|
+
setDeviceType(option: string): void;
|
|
68
|
+
setDialNumber(input: string): void;
|
|
69
|
+
setCurrentState(state: string): void;
|
|
70
|
+
setLastStateChangeTimestamp(timestamp: number): void;
|
|
71
|
+
setLastIdleCodeChangeTimestamp(timestamp: number): void;
|
|
72
|
+
setShowMultipleLoginAlert(value: boolean): void;
|
|
73
|
+
setCurrentTheme(theme: string): void;
|
|
74
|
+
setIsAgentLoggedIn(value: boolean): void;
|
|
75
|
+
setWrapupCodes(wrapupCodes: IWrapupCode[]): void;
|
|
76
|
+
setState(state: IdleCode | ICustomState): void;
|
|
77
|
+
setConsultCompleted(value: boolean): void;
|
|
78
|
+
setConsultInitiated(value: boolean): void;
|
|
79
|
+
setConsultAccepted(value: boolean): void;
|
|
80
|
+
setConsultStartTimeStamp(timestamp: number): void;
|
|
81
|
+
setAgentProfile(profile: Profile): void;
|
|
82
|
+
setTeamId(id: string): void;
|
|
83
|
+
}
|
|
84
|
+
interface IWrapupCode {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
}
|
|
88
|
+
declare enum TASK_EVENTS {
|
|
89
|
+
TASK_INCOMING = "task:incoming",
|
|
90
|
+
TASK_ASSIGNED = "task:assigned",
|
|
91
|
+
TASK_MEDIA = "task:media",
|
|
92
|
+
TASK_HOLD = "task:hold",
|
|
93
|
+
TASK_UNHOLD = "task:unhold",
|
|
94
|
+
TASK_CONSULT = "task:consult",
|
|
95
|
+
TASK_CONSULT_END = "task:consultEnd",
|
|
96
|
+
TASK_CONSULT_ACCEPTED = "task:consultAccepted",
|
|
97
|
+
TASK_PAUSE = "task:pause",
|
|
98
|
+
TASK_RESUME = "task:resume",
|
|
99
|
+
TASK_END = "task:end",
|
|
100
|
+
TASK_WRAPUP = "task:wrapup",
|
|
101
|
+
TASK_REJECT = "task:rejected",
|
|
102
|
+
TASK_HYDRATE = "task:hydrate",
|
|
103
|
+
TASK_CONSULTING = "task:consulting",
|
|
104
|
+
TASK_CONSULT_QUEUE_CANCELLED = "task:consultQueueCancelled",
|
|
105
|
+
AGENT_CONTACT_ASSIGNED = "AgentContactAssigned",
|
|
106
|
+
CONTACT_RECORDING_PAUSED = "ContactRecordingPaused",
|
|
107
|
+
CONTACT_RECORDING_RESUMED = "ContactRecordingResumed",
|
|
108
|
+
AGENT_WRAPPEDUP = "AgentWrappedUp",
|
|
109
|
+
AGENT_OFFER_CONTACT = "AgentOfferContact",
|
|
110
|
+
AGENT_CONSULT_CREATED = "AgentConsultCreated",
|
|
111
|
+
TASK_RECORDING_PAUSED = "task:recordingPaused",
|
|
112
|
+
TASK_RECORDING_RESUMED = "task:recordingResumed"
|
|
113
|
+
}
|
|
114
|
+
declare enum CC_EVENTS {
|
|
115
|
+
AGENT_DN_REGISTERED = "agent:dnRegistered",
|
|
116
|
+
AGENT_LOGOUT_SUCCESS = "agent:logoutSuccess",
|
|
117
|
+
AGENT_STATION_LOGIN_SUCCESS = "agent:stationLoginSuccess",
|
|
118
|
+
AGENT_MULTI_LOGIN = "agent:multiLogin",
|
|
119
|
+
AGENT_STATE_CHANGE = "agent:stateChange",
|
|
120
|
+
AGENT_RELOGIN_SUCCESS = "agent:reloginSuccess",
|
|
121
|
+
AGENT_OFFER_CONSULT = "AgentOfferConsult"
|
|
122
|
+
}
|
|
123
|
+
interface ICustomStateSet {
|
|
124
|
+
name: string;
|
|
125
|
+
developerName: string;
|
|
126
|
+
}
|
|
127
|
+
interface ICustomStateReset {
|
|
128
|
+
reset: boolean;
|
|
129
|
+
}
|
|
130
|
+
type ICustomState = ICustomStateSet | ICustomStateReset;
|
|
131
|
+
declare const ENGAGED_LABEL = "ENGAGED";
|
|
132
|
+
declare const ENGAGED_USERNAME = "Engaged";
|
|
133
|
+
type AgentLoginProfile = {
|
|
134
|
+
agentName?: string;
|
|
135
|
+
orgId?: string;
|
|
136
|
+
profileType?: string;
|
|
137
|
+
deviceType?: string;
|
|
138
|
+
roles?: Array<string>;
|
|
139
|
+
mmProfile?: {
|
|
140
|
+
chat: number;
|
|
141
|
+
email: number;
|
|
142
|
+
social: number;
|
|
143
|
+
telephony: number;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type { IContactCenter, ITask, Profile, Team, AgentLogin, WithWebex, IdleCode, InitParams, IStore, ILogger, IWrapupCode, IStoreWrapper, ICustomState, DestinationType, BuddyDetails, ContactServiceQueue, AgentLoginProfile, };
|
|
147
|
+
export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { IStoreWrapper, IStore, InitParams, TASK_EVENTS, CC_EVENTS, IWrapupCode, WithWebex, ICustomState, IdleCode, IContactCenter, ITask, BuddyDetails, ContactServiceQueue, AgentLoginProfile } 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
|
+
onTaskAssigned?: (task: ITask) => void;
|
|
9
|
+
onTaskSelected?: (task: ITask, isClicked: boolean) => void;
|
|
10
|
+
constructor();
|
|
11
|
+
get featureFlags(): {
|
|
12
|
+
[key: string]: boolean;
|
|
13
|
+
};
|
|
14
|
+
get teams(): Team[];
|
|
15
|
+
get loginOptions(): string[];
|
|
16
|
+
get cc(): IContactCenter;
|
|
17
|
+
get logger(): import("./store.types").ILogger;
|
|
18
|
+
get idleCodes(): IdleCode[];
|
|
19
|
+
get agentId(): string;
|
|
20
|
+
get deviceType(): string;
|
|
21
|
+
get teamId(): string;
|
|
22
|
+
get dialNumber(): string;
|
|
23
|
+
get wrapupCodes(): IWrapupCode[];
|
|
24
|
+
get currentTask(): ITask;
|
|
25
|
+
get isAgentLoggedIn(): boolean;
|
|
26
|
+
get taskList(): Record<string, ITask>;
|
|
27
|
+
get currentState(): string;
|
|
28
|
+
get lastStateChangeTimestamp(): number;
|
|
29
|
+
get lastIdleCodeChangeTimestamp(): number;
|
|
30
|
+
get showMultipleLoginAlert(): boolean;
|
|
31
|
+
get currentTheme(): string;
|
|
32
|
+
get customState(): ICustomState;
|
|
33
|
+
get consultCompleted(): boolean;
|
|
34
|
+
get consultInitiated(): boolean;
|
|
35
|
+
get consultAccepted(): boolean;
|
|
36
|
+
get consultStartTimeStamp(): number;
|
|
37
|
+
get callControlAudio(): MediaStream;
|
|
38
|
+
get consultOfferReceived(): boolean;
|
|
39
|
+
get isQueueConsultInProgress(): boolean;
|
|
40
|
+
get currentConsultQueueId(): string;
|
|
41
|
+
get isEndConsultEnabled(): boolean;
|
|
42
|
+
get allowConsultToQueue(): boolean;
|
|
43
|
+
get agentProfile(): AgentLoginProfile;
|
|
44
|
+
setCurrentTheme: (theme: string) => void;
|
|
45
|
+
setShowMultipleLoginAlert: (value: boolean) => void;
|
|
46
|
+
setDeviceType: (option: string) => void;
|
|
47
|
+
setTeamId: (id: string) => void;
|
|
48
|
+
setDialNumber: (input: string) => void;
|
|
49
|
+
setCurrentState: (state: string) => void;
|
|
50
|
+
setLastStateChangeTimestamp: (timestamp: number) => void;
|
|
51
|
+
setLastIdleCodeChangeTimestamp: (timestamp: number) => void;
|
|
52
|
+
setIsAgentLoggedIn: (value: boolean) => void;
|
|
53
|
+
setCurrentTask: (task: ITask, isClicked?: boolean) => void;
|
|
54
|
+
refreshTaskList: () => void;
|
|
55
|
+
setWrapupCodes: (wrapupCodes: IWrapupCode[]) => void;
|
|
56
|
+
setConsultCompleted: (value: boolean) => void;
|
|
57
|
+
setConsultInitiated: (value: boolean) => void;
|
|
58
|
+
setConsultAccepted: (value: boolean) => void;
|
|
59
|
+
setConsultOfferReceived: (value: boolean) => void;
|
|
60
|
+
setConsultStartTimeStamp: (timestamp: number) => void;
|
|
61
|
+
setCallControlAudio: (audio: MediaStream | null) => void;
|
|
62
|
+
setIsQueueConsultInProgress: (value: boolean) => void;
|
|
63
|
+
setCurrentConsultQueueId: (queueId: string | null) => void;
|
|
64
|
+
setState: (state: ICustomState | IdleCode) => void;
|
|
65
|
+
setIncomingTaskCb: (callback: (task: ITask) => void) => void;
|
|
66
|
+
setTaskRejected: (callback: ((task: ITask, reason: string) => void) | undefined) => void;
|
|
67
|
+
setTaskAssigned: (callback: ((task: ITask) => void) | undefined) => void;
|
|
68
|
+
setTaskSelected: (callback: ((task: ITask) => void) | undefined) => void;
|
|
69
|
+
setCCCallback: (event: CC_EVENTS | TASK_EVENTS, callback: any) => void;
|
|
70
|
+
setTaskCallback: (event: TASK_EVENTS, callback: any, taskId: string) => void;
|
|
71
|
+
setAgentProfile: (profile: AgentLoginProfile) => void;
|
|
72
|
+
removeCCCallback: (event: CC_EVENTS) => void;
|
|
73
|
+
removeTaskCallback: (event: TASK_EVENTS, callback: any, taskId: string) => void;
|
|
74
|
+
init(options: InitParams): Promise<void>;
|
|
75
|
+
registerCC: (webex?: WithWebex["webex"]) => Promise<void>;
|
|
76
|
+
handleTaskRemove: (taskId: any) => void;
|
|
77
|
+
handleTaskEnd: () => void;
|
|
78
|
+
handleTaskAssigned: (event: any) => void;
|
|
79
|
+
handleTaskWrapUp: (task: any) => void;
|
|
80
|
+
handleTaskMedia: (track: any) => void;
|
|
81
|
+
handleConsultCreated: () => void;
|
|
82
|
+
handleConsulting: (event: any) => void;
|
|
83
|
+
handleConsultEnd: (event: any) => void;
|
|
84
|
+
handleConsultOffer: () => void;
|
|
85
|
+
handleConsultAccepted: (event: any) => void;
|
|
86
|
+
handleConsultQueueCancelled: () => void;
|
|
87
|
+
handleIncomingTask: (event: any) => void;
|
|
88
|
+
handleStateChange: (data: any) => void;
|
|
89
|
+
handleMultiLoginCloseSession: (data: any) => void;
|
|
90
|
+
handleTaskHydrate: (event: any) => void;
|
|
91
|
+
handleTaskReject: (task: ITask, reason: string) => void;
|
|
92
|
+
getBuddyAgents: (mediaType?: string) => Promise<Array<BuddyDetails>>;
|
|
93
|
+
getQueues: (mediaType?: string) => Promise<Array<ContactServiceQueue>>;
|
|
94
|
+
cleanUpStore: () => void;
|
|
95
|
+
setupIncomingTaskHandler: (ccSDK: IContactCenter) => void;
|
|
96
|
+
}
|
|
97
|
+
declare const storeWrapper: StoreWrapper;
|
|
98
|
+
export default storeWrapper;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/cc-store",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Widgets Store",
|
|
4
|
-
"version": "1.28.0-ccwidgets.
|
|
4
|
+
"version": "1.28.0-ccwidgets.81",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
@@ -17,18 +17,20 @@
|
|
|
17
17
|
"build": "yarn run -T tsc",
|
|
18
18
|
"build:src": "yarn run clean:dist && webpack",
|
|
19
19
|
"build:watch": "webpack --watch",
|
|
20
|
-
"test:unit": "jest"
|
|
20
|
+
"test:unit": "jest --coverage",
|
|
21
|
+
"test:styles": "eslint"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
24
|
+
"@webex/plugin-cc": "3.8.1-next.2",
|
|
23
25
|
"mobx": "6.13.5",
|
|
24
|
-
"typescript": "5.6.3"
|
|
25
|
-
"webex": "3.7.0-wxcc.5"
|
|
26
|
+
"typescript": "5.6.3"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@babel/core": "7.25.2",
|
|
29
30
|
"@babel/preset-env": "7.25.4",
|
|
30
31
|
"@babel/preset-react": "7.24.7",
|
|
31
32
|
"@babel/preset-typescript": "7.25.9",
|
|
33
|
+
"@eslint/js": "^9.20.0",
|
|
32
34
|
"@testing-library/dom": "10.4.0",
|
|
33
35
|
"@testing-library/jest-dom": "6.6.2",
|
|
34
36
|
"@testing-library/react": "16.0.1",
|
|
@@ -36,20 +38,23 @@
|
|
|
36
38
|
"@types/react-test-renderer": "18",
|
|
37
39
|
"babel-jest": "29.7.0",
|
|
38
40
|
"babel-loader": "9.2.1",
|
|
41
|
+
"eslint": "^9.20.1",
|
|
42
|
+
"eslint-config-prettier": "^10.0.1",
|
|
43
|
+
"eslint-config-standard": "^17.1.0",
|
|
44
|
+
"eslint-plugin-import": "^2.25.2",
|
|
45
|
+
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
|
46
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
47
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
48
|
+
"eslint-plugin-react": "^7.37.4",
|
|
39
49
|
"file-loader": "6.2.0",
|
|
50
|
+
"globals": "^16.0.0",
|
|
40
51
|
"jest": "29.7.0",
|
|
41
52
|
"jest-environment-jsdom": "29.7.0",
|
|
53
|
+
"prettier": "^3.5.1",
|
|
42
54
|
"ts-loader": "9.5.1",
|
|
55
|
+
"typescript-eslint": "^8.24.1",
|
|
43
56
|
"webpack": "5.94.0",
|
|
44
57
|
"webpack-cli": "5.1.4",
|
|
45
58
|
"webpack-merge": "6.0.1"
|
|
46
|
-
}
|
|
47
|
-
"jest": {
|
|
48
|
-
"testEnvironment": "jsdom",
|
|
49
|
-
"testMatch": [
|
|
50
|
-
"**/tests/**/*.ts",
|
|
51
|
-
"**/tests/**/*.tsx"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"stableVersion": "1.28.0-ccwidgets.7"
|
|
59
|
+
}
|
|
55
60
|
}
|
package/dist/types/store.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IContactCenter, Team, WithWebex, IdleCode, InitParams, IStore } from './store.types';
|
|
2
|
-
declare class Store implements IStore {
|
|
3
|
-
private static instance;
|
|
4
|
-
teams: Team[];
|
|
5
|
-
loginOptions: string[];
|
|
6
|
-
cc: IContactCenter;
|
|
7
|
-
idleCodes: IdleCode[];
|
|
8
|
-
agentId: string;
|
|
9
|
-
selectedLoginOption: string;
|
|
10
|
-
constructor();
|
|
11
|
-
static getInstance(): Store;
|
|
12
|
-
setSelectedLoginOption(option: string): void;
|
|
13
|
-
registerCC(webex: WithWebex['webex']): Promise<void>;
|
|
14
|
-
init(options: InitParams): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
declare const store: Store;
|
|
17
|
-
export default store;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AgentLogin, IContactCenter, Profile, Team } from '@webex/plugin-cc';
|
|
2
|
-
interface WithWebex {
|
|
3
|
-
webex: {
|
|
4
|
-
cc: IContactCenter;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
interface WithWebexConfig {
|
|
8
|
-
webexConfig: any;
|
|
9
|
-
access_token: string;
|
|
10
|
-
}
|
|
11
|
-
type InitParams = WithWebex | WithWebexConfig;
|
|
12
|
-
type IdleCode = {
|
|
13
|
-
name: string;
|
|
14
|
-
id: string;
|
|
15
|
-
isSystem: boolean;
|
|
16
|
-
isDefault: boolean;
|
|
17
|
-
};
|
|
18
|
-
interface IStore {
|
|
19
|
-
teams: Team[];
|
|
20
|
-
loginOptions: string[];
|
|
21
|
-
cc: IContactCenter;
|
|
22
|
-
idleCodes: IdleCode[];
|
|
23
|
-
agentId: string;
|
|
24
|
-
registerCC(webex: WithWebex['webex']): Promise<Profile>;
|
|
25
|
-
init(params: InitParams): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export type { IContactCenter, Profile, Team, AgentLogin, WithWebex, IdleCode, InitParams, IStore };
|