Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ai-docs/CONTRACTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The React entry of `@webex/cc-widgets` re-exports the widgets, including `AIAssi
| ai-assistant.wellness-types | `@webex/cc-ai-assistant` | `WellnessBreakPhase`, `WellnessBreakErrorCode`, `WellnessBreakError`, `WellnessBreakOverlayTarget` | Exported TypeScript lifecycle, error, and layout contracts | additive minor surface; literals are stable | `packages/contact-center/ai-assistant/ai-docs/ai-assistant-spec.md` | `packages/contact-center/ai-assistant/src/ai-assistant.types.ts` |
| cc-components.WellnessBreak | `@webex/cc-components` | `WellnessBreakRequestCard`, `WellnessBreakOfferCard`, `WellnessBreakModal`, `WellnessBreakError` | Props-only Agent Wellness Break presentation; modal accepts an optional animation loader supplied by AI Assistant and owns no wellness media | monorepo component surface; no SDK/store or Lottie dependency | `packages/contact-center/cc-components/ai-docs/cc-components-spec.md` | `packages/contact-center/cc-components/src/components/AIAssistant/WellnessBreak/` |
| cc-widgets.store | `@webex/cc-store` | `store` | MobX singleton (`Store.getInstance()`); `init(options: InitParams, setupEventListeners): Promise<void>`; sole SDK access point via `store.cc.*` | stable semver | `packages/contact-center/store/ai-docs/store-spec.md` | `packages/contact-center/store/src/index.ts:1,4` |
| store.ai-summary | `@webex/cc-store` | `cc.aiSummaries`, summary request/receiver-feedback/send methods, `AISummaryEntry`, `AISummaryRole`, `AISummaryResponseSubmissionResult` | Entries keyed by interaction and role retain the unchanged SDK `AISummary` in `content` and `AISummaryResponse` in `response`. Requests return `AISummary` or `undefined`; senders return `AISummaryResponseSubmissionResult`. Widget helpers own local editing, copy tracking and deferred feedback through response fields. `setReceiverSummaryFeedback(feedback, expectedSummary, task)` uses the displayed SDK payload to guard its asynchronous acknowledgement. Consumers read enablement from `task.aiSummaryCapabilities`; `task:featureEnablement` refreshes the task view. Wrap-up sends `sendPostCallSummaryResponse(wrapUpCode, originalTask)` before `task.wrapup()`. | additive; uses published `@webex/contact-center` `3.12.0-next.148` | `packages/contact-center/store/ai-docs/store-spec.md` (AI summaries) | `packages/contact-center/store/src/store.types.ts`, `packages/contact-center/store/src/storeEventsWrapper.ts` |
| store.ai-summary | `@webex/cc-store` | `cc.aiSummaries`, summary request/receiver-feedback/send methods, `AISummaryEntry`, `AISummaryRole`, `AISummaryResponseSubmissionResult` | Entries keyed by interaction and role retain the unchanged SDK `AISummary` in `content` and `AISummaryResponse` in `response`. Requests return `AISummary` or `undefined`; senders return `AISummaryResponseSubmissionResult`. Widget helpers own local editing, copy tracking and deferred feedback through response fields. `setReceiverSummaryFeedback(feedback, expectedSummary, task)` uses the displayed SDK payload to guard its asynchronous acknowledgement. Consumers read enablement from `task.aiSummaryCapabilities`; `task:featureEnablement` refreshes the task view. Wrap-up sends `sendPostCallSummaryResponse(wrapUpCode, originalTask)` before `task.wrapup()`. | additive; uses published `@webex/contact-center` `3.12.0-next.159` | `packages/contact-center/store/ai-docs/store-spec.md` (AI summaries) | `packages/contact-center/store/src/store.types.ts`, `packages/contact-center/store/src/storeEventsWrapper.ts` |
| store.host-init.enableWxBetterTogether | `@webex/cc-store` | `webexConfig.cc.enableWxBetterTogether` → `store.enableWxBetterTogether` | Host init boolean (default `false`), set **before** `store.init()`: read from `webexConfig.cc` on `{ webexConfig, access_token }` init or `webex.config.cc` on `{ webex }` init; read-only observable after init (Phase 1: re-init to change). Gates wxApp Mute/Keypad visibility and wxApp mute seed; SDK owns mute/DTMF API routing. | stable semver; renaming or removing the init key or store getter is breaking | `packages/contact-center/store/ai-docs/store-spec.md` (`STORE-R-030`); `packages/contact-center/task/ai-docs/task-spec.md` (WXCC-6026) | `packages/contact-center/store/src/store.ts`, `packages/contact-center/store/src/store.types.ts` (`WebexCcInitConfig`) |
| store.types | `@webex/cc-store` | Existing queue/entry-point request, response, and entity type re-exports plus `TaskUIControls` | TypeScript exports describing the SDK-backed domain surface; established entity rows and Task destination controls pass through without a widget destination abstraction | stable semver; SDK-shaped types track SDK | `@webex/contact-center` types (`node_modules/@webex/contact-center/dist/types/index.d.ts`) (SDK source); `packages/contact-center/store/ai-docs/store-spec.md` | `packages/contact-center/store/src/store.types.ts` |
| cc-components.consult-transfer-lists | `@webex/cc-components` | `CallControl` consult/transfer fetch props plus `action`, `availableDestinations`, and optional list-item `presence` | `FetchPaginatedList<ContactServiceQueue>` / `FetchPaginatedList<EntryPointRecord>` and the SDK-ordered destination array from `TaskUIControls`; UI preserves list/category order, passes buddy availability to Momentum Avatar as semantic presence, shows `AddressBookEntry.number` and `EntryPointRecord.number` subtitles, and may only apply host hide overrides | stable semver; entity and control types track store/SDK contracts; optional presentation prop is additive | `packages/contact-center/cc-components/ai-docs/cc-components-spec.md`; `ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md` | `packages/contact-center/cc-components/src/components/task/task.types.ts` |
Expand Down
16 changes: 8 additions & 8 deletions packages/contact-center/store/ai-docs/store-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Owns Contact Center client-side state and the SDK boundary: initialize/register

## Stack

TypeScript 5.6.3, MobX 6.13.5 (`makeAutoObservable`, `observable.ref`, `runInAction`). Consumed in React 18 via `mobx-react-lite` `observer()` in downstream packages (not a dependency of this package itself). SDK dependency `@webex/contact-center` 3.12.0-next.148. Tests: Jest 29 + ts compile (`tsc --project tsconfig.test.json && jest --coverage`). Build target: `dist/index.js` (Webpack). Evidence: `packages/contact-center/store/package.json`.
TypeScript 5.6.3, MobX 6.13.5 (`makeAutoObservable`, `observable.ref`, `runInAction`). Consumed in React 18 via `mobx-react-lite` `observer()` in downstream packages (not a dependency of this package itself). SDK dependency `@webex/contact-center` 3.12.0-next.159. Tests: Jest 29 + ts compile (`tsc --project tsconfig.test.json && jest --coverage`). Build target: `dist/index.js` (Webpack). Evidence: `packages/contact-center/store/package.json`.

## Folder / Package Structure

Expand Down Expand Up @@ -94,7 +94,7 @@ Compatibility notes:

## Requires (dependencies)

- `@webex/contact-center` SDK (pinned in `package.json` at `3.12.0-next.148`) — the entire CC runtime: `Webex.init()`, `webex.cc.*` methods, the CC/task event stream, agent `Profile`, `webex.credentials.getUserToken()`. Consumed ONLY through the store. Fallback on unavailability: `Store.init()` rejects after a 6000ms timeout (`src/store.ts:140-142`); the wrapper wraps the rejection and invokes `onErrorCallback('Store', err)` (`src/storeEventsWrapper.ts:442-452`).
- `@webex/contact-center` SDK (pinned in `package.json` at `3.12.0-next.159`) — the entire CC runtime: `Webex.init()`, `webex.cc.*` methods, the CC/task event stream, agent `Profile`, `webex.credentials.getUserToken()`. Consumed ONLY through the store. Fallback on unavailability: `Store.init()` rejects after a 6000ms timeout (`src/store.ts:140-142`); the wrapper wraps the rejection and invokes `onErrorCallback('Store', err)` (`src/storeEventsWrapper.ts:442-452`).
- `mobx` ^6.13.5 — observable state and `runInAction` for all mutations.
- Internal: none upstream. The store is the lowest widget-layer dependency (`cc-components → widget packages → store → SDK`); it imports no widget package.

Expand Down Expand Up @@ -470,12 +470,12 @@ interaction ID lets task cleanup remove them together; entries are created as ne

The integration consumes `AISummary`, `AISummarySections`, `AISummaryResponse`,
`AISummaryAction`, and `AISummaryFeedback` from `@webex/contact-center`.
These APIs come from published SDK `3.12.0-next.148`. The store and React sample pin
that version; the root resolution also selects it for the sample's transitive Webex
SDK dependency. Three scoped resolutions replace unavailable transitive versions:
Device `3.12.0-next.55` uses published `next.54`, and Metrics `3.12.0-next.56` uses
published `next.55`; Mercury `3.12.0-next.62` uses published `next.61`. Remove these
resolutions once the referenced versions are published. No local SDK archive is used.
These APIs come from published SDK `3.12.0-next.159`. The store and React sample pin
that version directly; the sample also pins `webex` `3.12.0-next.249`, the umbrella
release that bundles the same `@webex/contact-center` build, so the dependency tree
resolves a single copy of the SDK, `@webex/calling`, `@webex/webex-core` and
`@webex/plugin-authorization`. No scoped Webex resolutions and no local SDK archive
are used.
The React sample uses the SDK-supported `User requested logout` reason for page-unload logout.
`AISummary` is the common incoming payload type; `AISummaryResponse` is the distinct
feedback payload sent back to the SDK. The store retains both types directly. The UI
Expand Down
2 changes: 1 addition & 1 deletion packages/contact-center/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"deploy:npm": "yarn npm publish"
},
"dependencies": {
"@webex/contact-center": "3.12.0-next.148",
"@webex/contact-center": "3.12.0-next.159",
Comment thread
riag23 marked this conversation as resolved.
"mobx": "6.13.5",
"typescript": "5.6.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/contact-center/store/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ class Store implements IStore {
this.legacyAuxCodeId = registeredSessionId ? response.lastStateAuxCodeId || '' : '';
this.legacyAgentState = this.legacyAuxCodeId ? (this.legacyAuxCodeId === '0' ? 'Available' : 'Idle') : '';
});
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762
this.teams = response.teams;
this.loginOptions = response.webRtcEnabled
? response.loginVoiceOptions
Expand Down
15 changes: 14 additions & 1 deletion packages/contact-center/test-fixtures/src/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ import type {
import type {IContactCenter, ITask} from '@webex/cc-store';

const mockProfile: Profile = {
teams: [{teamId: 'team1', teamName: 'Team 1'}],
teams: [
{
id: 'team1',
name: 'Team 1',
teamType: 'AGENT_BASED',
teamStatus: 'IN_SERVICE',
active: true,
siteId: 'site123',
siteName: 'Site 1',
userIds: ['agent1'],
rankQueuesForTeam: false,
queueRankings: [],
},
],
defaultDn: '12345',
dn: '12345',
forceDefaultDn: false,
Expand Down
4 changes: 2 additions & 2 deletions widgets-samples/cc/samples-cc-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@momentum-ui/web-components": "^2.26.20",
"@webex/cc-ai-assistant": "workspace:*",
"@webex/cc-widgets": "workspace:*",
"@webex/contact-center": "3.12.0-next.133",
"@webex/contact-center": "3.12.0-next.159",
"babel-loader": "^9.2.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.3",
Expand All @@ -34,7 +34,7 @@
"react-dom": "18.3.1",
"ts-loader": "^9.5.1",
"typescript": "^5.6.3",
"webex": "3.12.0-next.220",
"webex": "3.12.0-next.249",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0",
Expand Down
Loading
Loading