@webex/contact-center 3.12.0-next.149 → 3.12.0-next.150

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.
Files changed (37) hide show
  1. package/.sdd/manifest.json +1 -1
  2. package/ai-docs/CONTRACTS.md +1 -0
  3. package/dist/cc.js +4 -4
  4. package/dist/cc.js.map +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/services/config/Util.js +38 -45
  7. package/dist/services/config/Util.js.map +1 -1
  8. package/dist/services/config/constants.js +15 -71
  9. package/dist/services/config/constants.js.map +1 -1
  10. package/dist/services/config/index.js +49 -226
  11. package/dist/services/config/index.js.map +1 -1
  12. package/dist/services/config/types.js +33 -11
  13. package/dist/services/config/types.js.map +1 -1
  14. package/dist/types/cc.d.ts +3 -3
  15. package/dist/types/index.d.ts +16 -8
  16. package/dist/types/services/config/Util.d.ts +4 -8
  17. package/dist/types/services/config/constants.d.ts +15 -71
  18. package/dist/types/services/config/index.d.ts +16 -64
  19. package/dist/types/services/config/types.d.ts +97 -160
  20. package/dist/webex.js +1 -1
  21. package/package.json +1 -1
  22. package/src/cc.ts +4 -4
  23. package/src/index.ts +16 -8
  24. package/src/services/agent/ai-docs/AGENTS.md +1 -1
  25. package/src/services/config/Util.ts +43 -82
  26. package/src/services/config/ai-docs/AGENTS.md +34 -39
  27. package/src/services/config/ai-docs/ARCHITECTURE.md +88 -101
  28. package/src/services/config/ai-docs/config-spec.md +115 -132
  29. package/src/services/config/constants.ts +18 -80
  30. package/src/services/config/index.ts +52 -278
  31. package/src/services/config/types.ts +101 -185
  32. package/test/unit/spec/index.ts +6 -2
  33. package/test/unit/spec/services/config/Util.ts +442 -70
  34. package/test/unit/spec/services/config/index.ts +246 -544
  35. package/typedoc.md +1 -1
  36. package/umd/contact-center.min.js +2 -2
  37. package/umd/contact-center.min.js.map +1 -1
