@webex/contact-center 3.9.0 → 3.10.0-multi-llms.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cc.js +207 -47
- package/dist/cc.js.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/logger-proxy.js +24 -1
- package/dist/logger-proxy.js.map +1 -1
- package/dist/metrics/MetricsManager.js +1 -1
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +89 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +32 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +271 -0
- package/dist/services/AddressBook.js.map +1 -0
- package/dist/services/EntryPoint.js +227 -0
- package/dist/services/EntryPoint.js.map +1 -0
- package/dist/services/Queue.js +261 -0
- package/dist/services/Queue.js.map +1 -0
- package/dist/services/config/constants.js +36 -2
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +29 -21
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +33 -1
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/GlobalTypes.js.map +1 -1
- package/dist/services/core/Utils.js +181 -2
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +0 -4
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +17 -1
- package/dist/services/core/constants.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +0 -4
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/task/TaskManager.js +151 -7
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +104 -0
- package/dist/services/task/TaskUtils.js.map +1 -0
- package/dist/services/task/constants.js +26 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +86 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/index.js +428 -91
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +12 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +121 -35
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/metrics/constants.d.ts +25 -1
- package/dist/types/services/AddressBook.d.ts +74 -0
- package/dist/types/services/EntryPoint.d.ts +67 -0
- package/dist/types/services/Queue.d.ts +76 -0
- package/dist/types/services/config/constants.d.ts +35 -1
- package/dist/types/services/config/index.d.ts +6 -9
- package/dist/types/services/config/types.d.ts +79 -58
- package/dist/types/services/core/GlobalTypes.d.ts +25 -0
- package/dist/types/services/core/Utils.d.ts +55 -1
- package/dist/types/services/core/constants.d.ts +14 -0
- package/dist/types/services/task/TaskUtils.d.ts +42 -0
- package/dist/types/services/task/constants.d.ts +23 -0
- package/dist/types/services/task/contact.d.ts +10 -0
- package/dist/types/services/task/index.d.ts +85 -4
- package/dist/types/services/task/types.d.ts +245 -21
- package/dist/types/types.d.ts +162 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +192 -0
- package/dist/utils/PageCache.js.map +1 -0
- package/dist/webex.js +1 -1
- package/package.json +10 -9
- package/src/cc.ts +232 -52
- package/src/constants.ts +1 -0
- package/src/index.ts +17 -2
- package/src/logger-proxy.ts +24 -1
- package/src/metrics/MetricsManager.ts +1 -1
- package/src/metrics/behavioral-events.ts +94 -0
- package/src/metrics/constants.ts +37 -1
- package/src/services/AddressBook.ts +291 -0
- package/src/services/EntryPoint.ts +241 -0
- package/src/services/Queue.ts +277 -0
- package/src/services/config/constants.ts +42 -2
- package/src/services/config/index.ts +30 -30
- package/src/services/config/types.ts +59 -58
- package/src/services/core/GlobalTypes.ts +27 -0
- package/src/services/core/Utils.ts +215 -1
- package/src/services/core/aqm-reqs.ts +0 -5
- package/src/services/core/constants.ts +16 -0
- package/src/services/core/websocket/WebSocketManager.ts +0 -4
- package/src/services/task/TaskManager.ts +182 -9
- package/src/services/task/TaskUtils.ts +113 -0
- package/src/services/task/constants.ts +25 -0
- package/src/services/task/contact.ts +80 -0
- package/src/services/task/index.ts +497 -71
- package/src/services/task/types.ts +264 -20
- package/src/types.ts +180 -0
- package/src/utils/PageCache.ts +252 -0
- package/test/unit/spec/cc.ts +282 -85
- package/test/unit/spec/metrics/MetricsManager.ts +0 -1
- package/test/unit/spec/metrics/behavioral-events.ts +42 -0
- package/test/unit/spec/services/AddressBook.ts +332 -0
- package/test/unit/spec/services/EntryPoint.ts +259 -0
- package/test/unit/spec/services/Queue.ts +323 -0
- package/test/unit/spec/services/config/index.ts +279 -65
- package/test/unit/spec/services/core/Utils.ts +282 -1
- package/test/unit/spec/services/core/aqm-reqs.ts +1 -3
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +0 -4
- package/test/unit/spec/services/task/TaskManager.ts +760 -2
- package/test/unit/spec/services/task/TaskUtils.ts +131 -0
- package/test/unit/spec/services/task/contact.ts +31 -1
- package/test/unit/spec/services/task/index.ts +873 -163
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { EntryPointListResponse, EntryPointSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* EntryPoint class for managing Webex Contact Center entry points.
|
|
5
|
+
* Provides functionality to fetch, search, and paginate through entry points.
|
|
6
|
+
*
|
|
7
|
+
* @class EntryPoint
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get EntryPoint API instance from ContactCenter
|
|
21
|
+
* const entryPointAPI = cc.entryPoint;
|
|
22
|
+
*
|
|
23
|
+
* // Get all entry points with pagination
|
|
24
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
25
|
+
* page: 0,
|
|
26
|
+
* pageSize: 50
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Search for specific entry points
|
|
30
|
+
* const searchResults = await entryPointAPI.searchEntryPoints({
|
|
31
|
+
* search: 'support',
|
|
32
|
+
* filter: 'type=="voice"'
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class EntryPoint {
|
|
37
|
+
private webexRequest;
|
|
38
|
+
private webex;
|
|
39
|
+
private metricsManager;
|
|
40
|
+
private pageCache;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an instance of EntryPoint
|
|
43
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
constructor(webex: WebexSDK);
|
|
47
|
+
/**
|
|
48
|
+
* Fetches entry points for the organization with pagination support
|
|
49
|
+
* @param {EntryPointSearchParams} [params] - Search and pagination parameters
|
|
50
|
+
* @returns {Promise<EntryPointListResponse>} Promise resolving to paginated entry points
|
|
51
|
+
* @throws {Error} If the API call fails
|
|
52
|
+
* @public
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Get first page of entry points
|
|
56
|
+
* const response = await entryPointAPI.getEntryPoints();
|
|
57
|
+
*
|
|
58
|
+
* // Get specific page with custom page size
|
|
59
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
60
|
+
* page: 2,
|
|
61
|
+
* pageSize: 25
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
66
|
+
}
|
|
67
|
+
export default EntryPoint;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Queue API class for managing Webex Contact Center contact service queues.
|
|
5
|
+
* Provides functionality to fetch contact service queues using the queue API.
|
|
6
|
+
*
|
|
7
|
+
* @class Queue
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get Queue API instance from ContactCenter
|
|
21
|
+
* const queueAPI = cc.queue;
|
|
22
|
+
*
|
|
23
|
+
* // Get all queues
|
|
24
|
+
* const queues = await queueAPI.getQueues();
|
|
25
|
+
*
|
|
26
|
+
* // Get queues with pagination
|
|
27
|
+
* const queues = await queueAPI.getQueues({
|
|
28
|
+
* page: 0,
|
|
29
|
+
* pageSize: 50
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // Search for specific queues
|
|
33
|
+
* const searchResults = await queueAPI.getQueues({
|
|
34
|
+
* search: 'support',
|
|
35
|
+
* filter: 'name=="Support Queue"'
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class Queue {
|
|
40
|
+
private webexRequest;
|
|
41
|
+
private webex;
|
|
42
|
+
private metricsManager;
|
|
43
|
+
private pageCache;
|
|
44
|
+
/**
|
|
45
|
+
* Creates an instance of Queue
|
|
46
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
constructor(webex: WebexSDK);
|
|
50
|
+
/**
|
|
51
|
+
* Fetches contact service queues for the organization
|
|
52
|
+
* @param {ContactServiceQueueSearchParams} [params] - Search and pagination parameters
|
|
53
|
+
* @returns {Promise<ContactServiceQueuesResponse>} Promise resolving to contact service queues
|
|
54
|
+
* @throws {Error} If the API call fails
|
|
55
|
+
* @public
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Get all queues with default pagination
|
|
59
|
+
* const response = await queueAPI.getQueues();
|
|
60
|
+
*
|
|
61
|
+
* // Get queues with specific pagination
|
|
62
|
+
* const response = await queueAPI.getQueues({
|
|
63
|
+
* page: 0,
|
|
64
|
+
* pageSize: 25
|
|
65
|
+
* });
|
|
66
|
+
*
|
|
67
|
+
* // Search for queues
|
|
68
|
+
* const response = await queueAPI.getQueues({
|
|
69
|
+
* search: 'support',
|
|
70
|
+
* filter: 'queueType=="INBOUND"'
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
|
75
|
+
}
|
|
76
|
+
export default Queue;
|
|
@@ -51,7 +51,6 @@ export declare const METHODS: {
|
|
|
51
51
|
GET_TENANT_DATA: string;
|
|
52
52
|
GET_URL_MAPPING: string;
|
|
53
53
|
GET_DIAL_PLAN_DATA: string;
|
|
54
|
-
GET_QUEUES: string;
|
|
55
54
|
PARSE_AGENT_CONFIGS: string;
|
|
56
55
|
GET_URL_MAPPING_UTIL: string;
|
|
57
56
|
GET_MSFT_CONFIG: string;
|
|
@@ -200,4 +199,39 @@ export declare const endPointMap: {
|
|
|
200
199
|
* @ignore
|
|
201
200
|
*/
|
|
202
201
|
queueList: (orgId: string, queryParams: string) => string;
|
|
202
|
+
/**
|
|
203
|
+
* Gets the endpoint for entry points list with custom query parameters.
|
|
204
|
+
* @param orgId - Organization ID.
|
|
205
|
+
* @param queryParams - Query parameters string.
|
|
206
|
+
* @returns The endpoint URL string.
|
|
207
|
+
* @public
|
|
208
|
+
* @example
|
|
209
|
+
* const url = endPointMap.entryPointList('org123', 'page=0&pageSize=10');
|
|
210
|
+
* @ignore
|
|
211
|
+
*/
|
|
212
|
+
entryPointList: (orgId: string, queryParams: string) => string;
|
|
213
|
+
/**
|
|
214
|
+
* Gets the endpoint for address book entries with custom query parameters.
|
|
215
|
+
* @param orgId - Organization ID.
|
|
216
|
+
* @param addressBookId - Address book ID.
|
|
217
|
+
* @param queryParams - Query parameters string.
|
|
218
|
+
* @returns The endpoint URL string.
|
|
219
|
+
* @public
|
|
220
|
+
* @example
|
|
221
|
+
* const url = endPointMap.addressBookEntries('org123', 'book456', 'page=0&pageSize=10');
|
|
222
|
+
* @ignore
|
|
223
|
+
*/
|
|
224
|
+
addressBookEntries: (orgId: string, addressBookId: string, queryParams: string) => string;
|
|
225
|
+
/**
|
|
226
|
+
* Gets the endpoint for outdial ANI entries with custom query parameters.
|
|
227
|
+
* @param orgId - Organization ID.
|
|
228
|
+
* @param outdialANI - Outdial ANI ID.
|
|
229
|
+
* @param queryParams - Query parameters string.
|
|
230
|
+
* @returns The endpoint URL string.
|
|
231
|
+
* @public
|
|
232
|
+
* @example
|
|
233
|
+
* const url = endPointMap.outdialAniEntries('org123', 'ani456', 'page=0&pageSize=10');
|
|
234
|
+
* @ignore
|
|
235
|
+
*/
|
|
236
|
+
outdialAniEntries: (orgId: string, outdialANI: string, queryParams: string) => string;
|
|
203
237
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
* @module AgentConfigService
|
|
4
4
|
*/
|
|
5
|
-
import { DesktopProfileResponse, ListAuxCodesResponse, AgentResponse, OrgInfo, OrgSettings,
|
|
5
|
+
import { DesktopProfileResponse, ListAuxCodesResponse, AgentResponse, TenantData, OrgInfo, OrgSettings, URLMapping, TeamList, DialPlanEntity, Profile, ListTeamsResponse, AuxCode, MultimediaProfileResponse, SiteInfo, OutdialAniEntriesResponse, OutdialAniParams } from './types';
|
|
6
6
|
/**
|
|
7
7
|
* The AgentConfigService class provides methods to fetch agent configuration data.
|
|
8
8
|
* @private
|
|
@@ -156,16 +156,13 @@ export default class AgentConfigService {
|
|
|
156
156
|
*/
|
|
157
157
|
getDialPlanData(orgId: string): Promise<DialPlanEntity[]>;
|
|
158
158
|
/**
|
|
159
|
-
* Fetches
|
|
159
|
+
* Fetches outdial ANI (Automatic Number Identification) entries for the given orgId and outdial ANI ID.
|
|
160
160
|
* @ignore
|
|
161
|
-
* @param {string} orgId - organization ID for which the
|
|
162
|
-
* @param {
|
|
163
|
-
* @
|
|
164
|
-
* @param {string} search - optional search string
|
|
165
|
-
* @param {string} filter - optional filter string
|
|
166
|
-
* @returns Promise<ContactServiceQueue[]> - A promise that resolves to the list of contact service queues.
|
|
161
|
+
* @param {string} orgId - organization ID for which the outdial ANI entries are to be fetched.
|
|
162
|
+
* @param {OutdialAniParams} params - parameters object containing outdialANI and optional pagination/filtering options
|
|
163
|
+
* @returns {Promise<OutdialAniEntriesResponse>} - A promise that resolves to the outdial ANI entries response.
|
|
167
164
|
* @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
|
|
168
165
|
* @private
|
|
169
166
|
*/
|
|
170
|
-
|
|
167
|
+
getOutdialAniEntries(orgId: string, params: OutdialAniParams): Promise<OutdialAniEntriesResponse>;
|
|
171
168
|
}
|
|
@@ -38,6 +38,26 @@ export declare const CC_TASK_EVENTS: {
|
|
|
38
38
|
readonly AGENT_CONSULT_END_FAILED: "AgentConsultEndFailed";
|
|
39
39
|
/** Event emitted when consultation conference ends */
|
|
40
40
|
readonly AGENT_CONSULT_CONFERENCE_ENDED: "AgentConsultConferenceEnded";
|
|
41
|
+
/** Event emitted when consultation conference is in progress */
|
|
42
|
+
readonly AGENT_CONSULT_CONFERENCING: "AgentConsultConferencing";
|
|
43
|
+
/** Event emitted when consultation conference starts */
|
|
44
|
+
readonly AGENT_CONSULT_CONFERENCED: "AgentConsultConferenced";
|
|
45
|
+
/** Event emitted when consultation conference fails */
|
|
46
|
+
readonly AGENT_CONSULT_CONFERENCE_FAILED: "AgentConsultConferenceFailed";
|
|
47
|
+
/** Event emitted when participant joins conference */
|
|
48
|
+
readonly PARTICIPANT_JOINED_CONFERENCE: "ParticipantJoinedConference";
|
|
49
|
+
/** Event emitted when participant leaves conference */
|
|
50
|
+
readonly PARTICIPANT_LEFT_CONFERENCE: "ParticipantLeftConference";
|
|
51
|
+
/** Event emitted when participant leaving conference fails */
|
|
52
|
+
readonly PARTICIPANT_LEFT_CONFERENCE_FAILED: "ParticipantLeftConferenceFailed";
|
|
53
|
+
/** Event emitted when consultation conference end fails */
|
|
54
|
+
readonly AGENT_CONSULT_CONFERENCE_END_FAILED: "AgentConsultConferenceEndFailed";
|
|
55
|
+
/** Event emitted when conference is successfully transferred */
|
|
56
|
+
readonly AGENT_CONFERENCE_TRANSFERRED: "AgentConferenceTransferred";
|
|
57
|
+
/** Event emitted when conference transfer fails */
|
|
58
|
+
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
59
|
+
/** Event emitted for post-call activity by participant */
|
|
60
|
+
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
41
61
|
/** Event emitted when contact is blind transferred */
|
|
42
62
|
readonly AGENT_BLIND_TRANSFERRED: "AgentBlindTransferred";
|
|
43
63
|
/** Event emitted when blind transfer fails */
|
|
@@ -62,6 +82,8 @@ export declare const CC_TASK_EVENTS: {
|
|
|
62
82
|
readonly CONTACT_RECORDING_RESUME_FAILED: "ContactRecordingResumeFailed";
|
|
63
83
|
/** Event emitted when contact ends */
|
|
64
84
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
85
|
+
/** Event emitted when contact is merged */
|
|
86
|
+
readonly CONTACT_MERGED: "ContactMerged";
|
|
65
87
|
/** Event emitted when ending contact fails */
|
|
66
88
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
67
89
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -165,6 +187,26 @@ export declare const CC_EVENTS: {
|
|
|
165
187
|
readonly AGENT_CONSULT_END_FAILED: "AgentConsultEndFailed";
|
|
166
188
|
/** Event emitted when consultation conference ends */
|
|
167
189
|
readonly AGENT_CONSULT_CONFERENCE_ENDED: "AgentConsultConferenceEnded";
|
|
190
|
+
/** Event emitted when consultation conference is in progress */
|
|
191
|
+
readonly AGENT_CONSULT_CONFERENCING: "AgentConsultConferencing";
|
|
192
|
+
/** Event emitted when consultation conference starts */
|
|
193
|
+
readonly AGENT_CONSULT_CONFERENCED: "AgentConsultConferenced";
|
|
194
|
+
/** Event emitted when consultation conference fails */
|
|
195
|
+
readonly AGENT_CONSULT_CONFERENCE_FAILED: "AgentConsultConferenceFailed";
|
|
196
|
+
/** Event emitted when participant joins conference */
|
|
197
|
+
readonly PARTICIPANT_JOINED_CONFERENCE: "ParticipantJoinedConference";
|
|
198
|
+
/** Event emitted when participant leaves conference */
|
|
199
|
+
readonly PARTICIPANT_LEFT_CONFERENCE: "ParticipantLeftConference";
|
|
200
|
+
/** Event emitted when participant leaving conference fails */
|
|
201
|
+
readonly PARTICIPANT_LEFT_CONFERENCE_FAILED: "ParticipantLeftConferenceFailed";
|
|
202
|
+
/** Event emitted when consultation conference end fails */
|
|
203
|
+
readonly AGENT_CONSULT_CONFERENCE_END_FAILED: "AgentConsultConferenceEndFailed";
|
|
204
|
+
/** Event emitted when conference is successfully transferred */
|
|
205
|
+
readonly AGENT_CONFERENCE_TRANSFERRED: "AgentConferenceTransferred";
|
|
206
|
+
/** Event emitted when conference transfer fails */
|
|
207
|
+
readonly AGENT_CONFERENCE_TRANSFER_FAILED: "AgentConferenceTransferFailed";
|
|
208
|
+
/** Event emitted for post-call activity by participant */
|
|
209
|
+
readonly PARTICIPANT_POST_CALL_ACTIVITY: "ParticipantPostCallActivity";
|
|
168
210
|
/** Event emitted when contact is blind transferred */
|
|
169
211
|
readonly AGENT_BLIND_TRANSFERRED: "AgentBlindTransferred";
|
|
170
212
|
/** Event emitted when blind transfer fails */
|
|
@@ -189,6 +231,8 @@ export declare const CC_EVENTS: {
|
|
|
189
231
|
readonly CONTACT_RECORDING_RESUME_FAILED: "ContactRecordingResumeFailed";
|
|
190
232
|
/** Event emitted when contact ends */
|
|
191
233
|
readonly CONTACT_ENDED: "ContactEnded";
|
|
234
|
+
/** Event emitted when contact is merged */
|
|
235
|
+
readonly CONTACT_MERGED: "ContactMerged";
|
|
192
236
|
/** Event emitted when ending contact fails */
|
|
193
237
|
readonly AGENT_CONTACT_END_FAILED: "AgentContactEndFailed";
|
|
194
238
|
/** Event emitted when agent enters wrap-up state */
|
|
@@ -1048,66 +1092,43 @@ export type CallDistributionGroup = {
|
|
|
1048
1092
|
duration: number;
|
|
1049
1093
|
};
|
|
1050
1094
|
/**
|
|
1051
|
-
*
|
|
1095
|
+
* Represents a single outdial ANI (Automatic Number Identification) entry
|
|
1052
1096
|
* @public
|
|
1053
1097
|
*/
|
|
1054
|
-
export type
|
|
1055
|
-
/** Unique identifier for the
|
|
1098
|
+
export type OutdialAniEntry = {
|
|
1099
|
+
/** Unique identifier for the ANI entry */
|
|
1056
1100
|
id: string;
|
|
1057
|
-
/**
|
|
1101
|
+
/** Display name for the ANI entry */
|
|
1058
1102
|
name: string;
|
|
1059
|
-
/**
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
pauseRecordingPermitted: boolean;
|
|
1091
|
-
/** Maximum recording pause duration in seconds */
|
|
1092
|
-
recordingPauseDuration: number;
|
|
1093
|
-
/** Control flow script URL */
|
|
1094
|
-
controlFlowScriptUrl: string;
|
|
1095
|
-
/** IVR requeue URL */
|
|
1096
|
-
ivrRequeueUrl: string;
|
|
1097
|
-
/** Type of routing strategy */
|
|
1098
|
-
routingType: string;
|
|
1099
|
-
/** Queue-specific routing type */
|
|
1100
|
-
queueRoutingType: string;
|
|
1101
|
-
/** Queue skill requirements for routing */
|
|
1102
|
-
queueSkillRequirements: object[];
|
|
1103
|
-
/** Associated agents */
|
|
1104
|
-
agents: object[];
|
|
1105
|
-
/** Call distribution group configurations */
|
|
1106
|
-
callDistributionGroups: CallDistributionGroup[];
|
|
1107
|
-
/** Associated resource links */
|
|
1108
|
-
links: Array<string>;
|
|
1109
|
-
/** Timestamp when queue was created */
|
|
1110
|
-
createdTime: string;
|
|
1111
|
-
/** Timestamp when queue was last updated */
|
|
1112
|
-
lastUpdatedTime: string;
|
|
1103
|
+
/** Phone number associated with this ANI entry */
|
|
1104
|
+
number: string;
|
|
1105
|
+
/** Related links for this ANI entry */
|
|
1106
|
+
links: string[];
|
|
1107
|
+
/** Timestamp when this entry was created (Unix timestamp in milliseconds) */
|
|
1108
|
+
createdTime: number;
|
|
1109
|
+
/** Timestamp when this entry was last updated (Unix timestamp in milliseconds) */
|
|
1110
|
+
lastUpdatedTime: number;
|
|
1111
|
+
};
|
|
1112
|
+
/**
|
|
1113
|
+
* Response structure for outdial ANI entries API call
|
|
1114
|
+
* @public
|
|
1115
|
+
*/
|
|
1116
|
+
export type OutdialAniEntriesResponse = OutdialAniEntry[];
|
|
1117
|
+
/**
|
|
1118
|
+
* Parameters for fetching outdial ANI entries
|
|
1119
|
+
* @public
|
|
1120
|
+
*/
|
|
1121
|
+
export type OutdialAniParams = {
|
|
1122
|
+
/** Outdial ANI ID from agent profile */
|
|
1123
|
+
outdialANI: string;
|
|
1124
|
+
/** Page number for pagination (optional) */
|
|
1125
|
+
page?: number;
|
|
1126
|
+
/** Number of entries per page (optional) */
|
|
1127
|
+
pageSize?: number;
|
|
1128
|
+
/** Search string to filter entries (optional) */
|
|
1129
|
+
search?: string;
|
|
1130
|
+
/** Filter expression for advanced filtering (optional) */
|
|
1131
|
+
filter?: string;
|
|
1132
|
+
/** Comma-separated list of attributes to include in response (optional) */
|
|
1133
|
+
attributes?: string;
|
|
1113
1134
|
};
|
|
@@ -31,3 +31,28 @@ export type Failure = Msg<{
|
|
|
31
31
|
/** Human-readable description of the failure reason */
|
|
32
32
|
reason: string;
|
|
33
33
|
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Represents task API error details in a structured format
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export interface TaskError {
|
|
39
|
+
/** Original error object for throwing */
|
|
40
|
+
error: Error;
|
|
41
|
+
/** Unique tracking identifier for correlation */
|
|
42
|
+
trackingId: string;
|
|
43
|
+
/** Detailed error message from the API */
|
|
44
|
+
errorMessage: string;
|
|
45
|
+
/** Type/category of the error (e.g., "Bad Request") */
|
|
46
|
+
errorType: string;
|
|
47
|
+
/** Additional error context data */
|
|
48
|
+
errorData: string;
|
|
49
|
+
/** Numeric reason code */
|
|
50
|
+
reasonCode: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* An Error object augmented with a flexible data field for additional context.
|
|
54
|
+
* Use this to attach structured data to thrown errors without ts-ignore.
|
|
55
|
+
*/
|
|
56
|
+
export interface AugmentedError extends Error {
|
|
57
|
+
data?: Record<string, any>;
|
|
58
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Err from './Err';
|
|
2
2
|
import { LoginOption, WebexRequestPayload } from '../../types';
|
|
3
|
-
import { Failure } from './GlobalTypes';
|
|
3
|
+
import { Failure, AugmentedError } from './GlobalTypes';
|
|
4
|
+
import { TaskData, ConsultTransferPayLoad, Interaction } from '../task/types';
|
|
4
5
|
export declare const isValidDialNumber: (input: string) => boolean;
|
|
5
6
|
export declare const getStationLoginErrorData: (failure: Failure, loginOption: LoginOption) => {
|
|
6
7
|
message: any;
|
|
@@ -23,6 +24,21 @@ export declare const getErrorDetails: (error: any, methodName: string, moduleNam
|
|
|
23
24
|
error: Error;
|
|
24
25
|
reason: string;
|
|
25
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Extracts error details from task API errors and logs them. Also uploads logs for the error.
|
|
29
|
+
* This handles the specific error format returned by task API calls.
|
|
30
|
+
*
|
|
31
|
+
* @param error - The error object from task API calls with structure: {id: string, details: {trackingId: string, msg: {...}}}
|
|
32
|
+
* @param methodName - The name of the method where the error occurred.
|
|
33
|
+
* @param moduleName - The name of the module where the error occurred.
|
|
34
|
+
* @returns AugmentedError containing structured error details on err.data for metrics and logging
|
|
35
|
+
* @public
|
|
36
|
+
* @example
|
|
37
|
+
* const taskError = generateTaskErrorObject(error, 'transfer', 'TaskModule');
|
|
38
|
+
* throw taskError.error;
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
export declare const generateTaskErrorObject: (error: any, methodName: string, moduleName: string) => AugmentedError;
|
|
26
42
|
/**
|
|
27
43
|
* Creates an error details object suitable for use with the Err.Details class.
|
|
28
44
|
*
|
|
@@ -34,3 +50,41 @@ export declare const getErrorDetails: (error: any, methodName: string, moduleNam
|
|
|
34
50
|
* @ignore
|
|
35
51
|
*/
|
|
36
52
|
export declare const createErrDetailsObject: (errObj: WebexRequestPayload) => Err.Details<"Service.reqs.generic.failure">;
|
|
53
|
+
/**
|
|
54
|
+
* Gets the consulted agent ID from the media object by finding the agent
|
|
55
|
+
* in the consult media participants (excluding the current agent).
|
|
56
|
+
*
|
|
57
|
+
* @param media - The media object from the interaction
|
|
58
|
+
* @param agentId - The current agent's ID to exclude from the search
|
|
59
|
+
* @returns The consulted agent ID, or empty string if none found
|
|
60
|
+
*/
|
|
61
|
+
export declare const getConsultedAgentId: (media: Interaction['media'], agentId: string) => string;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the destination agent ID for CBT (Capacity Based Team) scenarios.
|
|
64
|
+
* CBT refers to teams created in Control Hub with capacity-based routing
|
|
65
|
+
* (as opposed to agent-based routing). This handles cases where the consulted
|
|
66
|
+
* participant is not directly in participants but can be found by matching
|
|
67
|
+
* the dial number (dn).
|
|
68
|
+
*
|
|
69
|
+
* @param interaction - The interaction object
|
|
70
|
+
* @param consultingAgent - The consulting agent identifier
|
|
71
|
+
* @returns The destination agent ID for CBT scenarios, or empty string if none found
|
|
72
|
+
*/
|
|
73
|
+
export declare const getDestAgentIdForCBT: (interaction: Interaction, consultingAgent: string) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Calculates the destination agent ID for consult operations.
|
|
76
|
+
*
|
|
77
|
+
* @param interaction - The interaction object
|
|
78
|
+
* @param agentId - The current agent's ID
|
|
79
|
+
* @returns The destination agent ID
|
|
80
|
+
*/
|
|
81
|
+
export declare const calculateDestAgentId: (interaction: Interaction, agentId: string) => string;
|
|
82
|
+
/**
|
|
83
|
+
* Calculates the destination agent ID for fetching destination type.
|
|
84
|
+
*
|
|
85
|
+
* @param interaction - The interaction object
|
|
86
|
+
* @param agentId - The current agent's ID
|
|
87
|
+
* @returns The destination agent ID for determining destination type
|
|
88
|
+
*/
|
|
89
|
+
export declare const calculateDestType: (interaction: Interaction, agentId: string) => string;
|
|
90
|
+
export declare const deriveConsultTransferDestinationType: (taskData?: TaskData) => ConsultTransferPayLoad['destinationType'];
|
|
@@ -53,6 +53,20 @@ export declare const CONNECTIVITY_CHECK_INTERVAL = 5000;
|
|
|
53
53
|
* @ignore
|
|
54
54
|
*/
|
|
55
55
|
export declare const CLOSE_SOCKET_TIMEOUT = 16000;
|
|
56
|
+
/**
|
|
57
|
+
* Constants for participant types, destination types, and interaction states
|
|
58
|
+
* @ignore
|
|
59
|
+
*/
|
|
60
|
+
export declare const PARTICIPANT_TYPES: {
|
|
61
|
+
/** Participant type for Entry Point Dial Number */
|
|
62
|
+
EP_DN: string;
|
|
63
|
+
/** Participant type for dial number */
|
|
64
|
+
DN: string;
|
|
65
|
+
/** Participant type for Agent */
|
|
66
|
+
AGENT: string;
|
|
67
|
+
};
|
|
68
|
+
/** Interaction state for consultation */
|
|
69
|
+
export declare const STATE_CONSULT = "consult";
|
|
56
70
|
export declare const METHODS: {
|
|
57
71
|
REQUEST: string;
|
|
58
72
|
UPLOAD_LOGS: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Interaction, ITask, TaskData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Determines if the given agent is the primary agent (owner) of the task
|
|
4
|
+
* @param task - The task to check
|
|
5
|
+
* @param agentId - The agent ID to check for primary status
|
|
6
|
+
* @returns true if the agent is the primary agent, false otherwise
|
|
7
|
+
*/
|
|
8
|
+
export declare const isPrimary: (task: ITask, agentId: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the given agent is a participant in the main interaction (mainCall)
|
|
11
|
+
* @param task - The task to check
|
|
12
|
+
* @param agentId - The agent ID to check for participation
|
|
13
|
+
* @returns true if the agent is a participant in the main interaction, false otherwise
|
|
14
|
+
*/
|
|
15
|
+
export declare const isParticipantInMainInteraction: (task: ITask, agentId: string) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the given agent is not in the interaction or has left the interaction
|
|
18
|
+
* @param task - The task to check
|
|
19
|
+
* @param agentId - The agent ID to check
|
|
20
|
+
* @returns true if the agent is not in the interaction or has left, false otherwise
|
|
21
|
+
*/
|
|
22
|
+
export declare const checkParticipantNotInInteraction: (task: ITask, agentId: string) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Determines if a conference is currently in progress based on the number of active agent participants
|
|
25
|
+
* @param TaskData - The payLoad data to check for conference status
|
|
26
|
+
* @returns true if there are 2 or more active agent participants in the main call, false otherwise
|
|
27
|
+
*/
|
|
28
|
+
export declare const getIsConferenceInProgress: (data: TaskData) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Checks if the current agent is a secondary agent in a consultation scenario.
|
|
31
|
+
* Secondary agents are those who were consulted (not the original call owner).
|
|
32
|
+
* @param task - The task object containing interaction details
|
|
33
|
+
* @returns true if this is a secondary agent (consulted party), false otherwise
|
|
34
|
+
*/
|
|
35
|
+
export declare const isSecondaryAgent: (interaction: Interaction) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Checks if the current agent is a secondary EP-DN (Entry Point Dial Number) agent.
|
|
38
|
+
* This is specifically for telephony consultations to external numbers/entry points.
|
|
39
|
+
* @param task - The task object containing interaction details
|
|
40
|
+
* @returns true if this is a secondary EP-DN agent in telephony consultation, false otherwise
|
|
41
|
+
*/
|
|
42
|
+
export declare const isSecondaryEpDnAgent: (interaction: Interaction) => boolean;
|
|
@@ -16,8 +16,28 @@ export declare const PAUSE = "/record/pause";
|
|
|
16
16
|
export declare const RESUME = "/record/resume";
|
|
17
17
|
export declare const WRAPUP = "/wrapup";
|
|
18
18
|
export declare const END = "/end";
|
|
19
|
+
export declare const CONSULT_CONFERENCE = "/consult/conference";
|
|
20
|
+
export declare const CONFERENCE_EXIT = "/conference/exit";
|
|
21
|
+
export declare const CONFERENCE_TRANSFER = "/conference/transfer";
|
|
19
22
|
export declare const TASK_MANAGER_FILE = "taskManager";
|
|
20
23
|
export declare const TASK_FILE = "task";
|
|
24
|
+
/**
|
|
25
|
+
* Task data field names that should be preserved during reconciliation
|
|
26
|
+
* These fields are retained even if not present in new data during updates
|
|
27
|
+
*/
|
|
28
|
+
export declare const PRESERVED_TASK_DATA_FIELDS: {
|
|
29
|
+
/** Indicates if the task is in consultation state */
|
|
30
|
+
IS_CONSULTED: string;
|
|
31
|
+
/** Indicates if wrap-up is required for this task */
|
|
32
|
+
WRAP_UP_REQUIRED: string;
|
|
33
|
+
/** Indicates if a conference is currently in progress (2+ active agents) */
|
|
34
|
+
IS_CONFERENCE_IN_PROGRESS: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Array of task data field names that should not be deleted during reconciliation
|
|
38
|
+
* Used by reconcileData method to preserve important task state fields
|
|
39
|
+
*/
|
|
40
|
+
export declare const KEYS_TO_NOT_DELETE: string[];
|
|
21
41
|
export declare const METHODS: {
|
|
22
42
|
ACCEPT: string;
|
|
23
43
|
TOGGLE_MUTE: string;
|
|
@@ -32,6 +52,9 @@ export declare const METHODS: {
|
|
|
32
52
|
END_CONSULT: string;
|
|
33
53
|
TRANSFER: string;
|
|
34
54
|
CONSULT_TRANSFER: string;
|
|
55
|
+
CONSULT_CONFERENCE: string;
|
|
56
|
+
EXIT_CONFERENCE: string;
|
|
57
|
+
TRANSFER_CONFERENCE: string;
|
|
35
58
|
UPDATE_TASK_DATA: string;
|
|
36
59
|
RECONCILE_DATA: string;
|
|
37
60
|
HANDLE_INCOMING_WEB_CALL: string;
|
|
@@ -56,4 +56,14 @@ export default function routingContact(aqm: AqmReqs): {
|
|
|
56
56
|
interactionId: string;
|
|
57
57
|
data: Contact.cancelCtq;
|
|
58
58
|
}>;
|
|
59
|
+
consultConference: import("../core/types").Res<Contact.AgentContact, {
|
|
60
|
+
interactionId: string;
|
|
61
|
+
data: Contact.ConsultConferenceData;
|
|
62
|
+
}>;
|
|
63
|
+
exitConference: import("../core/types").Res<Contact.AgentContact, {
|
|
64
|
+
interactionId: string;
|
|
65
|
+
}>;
|
|
66
|
+
conferenceTransfer: import("../core/types").Res<Contact.AgentContact, {
|
|
67
|
+
interactionId: string;
|
|
68
|
+
}>;
|
|
59
69
|
};
|