@webex/cc-task 1.28.0-ccwidgets.93 → 1.28.0-ccwidgets.95

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,4 +1,4 @@
1
- import { ITask, Interaction } from '@webex/plugin-cc';
1
+ import { ITask } from '@webex/plugin-cc';
2
2
  /**
3
3
  * This function determines the visibility of various controls based on the task's data.
4
4
  * @param task The task object
@@ -15,7 +15,7 @@ export declare function getControlsVisibility(deviceType: string, featureFlags:
15
15
  consult: boolean;
16
16
  transfer: boolean;
17
17
  conference: boolean;
18
- wrapup: any;
18
+ wrapup: boolean;
19
19
  pauseResumeRecording: boolean;
20
20
  endConsult: boolean;
21
21
  recordingIndicator: boolean;
@@ -1,27 +1,26 @@
1
1
  import { ITask } from '@webex/plugin-cc';
2
- import { useCallControlProps, UseTaskListProps, UseTaskProps } from './task.types';
3
- import { useOutdialCallProps } from '@webex/cc-components';
4
- import { DestinationType } from '@webex/cc-store';
2
+ import { useCallControlProps, UseTaskListProps, UseTaskProps, useOutdialCallProps } from './task.types';
3
+ import { BuddyDetails, DestinationType, ContactServiceQueue } from '@webex/cc-store';
5
4
  export declare const useTaskList: (props: UseTaskListProps) => {
6
- taskList: TaskProps;
5
+ taskList: Record<string, ITask>;
7
6
  acceptTask: (task: ITask) => void;
8
7
  declineTask: (task: ITask) => void;
9
8
  onTaskSelect: (task: ITask) => void;
10
9
  isBrowser: boolean;
11
10
  };
12
11
  export declare const useIncomingTask: (props: UseTaskProps) => {
13
- incomingTask: TaskProps;
12
+ incomingTask: ITask;
14
13
  accept: () => void;
15
14
  reject: () => void;
16
15
  isBrowser: boolean;
17
16
  };
18
17
  export declare const useCallControl: (props: useCallControlProps) => {
19
- currentTask: ControlProps;
18
+ currentTask: ITask;
20
19
  endCall: () => void;
21
20
  toggleHold: (hold: boolean) => void;
22
21
  toggleRecording: () => void;
23
22
  toggleMute: () => Promise<void>;
24
- isMuted: ControlProps;
23
+ isMuted: boolean;
25
24
  wrapupCall: (wrapUpReason: string, auxCodeId: string) => void;
26
25
  isHeld: boolean;
27
26
  setIsHeld: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -52,7 +51,7 @@ export declare const useCallControl: (props: useCallControlProps) => {
52
51
  consult: boolean;
53
52
  transfer: boolean;
54
53
  conference: boolean;
55
- wrapup: any;
54
+ wrapup: boolean;
56
55
  pauseResumeRecording: boolean;
57
56
  endConsult: boolean;
58
57
  recordingIndicator: boolean;
@@ -1,10 +1,10 @@
1
1
  import { TaskProps, ControlProps, OutdialCallProps } from '@webex/cc-components';
2
- export type UseTaskProps = Pick<TaskProps, 'incomingTask' | 'onAccepted' | 'onRejected' | 'deviceType' | 'logger'>;
3
- export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'deviceType' | 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected' | 'logger'>;
4
- export type IncomingTaskProps = Pick<TaskProps, 'incomingTask' | 'onAccepted' | 'onRejected'>;
5
- export type TaskListProps = Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>;
6
- export type CallControlProps = Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute'>;
7
- export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute' | 'logger' | 'consultInitiated' | 'deviceType' | 'featureFlags' | 'isMuted'>;
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'>>;
4
+ export type IncomingTaskProps = Pick<TaskProps, 'incomingTask'> & Partial<Pick<TaskProps, 'onAccepted' | 'onRejected'>>;
5
+ export type TaskListProps = Partial<Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>>;
6
+ export type CallControlProps = Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute'>>;
7
+ export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'consultInitiated' | 'deviceType' | 'featureFlags' | 'isMuted'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
8
8
  export type Participant = {
9
9
  id: string;
10
10
  pType: 'Customer' | 'Agent' | string;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@webex/cc-task",
3
3
  "description": "Webex Contact Center Widgets: Task",
4
- "version": "1.28.0-ccwidgets.93",
4
+ "version": "1.28.0-ccwidgets.95",
5
5
  "main": "dist/index.js",
6
+ "types": "dist/types/index.d.ts",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
@@ -16,12 +17,12 @@
16
17
  "build": "yarn run -T tsc",
17
18
  "build:src": "yarn run clean:dist && webpack",
18
19
  "build:watch": "webpack --watch",
19
- "test:unit": "jest --coverage",
20
+ "test:unit": "tsc --project tsconfig.test.json && jest --coverage",
20
21
  "test:styles": "eslint"
21
22
  },
22
23
  "dependencies": {
23
- "@webex/cc-components": "1.28.0-ccwidgets.93",
24
- "@webex/cc-store": "1.28.0-ccwidgets.93",
24
+ "@webex/cc-components": "1.28.0-ccwidgets.95",
25
+ "@webex/cc-store": "1.28.0-ccwidgets.95",
25
26
  "mobx-react-lite": "^4.1.0"
26
27
  },
27
28
  "devDependencies": {
@@ -35,6 +36,7 @@
35
36
  "@testing-library/react": "16.0.1",
36
37
  "@types/jest": "29.5.14",
37
38
  "@types/react-test-renderer": "18",
39
+ "@webex/test-fixtures": "0.0.0",
38
40
  "babel-jest": "29.7.0",
39
41
  "babel-loader": "9.2.1",
40
42
  "eslint": "^9.20.1",