@webex/cc-ai-assistant 0.0.0-next.11 → 0.0.0-next.13

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,7 @@
1
- import type { RealTimeAssistPayload } from '@webex/cc-store';
1
+ import type { RealTimeAssistPayload, WellnessBreakError, WellnessBreakEvent } from '@webex/cc-store';
2
+ import type { WellnessBreakOverlayTarget } from '@webex/cc-components';
3
+ export type { WellnessBreakError, WellnessBreakErrorCode, WellnessBreakPhase } from '@webex/cc-store';
4
+ export type { WellnessBreakOverlayTarget } from '@webex/cc-components';
2
5
  /**
3
6
  * Public props for the `AIAssistant` widget. All callbacks are optional —
4
7
  * the host can opt into any subset.
@@ -18,6 +21,20 @@ export interface IAIAssistantProps {
18
21
  onRealTimeAssistReceived?: (payload: RealTimeAssistPayload) => void;
19
22
  /** Optional extra class applied to the widget root. */
20
23
  className?: string;
24
+ /** Fired for a valid backend-provided actionable offer. */
25
+ onWellnessBreakOffered?: (event: WellnessBreakEvent) => void;
26
+ /** Fired after the break request changes agent state and any required ACCEPTED action is delivered. */
27
+ onWellnessBreakAccepted?: (event: WellnessBreakEvent) => void;
28
+ /** Fired when the timed break begins playing. */
29
+ onWellnessBreakStarted?: () => void;
30
+ /** Fired after the timed break ends and state restoration succeeds. */
31
+ onWellnessBreakEnded?: () => void;
32
+ /** Fired with a stable, non-PII lifecycle error shape. */
33
+ onWellnessBreakError?: (error: WellnessBreakError) => void;
34
+ /** Optional host/CDN audio URL. The packaged default is a data URL; use this override if CSP blocks data media. */
35
+ wellnessAudioUrl?: string;
36
+ /** Controls whether the break covers the viewport, assistant root, or a host element. */
37
+ wellnessBreakOverlayTarget?: WellnessBreakOverlayTarget;
21
38
  }
