@webex/cc-store 1.28.0-next.16 → 1.28.0-next.18
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.
package/dist/types/store.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ declare class Store implements IStore {
|
|
|
37
37
|
isDigitalChannelsInitialized: boolean;
|
|
38
38
|
dataCenter: string;
|
|
39
39
|
realtimeTranscriptionData: Partial<RealTimeTranscriptionData>[];
|
|
40
|
+
acceptedCampaignIds: Set<string>;
|
|
40
41
|
constructor();
|
|
41
42
|
static getInstance(): Store;
|
|
42
43
|
registerCC(webex?: WithWebex['webex']): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AgentLogin, Profile, BuddyDetails, ContactServiceQueue, ITask, BuddyAgents, BuddyAgentsResponse, StateChange, Logout, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, AddressBook } from '@webex/contact-center';
|
|
1
|
+
import { AgentLogin, Profile, BuddyDetails, ContactServiceQueue, ITask, BuddyAgents, BuddyAgentsResponse, StateChange, Logout, EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, AddressBook, TaskResponse } from '@webex/contact-center';
|
|
2
2
|
import { OutdialAniEntriesResponse, OutdialAniParams } from 'node_modules/@webex/contact-center/dist/types/services/config/types';
|
|
3
|
-
import { DestinationType } from 'node_modules/@webex/contact-center/dist/types/services/task/types';
|
|
3
|
+
import { DestinationType, PreviewContactPayload } from 'node_modules/@webex/contact-center/dist/types/services/task/types';
|
|
4
4
|
import { AgentProfileUpdate, LogContext, SetStateResponse, StationLoginResponse, StationLogoutResponse, Team, UpdateDeviceTypeResponse } from 'node_modules/@webex/contact-center/dist/types/types';
|
|
5
5
|
interface IContactCenter {
|
|
6
6
|
on: (event: string, callback: (data: any) => void) => void;
|
|
@@ -26,6 +26,9 @@ interface IContactCenter {
|
|
|
26
26
|
setAgentState(data: StateChange): Promise<SetStateResponse>;
|
|
27
27
|
getOutdialAniEntries(params: OutdialAniParams): Promise<OutdialAniEntriesResponse>;
|
|
28
28
|
getAccessToken(): Promise<string>;
|
|
29
|
+
acceptPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
30
|
+
skipPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
31
|
+
removePreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
29
32
|
}
|
|
30
33
|
type IWebex = {
|
|
31
34
|
cc: IContactCenter;
|
|
@@ -112,6 +115,7 @@ interface IStore {
|
|
|
112
115
|
isDigitalChannelsInitialized: boolean;
|
|
113
116
|
dataCenter: string;
|
|
114
117
|
realtimeTranscriptionData: Partial<RealTimeTranscriptionData>[];
|
|
118
|
+
acceptedCampaignIds: Set<string>;
|
|
115
119
|
init(params: InitParams, callback: (ccSDK: IContactCenter) => void): Promise<void>;
|
|
116
120
|
registerCC(webex?: WithWebex['webex']): Promise<void>;
|
|
117
121
|
}
|
|
@@ -143,6 +147,8 @@ interface IStoreWrapper extends IStore {
|
|
|
143
147
|
setOnError(callback: (widgetName: string, error: Error) => void): void;
|
|
144
148
|
setDataCenter(value: string): void;
|
|
145
149
|
getAccessToken(): Promise<string>;
|
|
150
|
+
addAcceptedCampaign(interactionId: string): void;
|
|
151
|
+
removeAcceptedCampaign(interactionId: string): void;
|
|
146
152
|
}
|
|
147
153
|
interface IWrapupCode {
|
|
148
154
|
id: string;
|
|
@@ -188,7 +194,9 @@ declare enum TASK_EVENTS {
|
|
|
188
194
|
TASK_MERGED = "task:merged",
|
|
189
195
|
TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
|
|
190
196
|
TASK_OUTDIAL_FAILED = "task:outdialFailed",
|
|
191
|
-
REAL_TIME_TRANSCRIPTION = "REAL_TIME_TRANSCRIPTION"
|
|
197
|
+
REAL_TIME_TRANSCRIPTION = "REAL_TIME_TRANSCRIPTION",
|
|
198
|
+
TASK_CAMPAIGN_PREVIEW_RESERVATION = "task:campaignPreviewReservation",
|
|
199
|
+
TASK_CAMPAIGN_CONTACT_UPDATED = "task:campaignContactUpdated"
|
|
192
200
|
}
|
|
193
201
|
declare enum CC_EVENTS {
|
|
194
202
|
AGENT_DN_REGISTERED = "agent:dnRegistered",
|
|
@@ -209,6 +217,8 @@ interface ICustomStateReset {
|
|
|
209
217
|
type ICustomState = ICustomStateSet | ICustomStateReset;
|
|
210
218
|
declare const ENGAGED_LABEL = "ENGAGED";
|
|
211
219
|
declare const ENGAGED_USERNAME = "Engaged";
|
|
220
|
+
declare const RESERVED_LABEL = "RESERVED";
|
|
221
|
+
declare const RESERVED_USERNAME = "Reserved";
|
|
212
222
|
type AgentLoginProfile = {
|
|
213
223
|
agentName?: string;
|
|
214
224
|
orgId?: string;
|
|
@@ -254,7 +264,11 @@ declare const ERROR_TRIGGERING_IDLE_CODES: {
|
|
|
254
264
|
RONA: string;
|
|
255
265
|
};
|
|
256
266
|
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, };
|
|
257
|
-
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, };
|
|
267
|
+
export { CC_EVENTS, TASK_EVENTS, ENGAGED_LABEL, ENGAGED_USERNAME, RESERVED_LABEL, RESERVED_USERNAME, DIAL_NUMBER, EXTENSION, DESKTOP, MEDIA_TYPE_TELEPHONY_LOWER, MEDIA_TYPE_TELEPHONY_UPPER, DEVICE_TYPE_BROWSER, AGENT_STATE_AVAILABLE, LoginOptions, ERROR_TRIGGERING_IDLE_CODES, };
|
|
268
|
+
/** Outbound type values that identify a campaign preview task. */
|
|
269
|
+
export declare const CAMPAIGN_PREVIEW_OUTBOUND_TYPES: string[];
|
|
270
|
+
/** Campaign type values (from callProcessingDetails) that identify a campaign preview task. */
|
|
271
|
+
export declare const CAMPAIGN_PREVIEW_CAMPAIGN_TYPES: string[];
|
|
258
272
|
export declare enum ConsultStatus {
|
|
259
273
|
NO_CONSULTATION_IN_PROGRESS = "No consultation in progress",
|
|
260
274
|
BEING_CONSULTED = "beingConsulted",
|
|
@@ -40,6 +40,7 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
40
40
|
get isDigitalChannelsInitialized(): boolean;
|
|
41
41
|
get dataCenter(): string;
|
|
42
42
|
get realtimeTranscriptionData(): Partial<import("./store.types").RealTimeTranscriptionData>[];
|
|
43
|
+
get acceptedCampaignIds(): Set<string>;
|
|
43
44
|
setDataCenter: (value: string) => void;
|
|
44
45
|
get currentConsultQueueId(): string;
|
|
45
46
|
get isEndConsultEnabled(): boolean;
|
|
@@ -84,6 +85,18 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
84
85
|
registerCC: (webex?: WithWebex["webex"]) => Promise<void>;
|
|
85
86
|
handleTaskRemove: (taskToRemove: ITask) => void;
|
|
86
87
|
handleTaskMuteState: (task: ITask) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Checks if a task is a campaign preview interaction.
|
|
90
|
+
* Matches agent desktop logic that checks both outboundType and campaignType.
|
|
91
|
+
*/
|
|
92
|
+
private isCampaignPreview;
|
|
93
|
+
/**
|
|
94
|
+
* Handles the campaign preview reservation event (agent accepted the preview).
|
|
95
|
+
* Transitions state from RESERVED to ENGAGED, matching agent desktop behavior.
|
|
96
|
+
*/
|
|
97
|
+
addAcceptedCampaign: (interactionId: string) => void;
|
|
98
|
+
removeAcceptedCampaign: (interactionId: string) => void;
|
|
99
|
+
handleCampaignPreviewReservation: (event: ITask) => void;
|
|
87
100
|
handleTaskEnd: () => void;
|
|
88
101
|
handleTaskAssigned: (event: any) => void;
|
|
89
102
|
handleTaskMedia: (track: any) => void;
|
|
@@ -102,6 +115,15 @@ declare class StoreWrapper implements IStoreWrapper {
|
|
|
102
115
|
*/
|
|
103
116
|
private registerTaskEventListeners;
|
|
104
117
|
handleIncomingTask: (event: any) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Handles the initial arrival of a campaign task.
|
|
120
|
+
* The SDK emits TASK_CAMPAIGN_PREVIEW_RESERVATION for all campaign types.
|
|
121
|
+
* Only standard and direct preview campaigns should enter RESERVED state
|
|
122
|
+
* (the agent must explicitly accept/skip the preview contact).
|
|
123
|
+
* Predictive and progressive campaigns go straight to the regular flow —
|
|
124
|
+
* they will transition directly to ENGAGED via handleTaskAssigned.
|
|
125
|
+
*/
|
|
126
|
+
handleIncomingCampaignPreview: (event: ITask) => void;
|
|
105
127
|
handleStateChange: (data: any) => void;
|
|
106
128
|
handleMultiLoginCloseSession: (data: any) => void;
|
|
107
129
|
handleTaskMerged: (event: any) => void;
|
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.
|
|
5
|
+
"version": "1.28.0-next.18",
|
|
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.12.0-next.
|
|
26
|
+
"@webex/contact-center": "3.12.0-next.42",
|
|
27
27
|
"mobx": "6.13.5",
|
|
28
28
|
"typescript": "5.6.3"
|
|
29
29
|
},
|