@webex/cc-store 1.28.0-next.9 → 1.28.0-rtt.2

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,5 @@
1
1
  import { ITask } from '@webex/contact-center';
2
- import { IContactCenter, Team, IdleCode, InitParams, IStore, ILogger, IWrapupCode, ICustomState, AgentLoginProfile, WithWebex } from './store.types';
2
+ import { IContactCenter, Team, IdleCode, InitParams, IStore, ILogger, IWrapupCode, ICustomState, AgentLoginProfile, WithWebex, RealtimeTranscriptionData, RealtimeTranscriptLine } from './store.types';
3
3
  declare class Store implements IStore {
4
4
  private static instance;
5
5
  teams: Team[];
@@ -36,6 +36,8 @@ declare class Store implements IStore {
36
36
  isMuted: boolean;
37
37
  isDigitalChannelsInitialized: boolean;
38
38
  dataCenter: string;
39
+ realtimeTranscriptionData: RealtimeTranscriptionData;
40
+ realtimeTranscriptLines: RealtimeTranscriptLine[];
39
41
  constructor();
40
42
  static getInstance(): Store;
41
43
  registerCC(webex?: WithWebex['webex']): Promise<void>;
@@ -55,6 +55,43 @@ type IdleCode = {
55
55
  isSystem: boolean;
56
56
  isDefault: boolean;
57
57
  };
58
+ type RealtimeTranscriptionData = {
59
+ content?: string;
60
+ conversationId?: string;
61
+ isFinal?: boolean;
62
+ languageCode?: string;
63
+ messageId?: string;
64
+ orgId?: string;
65
+ publishTimestamp?: number | string;
66
+ role?: string;
67
+ trackingId?: string;
68
+ utteranceId?: string;
69
+ };
70
+ type RealtimeTranscriptionEventPayload = {
71
+ data?: {
72
+ agentId?: string;
73
+ content?: string;
74
+ publishTimestamp?: number | string;
75
+ role?: string;
76
+ data?: RealtimeTranscriptionData;
77
+ notifDetails?: {
78
+ actionEvent?: string;
79
+ };
80
+ notifType?: string;
81
+ orgId?: string;
82
+ };
83
+ orgId?: string;
84
+ trackingId?: string;
85
+ type?: string;
86
+ };
87
+ type RealtimeTranscriptLine = {
88
+ messageId: string;
89
+ role: string;
90
+ caller: string;
91
+ content: string;
92
+ publishTimestamp: number;
93
+ conversationId?: string;
94
+ };
58
95
  interface IStore {
59
96
  featureFlags: {
60
97
  [key: string]: boolean;
@@ -90,6 +127,8 @@ interface IStore {
90
127
  isAddressBookEnabled: boolean;
91
128
  isDigitalChannelsInitialized: boolean;
92
129
  dataCenter: string;
130
+ realtimeTranscriptionData: RealtimeTranscriptionData;
131
+ realtimeTranscriptLines: RealtimeTranscriptLine[];
93
132
  init(params: InitParams, callback: (ccSDK: IContactCenter) => void): Promise<void>;
94
133
  registerCC(webex?: WithWebex['webex']): Promise<void>;
95
134
  }
@@ -165,7 +204,8 @@ declare enum TASK_EVENTS {
165
204
  TASK_PARTICIPANT_LEFT_FAILED = "task:participantLeftFailed",
166
205
  TASK_MERGED = "task:merged",
167
206
  TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
168
- TASK_OUTDIAL_FAILED = "task:outdialFailed"
207
+ TASK_OUTDIAL_FAILED = "task:outdialFailed",
208
+ REAL_TIME_TRANSCRIPTION = "REAL_TIME_TRANSCRIPTION"
169
209
  }
170
210
  declare enum CC_EVENTS {
171
211
  AGENT_DN_REGISTERED = "agent:dnRegistered",
@@ -230,7 +270,7 @@ declare const ERROR_TRIGGERING_IDLE_CODES: {
230
270
  CHANNEL_FAILURE: string;
231
271
  RONA: string;
232
272
  };
233
- export type { IContactCenter, ITask, Profile, Team, AgentLogin, WithWebex, IdleCode, InitParams, IStore, ILogger, IWrapupCode, IStoreWrapper, ICustomState, DestinationType, BuddyDetails, ContactServiceQueue, AgentLoginProfile, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, IWebex, PaginatedListParams, FetchPaginatedList, TransformPaginatedData, };
273
+ export type { IContactCenter, ITask, Profile, Team, AgentLogin, WithWebex, IdleCode, InitParams, IStore, ILogger, IWrapupCode, IStoreWrapper, ICustomState, DestinationType, BuddyDetails, ContactServiceQueue, AgentLoginProfile, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, IWebex, PaginatedListParams, FetchPaginatedList, TransformPaginatedData, RealtimeTranscriptionData, RealtimeTranscriptionEventPayload, RealtimeTranscriptLine, };
234
274
  export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME, DIAL_NUMBER, EXTENSION, DESKTOP, MEDIA_TYPE_TELEPHONY_LOWER, MEDIA_TYPE_TELEPHONY_UPPER, DEVICE_TYPE_BROWSER, AGENT_STATE_AVAILABLE, LoginOptions, ERROR_TRIGGERING_IDLE_CODES, };
235
275
  export declare enum ConsultStatus {
236
276
  NO_CONSULTATION_IN_PROGRESS = "No consultation in progress",
@@ -1,4 +1,4 @@
1
- import { IStoreWrapper, IStore, InitParams, TASK_EVENTS, CC_EVENTS, IWrapupCode, WithWebex, ICustomState, IdleCode, IContactCenter, ITask, BuddyDetails, ContactServiceQueue, ContactServiceQueueSearchParams, EntryPointListResponse, EntryPointSearchParams, AddressBookEntriesResponse, AddressBookEntrySearchParams, AgentLoginProfile } from './store.types';
1
+ import { IStoreWrapper, IStore, InitParams, TASK_EVENTS, CC_EVENTS, IWrapupCode, WithWebex, ICustomState, IdleCode, IContactCenter, ITask, BuddyDetails, ContactServiceQueue, ContactServiceQueueSearchParams, EntryPointListResponse, EntryPointSearchParams, AddressBookEntriesResponse, AddressBookEntrySearchParams, AgentLoginProfile, RealtimeTranscriptionEventPayload } from './store.types';
2
2
  declare class StoreWrapper implements IStoreWrapper {
3
3
  store: IStore;
4
4
  onIncomingTask: ({ task }: {
@@ -9,6 +9,7 @@ declare class StoreWrapper implements IStoreWrapper {
9
9
  onTaskAssigned?: (task: ITask) => void;
10
10
  onTaskSelected?: (task: ITask, isClicked: boolean) => void;
11
11
  onErrorCallback?: (widgetName: string, error: Error) => void;
12
+ private realtimeTranscriptionListeners;
12
13
  constructor();
13
14
  get featureFlags(): {
14
15
  [key: string]: boolean;
@@ -38,6 +39,8 @@ declare class StoreWrapper implements IStoreWrapper {
38
39
  get isDeclineButtonEnabled(): boolean;
39
40
  get isDigitalChannelsInitialized(): boolean;
40
41
  get dataCenter(): string;
42
+ get realtimeTranscriptionData(): import("./store.types").RealtimeTranscriptionData;
43
+ get realtimeTranscriptLines(): import("./store.types").RealtimeTranscriptLine[];
41
44
  setDataCenter: (value: string) => void;
42
45
  get currentConsultQueueId(): string;
43
46
  get isEndConsultEnabled(): boolean;
@@ -106,6 +109,8 @@ declare class StoreWrapper implements IStoreWrapper {
106
109
  handleTaskHydrate: (event: any) => void;
107
110
  handleTaskReject: (task: ITask, reason: string) => void;
108
111
  handleOutdialFailed: (reason: string) => void;
112
+ private findTranscriptPosition;
113
+ handleRealtimeTranscription: (payload: NonNullable<RealtimeTranscriptionEventPayload["data"]>) => void;
109
114
  getBuddyAgents: (mediaType?: string) => Promise<Array<BuddyDetails>>;
110
115
  getQueues: (mediaType?: string, params?: ContactServiceQueueSearchParams) => Promise<{
111
116
  data: ContactServiceQueue[];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@webex/cc-store",
3
3
  "description": "Webex Contact Center Widgets: Widgets Store",
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.9",
5
+ "version": "1.28.0-rtt.2",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/types/index.d.ts",
8
8
  "publishConfig": {
@@ -23,7 +23,7 @@
23
23
  "deploy:npm": "yarn npm publish"
24
24
  },
25
25
  "dependencies": {
26
- "@webex/contact-center": "3.11.0-next.5",
26
+ "@webex/contact-center": "3.12.0-next.1",
27
27
  "mobx": "6.13.5",
28
28
  "typescript": "5.6.3"
29
29
  },
@@ -38,7 +38,7 @@
38
38
  "@testing-library/react": "16.0.1",
39
39
  "@types/jest": "29.5.14",
40
40
  "@types/react-test-renderer": "18",
41
- "@webex/test-fixtures": "0.0.0-next.1",
41
+ "@webex/test-fixtures": "0.0.0-rtt.1",
42
42
  "babel-jest": "29.7.0",
43
43
  "babel-loader": "9.2.1",
44
44
  "eslint": "^9.20.1",