@webex/cc-task 1.28.0-next.4 → 1.28.0-next.41

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,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,3 +1,4 @@
1
1
  import React from 'react';
2
- declare const OutdialCall: React.FunctionComponent;
2
+ import { OutdialProps } from '../task.types';
3
+ declare const OutdialCall: React.FunctionComponent<OutdialProps>;
3
4
  export { OutdialCall };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { RealTimeTranscriptProps } from '../task.types';
3
+ declare const RealTimeTranscript: React.FunctionComponent<RealTimeTranscriptProps>;
4
+ export { RealTimeTranscript };
@@ -2,3 +2,14 @@ export declare const MEDIA_TYPE_TELEPHONY = "telephony";
2
2
  export declare const MEDIA_TYPE_CHAT = "chat";
3
3
  export declare const MEDIA_TYPE_EMAIL = "email";
4
4
  export declare const MAX_PARTICIPANTS_IN_MULTIPARTY_CONFERENCE = 7;
5
+ export declare enum DestinationAgentType {
6
+ EP_DN = "EpDn",
7
+ EPDN = "EPDN",
8
+ ENTRY_POINT = "EntryPoint",
9
+ EP = "EP"
10
+ }
11
+ export declare const TIMER_LABEL_WRAP_UP = "Wrap Up";
12
+ export declare const TIMER_LABEL_POST_CALL = "Post Call";
13
+ export declare const TIMER_LABEL_CONSULT_ON_HOLD = "Consult on Hold";
14
+ export declare const TIMER_LABEL_CONSULT_REQUESTED = "Consult Requested";
15
+ export declare const TIMER_LABEL_CONSULTING = "Consulting";
@@ -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,45 @@
1
- import { ILogger } from '@webex/cc-store';
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
15
- */
16
- export declare function getEndButtonVisibility(isBrowser: boolean, isEndCallEnabled: boolean, isCall: boolean, isConsultInitiatedOrAcceptedOrBeingConsulted: boolean, isConferenceInProgress: boolean, isConsultCompleted: boolean, isHeld: boolean): 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;
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
1
+ import { Interaction } from '@webex/contact-center';
2
+ import { ITask } from '@webex/cc-store';
3
+ type ConsultMediaEntry = {
4
+ holdTimestamp?: number | null;
5
+ };
6
+ export declare const getHoldAnchorStorageKey: (interactionId: string) => string;
7
+ export declare const getConsultHoldAnchorStorageKey: (interactionId: string) => string;
8
+ export declare const normalizeHoldTimestampMs: (raw: number) => number;
9
+ export declare const readHoldAnchor: (interactionId: string | undefined) => number | null;
10
+ export declare const writeHoldAnchor: (interactionId: string | undefined, timestampMs: number) => void;
11
+ export declare const clearHoldAnchor: (interactionId: string | undefined) => void;
12
+ export declare const readConsultHoldAnchor: (interactionId: string | undefined) => number | null;
13
+ export declare const writeConsultHoldAnchor: (interactionId: string | undefined, timestampMs: number) => void;
14
+ export declare const clearConsultHoldAnchor: (interactionId: string | undefined) => void;
15
+ /**
16
+ * Finds the hold timestamp for a specific media type from an interaction.
17
+ * Used by useHoldTimer for hold duration display.
18
+ *
19
+ * Note: There is a separate findHoldTimestamp in @webex/cc-store that takes ITask.
20
+ * This one takes Interaction directly.
71
21
  */
72
- export declare function getMuteUnmuteConsultButtonVisibility(isBrowser: boolean, webRtcEnabled: boolean, isCall: boolean, isConsultInitiated: boolean, isBeingConsulted: boolean): Visibility;
22
+ export declare function findHoldTimestamp(interaction: Interaction, mType?: string): number | null;
73
23
  /**
74
- * Get visibility for Switch to Main Call button
24
+ * Resolve main CAD hold timer anchor in milliseconds.
25
+ * Prefers interaction media; falls back to session anchor for refresh continuity.
75
26
  */
76
- export declare function getSwitchToMainCallButtonVisibility(isBeingConsulted: boolean, isConsultAccepted: boolean, isConsultInitiated: boolean, consultCallHeld: boolean, isCustomerInCall: boolean, isConferenceInProgress: boolean): Visibility;
27
+ export declare function resolveMainCadHoldTimestampMs(interaction: Interaction | undefined, isHeld: boolean, interactionId?: string): number | null;
77
28
  /**
78
- * Get visibility for Switch to Consult button
29
+ * Resolve consult-leg hold timer anchor in milliseconds (Agent 1 initiator CAD).
79
30
  */
