@webex/cc-task 1.28.0-next.48 → 1.28.0-next.49

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,12 +1,15 @@
1
1
  import { AddressBookEntriesResponse, AddressBookEntrySearchParams, ITask, TaskUIControls } from '@webex/contact-center';
2
2
  import { useCallControlProps, UseTaskListProps, UseTaskProps, UseRealTimeTranscriptInternalProps, RealTimeTranscriptEntry, useOutdialCallProps, TargetType, ParticipantDropAnnouncement } from './task.types';
3
3
  import { DestinationType, PaginatedListParams, ConferenceParticipantDropTarget } from '@webex/cc-store';
4
+ import { TelephonyToastAction, WxAppTelephonyErrorDisplay } from './wxapp-error.utils';
4
5
  import { OutdialAniEntriesResponse } from '@webex/contact-center/dist/types/services/config/types';
5
6
  export declare const useTaskList: (props: UseTaskListProps) => {
6
7
  taskList: Record<string, ITask>;
7
8
  acceptTask: (task: ITask) => void;
8
9
  declineTask: (task: ITask) => void;
9
10
  onTaskSelect: (task: ITask) => void;
11
+ taskActionErrors: any;
12
+ clearTaskActionError: any;
10
13
  };
11
14
  export declare const useRealTimeTranscript: (props: UseRealTimeTranscriptInternalProps) => {
12
15
  liveTranscriptEntries: RealTimeTranscriptEntry[];
@@ -18,6 +21,8 @@ export declare const useIncomingTask: (props: UseTaskProps) => {
18
21
  reject: () => void;
19
22
  acceptControl: any;
20
23
  declineControl: any;
24
+ offerActionError: any;
25
+ clearOfferActionError: () => void;
21
26
  };
22
27
  export declare const useCallControl: (props: useCallControlProps) => {
23
28
  currentTask: ITask;
@@ -26,6 +31,7 @@ export declare const useCallControl: (props: useCallControlProps) => {
26
31
  toggleHold: (hold: boolean) => void;
27
32
  toggleRecording: () => void;
28
33
  toggleMute: () => Promise<void>;
34
+ sendDtmf: (digit: string) => Promise<void>;
29
35
  isMuted: boolean;
30
36
  wrapupCall: (wrapUpReason: string, auxCodeId: string) => void;
31
37
  isRecording: boolean;
@@ -68,6 +74,11 @@ export declare const useCallControl: (props: useCallControlProps) => {
68
74
  getEntryPoints: ({ page, pageSize, search }: PaginatedListParams) => Promise<any>;
69
75
  getQueuesFetcher: ({ page, pageSize, search }: PaginatedListParams) => Promise<any>;
70
76
  isCampaignCall: boolean;
77
+ telephonyToast: {
78
+ error: WxAppTelephonyErrorDisplay;
79
+ action: TelephonyToastAction;
80
+ };
81
+ dismissTelephonyToast: () => void;
71
82
  };
72
83
  export declare const useOutdialCall: (props: useOutdialCallProps) => {
73
84
  startOutdial: (destination: string, origin?: string) => void;
@@ -0,0 +1,17 @@
1
+ import { ITask } from '@webex/cc-store';
2
+ import { useCallControlProps } from './task.types';
3
+ import { TelephonyToastAction } from './wxapp-error.utils';
4
+ export type MuteCoordinatorCallbacks = {
5
+ onToggleMute?: useCallControlProps['onToggleMute'];
6
+ logger: useCallControlProps['logger'];
7
+ showTelephonyToast: (error: unknown, action: TelephonyToastAction) => void;
8
+ };
9
+ export type EnqueueMuteToggleParams = {
10
+ task: ITask;
11
+ callbacks: MuteCoordinatorCallbacks;
12
+ };
13
+ export declare const resetMuteCoordinator: () => void;
14
+ export declare const resetMuteCoordinatorForInteraction: (interactionId: string | undefined) => void;
15
+ /** Test-only reset for module-level mute serialization state between Jest cases. */
16
+ export declare const resetMuteCoordinatorForTests: () => void;
17
+ export declare const enqueueMuteToggle: ({ task, callbacks }: EnqueueMuteToggleParams) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ /** Test-only reset for module-level offer attempt counters between Jest cases. */
2
+ export declare const resetOfferActionAttemptsForTests: () => void;
3
+ export declare const nextOfferActionAttempt: (interactionId: string) => number;
4
+ export declare const isLatestOfferActionAttempt: (interactionId: string, attemptId: number) => boolean;
@@ -23,7 +23,9 @@ export type PendingParticipantDropRequest = {
23
23
  dropTargetId: string;
24
24
  };
25
25
  export type CallControlProps = Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName' | 'onToggleMute' | 'conferenceEnabled' | 'consultTransferOptions'>>;
26
- export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute'>>;
26
+ export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'logger' | 'isMuted' | 'conferenceEnabled' | 'agentId'> & Partial<Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'onToggleMute' | 'enableWxBetterTogether'>> & {
27
+ widgetName?: 'CallControl' | 'CallControlCAD';
28
+ };
27
29
  export type useOutdialCallProps = Pick<OutdialCallProps, 'cc' | 'logger'>;
28
30
  export { CAMPAIGN_PREVIEW_OUTBOUND_TYPES, CAMPAIGN_PREVIEW_CAMPAIGN_TYPES } from '@webex/cc-store';
29
31
  export type { RealTimeTranscriptEntry, ParticipantDropAnnouncement };
@@ -0,0 +1,30 @@
1
+ import { ILogger } from '@webex/cc-store';
2
+ export type WxAppTelephonyErrorDisplay = {
3
+ message: string;
4
+ trackingId?: string;
5
+ status?: number | string;
6
+ isWxAppTelephonyError: boolean;
7
+ };
8
+ export declare const OFFER_ACTION_ACCEPT_MESSAGE = "Unable to answer the Call. Please try again";
9
+ export declare const OFFER_ACTION_DECLINE_MESSAGE = "Unable to decline the Call. Please try again";
10
+ export declare const getOfferActionUserMessage: (action: string) => string;
11
+ export declare const withOfferActionUserMessage: (display: WxAppTelephonyErrorDisplay, action: string) => WxAppTelephonyErrorDisplay;
12
+ export type TelephonyToastAction = 'mute' | 'unmute' | 'dtmf';
13
+ export declare const TELEPHONY_MUTE_MESSAGE = "Couldn't mute call. Please try again.";
14
+ export declare const TELEPHONY_UNMUTE_MESSAGE = "Couldn't unmute call. Please try again.";
15
+ export declare const TELEPHONY_DTMF_MESSAGE = "Action didn't work. Please try again.";
16
+ export declare const getTelephonyToastUserMessage: (action: TelephonyToastAction) => string;
17
+ export declare const getTelephonyToastDisplay: (display: WxAppTelephonyErrorDisplay, action: TelephonyToastAction) => WxAppTelephonyErrorDisplay;
18
+ type WxAppTelephonyErrorLike = Error & {
19
+ isWxAppTelephonyError?: boolean;
20
+ trackingId?: string;
21
+ status?: number | string;
22
+ statusCode?: number;
23
+ };
24
+ export declare const parseWxAppTelephonyError: (error: unknown) => WxAppTelephonyErrorDisplay;
25
+ export declare const toWxAppTelephonyError: (display: WxAppTelephonyErrorDisplay) => WxAppTelephonyErrorLike;
26
+ export declare const reportWxAppTelephonyFailure: (error: unknown, context: {
27
+ widget: string;
28
+ action: string;
29
+ }, logger: ILogger, onErrorCallback?: (widgetName: string, error: Error) => void) => WxAppTelephonyErrorDisplay;
30
+ export {};
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.48",
5
+ "version": "1.28.0-next.49",
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.45",
27
- "@webex/cc-store": "1.28.0-next.29",
26
+ "@webex/cc-components": "1.28.0-next.46",
27
+ "@webex/cc-store": "1.28.0-next.30",
28
28
  "mobx-react-lite": "^4.1.0",
29
29
  "react-error-boundary": "^6.0.0"
30
30
  },