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

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,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 };
@@ -2,3 +2,8 @@ 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 const TIMER_LABEL_WRAP_UP = "Wrap Up";
6
+ export declare const TIMER_LABEL_POST_CALL = "Post Call";
7
+ export declare const TIMER_LABEL_CONSULT_ON_HOLD = "Consult on Hold";
8
+ export declare const TIMER_LABEL_CONSULT_REQUESTED = "Consult Requested";
9
+ export declare const TIMER_LABEL_CONSULTING = "Consulting";
@@ -0,0 +1,29 @@
1
+ import { ITask } from '@webex/cc-store';
2
+ import { ControlVisibility } from '@webex/cc-components';
3
+ /**
4
+ * Timer data structure containing label and timestamp
5
+ */
6
+ export interface TimerData {
7
+ label: string | null;
8
+ timestamp: number;
9
+ }
10
+ /**
11
+ * Calculate state timer label and timestamp based on task state.
12
+ * 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
+ */
19
+ export declare function calculateStateTimerData(currentTask: ITask | null, controlVisibility: ControlVisibility | null, agentId: string): TimerData;
20
+ /**
21
+ * Calculate consult timer label and timestamp based on consult state.
22
+ * Handles consult on hold vs active consulting states.
23
+ *
24
+ * @param currentTask - The current task object
25
+ * @param controlVisibility - Control visibility flags
26
+ * @param agentId - The current agent ID
27
+ * @returns TimerData object with label and timestamp
28
+ */
29
+ export declare function calculateConsultTimerData(currentTask: ITask | null, controlVisibility: ControlVisibility | null, agentId: string): TimerData;
@@ -0,0 +1,9 @@
1
+ import { ITask } from '@webex/cc-store';
2
+ /**
3
+ * Custom hook to manage hold timer using a Web Worker
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
8
+ */
9
+ export declare const useHoldTimer: (currentTask: ITask | null) => number;
@@ -1,4 +1,4 @@
1
- import { ITask } from '@webex/contact-center';
1
+ import { AddressBookEntriesResponse, AddressBookEntrySearchParams, ITask } from '@webex/contact-center';
2
2
  import { useCallControlProps, UseTaskListProps, UseTaskProps, useOutdialCallProps } 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';
@@ -40,6 +40,10 @@ export declare const useCallControl: (props: useCallControlProps) => {
40
40
  setConsultAgentName: import("react").Dispatch<import("react").SetStateAction<string>>;
41
41
  holdTime: number;
42
42
  startTimestamp: number;
43
+ stateTimerLabel: string;
44
+ stateTimerTimestamp: number;
45
+ consultTimerLabel: string;
46
+ consultTimerTimestamp: number;
43
47
  lastTargetType: "agent" | "queue";
44
48
  setLastTargetType: import("react").Dispatch<import("react").SetStateAction<"agent" | "queue">>;
45
49
  controlVisibility: {
@@ -74,7 +78,7 @@ export declare const useCallControl: (props: useCallControlProps) => {
74
78
  secondsUntilAutoWrapup: number;
75
79
  cancelAutoWrapup: () => void;
76
80
  conferenceParticipants: Participant[];
77
- getAddressBookEntries: ({ page, pageSize, search }: PaginatedListParams) => Promise<import("@webex/contact-center").AddressBookEntriesResponse>;
81
+ getAddressBookEntries: ({ page, pageSize, search }: PaginatedListParams) => Promise<AddressBookEntriesResponse>;
78
82
  getEntryPoints: ({ page, pageSize, search }: PaginatedListParams) => Promise<import("@webex/contact-center").EntryPointListResponse>;
79
83
  getQueuesFetcher: ({ page, pageSize, search }: PaginatedListParams) => Promise<{
80
84
  data: import("@webex/contact-center").ContactServiceQueue[];
@@ -95,5 +99,6 @@ export declare const useCallControl: (props: useCallControlProps) => {
95
99
  export declare const useOutdialCall: (props: useOutdialCallProps) => {
96
100
  startOutdial: (destination: string, origin?: string) => void;
97
101
  getOutdialANIEntries: () => Promise<OutdialAniEntriesResponse>;
102
+ getAddressBookEntries: (params: AddressBookEntrySearchParams) => Promise<AddressBookEntriesResponse>;
98
103
  isTelephonyTaskActive: boolean;
99
104
  };
@@ -6,6 +6,13 @@ export type TaskListProps = Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDe
6
6
  export type CallControlProps = Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute' | 'conferenceEnabled' | 'consultTransferOptions'>>;
7
7
  export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'deviceType' | 'featureFlags' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
8
8
  export type useOutdialCallProps = Pick<OutdialCallProps, 'cc' | 'logger'>;
9
+ export interface OutdialProps {
10
+ /**
11
+ * Flag to determine if the address book is enabled.
12
+ * Defaults to true if not provided.
13
+ */
14
+ isAddressBookEnabled?: boolean;
15
+ }
9
16
  /**
10
17
  * Helper interface for device type checks
11
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-next.4",
5
+ "version": "1.28.0-next.6",
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-next.4",
27
- "@webex/cc-store": "1.28.0-next.2",
26
+ "@webex/cc-components": "1.28.0-next.6",
27
+ "@webex/cc-store": "1.28.0-next.3",
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-next.1",
42
+ "@webex/test-fixtures": "0.0.0-next.0",
43
43
  "babel-jest": "29.7.0",
44
44
  "babel-loader": "9.2.1",
45
45
  "eslint": "^9.20.1",