@@ -37,40 +37,35 @@ class AgentConfigService {
37
37
  */
38
38
  async getAgentConfig(orgId, agentId) {
39
39
  try {
40
- const userConfigPromise = this.getUserUsingCI(orgId, agentId);
41
- const orgInfoPromise = this.getOrgInfo(orgId);
42
- const orgSettingsPromise = this.getOrganizationSetting(orgId);
43
- const tenantDataPromise = this.getTenantData(orgId);
44
- const urlMappingPromise = this.getURLMapping(orgId);
45
- const aiFeatureFlagsPromise = this.getAIFeatureFlags(orgId);
40
+ const orgConfigPromise = this.getOrgDesktopLoginConfig(orgId);
41
+ const userConfigPromise = this.getUserDesktopLoginConfig(orgId, agentId);
46
42
  const auxCodesPromise = this.getAllAuxCodes(orgId, _constants3.DEFAULT_PAGE_SIZE, [], _constants3.DEFAULT_AUXCODE_ATTRIBUTES);
47
- const userConfigData = await userConfigPromise;
48
- _loggerProxy.default.info(`Fetched user data, userId: ${userConfigData.ciUserId}`, {
43
+ const userConfig = await userConfigPromise;
44
+ const {
45
+ user: userData,
46
+ agentProfile: agentProfileData
47
+ } = userConfig;
48
+ _loggerProxy.default.info(`Fetched user data, userId: ${userData.ciUserId}`, {
49
49
  module: _constants2.CONFIG_FILE_NAME,
50
50
  method: _constants3.METHODS.GET_AGENT_CONFIG
51
51
  });
52
- const agentProfilePromise = this.getDesktopProfileById(orgId, userConfigData.agentProfileId);
53
- const siteInfoPromise = this.getSiteInfo(orgId, userConfigData.siteId);
54
- const userDialPlanPromise = agentProfilePromise.then(agentProfileConfigData => agentProfileConfigData.dialPlanEnabled ? this.getDialPlanData(orgId) : []);
55
- const userTeamPromise = userConfigData.teamIds ? this.getAllTeams(orgId, _constants3.DEFAULT_PAGE_SIZE, userConfigData.teamIds) : Promise.resolve([]);
56
- const [agentProfileConfigData, siteInfo, userDialPlanData, userTeamData, orgInfo, orgSettingsData, tenantData, urlMappingData, aiFeatureFlagsData, auxCodesData] = await Promise.all([agentProfilePromise, siteInfoPromise, userDialPlanPromise, userTeamPromise, orgInfoPromise, orgSettingsPromise, tenantDataPromise, urlMappingPromise, aiFeatureFlagsPromise, auxCodesPromise]);
57
- const multimediaProfileId = userConfigData.multimediaProfileId || userTeamData[0]?.multiMediaProfileId || siteInfo.multimediaProfileId;
52
+ const siteInfoPromise = this.getSiteInfo(orgId, userData.siteId);
53
+ const userTeamPromise = this.getAllTeams(orgId, _constants3.DEFAULT_PAGE_SIZE, userData.dbId);
54
+ const userDialPlanPromise = agentProfileData.dialPlanEnabled ? this.getDialPlanData(orgId) : Promise.resolve([]);
55
+ const [siteInfo, userDialPlanData, userTeamData, orgConfig, auxCodesData] = await Promise.all([siteInfoPromise, userDialPlanPromise, userTeamPromise, orgConfigPromise, auxCodesPromise]);
56
+ const multimediaProfileId = userTeamData[0]?.multiMediaProfileId || siteInfo.multimediaProfileId;
58
57
  _loggerProxy.default.info('Fetched all required data', {
59
58
  module: _constants2.CONFIG_FILE_NAME,
60
59
  method: _constants3.METHODS.GET_AGENT_CONFIG
61
60
  });
62
61
  const response = (0, _Util.parseAgentConfigs)({
63
- userData: userConfigData,
62
+ orgConfig,
63
+ userData,
64
+ agentProfileData,
64
65
  teamData: userTeamData,
65
- tenantData,
66
- orgInfoData: orgInfo,
67
66
  auxCodes: auxCodesData,
68
- orgSettingsData,
69
- agentProfileData: agentProfileConfigData,
70
67
  dialPlanData: userDialPlanData,
71
- urlMapping: urlMappingData,
72
- multimediaProfileId,
73
- aiFeatureFlags: aiFeatureFlagsData
68
+ multimediaProfileId
74
69
  });
75
70
  _loggerProxy.default.info('Parsing completed for agent-config', {
76
71
  module: _constants2.CONFIG_FILE_NAME,
@@ -91,21 +86,20 @@ class AgentConfigService {
91
86
  }
92
87
 
93
88
  /**
94
- * Fetches the agent configuration data for the given orgId and agentId.
89
+ * Fetches the aggregated organization desktop-login configuration for the given orgId.
95
90
  * @ignore
96
- * @param {string} orgId - organization ID for which the agent configuration is to be fetched.
97
- * @param {string} agentId - agent ID for which the configuration is to be fetched.
98
- * @returns {Promise<AgentResponse>} - A promise that resolves to the agent configuration response.
91
+ * @param {string} orgId - organization ID for which the configuration is to be fetched.
92
+ * @returns {Promise<OrgDesktopLoginResponse>} - A promise that resolves to the organization configuration.
99
93
  * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
100
94
  * @private
101
95
  */
102
- async getUserUsingCI(orgId, agentId) {
103
- _loggerProxy.default.info('Fetching user data using CI', {
96
+ async getOrgDesktopLoginConfig(orgId) {
97
+ _loggerProxy.default.info('Fetching organization desktop-login configuration', {
104
98
  module: _constants2.CONFIG_FILE_NAME,
105
- method: _constants3.METHODS.GET_USER_USING_CI
99
+ method: _constants3.METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG
106
100
  });
107
101
  try {
108
- const resource = _constants3.endPointMap.userByCI(orgId, agentId);
102
+ const resource = _constants3.endPointMap.orgDesktopLogin(orgId);
109
103
  const response = await this.webexReq.request({
110
104
  service: _constants.WCC_API_GATEWAY,
111
105
  resource,
@@ -114,36 +108,36 @@ class AgentConfigService {
114
108
  if (response.statusCode !== 200) {
115
109
  throw new Error(`API call failed with ${response.statusCode}`);
116
110
  }
117
- _loggerProxy.default.log('getUserUsingCI api success.', {
111
+ _loggerProxy.default.log('getOrgDesktopLoginConfig api success.', {
118
112
  module: _constants2.CONFIG_FILE_NAME,
119
- method: _constants3.METHODS.GET_USER_USING_CI
113
+ method: _constants3.METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG
120
114
  });
121
115
  return Promise.resolve(response.body);
122
116
  } catch (error) {
123
- _loggerProxy.default.error(`getUserUsingCI API call failed with ${error}`, {
117
+ _loggerProxy.default.error(`getOrgDesktopLoginConfig API call failed with ${error}`, {
124
118
  module: _constants2.CONFIG_FILE_NAME,
125
- method: _constants3.METHODS.GET_USER_USING_CI
119
+ method: _constants3.METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG
126
120
  });
127
121
  throw error;
128
122
  }
129
123
  }
130
124
 
131
125
  /**
132
- * Fetches the desktop profile data for the given orgId and desktopProfileId.
126
+ * Fetches the aggregated user desktop-login configuration for the given orgId and ciUserId.
133
127
  * @ignore
134
- * @param {string} orgId - organization ID for which the desktop profile is to be fetched.
135
- * @param {string} desktopProfileId - desktop profile ID for which the data is to be fetched.
136
- * @returns {Promise<DesktopProfileResponse>} - A promise that resolves to the desktop profile response.
128
+ * @param {string} orgId - organization ID for which the configuration is to be fetched.
129
+ * @param {string} ciUserId - CI user ID of the agent whose configuration is to be fetched.
130
+ * @returns {Promise<UserDesktopLoginResponse>} - A promise that resolves to the user configuration.
137
131
  * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
138
132
  * @private
139
133
  */
140
- async getDesktopProfileById(orgId, desktopProfileId) {
141
- _loggerProxy.default.info('Fetching desktop profile', {
134
+ async getUserDesktopLoginConfig(orgId, ciUserId) {
135
+ _loggerProxy.default.info('Fetching user desktop-login configuration', {
142
136
  module: _constants2.CONFIG_FILE_NAME,
143
- method: _constants3.METHODS.GET_DESKTOP_PROFILE_BY_ID
137
+ method: _constants3.METHODS.GET_USER_DESKTOP_LOGIN_CONFIG
144
138
  });
145
139
  try {
146
- const resource = _constants3.endPointMap.desktopProfile(orgId, desktopProfileId);
140
+ const resource = _constants3.endPointMap.userDesktopLogin(orgId, ciUserId);
147
141
  const response = await this.webexReq.request({
148
142
  service: _constants.WCC_API_GATEWAY,
149
143
  resource,
@@ -152,15 +146,15 @@ class AgentConfigService {
152
146
  if (response.statusCode !== 200) {
153
147
  throw new Error(`API call failed with ${response.statusCode}`);
154
148
  }
155
- _loggerProxy.default.log('getDesktopProfileById api success.', {
149
+ _loggerProxy.default.log('getUserDesktopLoginConfig api success.', {
156
150
  module: _constants2.CONFIG_FILE_NAME,
157
- method: _constants3.METHODS.GET_DESKTOP_PROFILE_BY_ID
151
+ method: _constants3.METHODS.GET_USER_DESKTOP_LOGIN_CONFIG
158
152
  });
159
153
  return Promise.resolve(response.body);
160
154
  } catch (error) {
161
- _loggerProxy.default.error(`getDesktopProfileById API call failed with ${error}`, {
155
+ _loggerProxy.default.error(`getUserDesktopLoginConfig API call failed with ${error}`, {
162
156
  module: _constants2.CONFIG_FILE_NAME,
163
- method: _constants3.METHODS.GET_DESKTOP_PROFILE_BY_ID
157
+ method: _constants3.METHODS.GET_USER_DESKTOP_LOGIN_CONFIG
164
158
  });
165
159
  throw error;
166
160
  }
@@ -205,24 +199,23 @@ class AgentConfigService {
205
199
  }
206
200
 
207
201
  /**
208
- * fetches the list of teams for the given orgId.
202
+ * fetches the list of teams the given user belongs to.
209
203
  * @ignore
210
204
  * @param {string} orgId - organization ID for which the teams are to be fetched.
211
205
  * @param {number} page - the page number to fetch.
212
206
  * @param {number} pageSize - the number of teams to fetch per page.
213
- * @param {string[]} filter - optional filter criteria for the teams.
214
- * @param {string[]} attributes - optional attributes to include in the response.
207
+ * @param {string} userDbId - database ID of the user whose teams are to be fetched.
215
208
  * @returns {Promise<ListTeamsResponse>} - A promise that resolves to the list of teams response.
216
209
  * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
217
210
  * @private
218
211
  */
219
- async getListOfTeams(orgId, page, pageSize, filter) {
212
+ async getListOfTeams(orgId, page, pageSize, userDbId) {
220
213
  _loggerProxy.default.info('Fetching list of teams', {
221
214
  module: _constants2.CONFIG_FILE_NAME,
222
215
  method: _constants3.METHODS.GET_LIST_OF_TEAMS
223
216
  });
224
217
  try {
225
- const resource = _constants3.endPointMap.listTeams(orgId, page, pageSize, filter);
218
+ const resource = _constants3.endPointMap.listTeams(orgId, page, pageSize, userDbId);
226
219
  const response = await this.webexReq.request({
227
220
  service: _constants.WCC_API_GATEWAY,
228
221
  resource,
@@ -246,26 +239,25 @@ class AgentConfigService {
246
239
  }
247
240
 
248
241
  /**
249
- * Fetches all teams from all pages for the given orgId
242
+ * Fetches all teams the given user belongs to, from all pages
250
243
  * @ignore
251
244
  * @param {string} orgId - organization ID for which the teams are to be fetched.
252
245
  * @param {number} pageSize - the number of teams to fetch per page.
253
- * @param {string[]} filter - optional filter criteria for the teams.
254
- * @param {string[]} attributes - optional attributes to include in the response.
246
+ * @param {string} userDbId - database ID of the user whose teams are to be fetched.
255
247
  * @returns {Promise<TeamList[]>} - A promise that resolves to the list of teams.
256
248
  * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
257
249
  * @private
258
250
  */
259
- async getAllTeams(orgId, pageSize, filter) {
251
+ async getAllTeams(orgId, pageSize, userDbId) {
260
252
  try {
261
253
  let allTeams = [];
262
254
  let page = _constants3.DEFAULT_PAGE;
263
- const firstResponse = await this.getListOfTeams(orgId, page, pageSize, filter);
255
+ const firstResponse = await this.getListOfTeams(orgId, page, pageSize, userDbId);
264
256
  const totalPages = firstResponse.meta.totalPages;
265
257
  allTeams = allTeams.concat(firstResponse.data);
266
258
  const requests = [];
267
259
  for (page = _constants3.DEFAULT_PAGE + 1; page < totalPages; page += 1) {
268
- requests.push(this.getListOfTeams(orgId, page, pageSize, filter));
260
+ requests.push(this.getListOfTeams(orgId, page, pageSize, userDbId));
269
261
  }
270
262
  const responses = await Promise.all(requests);
271
263
  for (const response of responses) {
@@ -447,175 +439,6 @@ class AgentConfigService {
447
439
  }
448
440
  }
449
441
 
450
- /**
451
- * Fetches the organization info for the given orgId.
452
- * @ignore
453
- * @param {string} orgId - organization ID for which the organization info is to be fetched.
454
- * @returns {Promise<OrgInfo>} - A promise that resolves to the organization info response.
455
- * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
456
- * @private
457
- */
458
- async getOrgInfo(orgId) {
459
- try {
460
- const resource = _constants3.endPointMap.orgInfo(orgId);
461
- const response = await this.webexReq.request({
462
- service: _constants.WCC_API_GATEWAY,
463
- resource,
464
- method: _types.HTTP_METHODS.GET
465
- });
466
- if (response.statusCode !== 200) {
467
- throw new Error(`API call failed with ${response.statusCode}`);
468
- }
469
- _loggerProxy.default.log('getOrgInfo api success.', {
470
- module: _constants2.CONFIG_FILE_NAME,
471
- method: _constants3.METHODS.GET_ORG_INFO
472
- });
473
- return Promise.resolve(response.body);
474
- } catch (error) {
475
- _loggerProxy.default.error(`getOrgInfo API call failed with ${error}`, {
476
- module: _constants2.CONFIG_FILE_NAME,
477
- method: _constants3.METHODS.GET_ORG_INFO
478
- });
479
- throw error;
480
- }
481
- }
482
-
483
- /**
484
- * Fetches the organization settings for the given orgId.
485
- * @ignore
486
- * @param {string} orgId - organization ID for which the organization settings are to be fetched.
487
- * @returns {Promise<OrgSettings>} - A promise that resolves to the organization settings response.
488
- * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
489
- * @private
490
- */
491
- async getOrganizationSetting(orgId) {
492
- try {
493
- const resource = _constants3.endPointMap.orgSettings(orgId);
494
- const response = await this.webexReq.request({
495
- service: _constants.WCC_API_GATEWAY,
496
- resource,
497
- method: _types.HTTP_METHODS.GET
498
- });
499
- if (response.statusCode !== 200) {
500
- throw new Error(`API call failed with ${response.statusCode}`);
501
- }
502
- _loggerProxy.default.log('getOrganizationSetting api success.', {
503
- module: _constants2.CONFIG_FILE_NAME,
504
- method: _constants3.METHODS.GET_ORGANIZATION_SETTING
505
- });
506
- return Promise.resolve(response.body.data[0]);
507
- } catch (error) {
508
- _loggerProxy.default.error(`getOrganizationSetting API call failed with ${error}`, {
509
- module: _constants2.CONFIG_FILE_NAME,
510
- method: _constants3.METHODS.GET_ORGANIZATION_SETTING
511
- });
512
- throw error;
513
- }
514
- }
515
-
516
- /**
517
- * Fetches the tenant data for the given orgId.
518
- * @ignore
519
- * @param {string} orgId - organization ID for which the tenant data is to be fetched.
520
- * @returns {Promise<TenantData>} - A promise that resolves to the tenant data response.
521
- * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
522
- * @private
523
- */
524
- async getTenantData(orgId) {
525
- try {
526
- const resource = _constants3.endPointMap.tenantData(orgId);
527
- const response = await this.webexReq.request({
528
- service: _constants.WCC_API_GATEWAY,
529
- resource,
530
- method: _types.HTTP_METHODS.GET
531
- });
532
- if (response.statusCode !== 200) {
533
- throw new Error(`API call failed with ${response.statusCode}`);
534
- }
535
- _loggerProxy.default.log('getTenantData api success.', {
536
- module: _constants2.CONFIG_FILE_NAME,
537
- method: _constants3.METHODS.GET_TENANT_DATA
538
- });
539
- return Promise.resolve(response.body.data[0]);
540
- } catch (error) {
541
- _loggerProxy.default.error(`getTenantData API call failed with ${error}`, {
542
- module: _constants2.CONFIG_FILE_NAME,
543
- method: _constants3.METHODS.GET_TENANT_DATA
544
- });
545
- throw error;
546
- }
547
- }
548
-
549
- /**
550
- * Fetches the URL mapping data for the given orgId.
551
- * @ignore
552
- * @param {string} orgId - organization ID for which the URL mapping is to be fetched.
553
- * @returns {Promise<URLMapping[]>} - A promise that resolves to the URL mapping response.
554
- * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
555
- * @private
556
- */
557
- async getURLMapping(orgId) {
558
- try {
559
- const resource = _constants3.endPointMap.urlMapping(orgId);
560
- const response = await this.webexReq.request({
561
- service: _constants.WCC_API_GATEWAY,
562
- resource,
563
- method: _types.HTTP_METHODS.GET
564
- });
565
- if (response.statusCode !== 200) {
566
- throw new Error(`API call failed with ${response.statusCode}`);
567
- }
568
- _loggerProxy.default.log('getURLMapping api success.', {
569
- module: _constants2.CONFIG_FILE_NAME,
570
- method: _constants3.METHODS.GET_URL_MAPPING
571
- });
572
- return Promise.resolve(response.body.data);
573
- } catch (error) {
574
- _loggerProxy.default.error(`getURLMapping API call failed with ${error}`, {
575
- module: _constants2.CONFIG_FILE_NAME,
576
- method: _constants3.METHODS.GET_URL_MAPPING
577
- });
578
- throw error;
579
- }
580
- }
581
-
582
- /**
583
- * Fetches AI feature resources for the organization.
584
- * @ignore
585
- * @param {string} orgId - organization ID for which AI feature resources are to be fetched.
586
- * @returns {Promise<AIFeatureFlagsResponse>} - AI feature resources response.
587
- * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
588
- * @private
589
- */
590
- async getAIFeatureFlags(orgId) {
591
- _loggerProxy.default.info('Fetching AI feature resources', {
592
- module: _constants2.CONFIG_FILE_NAME,
593
- method: _constants3.METHODS.GET_AI_FEATURE_FLAGS
594
- });
595
- try {
596
- const resource = _constants3.endPointMap.aiFeature(orgId);
597
- const response = await this.webexReq.request({
598
- service: _constants.WCC_API_GATEWAY,
599
- resource,
600
- method: _types.HTTP_METHODS.GET
601
- });
602
- if (response.statusCode !== 200) {
603
- throw new Error(`API call failed with ${response.statusCode}`);
604
- }
605
- _loggerProxy.default.log('getAIFeatureFlags api success.', {
606
- module: _constants2.CONFIG_FILE_NAME,
607
- method: _constants3.METHODS.GET_AI_FEATURE_FLAGS
608
- });
609
- return Promise.resolve(response.body);
610
- } catch (error) {
611
- _loggerProxy.default.error(`getAIFeatureFlags API call failed with ${error}`, {
612
- module: _constants2.CONFIG_FILE_NAME,
613
- method: _constants3.METHODS.GET_AI_FEATURE_FLAGS
614
- });
615
- throw error;
616
- }
617
- }
618
-
619
442
  /**
620
443
  * Fetches the dial plan data for the given orgId.
621
444
  * @ignore
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","_loggerProxy","_interopRequireDefault","_WebexRequest","_constants","_constants2","_Util","_constants3","e","__esModule","default","AgentConfigService","constructor","webexReq","WebexRequest","getInstance","getAgentConfig","orgId","agentId","userConfigPromise","getUserUsingCI","orgInfoPromise","getOrgInfo","orgSettingsPromise","getOrganizationSetting","tenantDataPromise","getTenantData","urlMappingPromise","getURLMapping","aiFeatureFlagsPromise","getAIFeatureFlags","auxCodesPromise","getAllAuxCodes","DEFAULT_PAGE_SIZE","DEFAULT_AUXCODE_ATTRIBUTES","userConfigData","LoggerProxy","info","ciUserId","module","CONFIG_FILE_NAME","method","METHODS","GET_AGENT_CONFIG","agentProfilePromise","getDesktopProfileById","agentProfileId","siteInfoPromise","getSiteInfo","siteId","userDialPlanPromise","then","agentProfileConfigData","dialPlanEnabled","getDialPlanData","userTeamPromise","teamIds","getAllTeams","Promise","resolve","siteInfo","userDialPlanData","userTeamData","orgInfo","orgSettingsData","tenantData","urlMappingData","aiFeatureFlagsData","auxCodesData","all","multimediaProfileId","multiMediaProfileId","response","parseAgentConfigs","userData","teamData","orgInfoData","auxCodes","agentProfileData","dialPlanData","urlMapping","aiFeatureFlags","error","GET_USER_USING_CI","resource","endPointMap","userByCI","request","service","WCC_API_GATEWAY","HTTP_METHODS","GET","statusCode","Error","log","body","desktopProfileId","GET_DESKTOP_PROFILE_BY_ID","desktopProfile","getMultimediaProfileById","GET_MULTIMEDIA_PROFILE_BY_ID","multimediaProfile","getListOfTeams","page","pageSize","filter","GET_LIST_OF_TEAMS","listTeams","allTeams","DEFAULT_PAGE","firstResponse","totalPages","meta","concat","data","requests","push","responses","GET_ALL_TEAMS","getListOfAuxCodes","attributes","GET_LIST_OF_AUX_CODES","listAuxCodes","allAuxCodes","promises","forEach","GET_ALL_AUX_CODES","getWellbeingBreakIdleCode","GET_WELLBEING_BREAK_IDLE_CODE","systemIdleCodes","result","wellbeingCode","find","code","active","isSystemCode","name","WELLBEING_BREAK_IDLE_CODE","id","isSystem","isDefault","defaultCode","GET_SITE_INFO","GET_ORG_INFO","orgSettings","GET_ORGANIZATION_SETTING","GET_TENANT_DATA","GET_URL_MAPPING","GET_AI_FEATURE_FLAGS","aiFeature","dialPlan","GET_DIAL_PLAN_DATA","getOutdialAniEntries","params","outdialANI","search","MAIN_METHODS","GET_OUTDIAL_ANI_ENTRIES","queryParams","undefined","queryString","length","join","outdialAniEntries","exports"],"sources":["index.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * @module AgentConfigService\n */\n\nimport {HTTP_METHODS} from '../../types';\nimport LoggerProxy from '../../logger-proxy';\nimport {\n DesktopProfileResponse,\n ListAuxCodesResponse,\n AgentResponse,\n TenantData,\n OrgInfo,\n OrgSettings,\n URLMapping,\n TeamList,\n DialPlanEntity,\n Profile,\n ListTeamsResponse,\n AuxCode,\n MultimediaProfileResponse,\n SiteInfo,\n OutdialAniEntriesResponse,\n OutdialAniParams,\n AIFeatureFlagsResponse,\n Entity,\n} from './types';\nimport WebexRequest from '../core/WebexRequest';\nimport {WCC_API_GATEWAY} from '../constants';\nimport {CONFIG_FILE_NAME, METHODS as MAIN_METHODS} from '../../constants';\nimport {parseAgentConfigs} from './Util';\nimport {\n DEFAULT_AUXCODE_ATTRIBUTES,\n DEFAULT_PAGE,\n DEFAULT_PAGE_SIZE,\n endPointMap,\n METHODS,\n WELLBEING_BREAK_IDLE_CODE,\n} from './constants';\n\n/**\n * The AgentConfigService class provides methods to fetch agent configuration data.\n * @private\n * @ignore\n */\nexport default class AgentConfigService {\n private webexReq: WebexRequest;\n constructor() {\n this.webexReq = WebexRequest.getInstance();\n }\n\n /**\n * Fetches the agent configuration data for the given orgId and agentId.\n * @param {string} orgId - organization ID for which the agent configuration is to be fetched.\n * @param {string} agentId - agent ID for which the configuration is to be fetched.\n * @returns {Promise<Profile>} - A promise that resolves to the agent configuration profile.\n * @throws {Error} - Throws an error if any API call fails or if the response status is not 200.\n * @public\n */\n public async getAgentConfig(orgId: string, agentId: string): Promise<Profile> {\n try {\n const userConfigPromise = this.getUserUsingCI(orgId, agentId);\n const orgInfoPromise = this.getOrgInfo(orgId);\n const orgSettingsPromise = this.getOrganizationSetting(orgId);\n const tenantDataPromise = this.getTenantData(orgId);\n const urlMappingPromise = this.getURLMapping(orgId);\n const aiFeatureFlagsPromise = this.getAIFeatureFlags(orgId);\n const auxCodesPromise = this.getAllAuxCodes(\n orgId,\n DEFAULT_PAGE_SIZE,\n [],\n DEFAULT_AUXCODE_ATTRIBUTES\n );\n\n const userConfigData = await userConfigPromise;\n LoggerProxy.info(`Fetched user data, userId: ${userConfigData.ciUserId}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n const agentProfilePromise = this.getDesktopProfileById(orgId, userConfigData.agentProfileId);\n const siteInfoPromise = this.getSiteInfo(orgId, userConfigData.siteId);\n\n const userDialPlanPromise = agentProfilePromise.then((agentProfileConfigData) =>\n agentProfileConfigData.dialPlanEnabled ? this.getDialPlanData(orgId) : []\n );\n\n const userTeamPromise = userConfigData.teamIds\n ? this.getAllTeams(orgId, DEFAULT_PAGE_SIZE, userConfigData.teamIds)\n : Promise.resolve([]);\n\n const [\n agentProfileConfigData,\n siteInfo,\n userDialPlanData,\n userTeamData,\n orgInfo,\n orgSettingsData,\n tenantData,\n urlMappingData,\n aiFeatureFlagsData,\n auxCodesData,\n ] = await Promise.all([\n agentProfilePromise,\n siteInfoPromise,\n userDialPlanPromise,\n userTeamPromise,\n orgInfoPromise,\n orgSettingsPromise,\n tenantDataPromise,\n urlMappingPromise,\n aiFeatureFlagsPromise,\n auxCodesPromise,\n ]);\n const multimediaProfileId =\n userConfigData.multimediaProfileId ||\n userTeamData[0]?.multiMediaProfileId ||\n siteInfo.multimediaProfileId;\n\n LoggerProxy.info('Fetched all required data', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n const response = parseAgentConfigs({\n userData: userConfigData,\n teamData: userTeamData,\n tenantData,\n orgInfoData: orgInfo,\n auxCodes: auxCodesData,\n orgSettingsData,\n agentProfileData: agentProfileConfigData,\n dialPlanData: userDialPlanData,\n urlMapping: urlMappingData,\n multimediaProfileId,\n aiFeatureFlags: aiFeatureFlagsData,\n });\n\n LoggerProxy.info('Parsing completed for agent-config', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n LoggerProxy.info('Fetched configuration data successfully', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n return response;\n } catch (error) {\n LoggerProxy.error(`getAgentConfig call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the agent configuration data for the given orgId and agentId.\n * @ignore\n * @param {string} orgId - organization ID for which the agent configuration is to be fetched.\n * @param {string} agentId - agent ID for which the configuration is to be fetched.\n * @returns {Promise<AgentResponse>} - A promise that resolves to the agent configuration response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getUserUsingCI(orgId: string, agentId: string): Promise<AgentResponse> {\n LoggerProxy.info('Fetching user data using CI', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_USING_CI,\n });\n\n try {\n const resource = endPointMap.userByCI(orgId, agentId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getUserUsingCI api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_USING_CI,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getUserUsingCI API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_USING_CI,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the desktop profile data for the given orgId and desktopProfileId.\n * @ignore\n * @param {string} orgId - organization ID for which the desktop profile is to be fetched.\n * @param {string} desktopProfileId - desktop profile ID for which the data is to be fetched.\n * @returns {Promise<DesktopProfileResponse>} - A promise that resolves to the desktop profile response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getDesktopProfileById(\n orgId: string,\n desktopProfileId: string\n ): Promise<DesktopProfileResponse> {\n LoggerProxy.info('Fetching desktop profile', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DESKTOP_PROFILE_BY_ID,\n });\n\n try {\n const resource = endPointMap.desktopProfile(orgId, desktopProfileId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getDesktopProfileById api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DESKTOP_PROFILE_BY_ID,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getDesktopProfileById API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DESKTOP_PROFILE_BY_ID,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the multimedia profile data for the given orgId and multimediaProfileId.\n * @ignore\n * @param {string} orgId - organization ID for which the multimedia profile is to be fetched.\n * @param {string} multimediaProfileId - multimedia profile ID for which the data is to be fetched.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @returns {Promise<MultimediaProfileResponse>} - A promise that resolves to the multimedia profile response.\n * @private\n */\n public async getMultimediaProfileById(\n orgId: string,\n multimediaProfileId: string\n ): Promise<MultimediaProfileResponse> {\n LoggerProxy.info('Fetching multimedia profile', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n\n try {\n const resource = endPointMap.multimediaProfile(orgId, multimediaProfileId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getMultimediaProfileById API success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getMultimediaProfileById API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n throw error;\n }\n }\n\n /**\n * fetches the list of teams for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the teams are to be fetched.\n * @param {number} page - the page number to fetch.\n * @param {number} pageSize - the number of teams to fetch per page.\n * @param {string[]} filter - optional filter criteria for the teams.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<ListTeamsResponse>} - A promise that resolves to the list of teams response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getListOfTeams(\n orgId: string,\n page: number,\n pageSize: number,\n filter: string[]\n ): Promise<ListTeamsResponse> {\n LoggerProxy.info('Fetching list of teams', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n\n try {\n const resource = endPointMap.listTeams(orgId, page, pageSize, filter);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getListOfTeams api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getListOfTeams API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n throw error;\n }\n }\n\n /**\n * Fetches all teams from all pages for the given orgId\n * @ignore\n * @param {string} orgId - organization ID for which the teams are to be fetched.\n * @param {number} pageSize - the number of teams to fetch per page.\n * @param {string[]} filter - optional filter criteria for the teams.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<TeamList[]>} - A promise that resolves to the list of teams.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getAllTeams(orgId: string, pageSize: number, filter: string[]): Promise<TeamList[]> {\n try {\n let allTeams: TeamList[] = [];\n let page = DEFAULT_PAGE;\n const firstResponse = await this.getListOfTeams(orgId, page, pageSize, filter);\n const totalPages = firstResponse.meta.totalPages;\n allTeams = allTeams.concat(firstResponse.data);\n const requests = [];\n for (page = DEFAULT_PAGE + 1; page < totalPages; page += 1) {\n requests.push(this.getListOfTeams(orgId, page, pageSize, filter));\n }\n const responses = await Promise.all(requests);\n\n for (const response of responses) {\n allTeams = allTeams.concat(response.data);\n }\n\n return allTeams;\n } catch (error) {\n LoggerProxy.error(`getAllTeams API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ALL_TEAMS,\n });\n throw error;\n }\n }\n\n /**\n * fetches the list of aux codes for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the aux codes are to be fetched.\n * @param {number} page - the page number to fetch.\n * @param {number} pageSize - the number of aux codes to fetch per page.\n * @param {string[]} filter - optional filter criteria for the aux codes.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<ListAuxCodesResponse>} - A promise that resolves to the list of aux codes response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getListOfAuxCodes(\n orgId: string,\n page: number,\n pageSize: number,\n filter: string[],\n attributes: string[]\n ): Promise<ListAuxCodesResponse> {\n LoggerProxy.info('Fetching list of aux codes', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n\n try {\n const resource = endPointMap.listAuxCodes(orgId, page, pageSize, filter, attributes);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getListOfAuxCodes api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getListOfAuxCodes API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n throw error;\n }\n }\n\n /**\n * Fetches all aux codes from all pages for the given orgId\n * @ignore\n * @param {string} orgId - organization ID for which the aux codes are to be fetched.\n * @param {number} pageSize - the number of aux codes to fetch per page.\n * @param {string[]} filter - optional filter criteria for the aux codes.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<AuxCode[]>} - A promise that resolves to the list of aux codes.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getAllAuxCodes(\n orgId: string,\n pageSize: number,\n filter: string[],\n attributes: string[]\n ): Promise<AuxCode[]> {\n try {\n let allAuxCodes: AuxCode[] = [];\n let page = DEFAULT_PAGE;\n\n const firstResponse = await this.getListOfAuxCodes(orgId, page, pageSize, filter, attributes);\n allAuxCodes = allAuxCodes.concat(firstResponse.data);\n const totalPages = firstResponse.meta.totalPages;\n\n const promises: Promise<ListAuxCodesResponse>[] = [];\n for (page = DEFAULT_PAGE + 1; page < totalPages; page += 1) {\n promises.push(this.getListOfAuxCodes(orgId, page, pageSize, filter, attributes));\n }\n\n const responses = await Promise.all(promises);\n\n responses.forEach((response) => {\n allAuxCodes = allAuxCodes.concat(response.data);\n });\n\n return allAuxCodes;\n } catch (error) {\n LoggerProxy.error(`getAllAuxCodes API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ALL_AUX_CODES,\n });\n throw error;\n }\n }\n\n /**\n * Retrieves the exact system-managed WellbeingBreak idle code.\n * This query intentionally bypasses Desktop Profile filtering so the system code does not\n * need to appear in the normal agent-selectable idle-code list.\n * @param orgId - Organization identifier\n * @returns The normalized WellbeingBreak entity\n * @throws When the request fails or the exact system code is unavailable\n * @internal\n */\n public async getWellbeingBreakIdleCode(orgId: string): Promise<Entity> {\n LoggerProxy.info('Fetching WellbeingBreak system idle code', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_WELLBEING_BREAK_IDLE_CODE,\n });\n\n try {\n let page = DEFAULT_PAGE;\n let totalPages = 1;\n\n do {\n // Pagination is intentionally sequential so the lookup can stop as soon as the code is found.\n // eslint-disable-next-line no-await-in-loop\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource: endPointMap.systemIdleCodes(orgId, page, DEFAULT_PAGE_SIZE),\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n const result = response.body as ListAuxCodesResponse;\n const wellbeingCode = result.data?.find(\n (code) =>\n code.active === true &&\n code.isSystemCode === true &&\n code.name === WELLBEING_BREAK_IDLE_CODE\n );\n\n if (wellbeingCode) {\n return {\n id: wellbeingCode.id,\n name: wellbeingCode.name,\n isSystem: true,\n isDefault: wellbeingCode.defaultCode,\n };\n }\n\n totalPages = result.meta?.totalPages ?? 1;\n page += 1;\n } while (page < totalPages);\n\n throw new Error('WELLBEING_BREAK_IDLE_CODE_NOT_FOUND');\n } catch (error) {\n LoggerProxy.error(`getWellbeingBreakIdleCode API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_WELLBEING_BREAK_IDLE_CODE,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the site data for the given orgId and siteId.\n * @ignore\n * @param {string} orgId - organization ID for which the site info is to be fetched.\n * @param {string} siteId - site ID for which the data is to be fetched.\n * @returns {Promise<SiteInfo>} - A promise that resolves to the site info response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getSiteInfo(orgId: string, siteId: string): Promise<SiteInfo> {\n LoggerProxy.info('Fetching site information', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n try {\n const resource = endPointMap.siteInfo(orgId, siteId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getSiteInfo api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getSiteInfo API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the organization info for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the organization info is to be fetched.\n * @returns {Promise<OrgInfo>} - A promise that resolves to the organization info response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getOrgInfo(orgId: string): Promise<OrgInfo> {\n try {\n const resource = endPointMap.orgInfo(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getOrgInfo api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORG_INFO,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getOrgInfo API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORG_INFO,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the organization settings for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the organization settings are to be fetched.\n * @returns {Promise<OrgSettings>} - A promise that resolves to the organization settings response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getOrganizationSetting(orgId: string): Promise<OrgSettings> {\n try {\n const resource = endPointMap.orgSettings(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getOrganizationSetting api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORGANIZATION_SETTING,\n });\n\n return Promise.resolve(response.body.data[0]);\n } catch (error) {\n LoggerProxy.error(`getOrganizationSetting API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORGANIZATION_SETTING,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the tenant data for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the tenant data is to be fetched.\n * @returns {Promise<TenantData>} - A promise that resolves to the tenant data response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getTenantData(orgId: string): Promise<TenantData> {\n try {\n const resource = endPointMap.tenantData(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getTenantData api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_TENANT_DATA,\n });\n\n return Promise.resolve(response.body.data[0]);\n } catch (error) {\n LoggerProxy.error(`getTenantData API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_TENANT_DATA,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the URL mapping data for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the URL mapping is to be fetched.\n * @returns {Promise<URLMapping[]>} - A promise that resolves to the URL mapping response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getURLMapping(orgId: string): Promise<URLMapping[]> {\n try {\n const resource = endPointMap.urlMapping(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getURLMapping api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_URL_MAPPING,\n });\n\n return Promise.resolve(response.body.data);\n } catch (error) {\n LoggerProxy.error(`getURLMapping API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_URL_MAPPING,\n });\n throw error;\n }\n }\n\n /**\n * Fetches AI feature resources for the organization.\n * @ignore\n * @param {string} orgId - organization ID for which AI feature resources are to be fetched.\n * @returns {Promise<AIFeatureFlagsResponse>} - AI feature resources response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getAIFeatureFlags(orgId: string): Promise<AIFeatureFlagsResponse> {\n LoggerProxy.info('Fetching AI feature resources', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AI_FEATURE_FLAGS,\n });\n try {\n const resource = endPointMap.aiFeature(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getAIFeatureFlags api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AI_FEATURE_FLAGS,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getAIFeatureFlags API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AI_FEATURE_FLAGS,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the dial plan data for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the dial plan data is to be fetched.\n * @returns {Promise<DialPlanEntity[]>} - A promise that resolves to the dial plan data response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getDialPlanData(orgId: string): Promise<DialPlanEntity[]> {\n try {\n const resource = endPointMap.dialPlan(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getDialPlanData api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DIAL_PLAN_DATA,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getDialPlanData API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DIAL_PLAN_DATA,\n });\n throw error;\n }\n }\n\n // getQueues removed - use Queue instead\n\n /**\n * Fetches outdial ANI (Automatic Number Identification) entries for the given orgId and outdial ANI ID.\n * @ignore\n * @param {string} orgId - organization ID for which the outdial ANI entries are to be fetched.\n * @param {OutdialAniParams} params - parameters object containing outdialANI and optional pagination/filtering options\n * @returns {Promise<OutdialAniEntriesResponse>} - A promise that resolves to the outdial ANI entries response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getOutdialAniEntries(\n orgId: string,\n params: OutdialAniParams\n ): Promise<OutdialAniEntriesResponse> {\n const {outdialANI, page, pageSize, search, filter, attributes} = params;\n\n LoggerProxy.info('Fetching outdial ANI entries', {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n\n try {\n const queryParams = [];\n if (page !== undefined) queryParams.push(`page=${page}`);\n if (pageSize !== undefined) queryParams.push(`pageSize=${pageSize}`);\n if (search) queryParams.push(`search=${search}`);\n if (filter) queryParams.push(`filter=${filter}`);\n if (attributes) queryParams.push(`attributes=${attributes}`);\n\n const queryString = queryParams.length > 0 ? queryParams.join('&') : '';\n const resource = endPointMap.outdialAniEntries(orgId, outdialANI, queryString);\n\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n LoggerProxy.log('getOutdialAniEntries API success.', {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n\n return response.body?.data;\n } catch (error) {\n LoggerProxy.error(`getOutdialAniEntries API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAqBA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAOqB,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAtCrB;AACA;AACA;AACA;;AAqCA;AACA;AACA;AACA;AACA;AACe,MAAMG,kBAAkB,CAAC;EAEtCC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,QAAQ,GAAGC,qBAAY,CAACC,WAAW,CAAC,CAAC;EAC5C;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAaC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AC;MAEFvD,oBAAW,CAAC0D,GAAG,CAAC,mCAAmC,EAAE;QACnDvD,MAAM,EAAEC,4BAAgB;QACxBC,MAAM,EAAEmH,mBAAY,CAACC;MACvB,CAAC,CAAC;MAEF,OAAOrF,QAAQ,CAACuB,IAAI,EAAEmB,IAAI;IAC5B,CAAC,CAAC,OAAOhC,KAAK,EAAE;MACd9C,oBAAW,CAAC8C,KAAK,CAAC,6CAA6CA,KAAK,EAAE,EAAE;QACtE3C,MAAM,EAAEC,4BAAgB;QACxBC,MAAM,EAAEmH,mBAAY,CAACC;MACvB,CAAC,CAAC;MACF,MAAM3E,KAAK;IACb;EACF;AACF;AAACkF,OAAA,CAAA1J,OAAA,GAAAC,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_types","require","_loggerProxy","_interopRequireDefault","_WebexRequest","_constants","_constants2","_Util","_constants3","e","__esModule","default","AgentConfigService","constructor","webexReq","WebexRequest","getInstance","getAgentConfig","orgId","agentId","orgConfigPromise","getOrgDesktopLoginConfig","userConfigPromise","getUserDesktopLoginConfig","auxCodesPromise","getAllAuxCodes","DEFAULT_PAGE_SIZE","DEFAULT_AUXCODE_ATTRIBUTES","userConfig","user","userData","agentProfile","agentProfileData","LoggerProxy","info","ciUserId","module","CONFIG_FILE_NAME","method","METHODS","GET_AGENT_CONFIG","siteInfoPromise","getSiteInfo","siteId","userTeamPromise","getAllTeams","dbId","userDialPlanPromise","dialPlanEnabled","getDialPlanData","Promise","resolve","siteInfo","userDialPlanData","userTeamData","orgConfig","auxCodesData","all","multimediaProfileId","multiMediaProfileId","response","parseAgentConfigs","teamData","auxCodes","dialPlanData","error","GET_ORG_DESKTOP_LOGIN_CONFIG","resource","endPointMap","orgDesktopLogin","request","service","WCC_API_GATEWAY","HTTP_METHODS","GET","statusCode","Error","log","body","GET_USER_DESKTOP_LOGIN_CONFIG","userDesktopLogin","getMultimediaProfileById","GET_MULTIMEDIA_PROFILE_BY_ID","multimediaProfile","getListOfTeams","page","pageSize","userDbId","GET_LIST_OF_TEAMS","listTeams","allTeams","DEFAULT_PAGE","firstResponse","totalPages","meta","concat","data","requests","push","responses","GET_ALL_TEAMS","getListOfAuxCodes","filter","attributes","GET_LIST_OF_AUX_CODES","listAuxCodes","allAuxCodes","promises","forEach","GET_ALL_AUX_CODES","getWellbeingBreakIdleCode","GET_WELLBEING_BREAK_IDLE_CODE","systemIdleCodes","result","wellbeingCode","find","code","active","isSystemCode","name","WELLBEING_BREAK_IDLE_CODE","id","isSystem","isDefault","defaultCode","GET_SITE_INFO","dialPlan","GET_DIAL_PLAN_DATA","getOutdialAniEntries","params","outdialANI","search","MAIN_METHODS","GET_OUTDIAL_ANI_ENTRIES","queryParams","undefined","queryString","length","join","outdialAniEntries","exports"],"sources":["index.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * @module AgentConfigService\n */\n\nimport {HTTP_METHODS} from '../../types';\nimport LoggerProxy from '../../logger-proxy';\nimport {\n ListAuxCodesResponse,\n OrgDesktopLoginResponse,\n UserDesktopLoginResponse,\n TeamList,\n DialPlanEntity,\n Profile,\n ListTeamsResponse,\n AuxCode,\n MultimediaProfileResponse,\n SiteInfo,\n OutdialAniEntriesResponse,\n OutdialAniParams,\n Entity,\n} from './types';\nimport WebexRequest from '../core/WebexRequest';\nimport {WCC_API_GATEWAY} from '../constants';\nimport {CONFIG_FILE_NAME, METHODS as MAIN_METHODS} from '../../constants';\nimport {parseAgentConfigs} from './Util';\nimport {\n DEFAULT_AUXCODE_ATTRIBUTES,\n DEFAULT_PAGE,\n DEFAULT_PAGE_SIZE,\n endPointMap,\n METHODS,\n WELLBEING_BREAK_IDLE_CODE,\n} from './constants';\n\n/**\n * The AgentConfigService class provides methods to fetch agent configuration data.\n * @private\n * @ignore\n */\nexport default class AgentConfigService {\n private webexReq: WebexRequest;\n constructor() {\n this.webexReq = WebexRequest.getInstance();\n }\n\n /**\n * Fetches the agent configuration data for the given orgId and agentId.\n * @param {string} orgId - organization ID for which the agent configuration is to be fetched.\n * @param {string} agentId - agent ID for which the configuration is to be fetched.\n * @returns {Promise<Profile>} - A promise that resolves to the agent configuration profile.\n * @throws {Error} - Throws an error if any API call fails or if the response status is not 200.\n * @public\n */\n public async getAgentConfig(orgId: string, agentId: string): Promise<Profile> {\n try {\n const orgConfigPromise = this.getOrgDesktopLoginConfig(orgId);\n const userConfigPromise = this.getUserDesktopLoginConfig(orgId, agentId);\n const auxCodesPromise = this.getAllAuxCodes(\n orgId,\n DEFAULT_PAGE_SIZE,\n [],\n DEFAULT_AUXCODE_ATTRIBUTES\n );\n\n const userConfig = await userConfigPromise;\n const {user: userData, agentProfile: agentProfileData} = userConfig;\n LoggerProxy.info(`Fetched user data, userId: ${userData.ciUserId}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n const siteInfoPromise = this.getSiteInfo(orgId, userData.siteId);\n const userTeamPromise = this.getAllTeams(orgId, DEFAULT_PAGE_SIZE, userData.dbId);\n const userDialPlanPromise = agentProfileData.dialPlanEnabled\n ? this.getDialPlanData(orgId)\n : Promise.resolve([]);\n\n const [siteInfo, userDialPlanData, userTeamData, orgConfig, auxCodesData] = await Promise.all(\n [siteInfoPromise, userDialPlanPromise, userTeamPromise, orgConfigPromise, auxCodesPromise]\n );\n const multimediaProfileId =\n userTeamData[0]?.multiMediaProfileId || siteInfo.multimediaProfileId;\n\n LoggerProxy.info('Fetched all required data', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n const response = parseAgentConfigs({\n orgConfig,\n userData,\n agentProfileData,\n teamData: userTeamData,\n auxCodes: auxCodesData,\n dialPlanData: userDialPlanData,\n multimediaProfileId,\n });\n\n LoggerProxy.info('Parsing completed for agent-config', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n LoggerProxy.info('Fetched configuration data successfully', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n\n return response;\n } catch (error) {\n LoggerProxy.error(`getAgentConfig call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_AGENT_CONFIG,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the aggregated organization desktop-login configuration for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the configuration is to be fetched.\n * @returns {Promise<OrgDesktopLoginResponse>} - A promise that resolves to the organization configuration.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getOrgDesktopLoginConfig(orgId: string): Promise<OrgDesktopLoginResponse> {\n LoggerProxy.info('Fetching organization desktop-login configuration', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG,\n });\n\n try {\n const resource = endPointMap.orgDesktopLogin(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getOrgDesktopLoginConfig api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getOrgDesktopLoginConfig API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ORG_DESKTOP_LOGIN_CONFIG,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the aggregated user desktop-login configuration for the given orgId and ciUserId.\n * @ignore\n * @param {string} orgId - organization ID for which the configuration is to be fetched.\n * @param {string} ciUserId - CI user ID of the agent whose configuration is to be fetched.\n * @returns {Promise<UserDesktopLoginResponse>} - A promise that resolves to the user configuration.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getUserDesktopLoginConfig(\n orgId: string,\n ciUserId: string\n ): Promise<UserDesktopLoginResponse> {\n LoggerProxy.info('Fetching user desktop-login configuration', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_DESKTOP_LOGIN_CONFIG,\n });\n\n try {\n const resource = endPointMap.userDesktopLogin(orgId, ciUserId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getUserDesktopLoginConfig api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_DESKTOP_LOGIN_CONFIG,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getUserDesktopLoginConfig API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_USER_DESKTOP_LOGIN_CONFIG,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the multimedia profile data for the given orgId and multimediaProfileId.\n * @ignore\n * @param {string} orgId - organization ID for which the multimedia profile is to be fetched.\n * @param {string} multimediaProfileId - multimedia profile ID for which the data is to be fetched.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @returns {Promise<MultimediaProfileResponse>} - A promise that resolves to the multimedia profile response.\n * @private\n */\n public async getMultimediaProfileById(\n orgId: string,\n multimediaProfileId: string\n ): Promise<MultimediaProfileResponse> {\n LoggerProxy.info('Fetching multimedia profile', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n\n try {\n const resource = endPointMap.multimediaProfile(orgId, multimediaProfileId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getMultimediaProfileById API success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getMultimediaProfileById API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_MULTIMEDIA_PROFILE_BY_ID,\n });\n throw error;\n }\n }\n\n /**\n * fetches the list of teams the given user belongs to.\n * @ignore\n * @param {string} orgId - organization ID for which the teams are to be fetched.\n * @param {number} page - the page number to fetch.\n * @param {number} pageSize - the number of teams to fetch per page.\n * @param {string} userDbId - database ID of the user whose teams are to be fetched.\n * @returns {Promise<ListTeamsResponse>} - A promise that resolves to the list of teams response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getListOfTeams(\n orgId: string,\n page: number,\n pageSize: number,\n userDbId: string\n ): Promise<ListTeamsResponse> {\n LoggerProxy.info('Fetching list of teams', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n\n try {\n const resource = endPointMap.listTeams(orgId, page, pageSize, userDbId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getListOfTeams api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getListOfTeams API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_TEAMS,\n });\n throw error;\n }\n }\n\n /**\n * Fetches all teams the given user belongs to, from all pages\n * @ignore\n * @param {string} orgId - organization ID for which the teams are to be fetched.\n * @param {number} pageSize - the number of teams to fetch per page.\n * @param {string} userDbId - database ID of the user whose teams are to be fetched.\n * @returns {Promise<TeamList[]>} - A promise that resolves to the list of teams.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getAllTeams(orgId: string, pageSize: number, userDbId: string): Promise<TeamList[]> {\n try {\n let allTeams: TeamList[] = [];\n let page = DEFAULT_PAGE;\n const firstResponse = await this.getListOfTeams(orgId, page, pageSize, userDbId);\n const totalPages = firstResponse.meta.totalPages;\n allTeams = allTeams.concat(firstResponse.data);\n const requests = [];\n for (page = DEFAULT_PAGE + 1; page < totalPages; page += 1) {\n requests.push(this.getListOfTeams(orgId, page, pageSize, userDbId));\n }\n const responses = await Promise.all(requests);\n\n for (const response of responses) {\n allTeams = allTeams.concat(response.data);\n }\n\n return allTeams;\n } catch (error) {\n LoggerProxy.error(`getAllTeams API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ALL_TEAMS,\n });\n throw error;\n }\n }\n\n /**\n * fetches the list of aux codes for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the aux codes are to be fetched.\n * @param {number} page - the page number to fetch.\n * @param {number} pageSize - the number of aux codes to fetch per page.\n * @param {string[]} filter - optional filter criteria for the aux codes.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<ListAuxCodesResponse>} - A promise that resolves to the list of aux codes response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getListOfAuxCodes(\n orgId: string,\n page: number,\n pageSize: number,\n filter: string[],\n attributes: string[]\n ): Promise<ListAuxCodesResponse> {\n LoggerProxy.info('Fetching list of aux codes', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n\n try {\n const resource = endPointMap.listAuxCodes(orgId, page, pageSize, filter, attributes);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getListOfAuxCodes api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getListOfAuxCodes API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_LIST_OF_AUX_CODES,\n });\n throw error;\n }\n }\n\n /**\n * Fetches all aux codes from all pages for the given orgId\n * @ignore\n * @param {string} orgId - organization ID for which the aux codes are to be fetched.\n * @param {number} pageSize - the number of aux codes to fetch per page.\n * @param {string[]} filter - optional filter criteria for the aux codes.\n * @param {string[]} attributes - optional attributes to include in the response.\n * @returns {Promise<AuxCode[]>} - A promise that resolves to the list of aux codes.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getAllAuxCodes(\n orgId: string,\n pageSize: number,\n filter: string[],\n attributes: string[]\n ): Promise<AuxCode[]> {\n try {\n let allAuxCodes: AuxCode[] = [];\n let page = DEFAULT_PAGE;\n\n const firstResponse = await this.getListOfAuxCodes(orgId, page, pageSize, filter, attributes);\n allAuxCodes = allAuxCodes.concat(firstResponse.data);\n const totalPages = firstResponse.meta.totalPages;\n\n const promises: Promise<ListAuxCodesResponse>[] = [];\n for (page = DEFAULT_PAGE + 1; page < totalPages; page += 1) {\n promises.push(this.getListOfAuxCodes(orgId, page, pageSize, filter, attributes));\n }\n\n const responses = await Promise.all(promises);\n\n responses.forEach((response) => {\n allAuxCodes = allAuxCodes.concat(response.data);\n });\n\n return allAuxCodes;\n } catch (error) {\n LoggerProxy.error(`getAllAuxCodes API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_ALL_AUX_CODES,\n });\n throw error;\n }\n }\n\n /**\n * Retrieves the exact system-managed WellbeingBreak idle code.\n * This query intentionally bypasses Desktop Profile filtering so the system code does not\n * need to appear in the normal agent-selectable idle-code list.\n * @param orgId - Organization identifier\n * @returns The normalized WellbeingBreak entity\n * @throws When the request fails or the exact system code is unavailable\n * @internal\n */\n public async getWellbeingBreakIdleCode(orgId: string): Promise<Entity> {\n LoggerProxy.info('Fetching WellbeingBreak system idle code', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_WELLBEING_BREAK_IDLE_CODE,\n });\n\n try {\n let page = DEFAULT_PAGE;\n let totalPages = 1;\n\n do {\n // Pagination is intentionally sequential so the lookup can stop as soon as the code is found.\n // eslint-disable-next-line no-await-in-loop\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource: endPointMap.systemIdleCodes(orgId, page, DEFAULT_PAGE_SIZE),\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n const result = response.body as ListAuxCodesResponse;\n const wellbeingCode = result.data?.find(\n (code) =>\n code.active === true &&\n code.isSystemCode === true &&\n code.name === WELLBEING_BREAK_IDLE_CODE\n );\n\n if (wellbeingCode) {\n return {\n id: wellbeingCode.id,\n name: wellbeingCode.name,\n isSystem: true,\n isDefault: wellbeingCode.defaultCode,\n };\n }\n\n totalPages = result.meta?.totalPages ?? 1;\n page += 1;\n } while (page < totalPages);\n\n throw new Error('WELLBEING_BREAK_IDLE_CODE_NOT_FOUND');\n } catch (error) {\n LoggerProxy.error(`getWellbeingBreakIdleCode API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_WELLBEING_BREAK_IDLE_CODE,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the site data for the given orgId and siteId.\n * @ignore\n * @param {string} orgId - organization ID for which the site info is to be fetched.\n * @param {string} siteId - site ID for which the data is to be fetched.\n * @returns {Promise<SiteInfo>} - A promise that resolves to the site info response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getSiteInfo(orgId: string, siteId: string): Promise<SiteInfo> {\n LoggerProxy.info('Fetching site information', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n try {\n const resource = endPointMap.siteInfo(orgId, siteId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getSiteInfo api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getSiteInfo API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_SITE_INFO,\n });\n throw error;\n }\n }\n\n /**\n * Fetches the dial plan data for the given orgId.\n * @ignore\n * @param {string} orgId - organization ID for which the dial plan data is to be fetched.\n * @returns {Promise<DialPlanEntity[]>} - A promise that resolves to the dial plan data response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getDialPlanData(orgId: string): Promise<DialPlanEntity[]> {\n try {\n const resource = endPointMap.dialPlan(orgId);\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n if (response.statusCode !== 200) {\n throw new Error(`API call failed with ${response.statusCode}`);\n }\n\n LoggerProxy.log('getDialPlanData api success.', {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DIAL_PLAN_DATA,\n });\n\n return Promise.resolve(response.body);\n } catch (error) {\n LoggerProxy.error(`getDialPlanData API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: METHODS.GET_DIAL_PLAN_DATA,\n });\n throw error;\n }\n }\n\n // getQueues removed - use Queue instead\n\n /**\n * Fetches outdial ANI (Automatic Number Identification) entries for the given orgId and outdial ANI ID.\n * @ignore\n * @param {string} orgId - organization ID for which the outdial ANI entries are to be fetched.\n * @param {OutdialAniParams} params - parameters object containing outdialANI and optional pagination/filtering options\n * @returns {Promise<OutdialAniEntriesResponse>} - A promise that resolves to the outdial ANI entries response.\n * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.\n * @private\n */\n public async getOutdialAniEntries(\n orgId: string,\n params: OutdialAniParams\n ): Promise<OutdialAniEntriesResponse> {\n const {outdialANI, page, pageSize, search, filter, attributes} = params;\n\n LoggerProxy.info('Fetching outdial ANI entries', {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n\n try {\n const queryParams = [];\n if (page !== undefined) queryParams.push(`page=${page}`);\n if (pageSize !== undefined) queryParams.push(`pageSize=${pageSize}`);\n if (search) queryParams.push(`search=${search}`);\n if (filter) queryParams.push(`filter=${filter}`);\n if (attributes) queryParams.push(`attributes=${attributes}`);\n\n const queryString = queryParams.length > 0 ? queryParams.join('&') : '';\n const resource = endPointMap.outdialAniEntries(orgId, outdialANI, queryString);\n\n const response = await this.webexReq.request({\n service: WCC_API_GATEWAY,\n resource,\n method: HTTP_METHODS.GET,\n });\n\n LoggerProxy.log('getOutdialAniEntries API success.', {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n\n return response.body?.data;\n } catch (error) {\n LoggerProxy.error(`getOutdialAniEntries API call failed with ${error}`, {\n module: CONFIG_FILE_NAME,\n method: MAIN_METHODS.GET_OUTDIAL_ANI_ENTRIES,\n });\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAgBA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAOqB,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjCrB;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACe,MAAMG,kBAAkB,CAAC;EAEtCC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,QAAQ,GAAGC,qBAAY,CAACC,WAAW,CAAC,CAAC;EAC5C;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAaC,cAAcA,CAACC,KAAa,EAAEC,OAAe,EAAoB;IAC5E,IAAI;MACF,MAAMC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