@webex/cc-task 1.28.0-rtt.2 → 1.28.0-task-refactor.2
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/main-cad-hold.util.d.ts +20 -0
- package/dist/types/Utils/task-util.d.ts +26 -120
- package/dist/types/Utils/timer-utils.d.ts +40 -13
- package/dist/types/Utils/useHoldTimer.d.ts +2 -7
- 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
|
+
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ITask } from '@webex/cc-store';
|
|
2
|
+
import { Interaction, TaskUIControls } from '@webex/contact-center';
|
|
3
|
+
export type MainCadHoldInputs = {
|
|
4
|
+
currentTask: ITask | null;
|
|
5
|
+
controls: TaskUIControls;
|
|
6
|
+
agentId?: string;
|
|
7
|
+
holdDataVersion?: number;
|
|
8
|
+
};
|
|
9
|
+
export type MainCadHoldResult = {
|
|
10
|
+
isHeld: boolean;
|
|
11
|
+
interaction: Interaction | undefined;
|
|
12
|
+
holdTimestampMs: number | null;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Single source of truth for main CAD "On Hold" chip + timer inputs.
|
|
16
|
+
*
|
|
17
|
+
* Covers: simple consult (Agent 2), EP/DN consult, conference nested consult,
|
|
18
|
+
* plain conference hold, and refresh timer continuity (via resolveMainCadHoldTimestampMs).
|
|
19
|
+
*/
|
|
20
|
+
export declare function deriveMainCadHoldState({ currentTask, controls, agentId, holdDataVersion, }: MainCadHoldInputs): MainCadHoldResult;
|
|
@@ -1,125 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
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;
|
|
45
|
-
/**
|
|
46
|
-
* Get visibility for Merge Conference button
|
|
47
|
-
*/
|
|
48
|
-
export declare function getMergeConferenceButtonVisibility(isConsultInitiatedOrAccepted: boolean, isConsultAccepted: boolean, consultCallHeld: boolean, isConferenceInProgress: boolean, isCustomerInCall: boolean, conferenceEnabled: boolean): Visibility;
|
|
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
|
|
1
|
+
import { Interaction } from '@webex/contact-center';
|
|
2
|
+
type ConsultMediaEntry = {
|
|
3
|
+
holdTimestamp?: number | null;
|
|
4
|
+
};
|
|
5
|
+
export declare const getHoldAnchorStorageKey: (interactionId: string) => string;
|
|
6
|
+
export declare const getConsultHoldAnchorStorageKey: (interactionId: string) => string;
|
|
7
|
+
export declare const normalizeHoldTimestampMs: (raw: number) => number;
|
|
8
|
+
export declare const readHoldAnchor: (interactionId: string | undefined) => number | null;
|
|
9
|
+
export declare const writeHoldAnchor: (interactionId: string | undefined, timestampMs: number) => void;
|
|
10
|
+
export declare const clearHoldAnchor: (interactionId: string | undefined) => void;
|
|
11
|
+
export declare const readConsultHoldAnchor: (interactionId: string | undefined) => number | null;
|
|
12
|
+
export declare const writeConsultHoldAnchor: (interactionId: string | undefined, timestampMs: number) => void;
|
|
13
|
+
export declare const clearConsultHoldAnchor: (interactionId: string | undefined) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Finds the hold timestamp for a specific media type from an interaction.
|
|
16
|
+
* Used by useHoldTimer for hold duration display.
|
|
17
|
+
*
|
|
18
|
+
* Note: There is a separate findHoldTimestamp in @webex/cc-store that takes ITask.
|
|
19
|
+
* This one takes Interaction directly.
|
|
79
20
|
*/
|
|
80
|
-
export declare function
|
|
21
|
+
export declare function findHoldTimestamp(interaction: Interaction, mType?: string): number | null;
|
|
81
22
|
/**
|
|
82
|
-
*
|
|
23
|
+
* Resolve main CAD hold timer anchor in milliseconds.
|
|
24
|
+
* Prefers interaction media; falls back to session anchor for refresh continuity.
|
|
83
25
|
*/
|
|
84
|
-
export declare function
|
|
26
|
+
export declare function resolveMainCadHoldTimestampMs(interaction: Interaction | undefined, isHeld: boolean, interactionId?: string): number | null;
|
|
85
27
|
/**
|
|
86
|
-
*
|
|
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
|
|
28
|
+
* Resolve consult-leg hold timer anchor in milliseconds (Agent 1 initiator CAD).
|
|
94
29
|
*/
|
|
95
|
-
export declare function
|
|
96
|
-
|
|
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
|
-
};
|
|
30
|
+
export declare function resolveConsultHoldTimestampMs(consultMedia: ConsultMediaEntry | null | undefined, interactionId?: string): number;
|
|
31
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ITask } from '@webex/cc-store';
|
|
2
|
-
import {
|
|
1
|
+
import { ITask, TaskUIControls } from '@webex/cc-store';
|
|
2
|
+
import { Interaction } from '@webex/contact-center';
|
|
3
3
|
/**
|
|
4
4
|
* Timer data structure containing label and timestamp
|
|
5
5
|
*/
|
|
@@ -7,23 +7,50 @@ export interface TimerData {
|
|
|
7
7
|
label: string | null;
|
|
8
8
|
timestamp: number;
|
|
9
9
|
}
|
|
10
|
+
type MediaEntry = {
|
|
11
|
+
mType?: string;
|
|
12
|
+
isHold?: boolean;
|
|
13
|
+
holdTimestamp?: number | null;
|
|
14
|
+
lastUpdated?: number;
|
|
15
|
+
joinTimestamp?: number;
|
|
16
|
+
eventTime?: number;
|
|
17
|
+
createdAt?: number;
|
|
18
|
+
mediaResourceId?: string;
|
|
19
|
+
participants?: string[];
|
|
20
|
+
};
|
|
21
|
+
type InteractionParticipant = {
|
|
22
|
+
consultTimestamp?: number;
|
|
23
|
+
lastUpdated?: number;
|
|
24
|
+
consultState?: string;
|
|
25
|
+
isConsulted?: boolean;
|
|
26
|
+
isWrapUp?: boolean;
|
|
27
|
+
wrapUpTimestamp?: number | null;
|
|
28
|
+
currentState?: string | null;
|
|
29
|
+
currentStateTimestamp?: number | null;
|
|
30
|
+
};
|
|
31
|
+
type InteractionWithMedia = Interaction & {
|
|
32
|
+
media?: Record<string, MediaEntry>;
|
|
33
|
+
participants?: Record<string, InteractionParticipant>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Find the latest (most recently added) consult media from the interaction.
|
|
37
|
+
*
|
|
38
|
+
* After transfer → re-consult the backend may leave the OLD consult media
|
|
39
|
+
* in the interaction alongside the NEW one. Prefer held consult entries when
|
|
40
|
+
* present (switch-to-main), otherwise pick the most recent consult leg.
|
|
41
|
+
*/
|
|
42
|
+
export declare function findLatestConsultMedia(interaction: InteractionWithMedia | undefined): MediaEntry | null;
|
|
10
43
|
/**
|
|
11
44
|
* Calculate state timer label and timestamp based on task state.
|
|
12
45
|
* 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
46
|
*/
|
|
19
|
-
export declare function calculateStateTimerData(currentTask: ITask | null,
|
|
47
|
+
export declare function calculateStateTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
|
|
20
48
|
/**
|
|
21
49
|
* Calculate consult timer label and timestamp based on consult state.
|
|
22
50
|
* Handles consult on hold vs active consulting states.
|
|
23
51
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @param agentId - The current agent ID
|
|
27
|
-
* @returns TimerData object with label and timestamp
|
|
52
|
+
* Derives consult on hold from consult media isHold (not uiControls alone).
|
|
53
|
+
* EP/DN and agent-name: isHold may be true before holdTimestamp arrives — still show Consult on Hold.
|
|
28
54
|
*/
|
|
29
|
-
export declare function calculateConsultTimerData(currentTask: ITask | null,
|
|
55
|
+
export declare function calculateConsultTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
|
|
56
|
+
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { ITask } from '@webex/cc-store';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Prioritizes consult hold over main call hold
|
|
5
|
-
*
|
|
6
|
-
* @param currentTask - The current task object
|
|
7
|
-
* @returns holdTime - The elapsed time in seconds since the call was put on hold
|
|
2
|
+
* Hold timer only — main CAD on-hold boolean is computed in useCallControl (helper.ts).
|
|
8
3
|
*/
|
|
9
|
-
export declare const useHoldTimer: (
|
|
4
|
+
export declare const useHoldTimer: (mainCallOnHold: boolean, holdTimestampMs: number | null, holdDataVersion?: number, interactionId?: string) => 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.2",
|
|
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.2",
|
|
27
|
+
"@webex/cc-store": "1.28.0-task-refactor.2",
|
|
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-task-refactor.1",
|
|
43
43
|
"babel-jest": "29.7.0",
|
|
44
44
|
"babel-loader": "9.2.1",
|
|
45
45
|
"eslint": "^9.20.1",
|