@webex/contact-center 3.9.0-next.9 → 3.10.0-next.1
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 +182 -47
- package/dist/cc.js.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/logger-proxy.js +24 -1
- package/dist/logger-proxy.js.map +1 -1
- package/dist/metrics/behavioral-events.js +89 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +30 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +271 -0
- package/dist/services/AddressBook.js.map +1 -0
- package/dist/services/EntryPoint.js +227 -0
- package/dist/services/EntryPoint.js.map +1 -0
- package/dist/services/Queue.js +261 -0
- package/dist/services/Queue.js.map +1 -0
- package/dist/services/config/constants.js +36 -2
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +29 -21
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +33 -1
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Utils.js +42 -1
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/task/TaskManager.js +113 -3
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +76 -0
- package/dist/services/task/TaskUtils.js.map +1 -0
- package/dist/services/task/constants.js +26 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +86 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/index.js +273 -16
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +14 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +115 -35
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/metrics/constants.d.ts +24 -1
- package/dist/types/services/AddressBook.d.ts +74 -0
- package/dist/types/services/EntryPoint.d.ts +67 -0
- package/dist/types/services/Queue.d.ts +76 -0
- package/dist/types/services/config/constants.d.ts +35 -1
- package/dist/types/services/config/index.d.ts +6 -9
- package/dist/types/services/config/types.d.ts +79 -58
- package/dist/types/services/core/Utils.d.ts +14 -1
- package/dist/types/services/task/TaskUtils.d.ts +28 -0
- package/dist/types/services/task/constants.d.ts +23 -0
- package/dist/types/services/task/contact.d.ts +10 -0
- package/dist/types/services/task/index.d.ts +84 -3
- package/dist/types/services/task/types.d.ts +233 -21
- package/dist/types/types.d.ts +162 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +192 -0
- package/dist/utils/PageCache.js.map +1 -0
- package/dist/webex.js +1 -1
- package/package.json +9 -8
- package/src/cc.ts +206 -52
- package/src/constants.ts +1 -0
- package/src/index.ts +16 -2
- package/src/logger-proxy.ts +24 -1
- package/src/metrics/behavioral-events.ts +94 -0
- package/src/metrics/constants.ts +34 -1
- package/src/services/AddressBook.ts +291 -0
- package/src/services/EntryPoint.ts +241 -0
- package/src/services/Queue.ts +277 -0
- package/src/services/config/constants.ts +42 -2
- package/src/services/config/index.ts +30 -30
- package/src/services/config/types.ts +59 -58
- package/src/services/core/Utils.ts +44 -0
- package/src/services/task/TaskManager.ts +122 -5
- package/src/services/task/TaskUtils.ts +81 -0
- package/src/services/task/constants.ts +25 -0
- package/src/services/task/contact.ts +80 -0
- package/src/services/task/index.ts +338 -15
- package/src/services/task/types.ts +251 -20
- package/src/types.ts +180 -0
- package/src/utils/PageCache.ts +252 -0
- package/test/unit/spec/cc.ts +282 -85
- package/test/unit/spec/metrics/behavioral-events.ts +42 -0
- package/test/unit/spec/services/AddressBook.ts +332 -0
- package/test/unit/spec/services/EntryPoint.ts +259 -0
- package/test/unit/spec/services/Queue.ts +323 -0
- package/test/unit/spec/services/config/index.ts +279 -65
- package/test/unit/spec/services/task/TaskManager.ts +382 -0
- package/test/unit/spec/services/task/TaskUtils.ts +131 -0
- package/test/unit/spec/services/task/contact.ts +31 -1
- package/test/unit/spec/services/task/index.ts +359 -8
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
package/dist/cc.js
CHANGED
|
@@ -9,19 +9,22 @@ var _events = _interopRequireDefault(require("events"));
|
|
|
9
9
|
var _uuid = require("uuid");
|
|
10
10
|
var _types = require("./types");
|
|
11
11
|
var _constants = require("./constants");
|
|
12
|
-
var _constants2 = require("./services/constants");
|
|
12
|
+
var _constants2 = require("./services/config/constants");
|
|
13
|
+
var _constants3 = require("./services/constants");
|
|
13
14
|
var _services = _interopRequireDefault(require("./services"));
|
|
14
15
|
var _WebexRequest = _interopRequireDefault(require("./services/core/WebexRequest"));
|
|
15
16
|
var _loggerProxy = _interopRequireDefault(require("./logger-proxy"));
|
|
16
17
|
var _types2 = require("./services/agent/types");
|
|
17
18
|
var _Utils = require("./services/core/Utils");
|
|
18
19
|
var _types3 = require("./services/config/types");
|
|
19
|
-
var _constants3 = require("./services/config/constants");
|
|
20
20
|
var _TaskManager = _interopRequireDefault(require("./services/task/TaskManager"));
|
|
21
21
|
var _WebCallingService = _interopRequireDefault(require("./services/WebCallingService"));
|
|
22
22
|
var _types4 = require("./services/task/types");
|
|
23
23
|
var _MetricsManager = _interopRequireDefault(require("./metrics/MetricsManager"));
|
|
24
24
|
var _constants4 = require("./metrics/constants");
|
|
25
|
+
var _EntryPoint = _interopRequireDefault(require("./services/EntryPoint"));
|
|
26
|
+
var _AddressBook = _interopRequireDefault(require("./services/AddressBook"));
|
|
27
|
+
var _Queue = _interopRequireDefault(require("./services/Queue"));
|
|
25
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
29
|
/**
|
|
27
30
|
* @module CCPlugin
|
|
@@ -135,6 +138,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
135
138
|
*
|
|
136
139
|
* @public
|
|
137
140
|
*/
|
|
141
|
+
|
|
138
142
|
class ContactCenter extends _webexCore.WebexPlugin {
|
|
139
143
|
/**
|
|
140
144
|
* The plugin's unique namespace identifier in the Webex SDK.
|
|
@@ -206,6 +210,68 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
206
210
|
* @private
|
|
207
211
|
*/
|
|
208
212
|
|
|
213
|
+
/**
|
|
214
|
+
* API instance for managing Webex Contact Center entry points
|
|
215
|
+
* Provides functionality to fetch entry points with caching support
|
|
216
|
+
* @type {EntryPoint}
|
|
217
|
+
* @public
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const cc = webex.cc;
|
|
221
|
+
* await cc.register();
|
|
222
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
223
|
+
*
|
|
224
|
+
* // Access EntryPointRecord
|
|
225
|
+
* const response = await cc.entryPoint.getEntryPoints({
|
|
226
|
+
* page: 0,
|
|
227
|
+
* pageSize: 50
|
|
228
|
+
* });
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* API instance for managing Webex Contact Center address book contacts
|
|
234
|
+
* Provides functionality to fetch address book entries with caching support
|
|
235
|
+
* @type {AddressBook}
|
|
236
|
+
* @public
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* const cc = webex.cc;
|
|
240
|
+
* await cc.register();
|
|
241
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
242
|
+
*
|
|
243
|
+
* // Access AddressBook API
|
|
244
|
+
* const response = await cc.addressBook.getEntries({
|
|
245
|
+
* page: 0,
|
|
246
|
+
* pageSize: 25
|
|
247
|
+
* });
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* API instance for managing Webex Contact Center queues
|
|
253
|
+
* Provides functionality to fetch queues with caching support
|
|
254
|
+
* @type {Queue}
|
|
255
|
+
* @public
|
|
256
|
+
* @example
|
|
257
|
+
* ```typescript
|
|
258
|
+
* const cc = webex.cc;
|
|
259
|
+
* await cc.register();
|
|
260
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
261
|
+
*
|
|
262
|
+
* // Access Queue API
|
|
263
|
+
* const response = await cc.queue.getQueues({
|
|
264
|
+
* page: 0,
|
|
265
|
+
* pageSize: 50
|
|
266
|
+
* });
|
|
267
|
+
*
|
|
268
|
+
* // Filter queues by specific criteria
|
|
269
|
+
* const filteredQueues = await cc.queue.getQueues({
|
|
270
|
+
* filter: 'id=="queue-id-123"'
|
|
271
|
+
* });
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
|
|
209
275
|
/**
|
|
210
276
|
* Logger utility for Contact Center plugin
|
|
211
277
|
* Provides consistent logging across the plugin
|
|
@@ -246,6 +312,12 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
246
312
|
this.taskManager = _TaskManager.default.getTaskManager(this.services.contact, this.webCallingService, this.services.webSocketManager);
|
|
247
313
|
this.incomingTaskListener();
|
|
248
314
|
|
|
315
|
+
// Initialize API instances
|
|
316
|
+
// will have future function for indivdual fetch etc so better be in an object
|
|
317
|
+
this.entryPoint = new _EntryPoint.default(this.$webex);
|
|
318
|
+
this.addressBook = new _AddressBook.default(this.$webex, () => this.agentConfig?.addressBookId);
|
|
319
|
+
this.queue = new _Queue.default(this.$webex);
|
|
320
|
+
|
|
249
321
|
// Initialize logger
|
|
250
322
|
_loggerProxy.default.initialize(this.$webex.logger);
|
|
251
323
|
});
|
|
@@ -524,6 +596,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
524
596
|
});
|
|
525
597
|
// TODO: Make profile a singleton to make it available throughout app/sdk so we dont need to inject info everywhere
|
|
526
598
|
this.taskManager.setWrapupData(this.agentConfig.wrapUpData);
|
|
599
|
+
this.taskManager.setAgentId(this.agentConfig.agentId);
|
|
527
600
|
if (this.agentConfig.webRtcEnabled && this.agentConfig.loginVoiceOptions.includes(_types.LoginOption.BROWSER)) {
|
|
528
601
|
this.$webex.internal.mercury.connect().then(() => {
|
|
529
602
|
_loggerProxy.default.log('Authentication: webex.internal.mercury.connect successful', {
|
|
@@ -598,14 +671,14 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
598
671
|
};
|
|
599
672
|
throw error;
|
|
600
673
|
}
|
|
601
|
-
const loginResponse = this.services.agent.stationLogin({
|
|
674
|
+
const loginResponse = await this.services.agent.stationLogin({
|
|
602
675
|
data: {
|
|
603
676
|
dialNumber: data.loginOption === _types.LoginOption.BROWSER ? this.agentConfig.agentId : data.dialNumber,
|
|
604
677
|
teamId: data.teamId,
|
|
605
678
|
deviceType: data.loginOption,
|
|
606
679
|
isExtension: data.loginOption === _types.LoginOption.EXTENSION,
|
|
607
680
|
deviceId: this.getDeviceId(data.loginOption, data.dialNumber),
|
|
608
|
-
roles: [
|
|
681
|
+
roles: [_constants3.AGENT],
|
|
609
682
|
teamName: _constants.EMPTY_STRING,
|
|
610
683
|
siteId: _constants.EMPTY_STRING,
|
|
611
684
|
usesOtherDN: false,
|
|
@@ -728,7 +801,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
728
801
|
if (loginOption === _types.LoginOption.EXTENSION || loginOption === _types.LoginOption.AGENT_DN) {
|
|
729
802
|
return dialNumber;
|
|
730
803
|
}
|
|
731
|
-
return
|
|
804
|
+
return _constants3.WEB_RTC_PREFIX + this.agentConfig.agentId;
|
|
732
805
|
}
|
|
733
806
|
|
|
734
807
|
/**
|
|
@@ -1015,9 +1088,9 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1015
1088
|
module: _constants.CC_FILE,
|
|
1016
1089
|
method: _constants.METHODS.SILENT_RELOGIN
|
|
1017
1090
|
});
|
|
1018
|
-
auxCodeId =
|
|
1091
|
+
auxCodeId = _constants2.AGENT_STATE_AVAILABLE_ID;
|
|
1019
1092
|
const stateChangeData = {
|
|
1020
|
-
state:
|
|
1093
|
+
state: _constants2.AGENT_STATE_AVAILABLE,
|
|
1021
1094
|
auxCodeId,
|
|
1022
1095
|
lastStateChangeReason,
|
|
1023
1096
|
agentId
|
|
@@ -1099,6 +1172,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1099
1172
|
* Makes an outbound call to a specified phone number.
|
|
1100
1173
|
*
|
|
1101
1174
|
* @param {string} destination - The phone number to dial (e.g., '+1234567890').
|
|
1175
|
+
* @param {string} origin - The contact center number that will be used while making a call to the customer.
|
|
1102
1176
|
* Should include country code and be in E.164 format.
|
|
1103
1177
|
* @returns {Promise<TaskResponse>} Resolves with the task response containing:
|
|
1104
1178
|
* - interactionId: Unique identifier for the outbound call
|
|
@@ -1134,7 +1208,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1134
1208
|
*
|
|
1135
1209
|
* // Start the outbound call
|
|
1136
1210
|
* const destination = '+1234567890';
|
|
1137
|
-
* const task = await cc.startOutdial(destination);
|
|
1211
|
+
* const task = await cc.startOutdial(destination, origin);
|
|
1138
1212
|
*
|
|
1139
1213
|
* // Listen for all relevant task events
|
|
1140
1214
|
* task.on('task:ringing', () => {
|
|
@@ -1202,7 +1276,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1202
1276
|
* }
|
|
1203
1277
|
* ```
|
|
1204
1278
|
*/
|
|
1205
|
-
async startOutdial(destination) {
|
|
1279
|
+
async startOutdial(destination, origin) {
|
|
1206
1280
|
_loggerProxy.default.info('Starting outbound dial', {
|
|
1207
1281
|
module: _constants.CC_FILE,
|
|
1208
1282
|
method: _constants.METHODS.START_OUTDIAL
|
|
@@ -1213,6 +1287,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1213
1287
|
// Construct the outdial payload.
|
|
1214
1288
|
const outDialPayload = {
|
|
1215
1289
|
destination,
|
|
1290
|
+
origin,
|
|
1216
1291
|
entryPointId: this.agentConfig.outDialEp,
|
|
1217
1292
|
direction: _constants.OUTDIAL_DIRECTION,
|
|
1218
1293
|
attributes: _constants.ATTRIBUTES,
|
|
@@ -1225,6 +1300,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1225
1300
|
this.metricsManager.trackEvent(_constants4.METRIC_EVENT_NAMES.TASK_OUTDIAL_SUCCESS, {
|
|
1226
1301
|
..._MetricsManager.default.getCommonTrackingFieldForAQMResponse(result),
|
|
1227
1302
|
destination,
|
|
1303
|
+
origin,
|
|
1228
1304
|
mediaType: _constants.OUTDIAL_MEDIA_TYPE
|
|
1229
1305
|
}, ['behavioral', 'business', 'operational']);
|
|
1230
1306
|
_loggerProxy.default.log(`Outbound dial completed successfully`, {
|
|
@@ -1239,6 +1315,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1239
1315
|
this.metricsManager.trackEvent(_constants4.METRIC_EVENT_NAMES.TASK_OUTDIAL_FAILED, {
|
|
1240
1316
|
..._MetricsManager.default.getCommonTrackingFieldForAQMResponseFailed(failure),
|
|
1241
1317
|
destination,
|
|
1318
|
+
origin,
|
|
1242
1319
|
mediaType: _constants.OUTDIAL_MEDIA_TYPE
|
|
1243
1320
|
}, ['behavioral', 'business', 'operational']);
|
|
1244
1321
|
const {
|
|
@@ -1249,65 +1326,105 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1249
1326
|
}
|
|
1250
1327
|
|
|
1251
1328
|
/**
|
|
1252
|
-
*
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
* @
|
|
1329
|
+
* Fetches outdial ANI (Automatic Number Identification) entries for an outdial ANI ID.
|
|
1330
|
+
*
|
|
1331
|
+
* This method retrieves the list of phone numbers that can be used as caller ID when making
|
|
1332
|
+
* outbound calls. The ANI data is associated with an outdial ANI ID and can be filtered
|
|
1333
|
+
* and paginated as needed.
|
|
1334
|
+
*
|
|
1335
|
+
* @param {string} outdialANI - The outdial ANI ID to fetch ANI data for
|
|
1336
|
+
* @param {number} [page] - Optional page number for pagination (0-based)
|
|
1337
|
+
* @param {number} [pageSize] - Optional number of items per page
|
|
1338
|
+
* @param {string} [search] - Optional search term to filter results by name or number
|
|
1339
|
+
* @param {string} [filter] - Optional filter string
|
|
1340
|
+
* @param {string} [attributes] - Optional attributes to include in response
|
|
1341
|
+
* @returns {Promise<OutdialAniEntriesResponse>} Promise resolving to outdial ANI response containing:
|
|
1342
|
+
* - data: Array of ANI entries with number and name
|
|
1343
|
+
* - meta: Pagination metadata
|
|
1344
|
+
* @throws {Error} If the operation fails or agent is not registered
|
|
1259
1345
|
* @public
|
|
1260
1346
|
* @example
|
|
1261
1347
|
* ```typescript
|
|
1262
1348
|
* const cc = webex.cc;
|
|
1263
1349
|
* await cc.register();
|
|
1264
|
-
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
1265
1350
|
*
|
|
1266
|
-
* //
|
|
1267
|
-
* const
|
|
1351
|
+
* // Get agent profile to obtain outdial ANI ID
|
|
1352
|
+
* const agentProfile = cc.agentConfig;
|
|
1353
|
+
* const outdialANI = agentProfile.outdialANIId;
|
|
1268
1354
|
*
|
|
1269
|
-
* //
|
|
1270
|
-
* const
|
|
1355
|
+
* // Basic usage - get all ANI data for an outdial ANI ID
|
|
1356
|
+
* const aniData = await cc.getOutdialAniEntries({ outdialANI });
|
|
1271
1357
|
*
|
|
1272
|
-
* //
|
|
1273
|
-
* const
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
* );
|
|
1358
|
+
* // With pagination and search
|
|
1359
|
+
* const paginatedAni = await cc.getOutdialAniEntries({
|
|
1360
|
+
* outdialANI,
|
|
1361
|
+
* page: 0,
|
|
1362
|
+
* pageSize: 50,
|
|
1363
|
+
* search: '555' // search for numbers containing '555'
|
|
1364
|
+
* });
|
|
1279
1365
|
*
|
|
1280
|
-
* // Process
|
|
1281
|
-
*
|
|
1282
|
-
* console.log(
|
|
1283
|
-
* id: queue.queueId,
|
|
1284
|
-
* name: queue.queueName,
|
|
1285
|
-
* channelType: queue.channelType,
|
|
1286
|
-
* isActive: queue.isActive,
|
|
1287
|
-
* description: queue.description
|
|
1288
|
-
* });
|
|
1366
|
+
* // Process the results
|
|
1367
|
+
* paginatedAni.forEach(ani => {
|
|
1368
|
+
* console.log(`ANI: ${ani.number} - ${ani.name}`);
|
|
1289
1369
|
* });
|
|
1290
1370
|
* ```
|
|
1291
1371
|
*/
|
|
1292
|
-
async
|
|
1293
|
-
|
|
1372
|
+
async getOutdialAniEntries(params) {
|
|
1373
|
+
const {
|
|
1374
|
+
outdialANI,
|
|
1375
|
+
page,
|
|
1376
|
+
pageSize,
|
|
1377
|
+
search,
|
|
1378
|
+
filter,
|
|
1379
|
+
attributes
|
|
1380
|
+
} = params;
|
|
1381
|
+
_loggerProxy.default.info('Fetching outdial ANI entries', {
|
|
1294
1382
|
module: _constants.CC_FILE,
|
|
1295
|
-
method: _constants.METHODS.
|
|
1383
|
+
method: _constants.METHODS.GET_OUTDIAL_ANI_ENTRIES
|
|
1296
1384
|
});
|
|
1297
1385
|
const orgId = this.$webex.credentials.getOrgId();
|
|
1298
1386
|
if (!orgId) {
|
|
1299
1387
|
_loggerProxy.default.error('Org ID not found.', {
|
|
1300
1388
|
module: _constants.CC_FILE,
|
|
1301
|
-
method: _constants.METHODS.
|
|
1389
|
+
method: _constants.METHODS.GET_OUTDIAL_ANI_ENTRIES
|
|
1302
1390
|
});
|
|
1303
1391
|
throw new Error('Org ID not found.');
|
|
1304
1392
|
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1393
|
+
try {
|
|
1394
|
+
const result = await this.services.config.getOutdialAniEntries(orgId, {
|
|
1395
|
+
outdialANI,
|
|
1396
|
+
page,
|
|
1397
|
+
pageSize,
|
|
1398
|
+
search,
|
|
1399
|
+
filter,
|
|
1400
|
+
attributes
|
|
1401
|
+
});
|
|
1402
|
+
this.metricsManager.trackEvent(_constants4.METRIC_EVENT_NAMES.OUTDIAL_ANI_EP_FETCH_SUCCESS, {
|
|
1403
|
+
outdialANI,
|
|
1404
|
+
resultCount: result?.length || 0
|
|
1405
|
+
}, ['behavioral', 'business', 'operational']);
|
|
1406
|
+
_loggerProxy.default.log(`Successfully retrieved outdial ANI entries for ANI ID ${outdialANI}`, {
|
|
1407
|
+
module: _constants.CC_FILE,
|
|
1408
|
+
method: _constants.METHODS.GET_OUTDIAL_ANI_ENTRIES
|
|
1409
|
+
});
|
|
1410
|
+
return result;
|
|
1411
|
+
} catch (error) {
|
|
1412
|
+
const failure = error.details;
|
|
1413
|
+
this.metricsManager.trackEvent(_constants4.METRIC_EVENT_NAMES.OUTDIAL_ANI_EP_FETCH_FAILED, {
|
|
1414
|
+
..._MetricsManager.default.getCommonTrackingFieldForAQMResponseFailed(failure),
|
|
1415
|
+
outdialANI,
|
|
1416
|
+
error
|
|
1417
|
+
}, ['behavioral', 'business', 'operational']);
|
|
1418
|
+
_loggerProxy.default.error(`Failed to fetch outdial ANI entries for ANI ID ${outdialANI} due to: ${error}`, {
|
|
1419
|
+
module: _constants.CC_FILE,
|
|
1420
|
+
method: _constants.METHODS.GET_OUTDIAL_ANI_ENTRIES,
|
|
1421
|
+
trackingId: failure.trackingId
|
|
1422
|
+
});
|
|
1423
|
+
const {
|
|
1424
|
+
error: detailedError
|
|
1425
|
+
} = (0, _Utils.getErrorDetails)(error, _constants.METHODS.GET_OUTDIAL_ANI_ENTRIES, _constants.CC_FILE);
|
|
1426
|
+
throw detailedError;
|
|
1427
|
+
}
|
|
1311
1428
|
}
|
|
1312
1429
|
|
|
1313
1430
|
/**
|
|
@@ -1425,6 +1542,24 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
1425
1542
|
throw error;
|
|
1426
1543
|
}
|
|
1427
1544
|
}
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* Returns paginated entry points for the organization.
|
|
1548
|
+
* Thin wrapper around internal EntryPoint instance.
|
|
1549
|
+
* @public
|
|
1550
|
+
*/
|
|
1551
|
+
async getEntryPoints(params = {}) {
|
|
1552
|
+
return this.entryPoint.getEntryPoints(params);
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Returns paginated contact service queues for the organization.
|
|
1557
|
+
* Thin wrapper around internal Queue instance.
|
|
1558
|
+
* @public
|
|
1559
|
+
*/
|
|
1560
|
+
async getQueues(params = {}) {
|
|
1561
|
+
return this.queue.getQueues(params);
|
|
1562
|
+
}
|
|
1428
1563
|
}
|
|
1429
1564
|
exports.default = ContactCenter;
|
|
1430
1565
|
//# sourceMappingURL=cc.js.map
|