@webex/contact-center 3.12.0-next.8 → 3.12.0-next.81
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/AGENTS.md +438 -0
- package/ai-docs/README.md +131 -0
- package/ai-docs/RULES.md +455 -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 +265 -29
- package/dist/cc.js.map +1 -1
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +16 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/dist/metrics/behavioral-events.js +101 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +23 -4
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/ApiAiAssistant.js +74 -3
- package/dist/services/ApiAiAssistant.js.map +1 -1
- package/dist/services/UserPreference.js +427 -0
- package/dist/services/UserPreference.js.map +1 -0
- package/dist/services/config/Util.js +3 -3
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +23 -2
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/types.js +49 -9
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +107 -32
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +2 -1
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +1 -1
- 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 +725 -526
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +162 -26
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +9 -2
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/dialer.js +78 -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 +837 -0
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
- package/dist/services/task/state-machine/actions.js +543 -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 +340 -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 +553 -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 +212 -4
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +1042 -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 +94 -1
- package/dist/types/config.d.ts +6 -0
- package/dist/types/constants.d.ts +16 -1
- package/dist/types/index.d.ts +21 -6
- package/dist/types/metrics/constants.d.ts +19 -1
- package/dist/types/services/ApiAiAssistant.d.ts +11 -3
- package/dist/types/services/UserPreference.d.ts +118 -0
- package/dist/types/services/config/constants.d.ts +21 -0
- package/dist/types/services/config/types.d.ts +171 -10
- package/dist/types/services/core/Err.d.ts +4 -0
- package/dist/types/services/core/Utils.d.ts +33 -13
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +1 -0
- package/dist/types/services/core/websocket/types.d.ts +1 -1
- package/dist/types/services/index.d.ts +1 -1
- 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/TaskUtils.d.ts +46 -2
- package/dist/types/services/task/constants.d.ts +7 -0
- package/dist/types/services/task/dialer.d.ts +30 -0
- package/dist/types/services/task/digital/Digital.d.ts +22 -0
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1144 -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 +90 -0
- package/dist/types/services/task/state-machine/index.d.ts +13 -0
- package/dist/types/services/task/state-machine/types.d.ts +267 -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 +603 -66
- 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 +94 -0
- package/dist/types/webex.d.ts +1 -0
- package/dist/types.js +85 -0
- package/dist/types.js.map +1 -1
- package/dist/webex.js +14 -2
- package/dist/webex.js.map +1 -1
- package/package.json +15 -12
- package/src/cc.ts +329 -30
- package/src/config.ts +6 -0
- package/src/constants.ts +16 -1
- package/src/index.ts +23 -5
- package/src/metrics/ai-docs/AGENTS.md +348 -0
- package/src/metrics/ai-docs/ARCHITECTURE.md +336 -0
- package/src/metrics/behavioral-events.ts +106 -0
- package/src/metrics/constants.ts +23 -4
- package/src/services/ApiAiAssistant.ts +104 -3
- package/src/services/UserPreference.ts +509 -0
- package/src/services/agent/ai-docs/AGENTS.md +238 -0
- package/src/services/agent/ai-docs/ARCHITECTURE.md +302 -0
- package/src/services/ai-docs/AGENTS.md +384 -0
- package/src/services/config/Util.ts +3 -3
- package/src/services/config/ai-docs/AGENTS.md +253 -0
- package/src/services/config/ai-docs/ARCHITECTURE.md +424 -0
- package/src/services/config/constants.ts +25 -1
- package/src/services/config/types.ts +174 -11
- package/src/services/core/Err.ts +2 -0
- package/src/services/core/Utils.ts +123 -37
- package/src/services/core/ai-docs/AGENTS.md +379 -0
- package/src/services/core/ai-docs/ARCHITECTURE.md +696 -0
- package/src/services/core/websocket/WebSocketManager.ts +2 -0
- package/src/services/core/websocket/types.ts +1 -1
- package/src/services/index.ts +1 -1
- package/src/services/task/Task.ts +837 -0
- package/src/services/task/TaskFactory.ts +55 -0
- package/src/services/task/TaskManager.ts +738 -613
- package/src/services/task/TaskUtils.ts +205 -25
- package/src/services/task/ai-docs/AGENTS.md +455 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +585 -0
- package/src/services/task/constants.ts +7 -0
- package/src/services/task/dialer.ts +80 -0
- package/src/services/task/digital/Digital.ts +95 -0
- package/src/services/task/state-machine/TaskStateMachine.ts +1077 -0
- package/src/services/task/state-machine/actions.ts +685 -0
- package/src/services/task/state-machine/ai-docs/AGENTS.md +495 -0
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1135 -0
- package/src/services/task/state-machine/constants.ts +172 -0
- package/src/services/task/state-machine/guards.ts +406 -0
- package/src/services/task/state-machine/index.ts +28 -0
- package/src/services/task/state-machine/types.ts +241 -0
- package/src/services/task/state-machine/uiControlsComputer.ts +867 -0
- package/src/services/task/taskDataNormalizer.ts +137 -0
- package/src/services/task/types.ts +710 -71
- package/src/services/task/voice/Voice.ts +1267 -0
- package/src/services/task/voice/WebRTC.ts +187 -0
- package/src/types.ts +122 -2
- package/src/utils/AGENTS.md +276 -0
- package/src/webex.js +2 -0
- package/test/unit/spec/cc.ts +343 -23
- package/test/unit/spec/logger-proxy.ts +70 -0
- package/test/unit/spec/services/ApiAiAssistant.ts +122 -17
- 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 +30 -30
- package/test/unit/spec/services/core/Utils.ts +425 -8
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +66 -40
- 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 +832 -1702
- package/test/unit/spec/services/task/TaskUtils.ts +206 -0
- package/test/unit/spec/services/task/dialer.ts +190 -0
- package/test/unit/spec/services/task/digital/Digital.ts +105 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +1825 -0
- package/test/unit/spec/services/task/state-machine/guards.ts +479 -0
- package/test/unit/spec/services/task/state-machine/types.ts +18 -0
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +2020 -0
- package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
- package/test/unit/spec/services/task/voice/Voice.ts +631 -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/dist/types/services/task/index.d.ts +0 -650
- package/src/services/task/index.ts +0 -1801
- package/test/unit/spec/services/task/index.ts +0 -2184
|
@@ -122,15 +122,19 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
122
122
|
readonly TASK_CONFERENCE_END_FAILED: "Task Conference End Failed";
|
|
123
123
|
readonly TASK_CONFERENCE_TRANSFER_SUCCESS: "Task Conference Transfer Success";
|
|
124
124
|
readonly TASK_CONFERENCE_TRANSFER_FAILED: "Task Conference Transfer Failed";
|
|
125
|
+
readonly TASK_CONFERENCE_EXIT_SUCCESS: "Task Conference Exit Success";
|
|
126
|
+
readonly TASK_CONFERENCE_EXIT_FAILED: "Task Conference Exit Failed";
|
|
127
|
+
readonly TASK_SWITCH_CALL_SUCCESS: "Task Switch Call Success";
|
|
128
|
+
readonly TASK_SWITCH_CALL_FAILED: "Task Switch Call Failed";
|
|
125
129
|
readonly TASK_OUTDIAL_SUCCESS: "Task Outdial Success";
|
|
126
130
|
readonly TASK_OUTDIAL_FAILED: "Task Outdial Failed";
|
|
127
131
|
readonly UPLOAD_LOGS_SUCCESS: "Upload Logs Success";
|
|
128
132
|
readonly UPLOAD_LOGS_FAILED: "Upload Logs Failed";
|
|
129
133
|
readonly WEBSOCKET_DEREGISTER_SUCCESS: "Websocket Deregister Success";
|
|
130
134
|
readonly WEBSOCKET_DEREGISTER_FAIL: "Websocket Deregister Failed";
|
|
131
|
-
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
132
135
|
readonly AGENT_DEVICE_TYPE_UPDATE_SUCCESS: "Agent Device Type Update Success";
|
|
133
136
|
readonly AGENT_DEVICE_TYPE_UPDATE_FAILED: "Agent Device Type Update Failed";
|
|
137
|
+
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
134
138
|
readonly ENTRYPOINT_FETCH_SUCCESS: "Entrypoint Fetch Success";
|
|
135
139
|
readonly ENTRYPOINT_FETCH_FAILED: "Entrypoint Fetch Failed";
|
|
136
140
|
readonly ADDRESSBOOK_FETCH_SUCCESS: "AddressBook Fetch Success";
|
|
@@ -141,10 +145,24 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
141
145
|
readonly OUTDIAL_ANI_EP_FETCH_FAILED: "Outdial ANI Entries Fetch Failed";
|
|
142
146
|
readonly CAMPAIGN_PREVIEW_ACCEPT_SUCCESS: "Campaign Preview Accept Success";
|
|
143
147
|
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "Campaign Preview Accept Failed";
|
|
148
|
+
readonly CAMPAIGN_PREVIEW_SKIP_SUCCESS: "Campaign Preview Skip Success";
|
|
149
|
+
readonly CAMPAIGN_PREVIEW_SKIP_FAILED: "Campaign Preview Skip Failed";
|
|
150
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_SUCCESS: "Campaign Preview Remove Success";
|
|
151
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_FAILED: "Campaign Preview Remove Failed";
|
|
144
152
|
readonly AI_ASSISTANT_SEND_EVENT_SUCCESS: "AI Assistant Send Event Success";
|
|
145
153
|
readonly AI_ASSISTANT_SEND_EVENT_FAILED: "AI Assistant Send Event Failed";
|
|
154
|
+
readonly AI_ASSISTANT_GET_SUGGESTED_RESPONSE_SUCCESS: "AI Assistant Get Suggested Response Success";
|
|
155
|
+
readonly AI_ASSISTANT_GET_SUGGESTED_RESPONSE_FAILED: "AI Assistant Get Suggested Response Failed";
|
|
146
156
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_SUCCESS: "AI Assistant Fetch Historic Transcripts Success";
|
|
147
157
|
readonly AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_FAILED: "AI Assistant Fetch Historic Transcripts Failed";
|
|
158
|
+
readonly USER_PREFERENCE_GET_SUCCESS: "User Preference Get Success";
|
|
159
|
+
readonly USER_PREFERENCE_GET_FAILED: "User Preference Get Failed";
|
|
160
|
+
readonly USER_PREFERENCE_CREATE_SUCCESS: "User Preference Create Success";
|
|
161
|
+
readonly USER_PREFERENCE_CREATE_FAILED: "User Preference Create Failed";
|
|
162
|
+
readonly USER_PREFERENCE_UPDATE_SUCCESS: "User Preference Update Success";
|
|
163
|
+
readonly USER_PREFERENCE_UPDATE_FAILED: "User Preference Update Failed";
|
|
164
|
+
readonly USER_PREFERENCE_DELETE_SUCCESS: "User Preference Delete Success";
|
|
165
|
+
readonly USER_PREFERENCE_DELETE_FAILED: "User Preference Delete Failed";
|
|
148
166
|
};
|
|
149
167
|
/**
|
|
150
168
|
* Represents the possible metric event names used within the metrics system.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WebexSDK, TranscriptAction, AIAssistantEventType, AIAssistantEventName, HistoricTranscriptsResponse } from '../types';
|
|
1
|
+
import { WebexSDK, TranscriptAction, AIAssistantEventType, AIAssistantEventName, HistoricTranscriptsResponse, SuggestedResponseParams } from '../types';
|
|
2
2
|
import { AIFeatureFlags } from './config/types';
|
|
3
3
|
/**
|
|
4
4
|
* ApiAIAssistant provides AI Assistant APIs for transcript controls.
|
|
@@ -7,7 +7,7 @@ import { AIFeatureFlags } from './config/types';
|
|
|
7
7
|
export declare class ApiAIAssistant {
|
|
8
8
|
private webex;
|
|
9
9
|
private metricsManager;
|
|
10
|
-
aiFeature
|
|
10
|
+
private aiFeature;
|
|
11
11
|
constructor(webex: WebexSDK);
|
|
12
12
|
setAIFeatureFlags(aiFeature: AIFeatureFlags): void;
|
|
13
13
|
private getBaseUrl;
|
|
@@ -19,7 +19,15 @@ export declare class ApiAIAssistant {
|
|
|
19
19
|
* @param eventName - the name of the event (e.g. 'GET_TRANSCRIPTS')
|
|
20
20
|
* @param action - action within eventDetails (e.g. 'START' or 'STOP')
|
|
21
21
|
*/
|
|
22
|
-
sendEvent(agentId: string, interactionId: string, eventType: AIAssistantEventType, eventName: AIAssistantEventName, action
|
|
22
|
+
sendEvent(agentId: string, interactionId: string, eventType: AIAssistantEventType, eventName: AIAssistantEventName, action?: TranscriptAction, context?: string, languageCode?: string, trackingId?: string): Promise<Record<string, unknown>>;
|
|
23
|
+
/**
|
|
24
|
+
* Requests a suggested response for an interaction.
|
|
25
|
+
*
|
|
26
|
+
* @param params - Suggestion request parameters
|
|
27
|
+
* @returns HTTP response body from the AI Assistant event API
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
getSuggestedResponse(params: SuggestedResponseParams): Promise<any>;
|
|
23
31
|
/**
|
|
24
32
|
* Fetches historic transcripts for an interaction.
|
|
25
33
|
* This API is allowed only when real-time transcription feature is enabled.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { UserPreference as UserPreferenceResponse, CreateUserPreferenceRequest, UpdateUserPreferenceRequest, GetUserPreferenceParams } from './config/types';
|
|
3
|
+
/**
|
|
4
|
+
* UserPreference API class for managing Webex Contact Center user preferences.
|
|
5
|
+
* Provides functionality to get, create, update, and delete user preferences.
|
|
6
|
+
*
|
|
7
|
+
* @class UserPreference
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get UserPreference API instance from ContactCenter
|
|
21
|
+
* const userPreferenceAPI = cc.userPreference;
|
|
22
|
+
*
|
|
23
|
+
* // Get user preferences for the current user
|
|
24
|
+
* const preferences = await userPreferenceAPI.getUserPreference();
|
|
25
|
+
*
|
|
26
|
+
* // Create new user preferences
|
|
27
|
+
* const newPreferences = await userPreferenceAPI.createUserPreference({
|
|
28
|
+
* userId: 'user123',
|
|
29
|
+
* preferences: { e911Reminder: true }
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // Update user preferences
|
|
33
|
+
* const updatedPreferences = await userPreferenceAPI.updateUserPreference('user123', {
|
|
34
|
+
* preferences: { e911Reminder: false }
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* // Delete user preferences
|
|
38
|
+
* await userPreferenceAPI.deleteUserPreference('user123');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class UserPreference {
|
|
42
|
+
private webexRequest;
|
|
43
|
+
private webex;
|
|
44
|
+
private getUserId;
|
|
45
|
+
private metricsManager;
|
|
46
|
+
/**
|
|
47
|
+
* Creates an instance of UserPreference
|
|
48
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
49
|
+
* @param {() => string} getUserId - Function to get the current user's CI user ID
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
constructor(webex: WebexSDK, getUserId: () => string);
|
|
53
|
+
/**
|
|
54
|
+
* Fetches user preferences for a specific user
|
|
55
|
+
* @param {GetUserPreferenceParams} [params] - Optional parameters for fetching preferences
|
|
56
|
+
* @param {string} [params.userId] - User ID to fetch preferences for. Defaults to current user's CI user ID.
|
|
57
|
+
* @param {number} [params.page=0] - Page number (0-indexed). Default: 0
|
|
58
|
+
* @param {number} [params.pageSize=100] - Number of items per page. Default: 100
|
|
59
|
+
* @returns {Promise<UserPreferenceResponse>} Promise resolving to user preferences
|
|
60
|
+
* @throws {Error} If the API call fails
|
|
61
|
+
* @public
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* // Get preferences for current user
|
|
65
|
+
* const preferences = await userPreferenceAPI.getUserPreference();
|
|
66
|
+
*
|
|
67
|
+
* // Get preferences for a specific user
|
|
68
|
+
* const preferences = await userPreferenceAPI.getUserPreference({ userId: 'user123' });
|
|
69
|
+
*
|
|
70
|
+
* // Get preferences with pagination
|
|
71
|
+
* const preferences = await userPreferenceAPI.getUserPreference({ page: 0, pageSize: 50 });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getUserPreference(params?: GetUserPreferenceParams): Promise<UserPreferenceResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Creates new user preferences
|
|
77
|
+
* @param {CreateUserPreferenceRequest} data - The user preference data to create
|
|
78
|
+
* @returns {Promise<UserPreference>} Promise resolving to created user preferences
|
|
79
|
+
* @throws {Error} If the API call fails
|
|
80
|
+
* @public
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const newPreferences = await userPreferenceAPI.createUserPreference({
|
|
84
|
+
* userId: 'user123',
|
|
85
|
+
* preferences: { e911Reminder: true, notificationSettings: { email: true } }
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
createUserPreference(data: CreateUserPreferenceRequest): Promise<UserPreferenceResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Updates existing user preferences
|
|
92
|
+
* @param {string} userId - User ID to update preferences for
|
|
93
|
+
* @param {UpdateUserPreferenceRequest} data - The user preference data to update
|
|
94
|
+
* @returns {Promise<UserPreference>} Promise resolving to updated user preferences
|
|
95
|
+
* @throws {Error} If the API call fails
|
|
96
|
+
* @public
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const updatedPreferences = await userPreferenceAPI.updateUserPreference('user123', {
|
|
100
|
+
* preferences: { e911Reminder: false }
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
updateUserPreference(userId: string, data: UpdateUserPreferenceRequest): Promise<UserPreferenceResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* Deletes user preferences for a specific user
|
|
107
|
+
* @param {string} userId - User ID to delete preferences for
|
|
108
|
+
* @returns {Promise<void>} Promise resolving when deletion is complete
|
|
109
|
+
* @throws {Error} If the API call fails
|
|
110
|
+
* @public
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* await userPreferenceAPI.deleteUserPreference('user123');
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
deleteUserPreference(userId: string): Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
export default UserPreference;
|
|
@@ -246,4 +246,25 @@ export declare const endPointMap: {
|
|
|
246
246
|
* @ignore
|
|
247
247
|
*/
|
|
248
248
|
outdialAniEntries: (orgId: string, outdialANI: string, queryParams: string) => string;
|
|
249
|
+
/**
|
|
250
|
+
* Gets the endpoint for user preference by user ID.
|
|
251
|
+
* @param orgId - Organization ID.
|
|
252
|
+
* @param userId - User ID.
|
|
253
|
+
* @returns The endpoint URL string.
|
|
254
|
+
* @public
|
|
255
|
+
* @example
|
|
256
|
+
* const url = endPointMap.userPreference('org123', 'user456');
|
|
257
|
+
* @ignore
|
|
258
|
+
*/
|
|
259
|
+
userPreference: (orgId: string, userId: string) => string;
|
|
260
|
+
/**
|
|
261
|
+
* Gets the endpoint for creating user preference.
|
|
262
|
+
* @param orgId - Organization ID.
|
|
263
|
+
* @returns The endpoint URL string.
|
|
264
|
+
* @public
|
|
265
|
+
* @example
|
|
266
|
+
* const url = endPointMap.userPreferenceCreate('org123');
|
|
267
|
+
* @ignore
|
|
268
|
+
*/
|
|
269
|
+
userPreferenceCreate: (orgId: string) => string;
|
|
249
270
|
};
|
|
@@ -58,6 +58,8 @@ export declare const CC_TASK_EVENTS: {
|
|
|
58
58
|
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
59
59
|
/** Event emitted for post-call activity by participant */
|
|
60
60
|
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
61
|
+
/** Event emitted when consulted participant is being moved/transferred */
|
|
62
|
+
readonly CONSULTED_PARTICIPANT_MOVING: "ConsultedParticipantMoving";
|
|
61
63
|
/** Event emitted when contact is blind transferred */
|
|
62
64
|
readonly AGENT_BLIND_TRANSFERRED: "AgentBlindTransferred";
|
|
63
65
|
/** Event emitted when blind transfer fails */
|
|
@@ -74,6 +76,8 @@ export declare const CC_TASK_EVENTS: {
|
|
|
74
76
|
readonly AGENT_CONSULT_TRANSFER_FAILED: "AgentConsultTransferFailed";
|
|
75
77
|
/** Event emitted when contact recording is paused */
|
|
76
78
|
readonly CONTACT_RECORDING_PAUSED: "ContactRecordingPaused";
|
|
79
|
+
/** Event emitted when contact recording is started */
|
|
80
|
+
readonly CONTACT_RECORDING_STARTED: "ContactRecordingStarted";
|
|
77
81
|
/** Event emitted when pausing contact recording fails */
|
|
78
82
|
readonly CONTACT_RECORDING_PAUSE_FAILED: "ContactRecordingPauseFailed";
|
|
79
83
|
/** Event emitted when contact recording is resumed */
|
|
@@ -84,6 +88,10 @@ export declare const CC_TASK_EVENTS: {
|
|
|
84
88
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
85
89
|
/** Event emitted when contact is merged */
|
|
86
90
|
readonly CONTACT_MERGED: "ContactMerged";
|
|
91
|
+
/** Event emitted when contact payload is updated (routing updates) */
|
|
92
|
+
readonly CONTACT_UPDATED: "ContactUpdated";
|
|
93
|
+
/** Event emitted when contact owner changes */
|
|
94
|
+
readonly CONTACT_OWNER_CHANGED: "ContactOwnerChanged";
|
|
87
95
|
/** Event emitted when ending contact fails */
|
|
88
96
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
89
97
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -110,8 +118,20 @@ export declare const CC_TASK_EVENTS: {
|
|
|
110
118
|
readonly CAMPAIGN_CONTACT_UPDATED: "CampaignContactUpdated";
|
|
111
119
|
/** Event emitted when accepting a campaign preview contact fails */
|
|
112
120
|
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "CampaignPreviewAcceptFailed";
|
|
121
|
+
/** Event emitted when skipping a campaign preview contact fails */
|
|
122
|
+
readonly CAMPAIGN_PREVIEW_SKIP_FAILED: "CampaignPreviewSkipFailed";
|
|
123
|
+
/** Event emitted when removing a campaign preview contact fails */
|
|
124
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_FAILED: "CampaignPreviewRemoveFailed";
|
|
113
125
|
/** Event emitted when a real-time transcript chunk is received */
|
|
114
126
|
readonly REAL_TIME_TRANSCRIPTION: "REAL_TIME_TRANSCRIPTION";
|
|
127
|
+
/** Event emitted when an AI assistant suggested response is available */
|
|
128
|
+
readonly SUGGESTED_RESPONSE: "SUGGESTED_RESPONSE";
|
|
129
|
+
/** Event emitted when backend acknowledges it is listening for more context */
|
|
130
|
+
readonly SUGGESTED_RESPONSE_ACKNOWLEDGE: "SUGGESTED_RESPONSE_ACKNOWLEDGE";
|
|
131
|
+
/** Event emitted when a mid-call summary is available */
|
|
132
|
+
readonly MID_CALL_SUMMARY: "MID_CALL_SUMMARY";
|
|
133
|
+
/** Event emitted when a post-call summary is available */
|
|
134
|
+
readonly POST_CALL_SUMMARY: "POST_CALL_SUMMARY";
|
|
115
135
|
};
|
|
116
136
|
/**
|
|
117
137
|
* Events emitted on Contact Center agent operations
|
|
@@ -215,6 +235,8 @@ export declare const CC_EVENTS: {
|
|
|
215
235
|
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
216
236
|
/** Event emitted for post-call activity by participant */
|
|
217
237
|
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
238
|
+
/** Event emitted when consulted participant is being moved/transferred */
|
|
239
|
+
readonly CONSULTED_PARTICIPANT_MOVING: "ConsultedParticipantMoving";
|
|
218
240
|
/** Event emitted when contact is blind transferred */
|
|
219
241
|
readonly AGENT_BLIND_TRANSFERRED: "AgentBlindTransferred";
|
|
220
242
|
/** Event emitted when blind transfer fails */
|
|
@@ -231,6 +253,8 @@ export declare const CC_EVENTS: {
|
|
|
231
253
|
readonly AGENT_CONSULT_TRANSFER_FAILED: "AgentConsultTransferFailed";
|
|
232
254
|
/** Event emitted when contact recording is paused */
|
|
233
255
|
readonly CONTACT_RECORDING_PAUSED: "ContactRecordingPaused";
|
|
256
|
+
/** Event emitted when contact recording is started */
|
|
257
|
+
readonly CONTACT_RECORDING_STARTED: "ContactRecordingStarted";
|
|
234
258
|
/** Event emitted when pausing contact recording fails */
|
|
235
259
|
readonly CONTACT_RECORDING_PAUSE_FAILED: "ContactRecordingPauseFailed";
|
|
236
260
|
/** Event emitted when contact recording is resumed */
|
|
@@ -241,6 +265,10 @@ export declare const CC_EVENTS: {
|
|
|
241
265
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
242
266
|
/** Event emitted when contact is merged */
|
|
243
267
|
readonly CONTACT_MERGED: "ContactMerged";
|
|
268
|
+
/** Event emitted when contact payload is updated (routing updates) */
|
|
269
|
+
readonly CONTACT_UPDATED: "ContactUpdated";
|
|
270
|
+
/** Event emitted when contact owner changes */
|
|
271
|
+
readonly CONTACT_OWNER_CHANGED: "ContactOwnerChanged";
|
|
244
272
|
/** Event emitted when ending contact fails */
|
|
245
273
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
246
274
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -267,8 +295,20 @@ export declare const CC_EVENTS: {
|
|
|
267
295
|
readonly CAMPAIGN_CONTACT_UPDATED: "CampaignContactUpdated";
|
|
268
296
|
/** Event emitted when accepting a campaign preview contact fails */
|
|
269
297
|
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "CampaignPreviewAcceptFailed";
|
|
298
|
+
/** Event emitted when skipping a campaign preview contact fails */
|
|
299
|
+
readonly CAMPAIGN_PREVIEW_SKIP_FAILED: "CampaignPreviewSkipFailed";
|
|
300
|
+
/** Event emitted when removing a campaign preview contact fails */
|
|
301
|
+
readonly CAMPAIGN_PREVIEW_REMOVE_FAILED: "CampaignPreviewRemoveFailed";
|
|
270
302
|
/** Event emitted when a real-time transcript chunk is received */
|
|
271
303
|
readonly REAL_TIME_TRANSCRIPTION: "REAL_TIME_TRANSCRIPTION";
|
|
304
|
+
/** Event emitted when an AI assistant suggested response is available */
|
|
305
|
+
readonly SUGGESTED_RESPONSE: "SUGGESTED_RESPONSE";
|
|
306
|
+
/** Event emitted when backend acknowledges it is listening for more context */
|
|
307
|
+
readonly SUGGESTED_RESPONSE_ACKNOWLEDGE: "SUGGESTED_RESPONSE_ACKNOWLEDGE";
|
|
308
|
+
/** Event emitted when a mid-call summary is available */
|
|
309
|
+
readonly MID_CALL_SUMMARY: "MID_CALL_SUMMARY";
|
|
310
|
+
/** Event emitted when a post-call summary is available */
|
|
311
|
+
readonly POST_CALL_SUMMARY: "POST_CALL_SUMMARY";
|
|
272
312
|
/** Welcome event when agent connects to websocket/backend */
|
|
273
313
|
readonly WELCOME: "Welcome";
|
|
274
314
|
/** Event emitted when agent re-login is successful */
|
|
@@ -314,6 +354,14 @@ export type WelcomeEvent = {
|
|
|
314
354
|
/** ID of the agent that connected */
|
|
315
355
|
agentId: string;
|
|
316
356
|
};
|
|
357
|
+
/**
|
|
358
|
+
* Available login options for voice channel access
|
|
359
|
+
* 'AGENT_DN' - Login using agent's DN
|
|
360
|
+
* 'EXTENSION' - Login using extension number
|
|
361
|
+
* 'BROWSER' - Login using browser-based WebRTC
|
|
362
|
+
* @public
|
|
363
|
+
*/
|
|
364
|
+
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';
|
|
317
365
|
/**
|
|
318
366
|
* Response type for welcome events which can be either success or error
|
|
319
367
|
* @public
|
|
@@ -384,13 +432,34 @@ export type AgentResponse = {
|
|
|
384
432
|
dbId?: string;
|
|
385
433
|
/**
|
|
386
434
|
* The default dialed number of the agent.
|
|
435
|
+
* Note: The API returns this field as "deafultDialledNumber" (with typo).
|
|
387
436
|
*/
|
|
388
|
-
|
|
437
|
+
deafultDialledNumber?: string;
|
|
389
438
|
};
|
|
390
439
|
/**
|
|
391
440
|
* Represents the response from getDesktopProfileById method.
|
|
392
441
|
*/
|
|
393
442
|
export type DesktopProfileResponse = {
|
|
443
|
+
/**
|
|
444
|
+
* Unique identifier of the agent profile configuration.
|
|
445
|
+
*/
|
|
446
|
+
id: string;
|
|
447
|
+
/**
|
|
448
|
+
* Display name for the agent profile.
|
|
449
|
+
*/
|
|
450
|
+
name: string;
|
|
451
|
+
/**
|
|
452
|
+
* Description of the agent profile.
|
|
453
|
+
*/
|
|
454
|
+
description: string;
|
|
455
|
+
/**
|
|
456
|
+
* Parent entity type for the profile (for example ORGANIZATION).
|
|
457
|
+
*/
|
|
458
|
+
parentType: string;
|
|
459
|
+
/**
|
|
460
|
+
* Indicates whether screen pop is enabled.
|
|
461
|
+
*/
|
|
462
|
+
screenPopup: boolean;
|
|
394
463
|
/**
|
|
395
464
|
* Represents the voice options of an agent.
|
|
396
465
|
*/
|
|
@@ -423,6 +492,10 @@ export type DesktopProfileResponse = {
|
|
|
423
492
|
* Auto wrap-up allowed.
|
|
424
493
|
*/
|
|
425
494
|
autoWrapUp: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Whether the agent personal greeting is enabled.
|
|
497
|
+
*/
|
|
498
|
+
agentPersonalGreeting: boolean;
|
|
426
499
|
/**
|
|
427
500
|
* Auto answer allowed.
|
|
428
501
|
*/
|
|
@@ -439,6 +512,30 @@ export type DesktopProfileResponse = {
|
|
|
439
512
|
* Allow auto wrap-up extension.
|
|
440
513
|
*/
|
|
441
514
|
allowAutoWrapUpExtension: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Access control for queues assigned to the agent (ALL or SPECIFIC).
|
|
517
|
+
*/
|
|
518
|
+
accessQueue: string;
|
|
519
|
+
/**
|
|
520
|
+
* Queue identifiers available to the agent when access is SPECIFIC.
|
|
521
|
+
*/
|
|
522
|
+
queues: string[];
|
|
523
|
+
/**
|
|
524
|
+
* Access control for entry points assigned to the agent.
|
|
525
|
+
*/
|
|
526
|
+
accessEntryPoint: string;
|
|
527
|
+
/**
|
|
528
|
+
* Entry point identifiers available to the agent when access is SPECIFIC.
|
|
529
|
+
*/
|
|
530
|
+
entryPoints: string[];
|
|
531
|
+
/**
|
|
532
|
+
* Access control for buddy teams assigned to the agent.
|
|
533
|
+
*/
|
|
534
|
+
accessBuddyTeam: string;
|
|
535
|
+
/**
|
|
536
|
+
* Buddy team identifiers available to the agent when access is SPECIFIC.
|
|
537
|
+
*/
|
|
538
|
+
buddyTeams: string[];
|
|
442
539
|
/**
|
|
443
540
|
* Outdial enabled for the agent.
|
|
444
541
|
*/
|
|
@@ -475,6 +572,10 @@ export type DesktopProfileResponse = {
|
|
|
475
572
|
* Agent DN validation of the agent.
|
|
476
573
|
*/
|
|
477
574
|
agentDNValidation: string;
|
|
575
|
+
/**
|
|
576
|
+
* Additional DN validation criteria configured for the agent.
|
|
577
|
+
*/
|
|
578
|
+
agentDNValidationCriterions: string[];
|
|
478
579
|
/**
|
|
479
580
|
* Dial plans of the agent.
|
|
480
581
|
*/
|
|
@@ -503,6 +604,26 @@ export type DesktopProfileResponse = {
|
|
|
503
604
|
* State synchronization in Webex enabled or not.
|
|
504
605
|
*/
|
|
505
606
|
stateSynchronizationWebex: boolean;
|
|
607
|
+
/**
|
|
608
|
+
* Threshold rules configured for the agent profile.
|
|
609
|
+
*/
|
|
610
|
+
thresholdRules: Array<Record<string, string | number>>;
|
|
611
|
+
/**
|
|
612
|
+
* Whether the agent profile is currently active.
|
|
613
|
+
*/
|
|
614
|
+
active: boolean;
|
|
615
|
+
/**
|
|
616
|
+
* Whether this profile is the system default.
|
|
617
|
+
*/
|
|
618
|
+
systemDefault: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Timestamp when the profile was created.
|
|
621
|
+
*/
|
|
622
|
+
createdTime: number;
|
|
623
|
+
/**
|
|
624
|
+
* Timestamp when the profile was last updated.
|
|
625
|
+
*/
|
|
626
|
+
lastUpdatedTime: number;
|
|
506
627
|
};
|
|
507
628
|
/**
|
|
508
629
|
* Response containing multimedia profile configuration for an agent
|
|
@@ -898,14 +1019,6 @@ export type WrapupData = {
|
|
|
898
1019
|
allowCancelAutoWrapup?: boolean;
|
|
899
1020
|
};
|
|
900
1021
|
};
|
|
901
|
-
/**
|
|
902
|
-
* Available login options for voice channel access
|
|
903
|
-
* 'AGENT_DN' - Login using agent's DN
|
|
904
|
-
* 'EXTENSION' - Login using extension number
|
|
905
|
-
* 'BROWSER' - Login using browser-based WebRTC
|
|
906
|
-
* @public
|
|
907
|
-
*/
|
|
908
|
-
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';
|
|
909
1022
|
/**
|
|
910
1023
|
* Team configuration information
|
|
911
1024
|
* @public
|
|
@@ -1073,7 +1186,7 @@ export type Profile = {
|
|
|
1073
1186
|
/** Outbound entry point */
|
|
1074
1187
|
outDialEp: string;
|
|
1075
1188
|
/** Whether ending calls is enabled */
|
|
1076
|
-
|
|
1189
|
+
isEndTaskEnabled: boolean;
|
|
1077
1190
|
/** Whether ending consultations is enabled */
|
|
1078
1191
|
isEndConsultEnabled: boolean;
|
|
1079
1192
|
/** Optional lifecycle manager URL */
|
|
@@ -1205,3 +1318,51 @@ export type OutdialAniParams = {
|
|
|
1205
1318
|
/** Comma-separated list of attributes to include in response (optional) */
|
|
1206
1319
|
attributes?: string;
|
|
1207
1320
|
};
|
|
1321
|
+
/**
|
|
1322
|
+
* User preference data structure
|
|
1323
|
+
* @public
|
|
1324
|
+
*/
|
|
1325
|
+
export type UserPreference = {
|
|
1326
|
+
/** Unique identifier for the user preference */
|
|
1327
|
+
id: string;
|
|
1328
|
+
/** Organization ID */
|
|
1329
|
+
organizationId: string;
|
|
1330
|
+
/** User ID (CI user ID) */
|
|
1331
|
+
userId: string;
|
|
1332
|
+
/** User preference data as key-value pairs */
|
|
1333
|
+
preferences: Record<string, unknown>;
|
|
1334
|
+
/** Timestamp when this preference was created (Unix timestamp in milliseconds) */
|
|
1335
|
+
createdTime?: number;
|
|
1336
|
+
/** Timestamp when this preference was last updated (Unix timestamp in milliseconds) */
|
|
1337
|
+
lastUpdatedTime?: number;
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* Request payload for creating user preferences
|
|
1341
|
+
* @public
|
|
1342
|
+
*/
|
|
1343
|
+
export type CreateUserPreferenceRequest = {
|
|
1344
|
+
/** User ID (CI user ID) */
|
|
1345
|
+
userId: string;
|
|
1346
|
+
/** Desktop preference data as a JSON string (required) */
|
|
1347
|
+
desktopPreference: string;
|
|
1348
|
+
};
|
|
1349
|
+
/**
|
|
1350
|
+
* Request payload for updating user preferences
|
|
1351
|
+
* @public
|
|
1352
|
+
*/
|
|
1353
|
+
export type UpdateUserPreferenceRequest = {
|
|
1354
|
+
/** Desktop preference data as a JSON string (required) */
|
|
1355
|
+
desktopPreference: string;
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* Query parameters for fetching user preferences
|
|
1359
|
+
* @public
|
|
1360
|
+
*/
|
|
1361
|
+
export type GetUserPreferenceParams = {
|
|
1362
|
+
/** User ID to fetch preferences for. Defaults to current user's CI user ID. */
|
|
1363
|
+
userId?: string;
|
|
1364
|
+
/** Page number (0-indexed). Default: 0 */
|
|
1365
|
+
page?: number;
|
|
1366
|
+
/** Number of items per page. Default: 100 */
|
|
1367
|
+
pageSize?: number;
|
|
1368
|
+
};
|
|
@@ -67,6 +67,10 @@ export type TaskErrorIds = {
|
|
|
67
67
|
'Service.aqm.dialer.startOutdial': Failure;
|
|
68
68
|
} | {
|
|
69
69
|
'Service.aqm.dialer.acceptPreviewContact': Failure;
|
|
70
|
+
} | {
|
|
71
|
+
'Service.aqm.dialer.skipPreviewContact': Failure;
|
|
72
|
+
} | {
|
|
73
|
+
'Service.aqm.dialer.removePreviewContact': Failure;
|
|
70
74
|
} | {
|
|
71
75
|
'Service.reqs.generic.failure': {
|
|
72
76
|
trackingId: string;
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import * as Err from './Err';
|
|
2
2
|
import { LoginOption, WebexRequestPayload } from '../../types';
|
|
3
3
|
import { Failure, AugmentedError } from './GlobalTypes';
|
|
4
|
-
import {
|
|
4
|
+
import { ConsultConferenceData, consultConferencePayloadData, ConsultTransferDestinationType, TaskData, Interaction } from '../task/types';
|
|
5
5
|
import { DialPlan } from '../config/types';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Strips characters defined in the dial plan entry from the input string.
|
|
8
|
+
*
|
|
9
|
+
* @param input - The dial number to sanitize
|
|
10
|
+
* @param strippedChars - String of characters to remove from the input
|
|
11
|
+
* @returns The sanitized input with specified characters removed
|
|
12
|
+
*/
|
|
13
|
+
export declare const stripDialPlanChars: (input: string, strippedChars: string) => string;
|
|
7
14
|
/**
|
|
8
15
|
* Validates a dial number against the provided dial plan regex patterns.
|
|
9
16
|
* A number is valid if it matches at least one regex pattern in the dial plans.
|
|
10
|
-
*
|
|
17
|
+
* Skips validation when no dial plan entries are configured, deferring to the server.
|
|
11
18
|
*
|
|
12
19
|
* @param input - The dial number to validate
|
|
13
20
|
* @param dialPlanEntries - Array of dial plan entries containing regex patterns
|
|
14
|
-
* @returns true if the input matches at least one dial plan regex pattern, false otherwise
|
|
21
|
+
* @returns true if the input matches at least one dial plan regex pattern or no entries are configured, false otherwise
|
|
15
22
|
*/
|
|
16
23
|
export declare const isValidDialNumber: (input: string, dialPlanEntries: DialPlan['dialPlanEntity']) => boolean;
|
|
17
24
|
export declare const getStationLoginErrorData: (failure: Failure, loginOption: LoginOption) => {
|
|
@@ -61,14 +68,6 @@ export declare const generateTaskErrorObject: (error: any, methodName: string, m
|
|
|
61
68
|
* @ignore
|
|
62
69
|
*/
|
|
63
70
|
export declare const createErrDetailsObject: (errObj: WebexRequestPayload) => Err.Details<"Service.reqs.generic.failure">;
|
|
64
|
-
/**
|
|
65
|
-
* Gets the consulted agent ID from the media object by finding the agent
|
|
66
|
-
* in the consult media participants (excluding the current agent).
|
|
67
|
-
*
|
|
68
|
-
* @param media - The media object from the interaction
|
|
69
|
-
* @param agentId - The current agent's ID to exclude from the search
|
|
70
|
-
* @returns The consulted agent ID, or empty string if none found
|
|
71
|
-
*/
|
|
72
71
|
export declare const getConsultedAgentId: (media: Interaction['media'], agentId: string) => string;
|
|
73
72
|
/**
|
|
74
73
|
* Gets the destination agent ID for CBT (Capacity Based Team) scenarios.
|
|
@@ -98,4 +97,25 @@ export declare const calculateDestAgentId: (interaction: Interaction, agentId: s
|
|
|
98
97
|
* @returns The destination agent ID for determining destination type
|
|
99
98
|
*/
|
|
100
99
|
export declare const calculateDestType: (interaction: Interaction, agentId: string) => string;
|
|
101
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Gets the destination agent ID from participants.
|
|
102
|
+
* Finds a participant who is not the current agent and is an agent type.
|
|
103
|
+
*
|
|
104
|
+
* @param participants - The participants object from interaction
|
|
105
|
+
* @param agentId - The current agent's ID
|
|
106
|
+
* @returns The destination agent ID, or undefined if none found
|
|
107
|
+
*/
|
|
108
|
+
export declare const buildConsultConferenceParamData: (dataPassed: consultConferencePayloadData, interactionIdPassed: string) => {
|
|
109
|
+
interactionId: string;
|
|
110
|
+
data: ConsultConferenceData;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Derives the consult transfer destination type based on task data.
|
|
114
|
+
* This function determines the appropriate destination type for a consult transfer
|
|
115
|
+
* by examining the destination type stored in the task data.
|
|
116
|
+
*
|
|
117
|
+
* @param taskData - The task data containing destination information
|
|
118
|
+
* @returns The derived consult transfer destination type
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
export declare const deriveConsultTransferDestinationType: (taskData: TaskData) => ConsultTransferDestinationType;
|
|
@@ -23,7 +23,7 @@ export default class Services {
|
|
|
23
23
|
readonly dialer: ReturnType<typeof aqmDialer>;
|
|
24
24
|
/** WebSocket manager for handling real-time communications */
|
|
25
25
|
readonly webSocketManager: WebSocketManager;
|
|
26
|
-
/** RTD WebSocket manager for handling
|
|
26
|
+
/** RTD WebSocket manager for handling real-time transcription */
|
|
27
27
|
readonly rtdWebSocketManager: WebSocketManager;
|
|
28
28
|
/** Connection service for managing websocket connections */
|
|
29
29
|
readonly connectionService: ConnectionService;
|