@webex/cc-task 1.28.0-rtt.2 → 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.
- package/dist/index.js +223 -223
- package/dist/index.js.LICENSE.txt +72 -0
- package/dist/types/Utils/task-util.d.ts +7 -123
- package/dist/types/Utils/timer-utils.d.ts +16 -13
- package/dist/types/Utils/useHoldTimer.d.ts +9 -3
- package/dist/types/helper.d.ts +10 -41
- package/dist/types/index.d.ts +1 -2
- package/dist/types/task.types.d.ts +4 -20
- package/package.json +4 -4
- package/dist/types/ReatimeTranscript/index.d.ts +0 -4
|
@@ -1,5 +1,69 @@
|
|
|
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
|
+
|
|
1
48
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
49
|
|
|
50
|
+
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
51
|
+
|
|
52
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
53
|
+
|
|
54
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
55
|
+
|
|
56
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @license
|
|
60
|
+
* Lodash <https://lodash.com/>
|
|
61
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
62
|
+
* Released under MIT license <https://lodash.com/license>
|
|
63
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
64
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
65
|
+
*/
|
|
66
|
+
|
|
3
67
|
/**
|
|
4
68
|
* @license React
|
|
5
69
|
* use-sync-external-store-shim.production.js
|
|
@@ -9,3 +73,11 @@
|
|
|
9
73
|
* This source code is licensed under the MIT license found in the
|
|
10
74
|
* LICENSE file in the root directory of this source tree.
|
|
11
75
|
*/
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* core-decorators.js
|
|
79
|
+
* (c) 2017 Jay Phelps and contributors
|
|
80
|
+
* MIT Licensed
|
|
81
|
+
* https://github.com/jayphelps/core-decorators.js
|
|
82
|
+
* @license
|
|
83
|
+
*/
|
|
@@ -1,125 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ITask, Interaction } from '@webex/contact-center';
|
|
3
|
-
import { Visibility } from '@webex/cc-components';
|
|
4
|
-
export declare function findHoldTimestamp(interaction: Interaction, mType?: string): number | null;
|
|
5
|
-
/**
|
|
6
|
-
* Get visibility for Accept button
|
|
7
|
-
*/
|
|
8
|
-
export declare function getAcceptButtonVisibility(isBrowser: boolean, isPhoneDevice: boolean, webRtcEnabled: boolean, isCall: boolean, isDigitalChannel: boolean): Visibility;
|
|
9
|
-
/**
|
|
10
|
-
* Get visibility for Decline button
|
|
11
|
-
*/
|
|
12
|
-
export declare function getDeclineButtonVisibility(isBrowser: boolean, webRtcEnabled: boolean, isCall: boolean): Visibility;
|
|
13
|
-
/**
|
|
14
|
-
* Get visibility for End button (matches Agent Desktop behavior)
|
|
15
|
-
*/
|
|
16
|
-
export declare function getEndButtonVisibility(isBrowser: boolean, isEndCallEnabled: boolean, isCall: boolean, isConsultInitiatedOrAcceptedOrBeingConsulted: boolean, isConferenceInProgress: boolean, isConsultCompleted: boolean, isHeld: boolean, consultCallHeld: boolean, task?: ITask, agentId?: string): Visibility;
|
|
17
|
-
/**
|
|
18
|
-
* Get visibility for Mute/Unmute button
|
|
19
|
-
*/
|
|
20
|
-
export declare function getMuteUnmuteButtonVisibility(isBrowser: boolean, webRtcEnabled: boolean, isCall: boolean, isBeingConsulted: boolean): Visibility;
|
|
21
|
-
/**
|
|
22
|
-
* Get visibility for Hold/Resume button
|
|
23
|
-
*/
|
|
24
|
-
export declare function getHoldResumeButtonVisibility(isTelephonySupported: boolean, isCall: boolean, isConferenceInProgress: boolean, isConsultInProgress: boolean, isHeld: boolean, isBeingConsulted: boolean, isConsultCompleted: boolean): Visibility;
|
|
25
|
-
/**
|
|
26
|
-
* Get visibility for Pause/Resume Recording button
|
|
27
|
-
*/
|
|
28
|
-
export declare function getPauseResumeRecordingButtonVisibility(isTelephonySupported: boolean, isCall: boolean, isConferenceInProgress: boolean, isConsultInitiatedOrAccepted: boolean): Visibility;
|
|
29
|
-
/**
|
|
30
|
-
* Get visibility for Recording Indicator
|
|
31
|
-
*/
|
|
32
|
-
export declare function getRecordingIndicatorVisibility(isCall: boolean): Visibility;
|
|
33
|
-
/**
|
|
34
|
-
* Get visibility for Transfer button
|
|
35
|
-
*/
|
|
36
|
-
export declare function getTransferButtonVisibility(isTransferVisibility: boolean, isConferenceInProgress: boolean, isConsultInitiatedOrAccepted: boolean): Visibility;
|
|
37
|
-
/**
|
|
38
|
-
* Get visibility for Conference button
|
|
39
|
-
*/
|
|
40
|
-
export declare function getConferenceButtonVisibility(isBrowser: boolean, webRtcEnabled: boolean, isCall: boolean, isChat: boolean, isBeingConsulted: boolean, conferenceEnabled: boolean): Visibility;
|
|
41
|
-
/**
|
|
42
|
-
* Get visibility for Exit Conference button
|
|
43
|
-
*/
|
|
44
|
-
export declare function getExitConferenceButtonVisibility(isConferenceInProgress: boolean, isConsultInitiatedOrAccepted: boolean, consultCallHeld: boolean, isHeld: boolean, isConsultCompleted: boolean, conferenceEnabled: boolean): Visibility;
|
|
1
|
+
import { Interaction } from '@webex/contact-center';
|
|
45
2
|
/**
|
|
46
|
-
*
|
|
3
|
+
* Finds the hold timestamp for a specific media type from an interaction.
|
|
4
|
+
* Used by useHoldTimer for hold duration display.
|
|
5
|
+
*
|
|
6
|
+
* Note: There is a separate findHoldTimestamp in @webex/cc-store that takes ITask.
|
|
7
|
+
* This one takes Interaction directly.
|
|
47
8
|
*/
|
|
48
|
-
export declare function
|
|
49
|
-
/**
|
|
50
|
-
* Get visibility for Consult button
|
|
51
|
-
*/
|
|
52
|
-
export declare function getConsultButtonVisibility(isTelephonySupported: boolean, isCall: boolean, isConsultInProgress: boolean, isCustomerInCall: boolean, conferenceParticipantsCount: number, maxParticipantsInConference: number, isBeingConsulted: boolean, isHeld: boolean, isConsultCompleted: boolean, isConferenceInProgress: boolean): Visibility;
|
|
53
|
-
/**
|
|
54
|
-
* Get visibility for End Consult button
|
|
55
|
-
*/
|
|
56
|
-
export declare function getEndConsultButtonVisibility(isEndConsultEnabled: boolean, isTelephonySupported: boolean, isCall: boolean, isConsultInitiatedOrAccepted: boolean): Visibility;
|
|
57
|
-
/**
|
|
58
|
-
* Get visibility for Consult Transfer button
|
|
59
|
-
*/
|
|
60
|
-
export declare function getConsultTransferButtonVisibility(isConsultInitiatedOrAccepted: boolean, isConsultAccepted: boolean, consultCallHeld: boolean, isConferenceInProgress: boolean, isCustomerInCall: boolean): Visibility;
|
|
61
|
-
/**
|
|
62
|
-
* Get visibility for Merge Conference Consult button
|
|
63
|
-
*/
|
|
64
|
-
export declare function getMergeConferenceConsultButtonVisibility(isConsultAccepted: boolean, isConsultInitiated: boolean, consultCallHeld: boolean, isCustomerInCall: boolean, conferenceEnabled: boolean): Visibility;
|
|
65
|
-
/**
|
|
66
|
-
* Get visibility for Consult Transfer Consult button
|
|
67
|
-
*/
|
|
68
|
-
export declare function getConsultTransferConsultButtonVisibility(isConsultAccepted: boolean, isConsultInitiated: boolean, consultCallHeld: boolean, isCustomerInCall: boolean): Visibility;
|
|
69
|
-
/**
|
|
70
|
-
* Get visibility for Mute/Unmute Consult button
|
|
71
|
-
*/
|
|
72
|
-
export declare function getMuteUnmuteConsultButtonVisibility(isBrowser: boolean, webRtcEnabled: boolean, isCall: boolean, isConsultInitiated: boolean, isBeingConsulted: boolean): Visibility;
|
|
73
|
-
/**
|
|
74
|
-
* Get visibility for Switch to Main Call button
|
|
75
|
-
*/
|
|
76
|
-
export declare function getSwitchToMainCallButtonVisibility(isBeingConsulted: boolean, isConsultAccepted: boolean, isConsultInitiated: boolean, consultCallHeld: boolean, isCustomerInCall: boolean, isConferenceInProgress: boolean): Visibility;
|
|
77
|
-
/**
|
|
78
|
-
* Get visibility for Switch to Consult button
|
|
79
|
-
*/
|
|
80
|
-
export declare function getSwitchToConsultButtonVisibility(isBeingConsulted: boolean, consultCallHeld: boolean): Visibility;
|
|
81
|
-
/**
|
|
82
|
-
* Get visibility for Wrapup button
|
|
83
|
-
*/
|
|
84
|
-
export declare function getWrapupButtonVisibility(task: ITask): Visibility;
|
|
85
|
-
/**
|
|
86
|
-
* This function determines the visibility of various controls based on the task's data.
|
|
87
|
-
* @param deviceType The device type (Browser, Extension, AgentDN)
|
|
88
|
-
* @param featureFlags Feature flags configuration object
|
|
89
|
-
* @param task The task object
|
|
90
|
-
* @param agentId The agent ID
|
|
91
|
-
* @param conferenceEnabled Whether conference is enabled
|
|
92
|
-
* @param logger Optional logger instance
|
|
93
|
-
* @returns An object containing the visibility and state of various controls
|
|
94
|
-
*/
|
|
95
|
-
export declare function getControlsVisibility(deviceType: string, featureFlags: {
|
|
96
|
-
[key: string]: boolean;
|
|
97
|
-
}, task: ITask, agentId: string, conferenceEnabled: boolean, logger?: ILogger): {
|
|
98
|
-
accept: Visibility;
|
|
99
|
-
decline: Visibility;
|
|
100
|
-
end: Visibility;
|
|
101
|
-
muteUnmute: Visibility;
|
|
102
|
-
holdResume: Visibility;
|
|
103
|
-
pauseResumeRecording: Visibility;
|
|
104
|
-
recordingIndicator: Visibility;
|
|
105
|
-
transfer: Visibility;
|
|
106
|
-
conference: Visibility;
|
|
107
|
-
exitConference: Visibility;
|
|
108
|
-
mergeConference: Visibility;
|
|
109
|
-
consult: Visibility;
|
|
110
|
-
endConsult: Visibility;
|
|
111
|
-
consultTransfer: Visibility;
|
|
112
|
-
consultTransferConsult: Visibility;
|
|
113
|
-
mergeConferenceConsult: Visibility;
|
|
114
|
-
muteUnmuteConsult: Visibility;
|
|
115
|
-
switchToMainCall: Visibility;
|
|
116
|
-
switchToConsult: Visibility;
|
|
117
|
-
wrapup: Visibility;
|
|
118
|
-
isConferenceInProgress: boolean;
|
|
119
|
-
isConsultInitiated: boolean;
|
|
120
|
-
isConsultInitiatedAndAccepted: boolean;
|
|
121
|
-
isConsultReceived: boolean;
|
|
122
|
-
isConsultInitiatedOrAccepted: boolean;
|
|
123
|
-
isHeld: boolean;
|
|
124
|
-
consultCallHeld: boolean;
|
|
125
|
-
};
|
|
9
|
+
export declare function findHoldTimestamp(interaction: Interaction, mType?: string): number | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ITask } from '@webex/cc-store';
|
|
2
|
-
import { ControlVisibility } from '@webex/cc-components';
|
|
1
|
+
import { ITask, TaskUIControls } from '@webex/cc-store';
|
|
3
2
|
/**
|
|
4
3
|
* Timer data structure containing label and timestamp
|
|
5
4
|
*/
|
|
@@ -7,23 +6,27 @@ export interface TimerData {
|
|
|
7
6
|
label: string | null;
|
|
8
7
|
timestamp: number;
|
|
9
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Find the latest (most recently added) consult media from the interaction.
|
|
11
|
+
*
|
|
12
|
+
* After transfer → re-consult the backend may leave the OLD consult media
|
|
13
|
+
* in the interaction alongside the NEW one. Using Array.find() would return
|
|
14
|
+
* the first (stale) entry; we need the last one which is the active consult.
|
|
15
|
+
*/
|
|
16
|
+
export declare function findLatestConsultMedia(interaction: any): any;
|
|
10
17
|
/**
|
|
11
18
|
* Calculate state timer label and timestamp based on task state.
|
|
12
19
|
* Priority: Wrap Up > Post Call
|
|
13
|
-
*
|
|
14
|
-
* @param currentTask - The current task object
|
|
15
|
-
* @param controlVisibility - Control visibility flags
|
|
16
|
-
* @param agentId - The current agent ID
|
|
17
|
-
* @returns TimerData object with label and timestamp
|
|
18
20
|
*/
|
|
19
|
-
export declare function calculateStateTimerData(currentTask: ITask | null,
|
|
21
|
+
export declare function calculateStateTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
|
|
20
22
|
/**
|
|
21
23
|
* Calculate consult timer label and timestamp based on consult state.
|
|
22
24
|
* Handles consult on hold vs active consulting states.
|
|
23
25
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
26
|
+
* Approach mirrors the original next-branch pattern: derive consultCallHeld
|
|
27
|
+
* from the consult media's isHold flag (task data), NOT from SDK uiControls
|
|
28
|
+
* properties like activeLeg or switch button visibility. Those UI properties
|
|
29
|
+
* have different lifecycle timing and broader semantics that cause false
|
|
30
|
+
* positives (e.g., switch.isVisible is true during CONSULT_INITIATING).
|
|
28
31
|
*/
|
|
29
|
-
export declare function calculateConsultTimerData(currentTask: ITask | null,
|
|
32
|
+
export declare function calculateConsultTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ITask } from '@webex/cc-store';
|
|
2
|
+
import { TaskUIControls } from '@webex/contact-center';
|
|
2
3
|
/**
|
|
3
|
-
* Custom hook to manage hold timer using a Web Worker
|
|
4
|
-
*
|
|
4
|
+
* Custom hook to manage hold timer using a Web Worker.
|
|
5
|
+
*
|
|
6
|
+
* Derives two stable primitives from props — a boolean hold flag and a
|
|
7
|
+
* numeric timestamp — and uses them as the sole effect dependencies.
|
|
8
|
+
* This prevents the worker from being killed/recreated on every
|
|
9
|
+
* currentTask or controls reference change.
|
|
5
10
|
*
|
|
6
11
|
* @param currentTask - The current task object
|
|
12
|
+
* @param controls - SDK-computed UI controls with activeLeg
|
|
7
13
|
* @returns holdTime - The elapsed time in seconds since the call was put on hold
|
|
8
14
|
*/
|
|
9
|
-
export declare const useHoldTimer: (currentTask: ITask | null) => number;
|
|
15
|
+
export declare const useHoldTimer: (currentTask: ITask | null, controls?: TaskUIControls) => number;
|
package/dist/types/helper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddressBookEntriesResponse, AddressBookEntrySearchParams, ITask } from '@webex/contact-center';
|
|
2
|
-
import { useCallControlProps, UseTaskListProps, UseTaskProps,
|
|
1
|
+
import { AddressBookEntriesResponse, AddressBookEntrySearchParams, ITask, TaskUIControls } from '@webex/contact-center';
|
|
2
|
+
import { useCallControlProps, UseTaskListProps, UseTaskProps, useOutdialCallProps, TargetType } from './task.types';
|
|
3
3
|
import { BuddyDetails, DestinationType, PaginatedListParams, Participant } from '@webex/cc-store';
|
|
4
4
|
import { OutdialAniEntriesResponse } from '@webex/contact-center/dist/types/services/config/types';
|
|
5
5
|
export declare const useTaskList: (props: UseTaskListProps) => {
|
|
@@ -7,24 +7,20 @@ export declare const useTaskList: (props: UseTaskListProps) => {
|
|
|
7
7
|
acceptTask: (task: ITask) => void;
|
|
8
8
|
declineTask: (task: ITask) => void;
|
|
9
9
|
onTaskSelect: (task: ITask) => void;
|
|
10
|
-
isBrowser: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const useRealtimeTranscript: (props: UseRealtimeTranscriptInternalProps) => {
|
|
13
|
-
ivrTranscript: string;
|
|
14
|
-
liveTranscriptEntries: RealtimeTranscriptEntry[];
|
|
15
|
-
activeTab: import("@webex/cc-components/dist/types/components/task/task.types").TranscriptTab;
|
|
16
|
-
onTabChange: (tab: import("@webex/cc-components/dist/types/components/task/task.types").TranscriptTab) => void;
|
|
17
|
-
className: string;
|
|
18
10
|
};
|
|
19
11
|
export declare const useIncomingTask: (props: UseTaskProps) => {
|
|
20
12
|
incomingTask: ITask;
|
|
21
13
|
accept: () => void;
|
|
22
14
|
reject: () => void;
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
acceptControl: import("@webex/contact-center").TaskUIControlState;
|
|
16
|
+
declineControl: {
|
|
17
|
+
isEnabled: boolean;
|
|
18
|
+
isVisible: boolean;
|
|
19
|
+
};
|
|
25
20
|
};
|
|
26
21
|
export declare const useCallControl: (props: useCallControlProps) => {
|
|
27
22
|
currentTask: ITask;
|
|
23
|
+
isHeld: boolean;
|
|
28
24
|
endCall: () => void;
|
|
29
25
|
toggleHold: (hold: boolean) => void;
|
|
30
26
|
toggleRecording: () => void;
|
|
@@ -54,35 +50,8 @@ export declare const useCallControl: (props: useCallControlProps) => {
|
|
|
54
50
|
consultTimerTimestamp: number;
|
|
55
51
|
lastTargetType: TargetType;
|
|
56
52
|
setLastTargetType: import("react").Dispatch<import("react").SetStateAction<TargetType>>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
decline: import("@webex/cc-components").Visibility;
|
|
60
|
-
end: import("@webex/cc-components").Visibility;
|
|
61
|
-
muteUnmute: import("@webex/cc-components").Visibility;
|
|
62
|
-
holdResume: import("@webex/cc-components").Visibility;
|
|
63
|
-
pauseResumeRecording: import("@webex/cc-components").Visibility;
|
|
64
|
-
recordingIndicator: import("@webex/cc-components").Visibility;
|
|
65
|
-
transfer: import("@webex/cc-components").Visibility;
|
|
66
|
-
conference: import("@webex/cc-components").Visibility;
|
|
67
|
-
exitConference: import("@webex/cc-components").Visibility;
|
|
68
|
-
mergeConference: import("@webex/cc-components").Visibility;
|
|
69
|
-
consult: import("@webex/cc-components").Visibility;
|
|
70
|
-
endConsult: import("@webex/cc-components").Visibility;
|
|
71
|
-
consultTransfer: import("@webex/cc-components").Visibility;
|
|
72
|
-
consultTransferConsult: import("@webex/cc-components").Visibility;
|
|
73
|
-
mergeConferenceConsult: import("@webex/cc-components").Visibility;
|
|
74
|
-
muteUnmuteConsult: import("@webex/cc-components").Visibility;
|
|
75
|
-
switchToMainCall: import("@webex/cc-components").Visibility;
|
|
76
|
-
switchToConsult: import("@webex/cc-components").Visibility;
|
|
77
|
-
wrapup: import("@webex/cc-components").Visibility;
|
|
78
|
-
isConferenceInProgress: boolean;
|
|
79
|
-
isConsultInitiated: boolean;
|
|
80
|
-
isConsultInitiatedAndAccepted: boolean;
|
|
81
|
-
isConsultReceived: boolean;
|
|
82
|
-
isConsultInitiatedOrAccepted: boolean;
|
|
83
|
-
isHeld: boolean;
|
|
84
|
-
consultCallHeld: boolean;
|
|
85
|
-
};
|
|
53
|
+
controls: TaskUIControls;
|
|
54
|
+
conferenceEnabled: boolean;
|
|
86
55
|
secondsUntilAutoWrapup: number;
|
|
87
56
|
cancelAutoWrapup: () => void;
|
|
88
57
|
conferenceParticipants: Participant[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,5 +3,4 @@ import { TaskList } from './TaskList';
|
|
|
3
3
|
import { CallControl } from './CallControl';
|
|
4
4
|
import { OutdialCall } from './OutdialCall';
|
|
5
5
|
import { CallControlCAD } from './CallControlCAD';
|
|
6
|
-
|
|
7
|
-
export { IncomingTask, TaskList, CallControl, OutdialCall, CallControlCAD, RealtimeTranscript };
|
|
6
|
+
export { IncomingTask, TaskList, CallControl, OutdialCall, CallControlCAD };
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { TaskProps, ControlProps, OutdialCallProps
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'deviceType' | 'logger'> & Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
|
|
1
|
+
import { TaskProps, ControlProps, OutdialCallProps } from '@webex/cc-components';
|
|
2
|
+
export type UseTaskProps = Pick<TaskProps, 'incomingTask' | 'logger'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
|
|
3
|
+
export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'logger'> & Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
|
|
5
4
|
export type IncomingTaskProps = Pick<TaskProps, 'incomingTask'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
|
|
6
5
|
export type TaskListProps = Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
|
|
7
|
-
export type RealtimeTranscriptProps = Pick<RealtimeTranscriptComponentProps, 'ivrTranscript' | 'liveTranscriptEntries'> & Partial<Pick<RealtimeTranscriptComponentProps, 'activeTab' | 'onTabChange' | 'className'>>;
|
|
8
|
-
export type UseRealtimeTranscriptProps = RealtimeTranscriptProps;
|
|
9
|
-
export type UseRealtimeTranscriptInternalProps = UseRealtimeTranscriptProps & {
|
|
10
|
-
currentTaskId?: string;
|
|
11
|
-
realtimeTranscriptLines?: RealtimeTranscriptLine[];
|
|
12
|
-
};
|
|
13
6
|
export type CallControlProps = Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute' | 'conferenceEnabled' | 'consultTransferOptions'>>;
|
|
14
|
-
export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | '
|
|
7
|
+
export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
|
|
15
8
|
export type useOutdialCallProps = Pick<OutdialCallProps, 'cc' | 'logger'>;
|
|
16
|
-
export type { RealtimeTranscriptEntry, TranscriptTab };
|
|
17
9
|
export interface OutdialProps {
|
|
18
10
|
/**
|
|
19
11
|
* Flag to determine if the address book is enabled.
|
|
@@ -21,14 +13,6 @@ export interface OutdialProps {
|
|
|
21
13
|
*/
|
|
22
14
|
isAddressBookEnabled?: boolean;
|
|
23
15
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Helper interface for device type checks
|
|
26
|
-
*/
|
|
27
|
-
export interface DeviceTypeFlags {
|
|
28
|
-
isBrowser: boolean;
|
|
29
|
-
isAgentDN: boolean;
|
|
30
|
-
isExtension: boolean;
|
|
31
|
-
}
|
|
32
16
|
/**
|
|
33
17
|
* Target types for consult/transfer operations
|
|
34
18
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@webex/cc-task",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Task",
|
|
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,8 +23,8 @@
|
|
|
23
23
|
"deploy:npm": "yarn npm publish"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@webex/cc-components": "1.28.0-
|
|
27
|
-
"@webex/cc-store": "1.28.0-
|
|
26
|
+
"@webex/cc-components": "1.28.0-task-refactor.1",
|
|
27
|
+
"@webex/cc-store": "1.28.0-ccwidgets.126",
|
|
28
28
|
"mobx-react-lite": "^4.1.0",
|
|
29
29
|
"react-error-boundary": "^6.0.0"
|
|
30
30
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@testing-library/react": "16.0.1",
|
|
40
40
|
"@types/jest": "29.5.14",
|
|
41
41
|
"@types/react-test-renderer": "18",
|
|
42
|
-
"@webex/test-fixtures": "0.0.0
|
|
42
|
+
"@webex/test-fixtures": "0.0.0",
|
|
43
43
|
"babel-jest": "29.7.0",
|
|
44
44
|
"babel-loader": "9.2.1",
|
|
45
45
|
"eslint": "^9.20.1",
|