80
- export declare function getSwitchToConsultButtonVisibility(isBeingConsulted: boolean, consultCallHeld: boolean): Visibility;
31
+ export declare function resolveConsultHoldTimestampMs(consultMedia: ConsultMediaEntry | null | undefined, interactionId?: string): number;
81
32
  /**
82
- * Get visibility for Wrapup button
33
+ * Checks whether the given task is a campaign preview task based on
34
+ * its outboundType or callProcessingDetails.campaignType.
83
35
  */
84
- export declare function getWrapupButtonVisibility(task: ITask): Visibility;
36
+ export declare function isCampaignPreviewTask(task: ITask): boolean;
85
37
  /**
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
38
+ * Checks whether the task is a campaign preview that the agent has not
39
+ * explicitly accepted. Uses the store's acceptedCampaignIds as the
40
+ * source of truth the participants.hasJoined flag is unreliable
41
+ * because CampaignContactUpdated payloads can set it even when the
42
+ * agent only skipped or removed the preview.
94
43
  */
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
- };
44
+ export declare function isUnacceptedCampaignPreview(task: ITask, acceptedCampaignIds: Set<string>): boolean;
45
+ export {};
@@ -0,0 +1,56 @@
1
+ import { ITask, TaskUIControls } from '@webex/cc-store';
2
+ import { Interaction } from '@webex/contact-center';
3
+ /**
4
+ * Timer data structure containing label and timestamp
5
+ */
6
+ export interface TimerData {
7
+ label: string | null;
8
+ timestamp: number;
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;
43
+ /**
44
+ * Calculate state timer label and timestamp based on task state.
45
+ * Priority: Wrap Up > Post Call
46
+ */
47
+ export declare function calculateStateTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
48
+ /**
49
+ * Calculate consult timer label and timestamp based on consult state.
50
+ * Handles consult on hold vs active consulting states.
51
+ *
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.
54
+ */
55
+ export declare function calculateConsultTimerData(currentTask: ITask | null, controls: TaskUIControls | null, agentId: string): TimerData;
56
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Hold timer only — main CAD on-hold boolean is computed in useCallControl (helper.ts).
3
+ */
4
+ export declare const useHoldTimer: (mainCallOnHold: boolean, holdTimestampMs: number | null, holdDataVersion?: number, interactionId?: string) => number;
@@ -1,23 +1,27 @@
1
- import { ITask } from '@webex/contact-center';
2
- import { useCallControlProps, UseTaskListProps, UseTaskProps, useOutdialCallProps } from './task.types';
3
- import { BuddyDetails, DestinationType, PaginatedListParams, Participant } from '@webex/cc-store';
1
+ import { AddressBookEntriesResponse, AddressBookEntrySearchParams, ITask, TaskUIControls } from '@webex/contact-center';
2
+ import { useCallControlProps, UseTaskListProps, UseTaskProps, UseRealTimeTranscriptInternalProps, RealTimeTranscriptEntry, useOutdialCallProps, TargetType } from './task.types';
3
+ import { DestinationType, PaginatedListParams } 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) => {
6
6
  taskList: Record<string, ITask>;
7
7
  acceptTask: (task: ITask) => void;
8
8
  declineTask: (task: ITask) => void;
9
9
  onTaskSelect: (task: ITask) => void;
10
- isBrowser: boolean;
10
+ };
11
+ export declare const useRealTimeTranscript: (props: UseRealTimeTranscriptInternalProps) => {
12
+ liveTranscriptEntries: RealTimeTranscriptEntry[];
13
+ className: string;
11
14
  };
12
15
  export declare const useIncomingTask: (props: UseTaskProps) => {
13
16
  incomingTask: ITask;
14
17
  accept: () => void;
15
18
  reject: () => void;
16
- isBrowser: boolean;
17
- isDeclineButtonEnabled: boolean;
19
+ acceptControl: any;
20
+ declineControl: any;
18
21
  };
