@webex/contact-center 3.11.0 → 3.12.0-mobius-socket.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.
- package/dist/cc.js +121 -28
- package/dist/cc.js.map +1 -1
- package/dist/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/metrics/behavioral-events.js +13 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +9 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/ApiAiAssistant.js +173 -0
- package/dist/services/ApiAiAssistant.js.map +1 -0
- package/dist/services/agent/types.js.map +1 -1
- package/dist/services/config/Util.js +6 -2
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +12 -0
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +41 -2
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +19 -1
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js +27 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +28 -6
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +92 -17
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +20 -5
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/connection-service.js +3 -1
- package/dist/services/core/websocket/connection-service.js.map +1 -1
- package/dist/services/index.js +6 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/TaskManager.js +117 -24
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +16 -3
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +15 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/dialer.js +51 -0
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/types.js +15 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +801 -0
- package/dist/types/config.d.ts +66 -0
- package/dist/types/constants.d.ts +50 -0
- package/dist/types/index.d.ts +184 -0
- package/dist/types/logger-proxy.d.ts +71 -0
- package/dist/types/metrics/MetricsManager.d.ts +223 -0
- package/dist/types/metrics/behavioral-events.d.ts +29 -0
- package/dist/types/metrics/constants.d.ts +161 -0
- package/dist/types/services/AddressBook.d.ts +74 -0
- package/dist/types/services/ApiAiAssistant.d.ts +31 -0
- package/dist/types/services/EntryPoint.d.ts +67 -0
- package/dist/types/services/Queue.d.ts +76 -0
- package/dist/types/services/WebCallingService.d.ts +1 -0
- package/dist/types/services/agent/index.d.ts +46 -0
- package/dist/types/services/agent/types.d.ts +413 -0
- package/dist/types/services/config/Util.d.ts +20 -0
- package/dist/types/services/config/constants.d.ts +249 -0
- package/dist/types/services/config/index.d.ts +177 -0
- package/dist/types/services/config/types.d.ts +1207 -0
- package/dist/types/services/constants.d.ts +110 -0
- package/dist/types/services/core/Err.d.ts +121 -0
- package/dist/types/services/core/GlobalTypes.d.ts +58 -0
- package/dist/types/services/core/Utils.d.ts +101 -0
- package/dist/types/services/core/WebexRequest.d.ts +22 -0
- package/dist/types/services/core/aqm-reqs.d.ts +65 -0
- package/dist/types/services/core/constants.d.ts +99 -0
- package/dist/types/services/core/types.d.ts +47 -0
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +35 -0
- package/dist/types/services/core/websocket/connection-service.d.ts +27 -0
- package/dist/types/services/core/websocket/keepalive.worker.d.ts +2 -0
- package/dist/types/services/core/websocket/types.d.ts +37 -0
- package/dist/types/services/index.d.ts +54 -0
- package/dist/types/services/task/AutoWrapup.d.ts +40 -0
- package/dist/types/services/task/TaskManager.d.ts +1 -0
- package/dist/types/services/task/TaskUtils.d.ts +92 -0
- package/dist/types/services/task/constants.d.ts +84 -0
- package/dist/types/services/task/contact.d.ts +69 -0
- package/dist/types/services/task/dialer.d.ts +43 -0
- package/dist/types/services/task/index.d.ts +650 -0
- package/dist/types/services/task/types.d.ts +1319 -0
- package/dist/types/types.d.ts +643 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types/webex-config.d.ts +53 -0
- package/dist/types/webex.d.ts +7 -0
- package/dist/types.js +14 -1
- package/dist/types.js.map +1 -1
- package/dist/webex.js +1 -1
- package/package.json +9 -9
- package/src/cc.ts +157 -30
- package/src/constants.ts +4 -0
- package/src/index.ts +1 -0
- package/src/metrics/behavioral-events.ts +14 -0
- package/src/metrics/constants.ts +11 -0
- package/src/services/ApiAiAssistant.ts +217 -0
- package/src/services/agent/types.ts +1 -1
- package/src/services/config/Util.ts +8 -0
- package/src/services/config/constants.ts +12 -0
- package/src/services/config/index.ts +45 -1
- package/src/services/config/types.ts +67 -0
- package/src/services/constants.ts +29 -0
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/Utils.ts +32 -5
- package/src/services/core/aqm-reqs.ts +100 -22
- package/src/services/core/websocket/WebSocketManager.ts +21 -6
- package/src/services/core/websocket/connection-service.ts +5 -1
- package/src/services/index.ts +4 -0
- package/src/services/task/TaskManager.ts +174 -27
- package/src/services/task/TaskUtils.ts +12 -0
- package/src/services/task/constants.ts +16 -0
- package/src/services/task/dialer.ts +56 -1
- package/src/services/task/types.ts +24 -0
- package/src/types.ts +40 -1
- package/test/unit/spec/cc.ts +163 -23
- package/test/unit/spec/services/ApiAiAssistant.ts +115 -0
- package/test/unit/spec/services/config/index.ts +56 -0
- package/test/unit/spec/services/core/Utils.ts +63 -1
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +82 -12
- package/test/unit/spec/services/core/websocket/connection-service.ts +3 -1
- package/test/unit/spec/services/task/TaskManager.ts +1119 -251
- package/test/unit/spec/services/task/dialer.ts +198 -112
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
* @module METRIC_EVENT_NAMES
|
|
5
|
+
* @export
|
|
6
|
+
* @description
|
|
7
|
+
* A constant object containing all metric event names used for tracking various agent and task-related events
|
|
8
|
+
* within the Contact Center plugin. Each property represents a specific event and its corresponding string value
|
|
9
|
+
* as reported in metrics.
|
|
10
|
+
*
|
|
11
|
+
* @property {string} STATION_LOGIN_SUCCESS - Event name for successful station login.
|
|
12
|
+
* @property {string} STATION_LOGIN_FAILED - Event name for failed station login.
|
|
13
|
+
* @property {string} STATION_LOGOUT_SUCCESS - Event name for successful station logout.
|
|
14
|
+
* @property {string} STATION_LOGOUT_FAILED - Event name for failed station logout.
|
|
15
|
+
* @property {string} STATION_RELOGIN_SUCCESS - Event name for successful station relogin.
|
|
16
|
+
* @property {string} STATION_RELOGIN_FAILED - Event name for failed station relogin.
|
|
17
|
+
* @property {string} AGENT_STATE_CHANGE_SUCCESS - Event name for successful agent state change.
|
|
18
|
+
* @property {string} AGENT_STATE_CHANGE_FAILED - Event name for failed agent state change.
|
|
19
|
+
* @property {string} FETCH_BUDDY_AGENTS_SUCCESS - Event name for successfully fetching buddy agents.
|
|
20
|
+
* @property {string} FETCH_BUDDY_AGENTS_FAILED - Event name for failed attempt to fetch buddy agents.
|
|
21
|
+
* @property {string} WEBSOCKET_REGISTER_SUCCESS - Event name for successful websocket registration.
|
|
22
|
+
* @property {string} WEBSOCKET_REGISTER_FAILED - Event name for failed websocket registration.
|
|
23
|
+
* @property {string} AGENT_RONA - Event name for agent RONA (Ring No Answer).
|
|
24
|
+
* @property {string} AGENT_CONTACT_ASSIGN_FAILED - Event name for failed agent contact assignment.
|
|
25
|
+
* @property {string} AGENT_INVITE_FAILED - Event name for failed agent invite.
|
|
26
|
+
*
|
|
27
|
+
* @property {string} TASK_ACCEPT_SUCCESS - Event name for successful task acceptance.
|
|
28
|
+
* @property {string} TASK_ACCEPT_FAILED - Event name for failed task acceptance.
|
|
29
|
+
* @property {string} TASK_DECLINE_SUCCESS - Event name for successful task decline.
|
|
30
|
+
* @property {string} TASK_DECLINE_FAILED - Event name for failed task decline.
|
|
31
|
+
* @property {string} TASK_END_SUCCESS - Event name for successful task end.
|
|
32
|
+
* @property {string} TASK_END_FAILED - Event name for failed task end.
|
|
33
|
+
* @property {string} TASK_WRAPUP_SUCCESS - Event name for successful task wrap-up.
|
|
34
|
+
* @property {string} TASK_WRAPUP_FAILED - Event name for failed task wrap-up.
|
|
35
|
+
* @property {string} TASK_HOLD_SUCCESS - Event name for successful task hold.
|
|
36
|
+
* @property {string} TASK_HOLD_FAILED - Event name for failed task hold.
|
|
37
|
+
* @property {string} TASK_RESUME_SUCCESS - Event name for successful task resume.
|
|
38
|
+
* @property {string} TASK_RESUME_FAILED - Event name for failed task resume.
|
|
39
|
+
* @property {string} TASK_CONSULT_START_SUCCESS - Event name for successful consult start.
|
|
40
|
+
* @property {string} TASK_CONSULT_START_FAILED - Event name for failed consult start.
|
|
41
|
+
* @property {string} TASK_CONSULT_END_SUCCESS - Event name for successful consult end.
|
|
42
|
+
* @property {string} TASK_CONSULT_END_FAILED - Event name for failed consult end.
|
|
43
|
+
* @property {string} TASK_TRANSFER_SUCCESS - Event name for successful task transfer.
|
|
44
|
+
* @property {string} TASK_TRANSFER_FAILED - Event name for failed task transfer.
|
|
45
|
+
* @property {string} TASK_RESUME_RECORDING_SUCCESS - Event name for successful resume of recording.
|
|
46
|
+
* @property {string} TASK_RESUME_RECORDING_FAILED - Event name for failed resume of recording.
|
|
47
|
+
* @property {string} TASK_PAUSE_RECORDING_SUCCESS - Event name for successful pause of recording.
|
|
48
|
+
* @property {string} TASK_PAUSE_RECORDING_FAILED - Event name for failed pause of recording.
|
|
49
|
+
* @property {string} TASK_ACCEPT_CONSULT_SUCCESS - Event name for successful consult acceptance.
|
|
50
|
+
* @property {string} TASK_ACCEPT_CONSULT_FAILED - Event name for failed consult acceptance.
|
|
51
|
+
* @property {string} TASK_AUTO_ANSWER_SUCCESS - Event name for successful auto-answer.
|
|
52
|
+
* @property {string} TASK_AUTO_ANSWER_FAILED - Event name for failed auto-answer.
|
|
53
|
+
*
|
|
54
|
+
* @property {string} TASK_CONFERENCE_START_SUCCESS - Event name for successful conference start.
|
|
55
|
+
* @property {string} TASK_CONFERENCE_START_FAILED - Event name for failed conference start.
|
|
56
|
+
* @property {string} TASK_CONFERENCE_END_SUCCESS - Event name for successful conference end.
|
|
57
|
+
* @property {string} TASK_CONFERENCE_END_FAILED - Event name for failed conference end.
|
|
58
|
+
* @property {string} TASK_CONFERENCE_TRANSFER_SUCCESS - Event name for successful conference transfer.
|
|
59
|
+
* @property {string} TASK_CONFERENCE_TRANSFER_FAILED - Event name for failed conference transfer.
|
|
60
|
+
*
|
|
61
|
+
* @property {string} TASK_OUTDIAL_SUCCESS - Event name for successful outdial task.
|
|
62
|
+
* @property {string} TASK_OUTDIAL_FAILED - Event name for failed outdial task.
|
|
63
|
+
*
|
|
64
|
+
* @property {string} UPLOAD_LOGS_SUCCESS - Event name for successful log upload.
|
|
65
|
+
* @property {string} UPLOAD_LOGS_FAILED - Event name for failed log upload.
|
|
66
|
+
* @property {string} WEBSOCKET_DEREGISTER_SUCCESS - Event name for successful websocket deregistration.
|
|
67
|
+
* @property {string} WEBSOCKET_DEREGISTER_FAIL - Event name for failed websocket deregistration.
|
|
68
|
+
*
|
|
69
|
+
* @property {string} AGENT_DEVICE_TYPE_UPDATE_SUCCESS - Event name for successful agent device type update.
|
|
70
|
+
* @property {string} AGENT_DEVICE_TYPE_UPDATE_FAILED - Event name for failed agent device type update.
|
|
71
|
+
*
|
|
72
|
+
* @property {string} OUTDIAL_ANI_EP_FETCH_SUCCESS - Event name for successful outdial ANI entries fetch.
|
|
73
|
+
* @property {string} OUTDIAL_ANI_EP_FETCH_FAILED - Event name for failed outdial ANI entries fetch.
|
|
74
|
+
*
|
|
75
|
+
* @readonly
|
|
76
|
+
*/
|
|
77
|
+
export declare const METRIC_EVENT_NAMES: {
|
|
78
|
+
readonly STATION_LOGIN_SUCCESS: "Station Login Success";
|
|
79
|
+
readonly STATION_LOGIN_FAILED: "Station Login Failed";
|
|
80
|
+
readonly STATION_LOGOUT_SUCCESS: "Station Logout Success";
|
|
81
|
+
readonly STATION_LOGOUT_FAILED: "Station Logout Failed";
|
|
82
|
+
readonly STATION_RELOGIN_SUCCESS: "Station Relogin Success";
|
|
83
|
+
readonly STATION_RELOGIN_FAILED: "Station Relogin Failed";
|
|
84
|
+
readonly AGENT_STATE_CHANGE_SUCCESS: "Agent State Change Success";
|
|
85
|
+
readonly AGENT_STATE_CHANGE_FAILED: "Agent State Change Failed";
|
|
86
|
+
readonly FETCH_BUDDY_AGENTS_SUCCESS: "Fetch Buddy Agents Success";
|
|
87
|
+
readonly FETCH_BUDDY_AGENTS_FAILED: "Fetch Buddy Agents Failed";
|
|
88
|
+
readonly WEBSOCKET_REGISTER_SUCCESS: "Websocket Register Success";
|
|
89
|
+
readonly WEBSOCKET_REGISTER_FAILED: "Websocket Register Failed";
|
|
90
|
+
readonly AGENT_RONA: "Agent RONA";
|
|
91
|
+
readonly AGENT_CONTACT_ASSIGN_FAILED: "Agent Contact Assign Failed";
|
|
92
|
+
readonly AGENT_INVITE_FAILED: "Agent Invite Failed";
|
|
93
|
+
readonly TASK_ACCEPT_SUCCESS: "Task Accept Success";
|
|
94
|
+
readonly TASK_ACCEPT_FAILED: "Task Accept Failed";
|
|
95
|
+
readonly TASK_DECLINE_SUCCESS: "Task Decline Success";
|
|
96
|
+
readonly TASK_DECLINE_FAILED: "Task Decline Failed";
|
|
97
|
+
readonly TASK_END_SUCCESS: "Task End Success";
|
|
98
|
+
readonly TASK_END_FAILED: "Task End Failed";
|
|
99
|
+
readonly TASK_WRAPUP_SUCCESS: "Task Wrapup Success";
|
|
100
|
+
readonly TASK_WRAPUP_FAILED: "Task Wrapup Failed";
|
|
101
|
+
readonly TASK_HOLD_SUCCESS: "Task Hold Success";
|
|
102
|
+
readonly TASK_HOLD_FAILED: "Task Hold Failed";
|
|
103
|
+
readonly TASK_RESUME_SUCCESS: "Task Resume Success";
|
|
104
|
+
readonly TASK_RESUME_FAILED: "Task Resume Failed";
|
|
105
|
+
readonly TASK_CONSULT_START_SUCCESS: "Task Consult Start Success";
|
|
106
|
+
readonly TASK_CONSULT_START_FAILED: "Task Consult Start Failed";
|
|
107
|
+
readonly TASK_CONSULT_END_SUCCESS: "Task Consult End Success";
|
|
108
|
+
readonly TASK_CONSULT_END_FAILED: "Task Consult End Failed";
|
|
109
|
+
readonly TASK_TRANSFER_SUCCESS: "Task Transfer Success";
|
|
110
|
+
readonly TASK_TRANSFER_FAILED: "Task Transfer Failed";
|
|
111
|
+
readonly TASK_RESUME_RECORDING_SUCCESS: "Task Resume Recording Success";
|
|
112
|
+
readonly TASK_RESUME_RECORDING_FAILED: "Task Resume Recording Failed";
|
|
113
|
+
readonly TASK_PAUSE_RECORDING_SUCCESS: "Task Pause Recording Success";
|
|
114
|
+
readonly TASK_PAUSE_RECORDING_FAILED: "Task Pause Recording Failed";
|
|
115
|
+
readonly TASK_ACCEPT_CONSULT_SUCCESS: "Task Accept Consult Success";
|
|
116
|
+
readonly TASK_ACCEPT_CONSULT_FAILED: "Task Accept Consult Failed";
|
|
117
|
+
readonly TASK_AUTO_ANSWER_SUCCESS: "Task Auto Answer Success";
|
|
118
|
+
readonly TASK_AUTO_ANSWER_FAILED: "Task Auto Answer Failed";
|
|
119
|
+
readonly TASK_CONFERENCE_START_SUCCESS: "Task Conference Start Success";
|
|
120
|
+
readonly TASK_CONFERENCE_START_FAILED: "Task Conference Start Failed";
|
|
121
|
+
readonly TASK_CONFERENCE_END_SUCCESS: "Task Conference End Success";
|
|
122
|
+
readonly TASK_CONFERENCE_END_FAILED: "Task Conference End Failed";
|
|
123
|
+
readonly TASK_CONFERENCE_TRANSFER_SUCCESS: "Task Conference Transfer Success";
|
|
124
|
+
readonly TASK_CONFERENCE_TRANSFER_FAILED: "Task Conference Transfer Failed";
|
|
125
|
+
readonly TASK_OUTDIAL_SUCCESS: "Task Outdial Success";
|
|
126
|
+
readonly TASK_OUTDIAL_FAILED: "Task Outdial Failed";
|
|
127
|
+
readonly UPLOAD_LOGS_SUCCESS: "Upload Logs Success";
|
|
128
|
+
readonly UPLOAD_LOGS_FAILED: "Upload Logs Failed";
|
|
129
|
+
readonly WEBSOCKET_DEREGISTER_SUCCESS: "Websocket Deregister Success";
|
|
130
|
+
readonly WEBSOCKET_DEREGISTER_FAIL: "Websocket Deregister Failed";
|
|
131
|
+
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
132
|
+
readonly AGENT_DEVICE_TYPE_UPDATE_SUCCESS: "Agent Device Type Update Success";
|
|
133
|
+
readonly AGENT_DEVICE_TYPE_UPDATE_FAILED: "Agent Device Type Update Failed";
|
|
134
|
+
readonly ENTRYPOINT_FETCH_SUCCESS: "Entrypoint Fetch Success";
|
|
135
|
+
readonly ENTRYPOINT_FETCH_FAILED: "Entrypoint Fetch Failed";
|
|
136
|
+
readonly ADDRESSBOOK_FETCH_SUCCESS: "AddressBook Fetch Success";
|
|
137
|
+
readonly ADDRESSBOOK_FETCH_FAILED: "AddressBook Fetch Failed";
|
|
138
|
+
readonly QUEUE_FETCH_SUCCESS: "Queue Fetch Success";
|
|
139
|
+
readonly QUEUE_FETCH_FAILED: "Queue Fetch Failed";
|
|
140
|
+
readonly OUTDIAL_ANI_EP_FETCH_SUCCESS: "Outdial ANI Entries Fetch Success";
|
|
141
|
+
readonly OUTDIAL_ANI_EP_FETCH_FAILED: "Outdial ANI Entries Fetch Failed";
|
|
142
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_SUCCESS: "Campaign Preview Accept Success";
|
|
143
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "Campaign Preview Accept Failed";
|
|
144
|
+
readonly AI_ASSISTANT_SEND_EVENT_SUCCESS: "AI Assistant Send Event Success";
|
|
145
|
+
readonly AI_ASSISTANT_SEND_EVENT_FAILED: "AI Assistant Send Event Failed";
|
|
146
|
+
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_SUCCESS: "AI Assistant Fetch Historic Transcripts Success";
|
|
147
|
+
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_FAILED: "AI Assistant Fetch Historic Transcripts Failed";
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Represents the possible metric event names used within the metrics system.
|
|
151
|
+
*
|
|
152
|
+
* This type is derived from the keys of the `METRIC_EVENT_NAMES` constant, ensuring
|
|
153
|
+
* type safety and consistency when referring to metric event names throughout the codebase.
|
|
154
|
+
* @export
|
|
155
|
+
* @typedef {Enum<typeof METRIC_EVENT_NAMES>} METRIC_EVENT_NAMES
|
|
156
|
+
* @typeParam T - The type of the `METRIC_EVENT_NAMES` constant.
|
|
157
|
+
*
|
|
158
|
+
* @see {@link METRIC_EVENT_NAMES}
|
|
159
|
+
*/
|
|
160
|
+
export type METRIC_EVENT_NAMES = Enum<typeof METRIC_EVENT_NAMES>;
|
|
161
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { AddressBookEntriesResponse, AddressBookEntrySearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AddressBook API class for managing Webex Contact Center address book entries.
|
|
5
|
+
* Provides functionality to fetch address book entries using the entry API.
|
|
6
|
+
*
|
|
7
|
+
* @class AddressBook
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get AddressBook API instance from ContactCenter
|
|
21
|
+
* const addressBookAPI = cc.addressBook;
|
|
22
|
+
*
|
|
23
|
+
* // Get entries from agent's default address book
|
|
24
|
+
* const entries = await addressBookAPI.getEntries();
|
|
25
|
+
*
|
|
26
|
+
* // Get entries from a specific address book with pagination
|
|
27
|
+
* const entries = await addressBookAPI.getEntries({
|
|
28
|
+
* addressBookId: 'addressBookId123',
|
|
29
|
+
* page: 0,
|
|
30
|
+
* pageSize: 50
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* // Search for specific entries
|
|
34
|
+
* const searchResults = await addressBook.getEntries({
|
|
35
|
+
* search: 'john',
|
|
36
|
+
* filter: 'name=="John Doe"'
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class AddressBook {
|
|
41
|
+
private webexRequest;
|
|
42
|
+
private webex;
|
|
43
|
+
private getAddressBookId;
|
|
44
|
+
private metricsManager;
|
|
45
|
+
private pageCache;
|
|
46
|
+
/**
|
|
47
|
+
* Creates an instance of AddressBook
|
|
48
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
49
|
+
* @param {() => string} getAddressBookId - Function to get the addressBookId from agent profile
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
constructor(webex: WebexSDK, getAddressBookId: () => string);
|
|
53
|
+
/**
|
|
54
|
+
* Fetches address book entries for a specific address book using the entry API
|
|
55
|
+
* @param {AddressBookEntrySearchParams} [params] - Search and pagination parameters including addressBookId
|
|
56
|
+
* @returns {Promise<AddressBookEntriesResponse>} Promise resolving to address book entries
|
|
57
|
+
* @throws {Error} If the API call fails
|
|
58
|
+
* @public
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* // Get entries from agent's default address book
|
|
62
|
+
* const response = await addressBookAPI.getEntries();
|
|
63
|
+
*
|
|
64
|
+
* // Get entries from a specific address book with pagination
|
|
65
|
+
* const response = await addressBookAPI.getEntries({
|
|
66
|
+
* addressBookId: 'addressBookId123',
|
|
67
|
+
* page: 0,
|
|
68
|
+
* pageSize: 25
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
getEntries(params?: AddressBookEntrySearchParams): Promise<AddressBookEntriesResponse>;
|
|
73
|
+
}
|
|
74
|
+
export default AddressBook;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { WebexSDK, TranscriptAction, AIAssistantEventType, AIAssistantEventName, HistoricTranscriptsResponse } from '../types';
|
|
2
|
+
import { AIFeatureFlags } from './config/types';
|
|
3
|
+
/**
|
|
4
|
+
* ApiAIAssistant provides AI Assistant APIs for transcript controls.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class ApiAIAssistant {
|
|
8
|
+
private webex;
|
|
9
|
+
private metricsManager;
|
|
10
|
+
aiFeature: AIFeatureFlags;
|
|
11
|
+
constructor(webex: WebexSDK);
|
|
12
|
+
setAIFeatureFlags(aiFeature: AIFeatureFlags): void;
|
|
13
|
+
private getBaseUrl;
|
|
14
|
+
/**
|
|
15
|
+
* Sends an event to the AI Assistant service.
|
|
16
|
+
* @param agentId - agent identifier
|
|
17
|
+
* @param interactionId - interaction/conversation identifier
|
|
18
|
+
* @param eventType - the type of event (e.g. 'CUSTOM_EVENT')
|
|
19
|
+
* @param eventName - the name of the event (e.g. 'GET_TRANSCRIPTS')
|
|
20
|
+
* @param action - action within eventDetails (e.g. 'START' or 'STOP')
|
|
21
|
+
*/
|
|
22
|
+
sendEvent(agentId: string, interactionId: string, eventType: AIAssistantEventType, eventName: AIAssistantEventName, action: TranscriptAction): Promise<Record<string, unknown>>;
|
|
23
|
+
/**
|
|
24
|
+
* Fetches historic transcripts for an interaction.
|
|
25
|
+
* This API is allowed only when real-time transcription feature is enabled.
|
|
26
|
+
*
|
|
27
|
+
* @param interactionId - interaction/conversation identifier
|
|
28
|
+
*/
|
|
29
|
+
fetchHistoricTranscripts(agentId: string, interactionId: string): Promise<HistoricTranscriptsResponse>;
|
|
30
|
+
}
|
|
31
|
+
export default ApiAIAssistant;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { EntryPointListResponse, EntryPointSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* EntryPoint class for managing Webex Contact Center entry points.
|
|
5
|
+
* Provides functionality to fetch, search, and paginate through entry points.
|
|
6
|
+
*
|
|
7
|
+
* @class EntryPoint
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get EntryPoint API instance from ContactCenter
|
|
21
|
+
* const entryPointAPI = cc.entryPoint;
|
|
22
|
+
*
|
|
23
|
+
* // Get all entry points with pagination
|
|
24
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
25
|
+
* page: 0,
|
|
26
|
+
* pageSize: 50
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Search for specific entry points
|
|
30
|
+
* const searchResults = await entryPointAPI.searchEntryPoints({
|
|
31
|
+
* search: 'support',
|
|
32
|
+
* filter: 'type=="voice"'
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class EntryPoint {
|
|
37
|
+
private webexRequest;
|
|
38
|
+
private webex;
|
|
39
|
+
private metricsManager;
|
|
40
|
+
private pageCache;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an instance of EntryPoint
|
|
43
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
constructor(webex: WebexSDK);
|
|
47
|
+
/**
|
|
48
|
+
* Fetches entry points for the organization with pagination support
|
|
49
|
+
* @param {EntryPointSearchParams} [params] - Search and pagination parameters
|
|
50
|
+
* @returns {Promise<EntryPointListResponse>} Promise resolving to paginated entry points
|
|
51
|
+
* @throws {Error} If the API call fails
|
|
52
|
+
* @public
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Get first page of entry points
|
|
56
|
+
* const response = await entryPointAPI.getEntryPoints();
|
|
57
|
+
*
|
|
58
|
+
* // Get specific page with custom page size
|
|
59
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
60
|
+
* page: 2,
|
|
61
|
+
* pageSize: 25
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
66
|
+
}
|
|
67
|
+
export default EntryPoint;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Queue API class for managing Webex Contact Center contact service queues.
|
|
5
|
+
* Provides functionality to fetch contact service queues using the queue API.
|
|
6
|
+
*
|
|
7
|
+
* @class Queue
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get Queue API instance from ContactCenter
|
|
21
|
+
* const queueAPI = cc.queue;
|
|
22
|
+
*
|
|
23
|
+
* // Get all queues
|
|
24
|
+
* const queues = await queueAPI.getQueues();
|
|
25
|
+
*
|
|
26
|
+
* // Get queues with pagination
|
|
27
|
+
* const queues = await queueAPI.getQueues({
|
|
28
|
+
* page: 0,
|
|
29
|
+
* pageSize: 50
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // Search for specific queues
|
|
33
|
+
* const searchResults = await queueAPI.getQueues({
|
|
34
|
+
* search: 'support',
|
|
35
|
+
* filter: 'name=="Support Queue"'
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class Queue {
|
|
40
|
+
private webexRequest;
|
|
41
|
+
private webex;
|
|
42
|
+
private metricsManager;
|
|
43
|
+
private pageCache;
|
|
44
|
+
/**
|
|
45
|
+
* Creates an instance of Queue
|
|
46
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
constructor(webex: WebexSDK);
|
|
50
|
+
/**
|
|
51
|
+
* Fetches contact service queues for the organization
|
|
52
|
+
* @param {ContactServiceQueueSearchParams} [params] - Search and pagination parameters
|
|
53
|
+
* @returns {Promise<ContactServiceQueuesResponse>} Promise resolving to contact service queues
|
|
54
|
+
* @throws {Error} If the API call fails
|
|
55
|
+
* @public
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Get all queues with default pagination
|
|
59
|
+
* const response = await queueAPI.getQueues();
|
|
60
|
+
*
|
|
61
|
+
* // Get queues with specific pagination
|
|
62
|
+
* const response = await queueAPI.getQueues({
|
|
63
|
+
* page: 0,
|
|
64
|
+
* pageSize: 25
|
|
65
|
+
* });
|
|
66
|
+
*
|
|
67
|
+
* // Search for queues
|
|
68
|
+
* const response = await queueAPI.getQueues({
|
|
69
|
+
* search: 'support',
|
|
70
|
+
* filter: 'queueType=="INBOUND"'
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
|
75
|
+
}
|
|
76
|
+
export default Queue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as Agent from './types';
|
|
2
|
+
import AqmReqs from '../core/aqm-reqs';
|
|
3
|
+
/**
|
|
4
|
+
* Agent Service provides methods to manage agent states and operations
|
|
5
|
+
* @param routing - AqmReqs instance for making API requests
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
export default function routingAgent(routing: AqmReqs): {
|
|
9
|
+
/**
|
|
10
|
+
* Reloads the agent session
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
reload: import("../core/types").ResEmpty<Agent.ReloginSuccess>;
|
|
14
|
+
/**
|
|
15
|
+
* Logs out the agent
|
|
16
|
+
* @param p.data - Logout parameters
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
logout: import("../core/types").Res<Agent.LogoutSuccess, {
|
|
20
|
+
data: Agent.Logout;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Logs in the agent to a station
|
|
24
|
+
* @param p.data - Station login parameters
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
stationLogin: import("../core/types").Res<Agent.StationLoginSuccess, {
|
|
28
|
+
data: Agent.UserStationLogin;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Changes the agent's state
|
|
32
|
+
* @param p.data - State change parameters
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
stateChange: import("../core/types").Res<Agent.StateChangeSuccess, {
|
|
36
|
+
data: Agent.StateChange;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves list of buddy agents
|
|
40
|
+
* @param p.data - Buddy agent query parameters
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
buddyAgents: import("../core/types").Res<Agent.BuddyAgentsSuccess, {
|
|
44
|
+
data: Agent.BuddyAgents;
|
|
45
|
+
}>;
|
|
46
|
+
};
|