@webex/contact-center 3.9.0 → 3.10.0-next.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/dist/cc.js +196 -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 +162 -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/websocket/WebSocketManager.js +0 -4
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/task/TaskManager.js +114 -3
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +76 -0
- package/dist/services/task/TaskUtils.js.map +1 -0
- package/dist/services/task/constants.js +26 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +86 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/index.js +418 -87
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +14 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +115 -35
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/metrics/constants.d.ts +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 +40 -1
- package/dist/types/services/task/TaskUtils.d.ts +28 -0
- package/dist/types/services/task/constants.d.ts +23 -0
- package/dist/types/services/task/contact.d.ts +10 -0
- package/dist/types/services/task/index.d.ts +85 -4
- package/dist/types/services/task/types.d.ts +233 -21
- package/dist/types/types.d.ts +162 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +192 -0
- package/dist/utils/PageCache.js.map +1 -0
- package/dist/webex.js +1 -1
- package/package.json +10 -9
- package/src/cc.ts +221 -52
- package/src/constants.ts +1 -0
- package/src/index.ts +16 -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 +199 -1
- package/src/services/core/aqm-reqs.ts +0 -5
- package/src/services/core/websocket/WebSocketManager.ts +0 -4
- package/src/services/task/TaskManager.ts +123 -5
- package/src/services/task/TaskUtils.ts +81 -0
- package/src/services/task/constants.ts +25 -0
- package/src/services/task/contact.ts +80 -0
- package/src/services/task/index.ts +510 -71
- package/src/services/task/types.ts +251 -20
- package/src/types.ts +180 -0
- package/src/utils/PageCache.ts +252 -0
- package/test/unit/spec/cc.ts +282 -85
- package/test/unit/spec/metrics/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 +50 -0
- 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 +390 -1
- 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 +585 -130
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -370,6 +370,126 @@ export enum TASK_EVENTS {
|
|
|
370
370
|
* ```
|
|
371
371
|
*/
|
|
372
372
|
TASK_OFFER_CONTACT = 'task:offerContact',
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Triggered when a conference is being established
|
|
376
|
+
* @example
|
|
377
|
+
* ```typescript
|
|
378
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_ESTABLISHING, (task: ITask) => {
|
|
379
|
+
* console.log('Conference establishing:', task.data.interactionId);
|
|
380
|
+
* // Handle conference setup in progress
|
|
381
|
+
* });
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
TASK_CONFERENCE_ESTABLISHING = 'task:conferenceEstablishing',
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Triggered when a conference is started successfully
|
|
388
|
+
* @example
|
|
389
|
+
* ```typescript
|
|
390
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_STARTED, (task: ITask) => {
|
|
391
|
+
* console.log('Conference started:', task.data.interactionId);
|
|
392
|
+
* // Handle conference start
|
|
393
|
+
* });
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
TASK_CONFERENCE_STARTED = 'task:conferenceStarted',
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Triggered when a conference fails to start
|
|
400
|
+
* @example
|
|
401
|
+
* ```typescript
|
|
402
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_FAILED, (task: ITask) => {
|
|
403
|
+
* console.log('Conference failed:', task.data.interactionId);
|
|
404
|
+
* // Handle conference failure
|
|
405
|
+
* });
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
TASK_CONFERENCE_FAILED = 'task:conferenceFailed',
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Triggered when a conference is ended successfully
|
|
412
|
+
* @example
|
|
413
|
+
* ```typescript
|
|
414
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_ENDED, (task: ITask) => {
|
|
415
|
+
* console.log('Conference ended:', task.data.interactionId);
|
|
416
|
+
* // Handle conference end
|
|
417
|
+
* });
|
|
418
|
+
* ```
|
|
419
|
+
*/
|
|
420
|
+
TASK_CONFERENCE_ENDED = 'task:conferenceEnded',
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Triggered when a participant joins the conference
|
|
424
|
+
* @example
|
|
425
|
+
* ```typescript
|
|
426
|
+
* task.on(TASK_EVENTS.TASK_PARTICIPANT_JOINED, (task: ITask) => {
|
|
427
|
+
* console.log('Participant joined conference:', task.data.interactionId);
|
|
428
|
+
* // Handle participant joining
|
|
429
|
+
* });
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
TASK_PARTICIPANT_JOINED = 'task:participantJoined',
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Triggered when a participant leaves the conference
|
|
436
|
+
* @example
|
|
437
|
+
* ```typescript
|
|
438
|
+
* task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT, (task: ITask) => {
|
|
439
|
+
* console.log('Participant left conference:', task.data.interactionId);
|
|
440
|
+
* // Handle participant leaving
|
|
441
|
+
* });
|
|
442
|
+
* ```
|
|
443
|
+
*/
|
|
444
|
+
TASK_PARTICIPANT_LEFT = 'task:participantLeft',
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Triggered when conference transfer is successful
|
|
448
|
+
* @example
|
|
449
|
+
* ```typescript
|
|
450
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFERRED, (task: ITask) => {
|
|
451
|
+
* console.log('Conference transferred:', task.data.interactionId);
|
|
452
|
+
* // Handle successful conference transfer
|
|
453
|
+
* });
|
|
454
|
+
* ```
|
|
455
|
+
*/
|
|
456
|
+
TASK_CONFERENCE_TRANSFERRED = 'task:conferenceTransferred',
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Triggered when conference transfer fails
|
|
460
|
+
* @example
|
|
461
|
+
* ```typescript
|
|
462
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFER_FAILED, (task: ITask) => {
|
|
463
|
+
* console.log('Conference transfer failed:', task.data.interactionId);
|
|
464
|
+
* // Handle failed conference transfer
|
|
465
|
+
* });
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
TASK_CONFERENCE_TRANSFER_FAILED = 'task:conferenceTransferFailed',
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Triggered when ending a conference fails
|
|
472
|
+
* @example
|
|
473
|
+
* ```typescript
|
|
474
|
+
* task.on(TASK_EVENTS.TASK_CONFERENCE_END_FAILED, (task: ITask) => {
|
|
475
|
+
* console.log('Conference end failed:', task.data.interactionId);
|
|
476
|
+
* // Handle failed conference end
|
|
477
|
+
* });
|
|
478
|
+
* ```
|
|
479
|
+
*/
|
|
480
|
+
TASK_CONFERENCE_END_FAILED = 'task:conferenceEndFailed',
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Triggered when participant exit from conference fails
|
|
484
|
+
* @example
|
|
485
|
+
* ```typescript
|
|
486
|
+
* task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT_FAILED, (task: ITask) => {
|
|
487
|
+
* console.log('Participant failed to leave conference:', task.data.interactionId);
|
|
488
|
+
* // Handle failed participant exit
|
|
489
|
+
* });
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
TASK_PARTICIPANT_LEFT_FAILED = 'task:participantLeftFailed',
|
|
373
493
|
}
|
|
374
494
|
|
|
375
495
|
/**
|
|
@@ -613,6 +733,8 @@ export type TaskData = {
|
|
|
613
733
|
isConsulted?: boolean;
|
|
614
734
|
/** Indicates if the task is in conference state */
|
|
615
735
|
isConferencing: boolean;
|
|
736
|
+
/** Indicates if a conference is currently in progress (2+ active agents) */
|
|
737
|
+
isConferenceInProgress?: boolean;
|
|
616
738
|
/** Identifier of agent who last updated the task */
|
|
617
739
|
updatedBy?: string;
|
|
618
740
|
/** Type of destination for transfer/consult */
|
|
@@ -883,6 +1005,19 @@ export type ConsultConferenceData = {
|
|
|
883
1005
|
destinationType: string;
|
|
884
1006
|
};
|
|
885
1007
|
|
|
1008
|
+
/**
|
|
1009
|
+
* Legacy consultation conference data type matching Agent Desktop
|
|
1010
|
+
* @public
|
|
1011
|
+
*/
|
|
1012
|
+
export type consultConferencePayloadData = {
|
|
1013
|
+
/** Identifier of the agent initiating consult/conference */
|
|
1014
|
+
agentId: string;
|
|
1015
|
+
/** Type of destination (e.g., 'agent', 'queue') */
|
|
1016
|
+
destinationType: string;
|
|
1017
|
+
/** Identifier of the destination agent */
|
|
1018
|
+
destAgentId: string;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
886
1021
|
/**
|
|
887
1022
|
* Parameters required for cancelling a consult to queue operation
|
|
888
1023
|
* @public
|
|
@@ -931,6 +1066,8 @@ export type DialerPayload = {
|
|
|
931
1066
|
mediaType: 'telephony' | 'chat' | 'social' | 'email';
|
|
932
1067
|
/** The outbound type for the task */
|
|
933
1068
|
outboundType: 'OUTDIAL' | 'CALLBACK' | 'EXECUTE_FLOW';
|
|
1069
|
+
/** The Outdial ANI number that will be used while making a call to the customer. */
|
|
1070
|
+
origin: string;
|
|
934
1071
|
};
|
|
935
1072
|
|
|
936
1073
|
/**
|
|
@@ -1000,16 +1137,16 @@ export interface ITask extends EventEmitter {
|
|
|
1000
1137
|
autoWrapup?: AutoWrapup;
|
|
1001
1138
|
|
|
1002
1139
|
/**
|
|
1003
|
-
*
|
|
1004
|
-
* This method stops the auto-wrapup process if it is currently active
|
|
1140
|
+
* Cancels the auto-wrapup timer for the task.
|
|
1141
|
+
* This method stops the auto-wrapup process if it is currently active.
|
|
1005
1142
|
* Note: This is supported only in single session mode. Not supported in multi-session mode.
|
|
1006
1143
|
* @returns void
|
|
1007
1144
|
*/
|
|
1008
1145
|
cancelAutoWrapupTimer(): void;
|
|
1009
1146
|
|
|
1010
1147
|
/**
|
|
1011
|
-
* Deregisters all web call event listeners
|
|
1012
|
-
* Used when cleaning up task resources
|
|
1148
|
+
* Deregisters all web call event listeners.
|
|
1149
|
+
* Used when cleaning up task resources.
|
|
1013
1150
|
* @ignore
|
|
1014
1151
|
*/
|
|
1015
1152
|
unregisterWebCallListeners(): void;
|
|
@@ -1029,7 +1166,7 @@ export interface ITask extends EventEmitter {
|
|
|
1029
1166
|
* @returns Promise<TaskResponse>
|
|
1030
1167
|
* @example
|
|
1031
1168
|
* ```typescript
|
|
1032
|
-
* task.accept();
|
|
1169
|
+
* await task.accept();
|
|
1033
1170
|
* ```
|
|
1034
1171
|
*/
|
|
1035
1172
|
accept(): Promise<TaskResponse>;
|
|
@@ -1039,48 +1176,58 @@ export interface ITask extends EventEmitter {
|
|
|
1039
1176
|
* @returns Promise<TaskResponse>
|
|
1040
1177
|
* @example
|
|
1041
1178
|
* ```typescript
|
|
1042
|
-
* task.decline();
|
|
1179
|
+
* await task.decline();
|
|
1043
1180
|
* ```
|
|
1044
1181
|
*/
|
|
1045
1182
|
decline(): Promise<TaskResponse>;
|
|
1046
1183
|
|
|
1047
1184
|
/**
|
|
1048
|
-
* Places the current task on hold
|
|
1185
|
+
* Places the current task on hold.
|
|
1186
|
+
* @param mediaResourceId - Optional media resource ID to use for the hold operation. If not provided, uses the task's current mediaResourceId
|
|
1049
1187
|
* @returns Promise<TaskResponse>
|
|
1050
1188
|
* @example
|
|
1051
1189
|
* ```typescript
|
|
1052
|
-
*
|
|
1190
|
+
* // Hold with default mediaResourceId
|
|
1191
|
+
* await task.hold();
|
|
1192
|
+
*
|
|
1193
|
+
* // Hold with custom mediaResourceId
|
|
1194
|
+
* await task.hold('custom-media-resource-id');
|
|
1053
1195
|
* ```
|
|
1054
1196
|
*/
|
|
1055
|
-
hold(): Promise<TaskResponse>;
|
|
1197
|
+
hold(mediaResourceId?: string): Promise<TaskResponse>;
|
|
1056
1198
|
|
|
1057
1199
|
/**
|
|
1058
|
-
* Resumes a task that was previously on hold
|
|
1200
|
+
* Resumes a task that was previously on hold.
|
|
1201
|
+
* @param mediaResourceId - Optional media resource ID to use for the resume operation. If not provided, uses the task's current mediaResourceId from interaction media
|
|
1059
1202
|
* @returns Promise<TaskResponse>
|
|
1060
1203
|
* @example
|
|
1061
1204
|
* ```typescript
|
|
1062
|
-
*
|
|
1205
|
+
* // Resume with default mediaResourceId
|
|
1206
|
+
* await task.resume();
|
|
1207
|
+
*
|
|
1208
|
+
* // Resume with custom mediaResourceId
|
|
1209
|
+
* await task.resume('custom-media-resource-id');
|
|
1063
1210
|
* ```
|
|
1064
1211
|
*/
|
|
1065
|
-
resume(): Promise<TaskResponse>;
|
|
1212
|
+
resume(mediaResourceId?: string): Promise<TaskResponse>;
|
|
1066
1213
|
|
|
1067
1214
|
/**
|
|
1068
|
-
* Ends/terminates the current task
|
|
1215
|
+
* Ends/terminates the current task.
|
|
1069
1216
|
* @returns Promise<TaskResponse>
|
|
1070
1217
|
* @example
|
|
1071
1218
|
* ```typescript
|
|
1072
|
-
* task.end();
|
|
1219
|
+
* await task.end();
|
|
1073
1220
|
* ```
|
|
1074
1221
|
*/
|
|
1075
1222
|
end(): Promise<TaskResponse>;
|
|
1076
1223
|
|
|
1077
1224
|
/**
|
|
1078
|
-
* Initiates wrap-up process for the task with specified details
|
|
1225
|
+
* Initiates wrap-up process for the task with specified details.
|
|
1079
1226
|
* @param wrapupPayload - Wrap-up details including reason and auxiliary code
|
|
1080
1227
|
* @returns Promise<TaskResponse>
|
|
1081
1228
|
* @example
|
|
1082
1229
|
* ```typescript
|
|
1083
|
-
* task.wrapup({
|
|
1230
|
+
* await task.wrapup({
|
|
1084
1231
|
* wrapUpReason: "Customer issue resolved",
|
|
1085
1232
|
* auxCodeId: "RESOLVED"
|
|
1086
1233
|
* });
|
|
@@ -1089,25 +1236,109 @@ export interface ITask extends EventEmitter {
|
|
|
1089
1236
|
wrapup(wrapupPayload: WrapupPayLoad): Promise<TaskResponse>;
|
|
1090
1237
|
|
|
1091
1238
|
/**
|
|
1092
|
-
* Pauses the recording for current task
|
|
1239
|
+
* Pauses the recording for current task.
|
|
1093
1240
|
* @returns Promise<TaskResponse>
|
|
1094
1241
|
* @example
|
|
1095
1242
|
* ```typescript
|
|
1096
|
-
* task.pauseRecording();
|
|
1243
|
+
* await task.pauseRecording();
|
|
1097
1244
|
* ```
|
|
1098
1245
|
*/
|
|
1099
1246
|
pauseRecording(): Promise<TaskResponse>;
|
|
1100
1247
|
|
|
1101
1248
|
/**
|
|
1102
|
-
* Resumes a previously paused recording
|
|
1249
|
+
* Resumes a previously paused recording.
|
|
1103
1250
|
* @param resumeRecordingPayload - Parameters for resuming the recording
|
|
1104
1251
|
* @returns Promise<TaskResponse>
|
|
1105
1252
|
* @example
|
|
1106
1253
|
* ```typescript
|
|
1107
|
-
* task.resumeRecording({
|
|
1254
|
+
* await task.resumeRecording({
|
|
1108
1255
|
* autoResumed: false
|
|
1109
1256
|
* });
|
|
1110
1257
|
* ```
|
|
1111
1258
|
*/
|
|
1112
1259
|
resumeRecording(resumeRecordingPayload: ResumeRecordingPayload): Promise<TaskResponse>;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Initiates a consultation with another agent or queue.
|
|
1263
|
+
* @param consultPayload - Consultation details including destination and type
|
|
1264
|
+
* @returns Promise<TaskResponse>
|
|
1265
|
+
* @example
|
|
1266
|
+
* ```typescript
|
|
1267
|
+
* await task.consult({ to: "agentId", destinationType: "agent" });
|
|
1268
|
+
* ```
|
|
1269
|
+
*/
|
|
1270
|
+
consult(consultPayload: ConsultPayload): Promise<TaskResponse>;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Ends an ongoing consultation.
|
|
1274
|
+
* @param consultEndPayload - Details for ending the consultation
|
|
1275
|
+
* @returns Promise<TaskResponse>
|
|
1276
|
+
* @example
|
|
1277
|
+
* ```typescript
|
|
1278
|
+
* await task.endConsult({ isConsult: true, taskId: "taskId" });
|
|
1279
|
+
* ```
|
|
1280
|
+
*/
|
|
1281
|
+
endConsult(consultEndPayload: ConsultEndPayload): Promise<TaskResponse>;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Transfers the task to another agent or queue.
|
|
1285
|
+
* @param transferPayload - Transfer details including destination and type
|
|
1286
|
+
* @returns Promise<TaskResponse>
|
|
1287
|
+
* @example
|
|
1288
|
+
* ```typescript
|
|
1289
|
+
* await task.transfer({ to: "queueId", destinationType: "queue" });
|
|
1290
|
+
* ```
|
|
1291
|
+
*/
|
|
1292
|
+
transfer(transferPayload: TransferPayLoad): Promise<TaskResponse>;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Transfers the task after consultation.
|
|
1296
|
+
* @param consultTransferPayload - Details for consult transfer (optional)
|
|
1297
|
+
* @returns Promise<TaskResponse>
|
|
1298
|
+
* @example
|
|
1299
|
+
* ```typescript
|
|
1300
|
+
* await task.consultTransfer({ to: "agentId", destinationType: "agent" });
|
|
1301
|
+
* ```
|
|
1302
|
+
*/
|
|
1303
|
+
consultTransfer(consultTransferPayload?: ConsultTransferPayLoad): Promise<TaskResponse>;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Initiates a consult conference (merge consult call with main call).
|
|
1307
|
+
* @returns Promise<TaskResponse>
|
|
1308
|
+
* @example
|
|
1309
|
+
* ```typescript
|
|
1310
|
+
* await task.consultConference();
|
|
1311
|
+
* ```
|
|
1312
|
+
*/
|
|
1313
|
+
consultConference(): Promise<TaskResponse>;
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Exits from an ongoing conference.
|
|
1317
|
+
* @returns Promise<TaskResponse>
|
|
1318
|
+
* @example
|
|
1319
|
+
* ```typescript
|
|
1320
|
+
* await task.exitConference();
|
|
1321
|
+
* ```
|
|
1322
|
+
*/
|
|
1323
|
+
exitConference(): Promise<TaskResponse>;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Transfers the conference to another participant.
|
|
1327
|
+
* @returns Promise<TaskResponse>
|
|
1328
|
+
* @example
|
|
1329
|
+
* ```typescript
|
|
1330
|
+
* await task.transferConference();
|
|
1331
|
+
* ```
|
|
1332
|
+
*/
|
|
1333
|
+
transferConference(): Promise<TaskResponse>;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Toggles mute/unmute for the local audio stream during a WebRTC task.
|
|
1337
|
+
* @returns Promise<void>
|
|
1338
|
+
* @example
|
|
1339
|
+
* ```typescript
|
|
1340
|
+
* await task.toggleMute();
|
|
1341
|
+
* ```
|
|
1342
|
+
*/
|
|
1343
|
+
toggleMute(): Promise<void>;
|
|
1113
1344
|
}
|
package/src/types.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import * as Agent from './services/agent/types';
|
|
8
8
|
import * as Contact from './services/task/types';
|
|
9
9
|
import {Profile} from './services/config/types';
|
|
10
|
+
import {PaginatedResponse, BaseSearchParams} from './utils/PageCache';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Generic type for converting a const enum object into a union type of its values.
|
|
@@ -192,6 +193,10 @@ export interface LogContext {
|
|
|
192
193
|
method?: string;
|
|
193
194
|
interactionId?: string;
|
|
194
195
|
trackingId?: string;
|
|
196
|
+
/** Additional structured data to include in logs */
|
|
197
|
+
data?: Record<string, any>;
|
|
198
|
+
/** Error object to include in logs */
|
|
199
|
+
error?: Error | unknown;
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
/**
|
|
@@ -620,6 +625,181 @@ export type StationReLoginResponse = Agent.ReloginSuccess | Error;
|
|
|
620
625
|
*/
|
|
621
626
|
export type SetStateResponse = Agent.StateChangeSuccess | Error;
|
|
622
627
|
|
|
628
|
+
/**
|
|
629
|
+
* AddressBook types
|
|
630
|
+
*/
|
|
631
|
+
export interface AddressBookEntry {
|
|
632
|
+
id: string;
|
|
633
|
+
organizationId?: string;
|
|
634
|
+
version?: number;
|
|
635
|
+
name: string;
|
|
636
|
+
number: string;
|
|
637
|
+
createdTime?: number;
|
|
638
|
+
lastUpdatedTime?: number;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;
|
|
642
|
+
|
|
643
|
+
export interface AddressBookEntrySearchParams extends BaseSearchParams {
|
|
644
|
+
addressBookId?: string;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* EntryPointRecord types
|
|
649
|
+
*/
|
|
650
|
+
export interface EntryPointRecord {
|
|
651
|
+
id: string;
|
|
652
|
+
name: string;
|
|
653
|
+
description?: string;
|
|
654
|
+
type: string;
|
|
655
|
+
isActive: boolean;
|
|
656
|
+
orgId: string;
|
|
657
|
+
createdAt?: string;
|
|
658
|
+
updatedAt?: string;
|
|
659
|
+
settings?: Record<string, any>;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;
|
|
663
|
+
export type EntryPointSearchParams = BaseSearchParams;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Queue types
|
|
667
|
+
*/
|
|
668
|
+
export interface QueueSkillRequirement {
|
|
669
|
+
organizationId?: string;
|
|
670
|
+
id?: string;
|
|
671
|
+
version?: number;
|
|
672
|
+
skillId: string;
|
|
673
|
+
skillName?: string;
|
|
674
|
+
skillType?: string;
|
|
675
|
+
condition: string;
|
|
676
|
+
skillValue: string;
|
|
677
|
+
createdTime?: number;
|
|
678
|
+
lastUpdatedTime?: number;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export interface QueueAgent {
|
|
682
|
+
id: string;
|
|
683
|
+
ciUserId?: string;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export interface AgentGroup {
|
|
687
|
+
teamId: string;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export interface CallDistributionGroup {
|
|
691
|
+
agentGroups: AgentGroup[];
|
|
692
|
+
order: number;
|
|
693
|
+
duration?: number;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
export interface AssistantSkillMapping {
|
|
697
|
+
assistantSkillId?: string;
|
|
698
|
+
assistantSkillUpdatedTime?: number;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Configuration for a contact service queue
|
|
703
|
+
* @public
|
|
704
|
+
*/
|
|
705
|
+
export interface ContactServiceQueue {
|
|
706
|
+
/** Organization ID */
|
|
707
|
+
organizationId?: string;
|
|
708
|
+
/** Unique identifier for the queue */
|
|
709
|
+
id?: string;
|
|
710
|
+
/** Version of the queue */
|
|
711
|
+
version?: number;
|
|
712
|
+
/** Name of the Contact Service Queue */
|
|
713
|
+
name: string;
|
|
714
|
+
/** Description of the queue */
|
|
715
|
+
description?: string;
|
|
716
|
+
/** Queue type (INBOUND, OUTBOUND) */
|
|
717
|
+
queueType: 'INBOUND' | 'OUTBOUND';
|
|
718
|
+
/** Whether to check agent availability */
|
|
719
|
+
checkAgentAvailability: boolean;
|
|
720
|
+
/** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */
|
|
721
|
+
channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';
|
|
722
|
+
/** Social channel type for SOCIAL_CHANNEL channelType */
|
|
723
|
+
socialChannelType?:
|
|
724
|
+
| 'MESSAGEBIRD'
|
|
725
|
+
| 'MESSENGER'
|
|
726
|
+
| 'WHATSAPP'
|
|
727
|
+
| 'APPLE_BUSINESS_CHAT'
|
|
728
|
+
| 'GOOGLE_BUSINESS_MESSAGES';
|
|
729
|
+
/** Service level threshold in seconds */
|
|
730
|
+
serviceLevelThreshold: number;
|
|
731
|
+
/** Maximum number of simultaneous contacts */
|
|
732
|
+
maxActiveContacts: number;
|
|
733
|
+
/** Maximum time in queue in seconds */
|
|
734
|
+
maxTimeInQueue: number;
|
|
735
|
+
/** Default music in queue media file ID */
|
|
736
|
+
defaultMusicInQueueMediaFileId: string;
|
|
737
|
+
/** Timezone for routing strategies */
|
|
738
|
+
timezone?: string;
|
|
739
|
+
/** Whether the queue is active */
|
|
740
|
+
active: boolean;
|
|
741
|
+
/** Whether outdial campaign is enabled */
|
|
742
|
+
outdialCampaignEnabled?: boolean;
|
|
743
|
+
/** Whether monitoring is permitted */
|
|
744
|
+
monitoringPermitted: boolean;
|
|
745
|
+
/** Whether parking is permitted */
|
|
746
|
+
parkingPermitted: boolean;
|
|
747
|
+
/** Whether recording is permitted */
|
|
748
|
+
recordingPermitted: boolean;
|
|
749
|
+
/** Whether recording all calls is permitted */
|
|
750
|
+
recordingAllCallsPermitted: boolean;
|
|
751
|
+
/** Whether pausing recording is permitted */
|
|
752
|
+
pauseRecordingPermitted: boolean;
|
|
753
|
+
/** Recording pause duration in seconds */
|
|
754
|
+
recordingPauseDuration?: number;
|
|
755
|
+
/** Control flow script URL */
|
|
756
|
+
controlFlowScriptUrl: string;
|
|
757
|
+
/** IVR requeue URL */
|
|
758
|
+
ivrRequeueUrl: string;
|
|
759
|
+
/** Overflow number for telephony */
|
|
760
|
+
overflowNumber?: string;
|
|
761
|
+
/** Vendor ID */
|
|
762
|
+
vendorId?: string;
|
|
763
|
+
/** Routing type */
|
|
764
|
+
routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';
|
|
765
|
+
/** Skills-based routing type */
|
|
766
|
+
skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';
|
|
767
|
+
/** Queue routing type */
|
|
768
|
+
queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';
|
|
769
|
+
/** Queue skill requirements */
|
|
770
|
+
queueSkillRequirements?: QueueSkillRequirement[];
|
|
771
|
+
/** List of agents for agent-based queue */
|
|
772
|
+
agents?: QueueAgent[];
|
|
773
|
+
/** Call distribution groups */
|
|
774
|
+
callDistributionGroups: CallDistributionGroup[];
|
|
775
|
+
/** XSP version */
|
|
776
|
+
xspVersion?: string;
|
|
777
|
+
/** Subscription ID */
|
|
778
|
+
subscriptionId?: string;
|
|
779
|
+
/** Assistant skill mapping */
|
|
780
|
+
assistantSkill?: AssistantSkillMapping;
|
|
781
|
+
/** Whether this is a system default queue */
|
|
782
|
+
systemDefault?: boolean;
|
|
783
|
+
/** User who last updated agents list */
|
|
784
|
+
agentsLastUpdatedByUserName?: string;
|
|
785
|
+
/** Email of user who last updated agents list */
|
|
786
|
+
agentsLastUpdatedByUserEmailPrefix?: string;
|
|
787
|
+
/** When agents list was last updated */
|
|
788
|
+
agentsLastUpdatedTime?: number;
|
|
789
|
+
/** Creation timestamp in epoch millis */
|
|
790
|
+
createdTime?: number;
|
|
791
|
+
/** Last updated timestamp in epoch millis */
|
|
792
|
+
lastUpdatedTime?: number;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;
|
|
796
|
+
|
|
797
|
+
export interface ContactServiceQueueSearchParams extends BaseSearchParams {
|
|
798
|
+
desktopProfileFilter?: boolean;
|
|
799
|
+
provisioningView?: boolean;
|
|
800
|
+
singleObjectResponse?: boolean;
|
|
801
|
+
}
|
|
802
|
+
|
|
623
803
|
/**
|
|
624
804
|
* Response type for buddy agents query operations.
|
|
625
805
|
* Either a success response with list of buddy agents or an error.
|