22
39
  export interface UseAiAssistantInput extends IAIAssistantProps {
23
40
  interactionId?: string;
@@ -21,6 +21,7 @@ export declare const useRealTimeAssist: ({ interactionId, agentId, isFeatureEnab
21
21
  requestRealTimeAssist: (context?: string) => Promise<void>;
22
22
  setContextDraft: import("react").Dispatch<import("react").SetStateAction<string>>;
23
23
  submitContext: () => void;
24
+ clearTranscript: () => void;
24
25
  onRealTimeAssistAction: (event: AIAssistantActionEvent, assist: RealTimeAssistPayload) => any;
25
26
  };
26
27
  export declare const useAiAssistant: (input: UseAiAssistantInput) => {
@@ -33,6 +34,7 @@ export declare const useAiAssistant: (input: UseAiAssistantInput) => {
33
34
  requestRealTimeAssist: (context?: string) => Promise<void>;
34
35
  setContextDraft: import("react").Dispatch<import("react").SetStateAction<string>>;
35
36
  submitContext: () => void;
37
+ clearTranscript: () => void;
36
38
  onRealTimeAssistAction: (event: AIAssistantActionEvent, assist: RealTimeAssistPayload) => any;
37
39
  chrome: AIAssistantChromeState;
38
40
  isFullScreen: boolean;
@@ -0,0 +1,2 @@
1
+ import type { WellnessAnimationLoader } from '@webex/cc-components';
2
+ export declare const loadWellnessAnimation: WellnessAnimationLoader;
@@ -0,0 +1,7 @@
1
+ export declare const WELLNESS_OFFER_TIMEOUT_MS: number;
2
+ export declare const WELLNESS_STATE_SETTLE_MS: number;
3
+ export declare const WELLNESS_STARTING_MS: number;
4
+ export declare const WELLNESS_PLAYING_MS: number;
5
+ export declare const WELLNESS_ENDING_MS: number;
6
+ export declare const WELLNESS_RESTORE_RETRY_MS: number;
7
+ export declare const WELLNESS_RECOVERY_KEY = "webex-cc-agent-wellness-break:v1";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ export declare const WELLNESS_METRIC: {
2
+ readonly BREAK_STARTED: "Wellness Break Started";
3
+ readonly BREAK_ENDED: "Wellness Break Ended";
4
+ readonly CARD_BREAK_ACCEPTED: "Wellness Break Card Accepted";
5
+ readonly CARD_BREAK_REJECTED: "Wellness Break Card Rejected";
6
+ readonly CTA_APPROVED: "Wellness Break CTA Approved";
7
+ readonly CTA_REJECTED: "Wellness Break CTA Rejected";
8
+ readonly CTA_USER_REQUEST: "Wellness Break CTA User Request";
9
+ readonly DISPLAY_CTA: "Wellness Break Display CTA";
10
+ readonly ERROR_CHANGE_STATE: "Wellness Break Change State Error";
11
+ readonly GENERIC_ERROR: "Wellness Break Generic Error";
12
+ readonly NO_RESPONSE: "Wellness Break No Response";
13
+ readonly NOTIFICATION_FIRED: "Wellness Break Notification Fired";
14
+ readonly NOTIFICATION_ACCEPTED: "Wellness Break Notification Accepted";
15
+ readonly NOTIFICATION_DISMISSED: "Wellness Break Notification Dismissed";
16
+ readonly NOTIFICATION_REJECTED: "Wellness Break Notification Rejected";
17
+ readonly NOTIFICATION_TIMEOUT: "Wellness Break Notification Timeout";
18
+ readonly PROVIDE_BREAK_EVENT_RECEIVED: "Wellness Break Provide Break Event Received";
19
+ readonly RESTORE_STATE_RETRY_ATTEMPT: "Wellness Break Restore State Retry Attempt";
20
+ readonly RESTORE_STATE_RECONNECT_ATTEMPT: "Wellness Break Restore State Reconnect Attempt";
21
+ };
22
+ export type WellnessMetricName = (typeof WELLNESS_METRIC)[keyof typeof WELLNESS_METRIC];
23
+ /** Emits only behavior categories and bounded numeric/boolean properties; never session or event data. */
24
+ export declare const logWellnessMetric: (name: WellnessMetricName, properties?: Record<string, string | number | boolean>) => void;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@webex/cc-ai-assistant",
3
3
  "description": "Webex Contact Center Widgets: AI Assistant",
4
4
  "license": "Cisco's General Terms (https://www.cisco.com/site/us/en/about/legal/contract-experience/index.html)",
5
- "version": "0.0.0-next.11",
5
+ "version": "0.0.0-next.13",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/types/index.d.ts",
8
8
  "publishConfig": {
@@ -23,9 +23,10 @@
23
23
  "deploy:npm": "yarn npm publish"
24
24
  },
25
25
  "dependencies": {
26
- "@webex/cc-components": "1.28.0-next.50",
27
- "@webex/cc-store": "1.28.0-next.33",
28
- "@webex/cc-ui-logging": "1.28.0-next.34",
26
+ "@webex/cc-components": "1.28.0-next.52",
27
+ "@webex/cc-store": "1.28.0-next.34",
28
+ "@webex/cc-ui-logging": "1.28.0-next.36",
29
+ "lottie-web": "5.13.0",
29
30
  "mobx-react-lite": "^4.1.0",
30
31
  "react-error-boundary": "^6.0.0",
31
32
  "typescript": "5.6.3"
@@ -41,7 +42,7 @@
41
42
  "@testing-library/react": "16.0.1",
42
43
  "@types/jest": "29.5.14",
43
44
  "@types/react-test-renderer": "18",
44
- "@webex/test-fixtures": "0.0.0-next.1",
45
+ "@webex/test-fixtures": "0.0.0-next.0",
45
46
  "babel-jest": "29.7.0",
46
47
  "babel-loader": "9.2.1",
47
48
  "eslint": "^9.20.1",