19
22
  export declare const useCallControl: (props: useCallControlProps) => {
20
23
  currentTask: ITask;
24
+ isHeld: boolean;
21
25
  endCall: () => void;
22
26
  toggleHold: (hold: boolean) => void;
23
27
  toggleRecording: () => void;
@@ -27,6 +31,7 @@ export declare const useCallControl: (props: useCallControlProps) => {
27
31
  isRecording: boolean;
28
32
  setIsRecording: import("react").Dispatch<import("react").SetStateAction<boolean>>;
29
33
  buddyAgents: BuddyDetails[];
34
+ loadingBuddyAgents: boolean;
30
35
  loadBuddyAgents: () => Promise<void>;
31
36
  transferCall: (to: string, type: DestinationType) => Promise<void>;
32
37
  consultCall: (consultDestination: string, destinationType: DestinationType, allowParticipantsToInteract: boolean) => Promise<void>;
@@ -40,60 +45,25 @@ export declare const useCallControl: (props: useCallControlProps) => {
40
45
  setConsultAgentName: import("react").Dispatch<import("react").SetStateAction<string>>;
41
46
  holdTime: number;
42
47
  startTimestamp: number;
43
- lastTargetType: "agent" | "queue";
44
- setLastTargetType: import("react").Dispatch<import("react").SetStateAction<"agent" | "queue">>;
45
- controlVisibility: {
46
- accept: import("@webex/cc-components").Visibility;
47
- decline: import("@webex/cc-components").Visibility;
48
- end: import("@webex/cc-components").Visibility;
49
- muteUnmute: import("@webex/cc-components").Visibility;
50
- holdResume: import("@webex/cc-components").Visibility;
51
- pauseResumeRecording: import("@webex/cc-components").Visibility;
52
- recordingIndicator: import("@webex/cc-components").Visibility;
53
- transfer: import("@webex/cc-components").Visibility;
54
- conference: import("@webex/cc-components").Visibility;
55
- exitConference: import("@webex/cc-components").Visibility;
56
- mergeConference: import("@webex/cc-components").Visibility;
57
- consult: import("@webex/cc-components").Visibility;
58
- endConsult: import("@webex/cc-components").Visibility;
59
- consultTransfer: import("@webex/cc-components").Visibility;
60
- consultTransferConsult: import("@webex/cc-components").Visibility;
61
- mergeConferenceConsult: import("@webex/cc-components").Visibility;
62
- muteUnmuteConsult: import("@webex/cc-components").Visibility;
63
- switchToMainCall: import("@webex/cc-components").Visibility;
64
- switchToConsult: import("@webex/cc-components").Visibility;
65
- wrapup: import("@webex/cc-components").Visibility;
66
- isConferenceInProgress: boolean;
67
- isConsultInitiated: boolean;
68
- isConsultInitiatedAndAccepted: boolean;
69
- isConsultReceived: boolean;
70
- isConsultInitiatedOrAccepted: boolean;
71
- isHeld: boolean;
72
- consultCallHeld: boolean;
73
- };
48
+ stateTimerLabel: string;
49
+ stateTimerTimestamp: number;
50
+ consultTimerLabel: string;
51
+ consultTimerTimestamp: number;
52
+ lastTargetType: TargetType;
53
+ setLastTargetType: import("react").Dispatch<import("react").SetStateAction<TargetType>>;
54
+ controls: TaskUIControls;
55
+ conferenceEnabled: boolean;
74
56
  secondsUntilAutoWrapup: number;
75
57
  cancelAutoWrapup: () => void;
76
58
  conferenceParticipants: Participant[];
77
- getAddressBookEntries: ({ page, pageSize, search }: PaginatedListParams) => Promise<import("@webex/contact-center").AddressBookEntriesResponse>;
78
- getEntryPoints: ({ page, pageSize, search }: PaginatedListParams) => Promise<import("@webex/contact-center").EntryPointListResponse>;
79
- getQueuesFetcher: ({ page, pageSize, search }: PaginatedListParams) => Promise<{
80
- data: import("@webex/contact-center").ContactServiceQueue[];
81
- meta: {
82
- page: number;
83
- pageSize: number;
84
- total: number;
85
- totalPages: number;
86
- };
87
- } | {
88
- data: any[];
89
- meta: {
90
- page: number;
91
- totalPages: number;
92
- };
93
- }>;
59
+ getAddressBookEntries: ({ page, pageSize, search }: PaginatedListParams) => Promise<any>;
60
+ getEntryPoints: ({ page, pageSize, search }: PaginatedListParams) => Promise<any>;
61
+ getQueuesFetcher: ({ page, pageSize, search }: PaginatedListParams) => Promise<any>;
62
+ isCampaignCall: boolean;
94
63
  };
95
64
  export declare const useOutdialCall: (props: useOutdialCallProps) => {
96
65
  startOutdial: (destination: string, origin?: string) => void;
97
66
  getOutdialANIEntries: () => Promise<OutdialAniEntriesResponse>;
67
+ getAddressBookEntries: (params: AddressBookEntrySearchParams) => Promise<AddressBookEntriesResponse>;
98
68
  isTelephonyTaskActive: boolean;
99
69
  };
@@ -3,4 +3,5 @@ import { TaskList } from './TaskList';
3
3
  import { CallControl } from './CallControl';
4
4
  import { OutdialCall } from './OutdialCall';
5
5
  import { CallControlCAD } from './CallControlCAD';
6
- export { IncomingTask, TaskList, CallControl, OutdialCall, CallControlCAD };
6
+ import { RealTimeTranscript } from './RealTimeTranscript';
7
+ export { IncomingTask, TaskList, CallControl, OutdialCall, CallControlCAD, RealTimeTranscript };
@@ -1,16 +1,40 @@
1
- import { TaskProps, ControlProps, OutdialCallProps } from '@webex/cc-components';
2
- export type UseTaskProps = Pick<TaskProps, 'incomingTask' | 'deviceType' | 'logger'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
3
- export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'deviceType' | 'logger'> & Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
1
+ import { TaskProps, ControlProps, OutdialCallProps, RealTimeTranscriptComponentProps, RealTimeTranscriptEntry } from '@webex/cc-components';
2
+ import { RealTimeTranscriptionData } from '@webex/cc-store';
3
+ export type UseTaskProps = Pick<TaskProps, 'incomingTask' | 'logger'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
4
+ export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'logger'> & Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
4
5
  export type IncomingTaskProps = Pick<TaskProps, 'incomingTask'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
5
- export type TaskListProps = Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
6
+ export type TaskListProps = Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>> & {
7
+ /**
8
+ * Flag to enable campaign preview task rendering.
9
+ * When true and the task is a campaign preview, CampaignTask is rendered.
10
+ * Defaults to true.
11
+ */
12
+ hasCampaignPreviewEnabled?: boolean;
13
+ };
14
+ export type RealTimeTranscriptProps = Pick<RealTimeTranscriptComponentProps, 'liveTranscriptEntries' | 'className'>;
15
+ export type UseRealTimeTranscriptInternalProps = RealTimeTranscriptProps & {
16
+ currentTaskId?: string;
17
+ realtimeTranscriptionData?: Partial<RealTimeTranscriptionData>[];
18
+ };
6
19
  export type CallControlProps = Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute' | 'conferenceEnabled' | 'consultTransferOptions'>>;
7
- export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'deviceType' | 'featureFlags' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
20
+ export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
8
21
  export type useOutdialCallProps = Pick<OutdialCallProps, 'cc' | 'logger'>;
22
+ export { CAMPAIGN_PREVIEW_OUTBOUND_TYPES, CAMPAIGN_PREVIEW_CAMPAIGN_TYPES } from '@webex/cc-store';
23
+ export type { RealTimeTranscriptEntry };
24
+ export interface OutdialProps {
25
+ /**
26
+ * Flag to determine if the address book is enabled.
27
+ * Defaults to true if not provided.
28
+ */
29
+ isAddressBookEnabled?: boolean;
30
+ }
9
31
  /**
10
- * Helper interface for device type checks
32
+ * Target types for consult/transfer operations
11
33
  */
12
- export interface DeviceTypeFlags {
13
- isBrowser: boolean;
14
- isAgentDN: boolean;
15
- isExtension: boolean;
16
- }
34
+ export declare const TARGET_TYPE: {
35
+ readonly AGENT: "agent";
36
+ readonly QUEUE: "queue";
37
+ readonly ENTRY_POINT: "entryPoint";
38
+ readonly DIAL_NUMBER: "dialNumber";
39
+ };
40
+ export type TargetType = (typeof TARGET_TYPE)[keyof typeof TARGET_TYPE];
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-next.4",
5
+ "version": "1.28.0-next.41",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/types/index.d.ts",
8
8
  "publishConfig": {
@@ -18,13 +18,13 @@
18
18
  "build": "yarn run -T tsc",
19
19
  "build:src": "yarn run clean:dist && webpack",
20
20
  "build:watch": "webpack --watch",
21
- "test:unit": "tsc --project tsconfig.test.json && jest --coverage",
21
+ "test:unit": "tsc --project tsconfig.test.json && NODE_ENV=test jest --coverage",
22
22
  "test:styles": "eslint",
23
23
  "deploy:npm": "yarn npm publish"
24
24
  },
25
25
  "dependencies": {
26
- "@webex/cc-components": "1.28.0-next.4",
27
- "@webex/cc-store": "1.28.0-next.2",
26
+ "@webex/cc-components": "1.28.0-next.38",
27
+ "@webex/cc-store": "1.28.0-next.23",
28
28
  "mobx-react-lite": "^4.1.0",
29
29
  "react-error-boundary": "^6.0.0"
30
30
  },