@webex/cc-user-state 1.28.0-next.6 → 1.28.0-next.60

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,6 @@
1
+ import type { VoiceConnectionState } from '@webex/cc-store';
1
2
  import { UseUserStateProps } from './user-state.types';
2
- export declare const useUserState: ({ idleCodes, agentId, cc, currentState, customState, lastStateChangeTimestamp, logger, onStateChange, lastIdleCodeChangeTimestamp, }: UseUserStateProps) => {
3
+ export declare const useUserState: ({ idleCodes, agentId, cc, currentState, customState, lastStateChangeTimestamp, logger, onStateChange, onVoiceReconnect, lastIdleCodeChangeTimestamp, isCurrentStateExternallyManaged, wellnessIdleCodeLookupPending, isBrowserVoiceSession, isAgentLoggedIn, }: UseUserStateProps) => {
3
4
  idleCodes: import("@webex/cc-store").IdleCode[];
4
5
  setAgentStatus: (selectedCode: any) => void;
5
6
  isSettingAgentStatus: boolean;
@@ -7,4 +8,10 @@ export declare const useUserState: ({ idleCodes, agentId, cc, currentState, cust
7
8
  lastIdleStateChangeElapsedTime: number;
8
9
  currentState: string;
9
10
  onStateChange: (arg: import("@webex/cc-store").IdleCode | import("@webex/cc-store").ICustomState) => void;
11
+ voiceConnectionState: VoiceConnectionState;
12
+ stateChangeError: string;
13
+ voiceConnectionLossDialogOpen: boolean;
14
+ onVoiceReconnect: () => Promise<void>;
15
+ onVoiceConnectionLossDialogClose: () => void;
16
+ voiceReconnectError: string;
10
17
  };
@@ -1,3 +1,12 @@
1
1
  import { IUserState } from '@webex/cc-components';
2
- export type IUserStateProps = Pick<IUserState, 'onStateChange'>;
3
- export type UseUserStateProps = Pick<IUserState, 'idleCodes' | 'agentId' | 'cc' | 'currentState' | 'customState' | 'lastStateChangeTimestamp' | 'logger' | 'onStateChange' | 'lastIdleCodeChangeTimestamp'>;
2
+ export type IUserStateProps = Pick<IUserState, 'onStateChange' | 'onVoiceReconnect'>;
3
+ export type UseUserStateProps = Pick<IUserState, 'idleCodes' | 'agentId' | 'cc' | 'currentState' | 'customState' | 'lastStateChangeTimestamp' | 'logger' | 'onStateChange' | 'onVoiceReconnect' | 'lastIdleCodeChangeTimestamp'> & {
4
+ /** True when an SDK-owned lifecycle, rather than the dropdown, changed the current state. */
5
+ isCurrentStateExternallyManaged?: boolean;
6
+ /** True until the SDK identifies the system-owned wellness idle code. */
7
+ wellnessIdleCodeLookupPending?: boolean;
8
+ /** True when the registered agent session is using browser voice. */
9
+ isBrowserVoiceSession?: boolean;
10
+ /** True while the agent remains logged in to Contact Center. */
11
+ isAgentLoggedIn?: boolean;
12
+ };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@webex/cc-user-state",
3
3
  "description": "Webex Contact Center Widgets: User State",
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.6",
5
+ "version": "1.28.0-next.60",
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.6",
27
- "@webex/cc-store": "1.28.0-next.3",
26
+ "@webex/cc-components": "1.28.0-next.59",
27
+ "@webex/cc-store": "1.28.0-next.40",
28
28
  "mobx-react-lite": "^4.1.0",
29
29
  "react-error-boundary": "^6.0.0",
30
30
  "typescript": "5.6.3"
@@ -40,7 +40,7 @@
40
40
  "@testing-library/react": "16.0.1",
41
41
  "@types/jest": "29.5.14",
42
42
  "@types/react-test-renderer": "18",
43
- "@webex/test-fixtures": "0.0.0-next.0",
43
+ "@webex/test-fixtures": "0.0.0-next.1",
44
44
  "babel-jest": "29.7.0",
45
45
  "babel-loader": "9.2.1",
46
46
  "eslint": "^9.20.1",