@webex/contact-center 3.11.0 → 3.12.0-llmrefactor.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +882 -0
- package/AGENTS.md +94 -0
- package/ai-docs/ARCHITECTURE.md +168 -0
- package/ai-docs/CONTRACTS.md +46 -0
- package/ai-docs/GETTING_STARTED.md +168 -0
- package/ai-docs/GLOSSARY.md +43 -0
- package/ai-docs/README.md +138 -0
- package/ai-docs/REVIEW_CHECKLIST.md +41 -0
- package/ai-docs/RULES.md +444 -0
- package/ai-docs/SECURITY.md +52 -0
- package/ai-docs/SERVICE_STATE.md +48 -0
- package/ai-docs/SPEC_INDEX.md +65 -0
- package/ai-docs/adr/0001-spec-source-policy.md +55 -0
- package/ai-docs/adr/README.md +8 -0
- package/ai-docs/adr/_adr-template.md +31 -0
- package/ai-docs/contact-center-spec.md +341 -0
- package/ai-docs/features/generated-spec-conformance-fidelity-remediation/spec/feature-spec.md +117 -0
- package/ai-docs/features/residual-warning-coverage-completion/spec/feature-spec.md +203 -0
- package/ai-docs/features/validator-code-fidelity-drift-fix/spec/feature-spec.md +315 -0
- package/ai-docs/patterns/event-driven-patterns.md +485 -0
- package/ai-docs/patterns/testing-patterns.md +480 -0
- package/ai-docs/patterns/typescript-patterns.md +365 -0
- package/ai-docs/templates/README.md +102 -0
- package/ai-docs/templates/documentation/create-agents-md.md +240 -0
- package/ai-docs/templates/documentation/create-architecture-md.md +295 -0
- package/ai-docs/templates/existing-service/bug-fix.md +254 -0
- package/ai-docs/templates/existing-service/feature-enhancement.md +450 -0
- package/ai-docs/templates/new-method/00-master.md +80 -0
- package/ai-docs/templates/new-method/01-requirements.md +232 -0
- package/ai-docs/templates/new-method/02-implementation.md +295 -0
- package/ai-docs/templates/new-method/03-tests.md +201 -0
- package/ai-docs/templates/new-method/04-validation.md +141 -0
- package/ai-docs/templates/new-service/00-master.md +109 -0
- package/ai-docs/templates/new-service/01-pre-questions.md +159 -0
- package/ai-docs/templates/new-service/02-code-generation.md +346 -0
- package/ai-docs/templates/new-service/03-integration.md +178 -0
- package/ai-docs/templates/new-service/04-test-generation.md +205 -0
- package/ai-docs/templates/new-service/05-validation.md +145 -0
- package/dist/cc.js +379 -50
- package/dist/cc.js.map +1 -1
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +22 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/metrics/behavioral-events.js +114 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +32 -3
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/ApiAiAssistant.js +318 -0
- package/dist/services/ApiAiAssistant.js.map +1 -0
- package/dist/services/UserPreference.js +427 -0
- package/dist/services/UserPreference.js.map +1 -0
- package/dist/services/agent/types.js.map +1 -1
- package/dist/services/config/Util.js +8 -4
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +35 -2
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +41 -2
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +66 -8
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js +27 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +122 -25
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +92 -17
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +22 -6
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/connection-service.js +3 -1
- package/dist/services/core/websocket/connection-service.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +6 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/Task.js +688 -0
- package/dist/services/task/Task.js.map +1 -0
- package/dist/services/task/TaskFactory.js +45 -0
- package/dist/services/task/TaskFactory.js.map +1 -0
- package/dist/services/task/TaskManager.js +751 -457
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +220 -23
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +23 -2
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/dialer.js +129 -0
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/digital/Digital.js +77 -0
- package/dist/services/task/digital/Digital.js.map +1 -0
- package/dist/services/task/state-machine/TaskStateMachine.js +873 -0
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
- package/dist/services/task/state-machine/actions.js +567 -0
- package/dist/services/task/state-machine/actions.js.map +1 -0
- package/dist/services/task/state-machine/constants.js +161 -0
- package/dist/services/task/state-machine/constants.js.map +1 -0
- package/dist/services/task/state-machine/guards.js +382 -0
- package/dist/services/task/state-machine/guards.js.map +1 -0
- package/dist/services/task/state-machine/index.js +53 -0
- package/dist/services/task/state-machine/index.js.map +1 -0
- package/dist/services/task/state-machine/types.js +54 -0
- package/dist/services/task/state-machine/types.js.map +1 -0
- package/dist/services/task/state-machine/uiControlsComputer.js +603 -0
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -0
- package/dist/services/task/taskDataNormalizer.js +99 -0
- package/dist/services/task/taskDataNormalizer.js.map +1 -0
- package/dist/services/task/types.js +227 -4
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +1044 -0
- package/dist/services/task/voice/Voice.js.map +1 -0
- package/dist/services/task/voice/WebRTC.js +149 -0
- package/dist/services/task/voice/WebRTC.js.map +1 -0
- package/dist/types/cc.d.ts +894 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +66 -0
- package/dist/types/index.d.ts +199 -0
- package/dist/types/logger-proxy.d.ts +71 -0
- package/dist/types/metrics/MetricsManager.d.ts +223 -0
- package/dist/types/metrics/behavioral-events.d.ts +29 -0
- package/dist/types/metrics/constants.d.ts +181 -0
- package/dist/types/services/AddressBook.d.ts +74 -0
- package/dist/types/services/ApiAiAssistant.d.ts +49 -0
- package/dist/types/services/EntryPoint.d.ts +67 -0
- package/dist/types/services/Queue.d.ts +76 -0
- package/dist/types/services/UserPreference.d.ts +118 -0
- package/dist/types/services/WebCallingService.d.ts +1 -0
- package/dist/types/services/agent/index.d.ts +46 -0
- package/dist/types/services/agent/types.d.ts +413 -0
- package/dist/types/services/config/Util.d.ts +20 -0
- package/dist/types/services/config/constants.d.ts +270 -0
- package/dist/types/services/config/index.d.ts +177 -0
- package/dist/types/services/config/types.d.ts +1368 -0
- package/dist/types/services/constants.d.ts +110 -0
- package/dist/types/services/core/Err.d.ts +125 -0
- package/dist/types/services/core/GlobalTypes.d.ts +58 -0
- package/dist/types/services/core/Utils.d.ts +121 -0
- package/dist/types/services/core/WebexRequest.d.ts +22 -0
- package/dist/types/services/core/aqm-reqs.d.ts +65 -0
- package/dist/types/services/core/constants.d.ts +99 -0
- package/dist/types/services/core/types.d.ts +47 -0
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +36 -0
- package/dist/types/services/core/websocket/connection-service.d.ts +27 -0
- package/dist/types/services/core/websocket/keepalive.worker.d.ts +2 -0
- package/dist/types/services/core/websocket/types.d.ts +37 -0
- package/dist/types/services/index.d.ts +54 -0
- package/dist/types/services/task/AutoWrapup.d.ts +40 -0
- package/dist/types/services/task/Task.d.ts +157 -0
- package/dist/types/services/task/TaskFactory.d.ts +12 -0
- package/dist/types/services/task/TaskManager.d.ts +1 -0
- package/dist/types/services/task/TaskUtils.d.ts +138 -0
- package/dist/types/services/task/constants.d.ts +91 -0
- package/dist/types/services/task/contact.d.ts +69 -0
- package/dist/types/services/task/dialer.d.ts +73 -0
- package/dist/types/services/task/digital/Digital.d.ts +22 -0
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1194 -0
- package/dist/types/services/task/state-machine/actions.d.ts +10 -0
- package/dist/types/services/task/state-machine/constants.d.ts +107 -0
- package/dist/types/services/task/state-machine/guards.d.ts +102 -0
- package/dist/types/services/task/state-machine/index.d.ts +13 -0
- package/dist/types/services/task/state-machine/types.d.ts +269 -0
- package/dist/types/services/task/state-machine/uiControlsComputer.d.ts +9 -0
- package/dist/types/services/task/taskDataNormalizer.d.ts +10 -0
- package/dist/types/services/task/types.d.ts +1856 -0
- package/dist/types/services/task/voice/Voice.d.ts +184 -0
- package/dist/types/services/task/voice/WebRTC.d.ts +53 -0
- package/dist/types/types.d.ts +778 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types/webex-config.d.ts +53 -0
- package/dist/types/webex.d.ts +8 -0
- package/dist/types.js +130 -1
- package/dist/types.js.map +1 -1
- package/dist/webex.js +14 -2
- package/dist/webex.js.map +1 -1
- package/package.json +16 -12
- package/src/cc.ts +477 -51
- package/src/config.ts +6 -0
- package/src/constants.ts +21 -1
- package/src/index.ts +24 -5
- package/src/metrics/ai-docs/AGENTS.md +350 -0
- package/src/metrics/ai-docs/ARCHITECTURE.md +338 -0
- package/src/metrics/ai-docs/metrics-spec.md +854 -0
- package/src/metrics/behavioral-events.ts +120 -0
- package/src/metrics/constants.ts +37 -3
- package/src/services/ApiAiAssistant.ts +412 -0
- package/src/services/UserPreference.ts +509 -0
- package/src/services/agent/ai-docs/AGENTS.md +240 -0
- package/src/services/agent/ai-docs/ARCHITECTURE.md +304 -0
- package/src/services/agent/ai-docs/agent-spec.md +504 -0
- package/src/services/agent/types.ts +1 -1
- package/src/services/ai-docs/AGENTS.md +386 -0
- package/src/services/ai-docs/services-spec.md +492 -0
- package/src/services/config/Util.ts +10 -2
- package/src/services/config/ai-docs/AGENTS.md +255 -0
- package/src/services/config/ai-docs/ARCHITECTURE.md +426 -0
- package/src/services/config/ai-docs/config-spec.md +669 -0
- package/src/services/config/constants.ts +37 -1
- package/src/services/config/index.ts +45 -1
- package/src/services/config/types.ts +241 -11
- package/src/services/constants.ts +29 -0
- package/src/services/core/Err.ts +3 -0
- package/src/services/core/Utils.ts +143 -30
- package/src/services/core/ai-docs/AGENTS.md +381 -0
- package/src/services/core/ai-docs/ARCHITECTURE.md +698 -0
- package/src/services/core/ai-docs/core-spec.md +783 -0
- package/src/services/core/aqm-reqs.ts +100 -22
- package/src/services/core/websocket/WebSocketManager.ts +23 -6
- package/src/services/core/websocket/connection-service.ts +5 -1
- package/src/services/core/websocket/types.ts +1 -1
- package/src/services/index.ts +4 -0
- package/src/services/task/Task.ts +837 -0
- package/src/services/task/TaskFactory.ts +55 -0
- package/src/services/task/TaskManager.ts +793 -521
- package/src/services/task/TaskUtils.ts +314 -24
- package/src/services/task/ai-docs/AGENTS.md +457 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +594 -0
- package/src/services/task/ai-docs/task-spec.md +1319 -0
- package/src/services/task/constants.ts +23 -0
- package/src/services/task/dialer.ts +136 -1
- package/src/services/task/digital/Digital.ts +95 -0
- package/src/services/task/state-machine/TaskStateMachine.ts +1166 -0
- package/src/services/task/state-machine/actions.ts +738 -0
- package/src/services/task/state-machine/ai-docs/AGENTS.md +458 -0
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1137 -0
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +2177 -0
- package/src/services/task/state-machine/constants.ts +172 -0
- package/src/services/task/state-machine/guards.ts +445 -0
- package/src/services/task/state-machine/index.ts +28 -0
- package/src/services/task/state-machine/types.ts +243 -0
- package/src/services/task/state-machine/uiControlsComputer.ts +961 -0
- package/src/services/task/taskDataNormalizer.ts +137 -0
- package/src/services/task/types.ts +734 -71
- package/src/services/task/voice/Voice.ts +1270 -0
- package/src/services/task/voice/WebRTC.ts +187 -0
- package/src/types.ts +205 -2
- package/src/utils/AGENTS.md +278 -0
- package/src/utils/ai-docs/utils-spec.md +381 -0
- package/src/webex.js +2 -0
- package/test/unit/spec/cc.ts +503 -43
- package/test/unit/spec/logger-proxy.ts +70 -0
- package/test/unit/spec/services/ApiAiAssistant.ts +273 -0
- package/test/unit/spec/services/UserPreference.ts +401 -0
- package/test/unit/spec/services/WebCallingService.ts +7 -1
- package/test/unit/spec/services/config/index.ts +85 -29
- package/test/unit/spec/services/core/Utils.ts +481 -2
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +137 -41
- package/test/unit/spec/services/core/websocket/connection-service.ts +3 -1
- package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
- package/test/unit/spec/services/task/Task.ts +477 -0
- package/test/unit/spec/services/task/TaskFactory.ts +62 -0
- package/test/unit/spec/services/task/TaskManager.ts +1001 -1003
- package/test/unit/spec/services/task/TaskUtils.ts +235 -0
- package/test/unit/spec/services/task/dialer.ts +372 -96
- package/test/unit/spec/services/task/digital/Digital.ts +105 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +2651 -0
- package/test/unit/spec/services/task/state-machine/guards.ts +637 -0
- package/test/unit/spec/services/task/state-machine/types.ts +18 -0
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +2663 -0
- package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
- package/test/unit/spec/services/task/voice/Voice.ts +649 -0
- package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
- package/dist/services/task/index.js +0 -1525
- package/dist/services/task/index.js.map +0 -1
- package/src/services/task/index.ts +0 -1801
- package/test/unit/spec/services/task/index.ts +0 -2184
|
@@ -67,6 +67,8 @@ export const METHODS = {
|
|
|
67
67
|
GET_TENANT_DATA: 'getTenantData',
|
|
68
68
|
GET_URL_MAPPING: 'getURLMapping',
|
|
69
69
|
GET_DIAL_PLAN_DATA: 'getDialPlanData',
|
|
70
|
+
GET_AI_FEATURE_FLAGS: 'getAIFeatureFlags',
|
|
71
|
+
GET_QUEUES: 'getQueues',
|
|
70
72
|
|
|
71
73
|
// Util methods
|
|
72
74
|
PARSE_AGENT_CONFIGS: 'parseAgentConfigs',
|
|
@@ -164,7 +166,7 @@ export const endPointMap = {
|
|
|
164
166
|
) =>
|
|
165
167
|
`organization/${orgId}/v2/auxiliary-code?page=${page}&pageSize=${pageSize}${
|
|
166
168
|
filter && filter.length > 0 ? `&filter=id=in=(${filter})` : ''
|
|
167
|
-
}&attributes=${attributes}`,
|
|
169
|
+
}&attributes=${attributes}&desktopProfileFilter=true`,
|
|
168
170
|
|
|
169
171
|
/**
|
|
170
172
|
* Gets the endpoint for organization info.
|
|
@@ -232,6 +234,16 @@ export const endPointMap = {
|
|
|
232
234
|
* @ignore
|
|
233
235
|
*/
|
|
234
236
|
dialPlan: (orgId: string) => `organization/${orgId}/dial-plan?agentView=true`,
|
|
237
|
+
/**
|
|
238
|
+
* Gets the endpoint for listing AI feature flags.
|
|
239
|
+
* @param orgId - Organization ID.
|
|
240
|
+
* @returns The endpoint URL string.
|
|
241
|
+
* @public
|
|
242
|
+
* @example
|
|
243
|
+
* const url = endPointMap.aiFeatureFlags('org123');
|
|
244
|
+
* @ignore
|
|
245
|
+
*/
|
|
246
|
+
aiFeature: (orgId: string) => `organization/${orgId}/v2/ai-feature?page=0&pageSize=100`,
|
|
235
247
|
|
|
236
248
|
/**
|
|
237
249
|
* Gets the endpoint for the queue list with custom query parameters.
|
|
@@ -286,4 +298,28 @@ export const endPointMap = {
|
|
|
286
298
|
`organization/${orgId}/v2/outdial-ani/${outdialANI}/entry${
|
|
287
299
|
queryParams ? `?${queryParams}` : ''
|
|
288
300
|
}`,
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Gets the endpoint for user preference by user ID.
|
|
304
|
+
* @param orgId - Organization ID.
|
|
305
|
+
* @param userId - User ID.
|
|
306
|
+
* @returns The endpoint URL string.
|
|
307
|
+
* @public
|
|
308
|
+
* @example
|
|
309
|
+
* const url = endPointMap.userPreference('org123', 'user456');
|
|
310
|
+
* @ignore
|
|
311
|
+
*/
|
|
312
|
+
userPreference: (orgId: string, userId: string) =>
|
|
313
|
+
`organization/${orgId}/user-preference/${userId}`,
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Gets the endpoint for creating user preference.
|
|
317
|
+
* @param orgId - Organization ID.
|
|
318
|
+
* @returns The endpoint URL string.
|
|
319
|
+
* @public
|
|
320
|
+
* @example
|
|
321
|
+
* const url = endPointMap.userPreferenceCreate('org123');
|
|
322
|
+
* @ignore
|
|
323
|
+
*/
|
|
324
|
+
userPreferenceCreate: (orgId: string) => `organization/${orgId}/user-preference`,
|
|
289
325
|
};
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
SiteInfo,
|
|
23
23
|
OutdialAniEntriesResponse,
|
|
24
24
|
OutdialAniParams,
|
|
25
|
+
AIFeatureFlagsResponse,
|
|
25
26
|
} from './types';
|
|
26
27
|
import WebexRequest from '../core/WebexRequest';
|
|
27
28
|
import {WCC_API_GATEWAY} from '../constants';
|
|
@@ -61,6 +62,7 @@ export default class AgentConfigService {
|
|
|
61
62
|
const orgSettingsPromise = this.getOrganizationSetting(orgId);
|
|
62
63
|
const tenantDataPromise = this.getTenantData(orgId);
|
|
63
64
|
const urlMappingPromise = this.getURLMapping(orgId);
|
|
65
|
+
const aiFeatureFlagsPromise = this.getAIFeatureFlags(orgId);
|
|
64
66
|
const auxCodesPromise = this.getAllAuxCodes(
|
|
65
67
|
orgId,
|
|
66
68
|
DEFAULT_PAGE_SIZE,
|
|
@@ -94,6 +96,7 @@ export default class AgentConfigService {
|
|
|
94
96
|
orgSettingsData,
|
|
95
97
|
tenantData,
|
|
96
98
|
urlMappingData,
|
|
99
|
+
aiFeatureFlagsData,
|
|
97
100
|
auxCodesData,
|
|
98
101
|
] = await Promise.all([
|
|
99
102
|
agentProfilePromise,
|
|
@@ -104,9 +107,9 @@ export default class AgentConfigService {
|
|
|
104
107
|
orgSettingsPromise,
|
|
105
108
|
tenantDataPromise,
|
|
106
109
|
urlMappingPromise,
|
|
110
|
+
aiFeatureFlagsPromise,
|
|
107
111
|
auxCodesPromise,
|
|
108
112
|
]);
|
|
109
|
-
|
|
110
113
|
const multimediaProfileId =
|
|
111
114
|
userConfigData.multimediaProfileId ||
|
|
112
115
|
userTeamData[0]?.multiMediaProfileId ||
|
|
@@ -128,6 +131,7 @@ export default class AgentConfigService {
|
|
|
128
131
|
dialPlanData: userDialPlanData,
|
|
129
132
|
urlMapping: urlMappingData,
|
|
130
133
|
multimediaProfileId,
|
|
134
|
+
aiFeatureFlags: aiFeatureFlagsData,
|
|
131
135
|
});
|
|
132
136
|
|
|
133
137
|
LoggerProxy.info('Parsing completed for agent-config', {
|
|
@@ -651,6 +655,46 @@ export default class AgentConfigService {
|
|
|
651
655
|
}
|
|
652
656
|
}
|
|
653
657
|
|
|
658
|
+
/**
|
|
659
|
+
* Fetches AI feature resources for the organization.
|
|
660
|
+
* @ignore
|
|
661
|
+
* @param {string} orgId - organization ID for which AI feature resources are to be fetched.
|
|
662
|
+
* @returns {Promise<AIFeatureFlagsResponse>} - AI feature resources response.
|
|
663
|
+
* @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
|
|
664
|
+
* @private
|
|
665
|
+
*/
|
|
666
|
+
public async getAIFeatureFlags(orgId: string): Promise<AIFeatureFlagsResponse> {
|
|
667
|
+
LoggerProxy.info('Fetching AI feature resources', {
|
|
668
|
+
module: CONFIG_FILE_NAME,
|
|
669
|
+
method: METHODS.GET_AI_FEATURE_FLAGS,
|
|
670
|
+
});
|
|
671
|
+
try {
|
|
672
|
+
const resource = endPointMap.aiFeature(orgId);
|
|
673
|
+
const response = await this.webexReq.request({
|
|
674
|
+
service: WCC_API_GATEWAY,
|
|
675
|
+
resource,
|
|
676
|
+
method: HTTP_METHODS.GET,
|
|
677
|
+
});
|
|
678
|
+
|
|
679
|
+
if (response.statusCode !== 200) {
|
|
680
|
+
throw new Error(`API call failed with ${response.statusCode}`);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
LoggerProxy.log('getAIFeatureFlags api success.', {
|
|
684
|
+
module: CONFIG_FILE_NAME,
|
|
685
|
+
method: METHODS.GET_AI_FEATURE_FLAGS,
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
return Promise.resolve(response.body);
|
|
689
|
+
} catch (error) {
|
|
690
|
+
LoggerProxy.error(`getAIFeatureFlags API call failed with ${error}`, {
|
|
691
|
+
module: CONFIG_FILE_NAME,
|
|
692
|
+
method: METHODS.GET_AI_FEATURE_FLAGS,
|
|
693
|
+
});
|
|
694
|
+
throw error;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
654
698
|
/**
|
|
655
699
|
* Fetches the dial plan data for the given orgId.
|
|
656
700
|
* @ignore
|
|
@@ -65,6 +65,8 @@ export const CC_TASK_EVENTS = {
|
|
|
65
65
|
AGENT_CONFERENCE_TRANSFER_FAILED: 'AgentConferenceTransferFailed',
|
|
66
66
|
/** Event emitted for post-call activity by participant */
|
|
67
67
|
PARTICIPANT_POST_CALL_ACTIVITY: 'ParticipantPostCallActivity',
|
|
68
|
+
/** Event emitted when consulted participant is being moved/transferred */
|
|
69
|
+
CONSULTED_PARTICIPANT_MOVING: 'ConsultedParticipantMoving',
|
|
68
70
|
/** Event emitted when contact is blind transferred */
|
|
69
71
|
AGENT_BLIND_TRANSFERRED: 'AgentBlindTransferred',
|
|
70
72
|
/** Event emitted when blind transfer fails */
|
|
@@ -81,6 +83,8 @@ export const CC_TASK_EVENTS = {
|
|
|
81
83
|
AGENT_CONSULT_TRANSFER_FAILED: 'AgentConsultTransferFailed',
|
|
82
84
|
/** Event emitted when contact recording is paused */
|
|
83
85
|
CONTACT_RECORDING_PAUSED: 'ContactRecordingPaused',
|
|
86
|
+
/** Event emitted when contact recording is started */
|
|
87
|
+
CONTACT_RECORDING_STARTED: 'ContactRecordingStarted',
|
|
84
88
|
/** Event emitted when pausing contact recording fails */
|
|
85
89
|
CONTACT_RECORDING_PAUSE_FAILED: 'ContactRecordingPauseFailed',
|
|
86
90
|
/** Event emitted when contact recording is resumed */
|
|
@@ -91,6 +95,10 @@ export const CC_TASK_EVENTS = {
|
|
|
91
95
|
CONTACT_ENDED: 'ContactEnded',
|
|
92
96
|
/** Event emitted when contact is merged */
|
|
93
97
|
CONTACT_MERGED: 'ContactMerged',
|
|
98
|
+
/** Event emitted when contact payload is updated (routing updates) */
|
|
99
|
+
CONTACT_UPDATED: 'ContactUpdated',
|
|
100
|
+
/** Event emitted when contact owner changes */
|
|
101
|
+
CONTACT_OWNER_CHANGED: 'ContactOwnerChanged',
|
|
94
102
|
/** Event emitted when ending contact fails */
|
|
95
103
|
AGENT_CONTACT_END_FAILED: 'AgentContactEndFailed',
|
|
96
104
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -111,6 +119,26 @@ export const CC_TASK_EVENTS = {
|
|
|
111
119
|
AGENT_CONTACT_UNASSIGNED: 'AgentContactUnassigned',
|
|
112
120
|
/** Event emitted when inviting agent fails */
|
|
113
121
|
AGENT_INVITE_FAILED: 'AgentInviteFailed',
|
|
122
|
+
/** Event emitted when a campaign preview contact is offered to the agent */
|
|
123
|
+
AGENT_OFFER_CAMPAIGN_RESERVATION: 'AgentOfferCampaignReservation',
|
|
124
|
+
/** Event emitted when campaign contact is updated */
|
|
125
|
+
CAMPAIGN_CONTACT_UPDATED: 'CampaignContactUpdated',
|
|
126
|
+
/** Event emitted when accepting a campaign preview contact fails */
|
|
127
|
+
CAMPAIGN_PREVIEW_ACCEPT_FAILED: 'CampaignPreviewAcceptFailed',
|
|
128
|
+
/** Event emitted when skipping a campaign preview contact fails */
|
|
129
|
+
CAMPAIGN_PREVIEW_SKIP_FAILED: 'CampaignPreviewSkipFailed',
|
|
130
|
+
/** Event emitted when removing a campaign preview contact fails */
|
|
131
|
+
CAMPAIGN_PREVIEW_REMOVE_FAILED: 'CampaignPreviewRemoveFailed',
|
|
132
|
+
/** Event emitted when a real-time transcript chunk is received */
|
|
133
|
+
REAL_TIME_TRANSCRIPTION: 'REAL_TIME_TRANSCRIPTION',
|
|
134
|
+
/** Event emitted when an AI assistant suggested response is available */
|
|
135
|
+
SUGGESTED_RESPONSE: 'SUGGESTED_RESPONSE',
|
|
136
|
+
/** Event emitted when backend acknowledges it is listening for more context */
|
|
137
|
+
SUGGESTED_RESPONSE_ACKNOWLEDGE: 'SUGGESTED_RESPONSE_ACKNOWLEDGE',
|
|
138
|
+
/** Event emitted when a mid-call summary is available */
|
|
139
|
+
MID_CALL_SUMMARY: 'MID_CALL_SUMMARY',
|
|
140
|
+
/** Event emitted when a post-call summary is available */
|
|
141
|
+
POST_CALL_SUMMARY: 'POST_CALL_SUMMARY',
|
|
114
142
|
} as const;
|
|
115
143
|
|
|
116
144
|
/**
|
|
@@ -177,6 +205,15 @@ export type WelcomeEvent = {
|
|
|
177
205
|
agentId: string;
|
|
178
206
|
};
|
|
179
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Available login options for voice channel access
|
|
210
|
+
* 'AGENT_DN' - Login using agent's DN
|
|
211
|
+
* 'EXTENSION' - Login using extension number
|
|
212
|
+
* 'BROWSER' - Login using browser-based WebRTC
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
215
|
+
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';
|
|
216
|
+
|
|
180
217
|
/**
|
|
181
218
|
* Response type for welcome events which can be either success or error
|
|
182
219
|
* @public
|
|
@@ -267,14 +304,40 @@ export type AgentResponse = {
|
|
|
267
304
|
|
|
268
305
|
/**
|
|
269
306
|
* The default dialed number of the agent.
|
|
307
|
+
* Note: The API returns this field as "deafultDialledNumber" (with typo).
|
|
270
308
|
*/
|
|
271
|
-
|
|
309
|
+
deafultDialledNumber?: string;
|
|
272
310
|
};
|
|
273
311
|
|
|
274
312
|
/**
|
|
275
313
|
* Represents the response from getDesktopProfileById method.
|
|
276
314
|
*/
|
|
277
315
|
export type DesktopProfileResponse = {
|
|
316
|
+
/**
|
|
317
|
+
* Unique identifier of the agent profile configuration.
|
|
318
|
+
*/
|
|
319
|
+
id: string;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Display name for the agent profile.
|
|
323
|
+
*/
|
|
324
|
+
name: string;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Description of the agent profile.
|
|
328
|
+
*/
|
|
329
|
+
description: string;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Parent entity type for the profile (for example ORGANIZATION).
|
|
333
|
+
*/
|
|
334
|
+
parentType: string;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Indicates whether screen pop is enabled.
|
|
338
|
+
*/
|
|
339
|
+
screenPopup: boolean;
|
|
340
|
+
|
|
278
341
|
/**
|
|
279
342
|
* Represents the voice options of an agent.
|
|
280
343
|
*/
|
|
@@ -315,6 +378,11 @@ export type DesktopProfileResponse = {
|
|
|
315
378
|
*/
|
|
316
379
|
autoWrapUp: boolean;
|
|
317
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Whether the agent personal greeting is enabled.
|
|
383
|
+
*/
|
|
384
|
+
agentPersonalGreeting: boolean;
|
|
385
|
+
|
|
318
386
|
/**
|
|
319
387
|
* Auto answer allowed.
|
|
320
388
|
*/
|
|
@@ -335,6 +403,36 @@ export type DesktopProfileResponse = {
|
|
|
335
403
|
*/
|
|
336
404
|
allowAutoWrapUpExtension: boolean;
|
|
337
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Access control for queues assigned to the agent (ALL or SPECIFIC).
|
|
408
|
+
*/
|
|
409
|
+
accessQueue: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Queue identifiers available to the agent when access is SPECIFIC.
|
|
413
|
+
*/
|
|
414
|
+
queues: string[];
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Access control for entry points assigned to the agent.
|
|
418
|
+
*/
|
|
419
|
+
accessEntryPoint: string;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Entry point identifiers available to the agent when access is SPECIFIC.
|
|
423
|
+
*/
|
|
424
|
+
entryPoints: string[];
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Access control for buddy teams assigned to the agent.
|
|
428
|
+
*/
|
|
429
|
+
accessBuddyTeam: string;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Buddy team identifiers available to the agent when access is SPECIFIC.
|
|
433
|
+
*/
|
|
434
|
+
buddyTeams: string[];
|
|
435
|
+
|
|
338
436
|
/**
|
|
339
437
|
* Outdial enabled for the agent.
|
|
340
438
|
*/
|
|
@@ -378,6 +476,11 @@ export type DesktopProfileResponse = {
|
|
|
378
476
|
*/
|
|
379
477
|
agentDNValidation: string;
|
|
380
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Additional DN validation criteria configured for the agent.
|
|
481
|
+
*/
|
|
482
|
+
agentDNValidationCriterions: string[];
|
|
483
|
+
|
|
381
484
|
/**
|
|
382
485
|
* Dial plans of the agent.
|
|
383
486
|
*/
|
|
@@ -412,6 +515,31 @@ export type DesktopProfileResponse = {
|
|
|
412
515
|
* State synchronization in Webex enabled or not.
|
|
413
516
|
*/
|
|
414
517
|
stateSynchronizationWebex: boolean;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Threshold rules configured for the agent profile.
|
|
521
|
+
*/
|
|
522
|
+
thresholdRules: Array<Record<string, string | number>>;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Whether the agent profile is currently active.
|
|
526
|
+
*/
|
|
527
|
+
active: boolean;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Whether this profile is the system default.
|
|
531
|
+
*/
|
|
532
|
+
systemDefault: boolean;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Timestamp when the profile was created.
|
|
536
|
+
*/
|
|
537
|
+
createdTime: number;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Timestamp when the profile was last updated.
|
|
541
|
+
*/
|
|
542
|
+
lastUpdatedTime: number;
|
|
415
543
|
};
|
|
416
544
|
|
|
417
545
|
/**
|
|
@@ -580,6 +708,8 @@ export type OrgInfo = {
|
|
|
580
708
|
tenantId: string;
|
|
581
709
|
/** Organization timezone */
|
|
582
710
|
timezone: string;
|
|
711
|
+
/** Current environment (e.g., 'produs1', 'intgus1') */
|
|
712
|
+
environment: string;
|
|
583
713
|
};
|
|
584
714
|
|
|
585
715
|
/**
|
|
@@ -856,15 +986,6 @@ export type WrapupData = {
|
|
|
856
986
|
};
|
|
857
987
|
};
|
|
858
988
|
|
|
859
|
-
/**
|
|
860
|
-
* Available login options for voice channel access
|
|
861
|
-
* 'AGENT_DN' - Login using agent's DN
|
|
862
|
-
* 'EXTENSION' - Login using extension number
|
|
863
|
-
* 'BROWSER' - Login using browser-based WebRTC
|
|
864
|
-
* @public
|
|
865
|
-
*/
|
|
866
|
-
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';
|
|
867
|
-
|
|
868
989
|
/**
|
|
869
990
|
* Team configuration information
|
|
870
991
|
* @public
|
|
@@ -900,6 +1021,59 @@ export type URLMappings = {
|
|
|
900
1021
|
acqueonConsoleUrl: string;
|
|
901
1022
|
};
|
|
902
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* AI feature resource row returned by /v2/ai-feature API.
|
|
1026
|
+
* @public
|
|
1027
|
+
*/
|
|
1028
|
+
export type AIFeatureFlags = {
|
|
1029
|
+
id: string;
|
|
1030
|
+
realtimeTranscripts?: {
|
|
1031
|
+
enable?: boolean;
|
|
1032
|
+
agentInclusionType?: string;
|
|
1033
|
+
};
|
|
1034
|
+
suggestedResponses?: {
|
|
1035
|
+
enable?: boolean;
|
|
1036
|
+
};
|
|
1037
|
+
generatedSummaries?: {
|
|
1038
|
+
callDropSummariesEnabled?: boolean;
|
|
1039
|
+
virtualAgentTransferSummariesEnabled?: boolean;
|
|
1040
|
+
consultTransferSummariesEnabled?: boolean;
|
|
1041
|
+
wrapUpSummariesEnabled?: boolean;
|
|
1042
|
+
queuesInclusionType?: string;
|
|
1043
|
+
};
|
|
1044
|
+
agentWellbeing?: {
|
|
1045
|
+
enable?: boolean;
|
|
1046
|
+
agentInclusionType?: string;
|
|
1047
|
+
wellnessBreakReminders?: string;
|
|
1048
|
+
};
|
|
1049
|
+
autoCSAT?: {
|
|
1050
|
+
enable?: boolean;
|
|
1051
|
+
queuesInclusionType?: string;
|
|
1052
|
+
surveyDataSource?: string;
|
|
1053
|
+
};
|
|
1054
|
+
links?: string[];
|
|
1055
|
+
createdTime?: number;
|
|
1056
|
+
lastUpdatedTime?: number;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Response type for list AI feature resources API.
|
|
1061
|
+
* @public
|
|
1062
|
+
*/
|
|
1063
|
+
export type AIFeatureFlagsResponse = {
|
|
1064
|
+
meta?: {
|
|
1065
|
+
orgid?: string;
|
|
1066
|
+
page?: number;
|
|
1067
|
+
pageSize?: number;
|
|
1068
|
+
totalPages?: number;
|
|
1069
|
+
totalRecords?: number;
|
|
1070
|
+
links?: {
|
|
1071
|
+
self?: string;
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
data: AIFeatureFlags[];
|
|
1075
|
+
};
|
|
1076
|
+
|
|
903
1077
|
/**
|
|
904
1078
|
* Comprehensive agent profile configuration in the contact center system
|
|
905
1079
|
* Contains all settings and capabilities for an agent
|
|
@@ -984,7 +1158,7 @@ export type Profile = {
|
|
|
984
1158
|
/** Outbound entry point */
|
|
985
1159
|
outDialEp: string;
|
|
986
1160
|
/** Whether ending calls is enabled */
|
|
987
|
-
|
|
1161
|
+
isEndTaskEnabled: boolean;
|
|
988
1162
|
/** Whether ending consultations is enabled */
|
|
989
1163
|
isEndConsultEnabled: boolean;
|
|
990
1164
|
/** Optional lifecycle manager URL */
|
|
@@ -1031,6 +1205,8 @@ export type Profile = {
|
|
|
1031
1205
|
isAnalyzerEnabled?: boolean;
|
|
1032
1206
|
/** Tenant timezone */
|
|
1033
1207
|
tenantTimezone?: string;
|
|
1208
|
+
/** Current environment (e.g., 'produs1', 'intgus1') */
|
|
1209
|
+
environment?: string;
|
|
1034
1210
|
/** Available voice login options */
|
|
1035
1211
|
loginVoiceOptions?: LoginOption[];
|
|
1036
1212
|
/** Current login device type */
|
|
@@ -1055,6 +1231,8 @@ export type Profile = {
|
|
|
1055
1231
|
lastStateChangeTimestamp?: number;
|
|
1056
1232
|
/** Timestamp of last idle code change */
|
|
1057
1233
|
lastIdleCodeChangeTimestamp?: number;
|
|
1234
|
+
/** AI feature flags resolved from organization config */
|
|
1235
|
+
aiFeature?: AIFeatureFlags;
|
|
1058
1236
|
};
|
|
1059
1237
|
|
|
1060
1238
|
/**
|
|
@@ -1116,3 +1294,55 @@ export type OutdialAniParams = {
|
|
|
1116
1294
|
/** Comma-separated list of attributes to include in response (optional) */
|
|
1117
1295
|
attributes?: string;
|
|
1118
1296
|
};
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* User preference data structure
|
|
1300
|
+
* @public
|
|
1301
|
+
*/
|
|
1302
|
+
export type UserPreference = {
|
|
1303
|
+
/** Unique identifier for the user preference */
|
|
1304
|
+
id: string;
|
|
1305
|
+
/** Organization ID */
|
|
1306
|
+
organizationId: string;
|
|
1307
|
+
/** User ID (CI user ID) */
|
|
1308
|
+
userId: string;
|
|
1309
|
+
/** User preference data as key-value pairs */
|
|
1310
|
+
preferences: Record<string, unknown>;
|
|
1311
|
+
/** Timestamp when this preference was created (Unix timestamp in milliseconds) */
|
|
1312
|
+
createdTime?: number;
|
|
1313
|
+
/** Timestamp when this preference was last updated (Unix timestamp in milliseconds) */
|
|
1314
|
+
lastUpdatedTime?: number;
|
|
1315
|
+
};
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Request payload for creating user preferences
|
|
1319
|
+
* @public
|
|
1320
|
+
*/
|
|
1321
|
+
export type CreateUserPreferenceRequest = {
|
|
1322
|
+
/** User ID (CI user ID) */
|
|
1323
|
+
userId: string;
|
|
1324
|
+
/** Desktop preference data as a JSON string (required) */
|
|
1325
|
+
desktopPreference: string;
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Request payload for updating user preferences
|
|
1330
|
+
* @public
|
|
1331
|
+
*/
|
|
1332
|
+
export type UpdateUserPreferenceRequest = {
|
|
1333
|
+
/** Desktop preference data as a JSON string (required) */
|
|
1334
|
+
desktopPreference: string;
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Query parameters for fetching user preferences
|
|
1339
|
+
* @public
|
|
1340
|
+
*/
|
|
1341
|
+
export type GetUserPreferenceParams = {
|
|
1342
|
+
/** User ID to fetch preferences for. Defaults to current user's CI user ID. */
|
|
1343
|
+
userId?: string;
|
|
1344
|
+
/** Page number (0-indexed). Default: 0 */
|
|
1345
|
+
page?: number;
|
|
1346
|
+
/** Number of items per page. Default: 100 */
|
|
1347
|
+
pageSize?: number;
|
|
1348
|
+
};
|
|
@@ -59,6 +59,14 @@ export const AGENT = 'agent';
|
|
|
59
59
|
*/
|
|
60
60
|
export const SUBSCRIBE_API = 'v1/notification/subscribe';
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* API path for realtime transcription subscription.
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @public
|
|
66
|
+
* @ignore
|
|
67
|
+
*/
|
|
68
|
+
export const RTD_SUBSCRIBE_API = 'v1/realtime/subscribe';
|
|
69
|
+
|
|
62
70
|
/**
|
|
63
71
|
* API path for agent login.
|
|
64
72
|
* @type {string}
|
|
@@ -109,3 +117,24 @@ export const METHODS = {
|
|
|
109
117
|
MAP_CALL_TO_TASK: 'mapCallToTask',
|
|
110
118
|
GET_TASK_ID_FOR_CALL: 'getTaskIdForCall',
|
|
111
119
|
};
|
|
120
|
+
|
|
121
|
+
export const AI_ASSISTANT_API_URLS = {
|
|
122
|
+
EVENT: '/event',
|
|
123
|
+
TRANSCRIPTS_LIST: '/transcripts/list',
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const AI_ASSISTANT_BASE_URL_TEMPLATE = 'https://api-ai-assistant.%s.ciscoccservice.com';
|
|
127
|
+
|
|
128
|
+
export const AI_ASSISTANT_ENV_MAP: Record<string, string> = {
|
|
129
|
+
'api.intgus1.ciscoccservice.com': 'intgus1',
|
|
130
|
+
'api.qaus1.ciscoccservice.com': 'qaus1',
|
|
131
|
+
'api.wxcc-us1.cisco.com': 'produs1',
|
|
132
|
+
'api.wxcc-eu1.cisco.com': 'prodeu1',
|
|
133
|
+
'api.wxcc-eu2.cisco.com': 'prodeu2',
|
|
134
|
+
'api.wxcc-anz1.cisco.com': 'prodanz1',
|
|
135
|
+
'api.wxcc-ca1.cisco.com': 'prodca1',
|
|
136
|
+
'api.wxcc-jp1.cisco.com': 'prodjp1',
|
|
137
|
+
'api.wxcc-sg1.cisco.com': 'prodsg1',
|
|
138
|
+
'api.wxcc-in1.cisco.com': 'prodin1',
|
|
139
|
+
'api.loadus1.cisco.com': 'loadus1',
|
|
140
|
+
};
|
package/src/services/core/Err.ts
CHANGED
|
@@ -38,6 +38,9 @@ export type TaskErrorIds =
|
|
|
38
38
|
| {'Service.aqm.task.pauseRecording': Failure}
|
|
39
39
|
| {'Service.aqm.task.resumeRecording': Failure}
|
|
40
40
|
| {'Service.aqm.dialer.startOutdial': Failure}
|
|
41
|
+
| {'Service.aqm.dialer.acceptPreviewContact': Failure}
|
|
42
|
+
| {'Service.aqm.dialer.skipPreviewContact': Failure}
|
|
43
|
+
| {'Service.aqm.dialer.removePreviewContact': Failure}
|
|
41
44
|
| {'Service.reqs.generic.failure': {trackingId: string}};
|
|
42
45
|
|
|
43
46
|
export type ReqError =
|