@webex/contact-center 3.12.0-llmrefactor.1 → 3.12.0-llmrefactor.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +7 -5
- package/ai-docs/ARCHITECTURE.md +1 -1
- package/ai-docs/CONTRACTS.md +8 -3
- package/ai-docs/SECURITY.md +1 -1
- package/ai-docs/contact-center-spec.md +22 -4
- package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
- package/dist/cc.js +544 -12
- package/dist/cc.js.map +1 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +10 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/MetricsManager.js +16 -0
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +104 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +18 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +18 -15
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/AnswerCallOnWebexService.js +202 -0
- package/dist/services/AnswerCallOnWebexService.js.map +1 -0
- package/dist/services/EntryPoint.js +46 -68
- package/dist/services/EntryPoint.js.map +1 -1
- package/dist/services/Queue.js +27 -22
- package/dist/services/Queue.js.map +1 -1
- package/dist/services/WebexCrossClientService.js +222 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +108 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +3 -0
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +10 -6
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/types.js +4 -0
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/WebexRequest.js +6 -2
- package/dist/services/core/WebexRequest.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +28 -14
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/task/Task.js +73 -7
- package/dist/services/task/Task.js.map +1 -1
- package/dist/services/task/TaskFactory.js +8 -4
- package/dist/services/task/TaskFactory.js.map +1 -1
- package/dist/services/task/TaskManager.js +490 -21
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/WebexCallingUtils.js +70 -0
- package/dist/services/task/WebexCallingUtils.js.map +1 -0
- package/dist/services/task/constants.js +4 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +29 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/digital/Digital.js +3 -2
- package/dist/services/task/digital/Digital.js.map +1 -1
- package/dist/services/task/state-machine/TaskStateMachine.js +162 -53
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -1
- package/dist/services/task/state-machine/actions.js +6 -1
- package/dist/services/task/state-machine/actions.js.map +1 -1
- package/dist/services/task/state-machine/guards.js +7 -10
- package/dist/services/task/state-machine/guards.js.map +1 -1
- package/dist/services/task/state-machine/types.js.map +1 -1
- package/dist/services/task/state-machine/uiControlsComputer.js +118 -18
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -1
- package/dist/services/task/types.js +16 -1
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +456 -15
- package/dist/services/task/voice/Voice.js.map +1 -1
- package/dist/services/task/voice/WebRTC.js +4 -1
- package/dist/services/task/voice/WebRTC.js.map +1 -1
- package/dist/services/task/voice/wxAppVoiceMethods.js +354 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
- package/dist/services/wxAppDiagnosticLogging.js +122 -0
- package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
- package/dist/services/wxAppTelephonyUtils.js +19 -0
- package/dist/services/wxAppTelephonyUtils.js.map +1 -0
- package/dist/types/cc.d.ts +78 -4
- package/dist/types/config.d.ts +7 -0
- package/dist/types/constants.d.ts +8 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/metrics/MetricsManager.d.ts +6 -0
- package/dist/types/metrics/constants.d.ts +17 -0
- package/dist/types/services/AddressBook.d.ts +2 -1
- package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
- package/dist/types/services/EntryPoint.d.ts +7 -5
- package/dist/types/services/Queue.d.ts +5 -3
- package/dist/types/services/WebexCrossClientService.d.ts +32 -0
- package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
- package/dist/types/services/config/constants.d.ts +8 -5
- package/dist/types/services/config/types.d.ts +17 -4
- package/dist/types/services/core/Err.d.ts +2 -0
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/task/Task.d.ts +20 -2
- package/dist/types/services/task/TaskFactory.d.ts +2 -1
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +3 -0
- package/dist/types/services/task/contact.d.ts +4 -0
- package/dist/types/services/task/digital/Digital.d.ts +2 -2
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +304 -56
- package/dist/types/services/task/state-machine/guards.d.ts +6 -5
- package/dist/types/services/task/state-machine/types.d.ts +9 -1
- package/dist/types/services/task/types.d.ts +81 -4
- package/dist/types/services/task/voice/Voice.d.ts +52 -9
- package/dist/types/services/task/voice/WebRTC.d.ts +2 -2
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +55 -0
- package/dist/types/services/wxAppDiagnosticLogging.d.ts +51 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +14 -8
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types.js +7 -2
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +19 -5
- package/dist/utils/PageCache.js.map +1 -1
- package/dist/webex.js +1 -1
- package/package.json +8 -8
- package/src/cc.ts +657 -12
- package/src/config.ts +7 -0
- package/src/constants.ts +8 -0
- package/src/index.ts +2 -0
- package/src/metrics/MetricsManager.ts +16 -0
- package/src/metrics/ai-docs/metrics-spec.md +78 -10
- package/src/metrics/behavioral-events.ts +106 -0
- package/src/metrics/constants.ts +20 -0
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +239 -0
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/WebexCrossClientService.ts +293 -0
- package/src/services/WxAppTelephonyMercurySync.ts +142 -0
- package/src/services/agent/ai-docs/agent-spec.md +1 -0
- package/src/services/ai-docs/AGENTS.md +10 -10
- package/src/services/ai-docs/services-spec.md +6 -1
- package/src/services/config/Util.ts +3 -0
- package/src/services/config/ai-docs/AGENTS.md +1 -1
- package/src/services/config/ai-docs/ARCHITECTURE.md +2 -2
- package/src/services/config/ai-docs/config-spec.md +6 -0
- package/src/services/config/constants.ts +10 -6
- package/src/services/config/types.ts +16 -4
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/ai-docs/core-spec.md +5 -1
- package/src/services/core/aqm-reqs.ts +30 -15
- package/src/services/core/types.ts +2 -0
- package/src/services/task/Task.ts +79 -8
- package/src/services/task/TaskFactory.ts +8 -3
- package/src/services/task/TaskManager.ts +716 -17
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +1 -0
- package/src/services/task/ai-docs/task-spec.md +156 -3
- package/src/services/task/constants.ts +3 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/digital/Digital.ts +4 -2
- package/src/services/task/state-machine/TaskStateMachine.ts +235 -81
- package/src/services/task/state-machine/actions.ts +5 -2
- package/src/services/task/state-machine/ai-docs/AGENTS.md +6 -4
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +35 -16
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +103 -33
- package/src/services/task/state-machine/guards.ts +7 -10
- package/src/services/task/state-machine/types.ts +16 -1
- package/src/services/task/state-machine/uiControlsComputer.ts +206 -32
- package/src/services/task/types.ts +114 -4
- package/src/services/task/voice/Voice.ts +595 -14
- package/src/services/task/voice/WebRTC.ts +5 -1
- package/src/services/task/voice/wxAppVoiceMethods.ts +516 -0
- package/src/services/wxAppDiagnosticLogging.ts +174 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +33 -9
- package/src/utils/AGENTS.md +21 -10
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/ai-docs/utils-spec.md +21 -11
- package/test/unit/spec/cc.ts +1522 -19
- package/test/unit/spec/metrics/MetricsManager.ts +25 -0
- package/test/unit/spec/metrics/behavioral-events.ts +60 -0
- package/test/unit/spec/services/AddressBook.ts +37 -6
- package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
- package/test/unit/spec/services/EntryPoint.ts +87 -40
- package/test/unit/spec/services/Queue.ts +123 -12
- package/test/unit/spec/services/WebexCrossClientService.ts +467 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
- package/test/unit/spec/services/config/Util.ts +85 -0
- package/test/unit/spec/services/core/WebexRequest.ts +3 -1
- package/test/unit/spec/services/core/aqm-reqs.ts +113 -1
- package/test/unit/spec/services/task/Task.ts +274 -6
- package/test/unit/spec/services/task/TaskFactory.ts +39 -2
- package/test/unit/spec/services/task/TaskManager.ts +1717 -9
- package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
- package/test/unit/spec/services/task/contact.ts +33 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +1485 -109
- package/test/unit/spec/services/task/state-machine/guards.ts +210 -8
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +445 -7
- package/test/unit/spec/services/task/voice/Voice.ts +1412 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +603 -0
- package/test/unit/spec/services/wxAppDiagnosticLogging.ts +143 -0
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -89,10 +89,15 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
89
89
|
target: TaskState;
|
|
90
90
|
actions: string[];
|
|
91
91
|
};
|
|
92
|
-
TASK_WRAPUP: {
|
|
92
|
+
TASK_WRAPUP: ({
|
|
93
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
93
94
|
target: TaskState;
|
|
94
95
|
actions: string[];
|
|
95
|
-
}
|
|
96
|
+
} | {
|
|
97
|
+
target: TaskState;
|
|
98
|
+
actions: string[];
|
|
99
|
+
guard?: undefined;
|
|
100
|
+
})[];
|
|
96
101
|
CONTACT_ENDED: {
|
|
97
102
|
target: TaskState;
|
|
98
103
|
actions: string[];
|
|
@@ -185,10 +190,7 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
185
190
|
actions: string[];
|
|
186
191
|
};
|
|
187
192
|
CONSULT_END: ({
|
|
188
|
-
guard: (
|
|
189
|
-
context: any;
|
|
190
|
-
event: any;
|
|
191
|
-
}) => boolean;
|
|
193
|
+
guard: (params: any) => boolean;
|
|
192
194
|
target: TaskState;
|
|
193
195
|
actions: string[];
|
|
194
196
|
} | {
|
|
@@ -196,7 +198,6 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
196
198
|
context: any;
|
|
197
199
|
}) => boolean;
|
|
198
200
|
actions: string[];
|
|
199
|
-
target?: undefined;
|
|
200
201
|
})[];
|
|
201
202
|
CONTACT_ENDED: ({
|
|
202
203
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -211,12 +212,30 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
211
212
|
target: TaskState;
|
|
212
213
|
actions: string[];
|
|
213
214
|
};
|
|
215
|
+
OUTBOUND_FAILED: ({
|
|
216
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
217
|
+
target: TaskState;
|
|
218
|
+
actions: string[];
|
|
219
|
+
} | {
|
|
220
|
+
target: TaskState;
|
|
221
|
+
actions: string[];
|
|
222
|
+
guard?: undefined;
|
|
223
|
+
})[];
|
|
214
224
|
PAUSE_RECORDING: {
|
|
215
225
|
actions: string[];
|
|
216
226
|
};
|
|
217
227
|
RESUME_RECORDING: {
|
|
218
228
|
actions: string[];
|
|
219
229
|
};
|
|
230
|
+
EXIT_CONFERENCE_SUCCESS: ({
|
|
231
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
232
|
+
target: TaskState;
|
|
233
|
+
actions: string[];
|
|
234
|
+
} | {
|
|
235
|
+
target: TaskState;
|
|
236
|
+
actions: string[];
|
|
237
|
+
guard?: undefined;
|
|
238
|
+
})[];
|
|
220
239
|
};
|
|
221
240
|
};
|
|
222
241
|
HOLD_INITIATING: {
|
|
@@ -229,6 +248,19 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
229
248
|
target: TaskState;
|
|
230
249
|
actions: string[];
|
|
231
250
|
};
|
|
251
|
+
OUTBOUND_FAILED: ({
|
|
252
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
253
|
+
target: TaskState;
|
|
254
|
+
actions: string[];
|
|
255
|
+
} | {
|
|
256
|
+
target: TaskState;
|
|
257
|
+
actions: string[];
|
|
258
|
+
guard?: undefined;
|
|
259
|
+
})[];
|
|
260
|
+
TASK_WRAPUP: {
|
|
261
|
+
target: TaskState;
|
|
262
|
+
actions: string[];
|
|
263
|
+
};
|
|
232
264
|
};
|
|
233
265
|
};
|
|
234
266
|
HELD: {
|
|
@@ -279,13 +311,42 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
279
311
|
actions: string[];
|
|
280
312
|
guard?: undefined;
|
|
281
313
|
})[];
|
|
282
|
-
CONSULT_END: {
|
|
314
|
+
CONSULT_END: ({
|
|
315
|
+
guard: (params: any) => boolean;
|
|
316
|
+
target: TaskState;
|
|
283
317
|
actions: string[];
|
|
284
|
-
}
|
|
318
|
+
} | {
|
|
319
|
+
actions: string[];
|
|
320
|
+
})[];
|
|
321
|
+
PARTICIPANT_LEAVE: ({
|
|
322
|
+
guard: (params: any) => boolean;
|
|
323
|
+
target: TaskState;
|
|
324
|
+
actions: string[];
|
|
325
|
+
} | {
|
|
326
|
+
actions: string[];
|
|
327
|
+
})[];
|
|
285
328
|
TASK_WRAPUP: {
|
|
286
329
|
target: TaskState;
|
|
287
330
|
actions: string[];
|
|
288
331
|
};
|
|
332
|
+
OUTBOUND_FAILED: ({
|
|
333
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
334
|
+
target: TaskState;
|
|
335
|
+
actions: string[];
|
|
336
|
+
} | {
|
|
337
|
+
target: TaskState;
|
|
338
|
+
actions: string[];
|
|
339
|
+
guard?: undefined;
|
|
340
|
+
})[];
|
|
341
|
+
EXIT_CONFERENCE_SUCCESS: ({
|
|
342
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
343
|
+
target: TaskState;
|
|
344
|
+
actions: string[];
|
|
345
|
+
} | {
|
|
346
|
+
target: TaskState;
|
|
347
|
+
actions: string[];
|
|
348
|
+
guard?: undefined;
|
|
349
|
+
})[];
|
|
289
350
|
};
|
|
290
351
|
};
|
|
291
352
|
RESUME_INITIATING: {
|
|
@@ -297,6 +358,26 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
297
358
|
UNHOLD_FAILED: {
|
|
298
359
|
target: TaskState;
|
|
299
360
|
};
|
|
361
|
+
PARTICIPANT_LEAVE: ({
|
|
362
|
+
guard: (params: any) => boolean;
|
|
363
|
+
target: TaskState;
|
|
364
|
+
actions: string[];
|
|
365
|
+
} | {
|
|
366
|
+
actions: string[];
|
|
367
|
+
})[];
|
|
368
|
+
OUTBOUND_FAILED: ({
|
|
369
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
370
|
+
target: TaskState;
|
|
371
|
+
actions: string[];
|
|
372
|
+
} | {
|
|
373
|
+
target: TaskState;
|
|
374
|
+
actions: string[];
|
|
375
|
+
guard?: undefined;
|
|
376
|
+
})[];
|
|
377
|
+
TASK_WRAPUP: {
|
|
378
|
+
target: TaskState;
|
|
379
|
+
actions: string[];
|
|
380
|
+
};
|
|
300
381
|
};
|
|
301
382
|
};
|
|
302
383
|
CONSULT_INITIATING: {
|
|
@@ -337,7 +418,22 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
337
418
|
guard?: undefined;
|
|
338
419
|
})[];
|
|
339
420
|
CONSULT_END: ({
|
|
340
|
-
guard: (
|
|
421
|
+
guard: (params: any) => boolean;
|
|
422
|
+
target: TaskState;
|
|
423
|
+
actions: string[];
|
|
424
|
+
} | {
|
|
425
|
+
target: TaskState;
|
|
426
|
+
actions: string[];
|
|
427
|
+
})[];
|
|
428
|
+
PARTICIPANT_LEAVE: ({
|
|
429
|
+
guard: (params: any) => boolean;
|
|
430
|
+
target: TaskState;
|
|
431
|
+
actions: string[];
|
|
432
|
+
} | {
|
|
433
|
+
actions: string[];
|
|
434
|
+
})[];
|
|
435
|
+
OUTBOUND_FAILED: ({
|
|
436
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
341
437
|
target: TaskState;
|
|
342
438
|
actions: string[];
|
|
343
439
|
} | {
|
|
@@ -345,6 +441,10 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
345
441
|
actions: string[];
|
|
346
442
|
guard?: undefined;
|
|
347
443
|
})[];
|
|
444
|
+
TASK_WRAPUP: {
|
|
445
|
+
target: TaskState;
|
|
446
|
+
actions: string[];
|
|
447
|
+
};
|
|
348
448
|
};
|
|
349
449
|
};
|
|
350
450
|
CONSULTING: {
|
|
@@ -364,16 +464,12 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
364
464
|
guard?: undefined;
|
|
365
465
|
})[];
|
|
366
466
|
CONSULT_END: ({
|
|
367
|
-
guard: (
|
|
368
|
-
context: any;
|
|
369
|
-
event: any;
|
|
370
|
-
}) => boolean;
|
|
467
|
+
guard: (params: any) => boolean;
|
|
371
468
|
target: TaskState;
|
|
372
469
|
actions: string[];
|
|
373
470
|
} | {
|
|
374
471
|
target: TaskState;
|
|
375
472
|
actions: string[];
|
|
376
|
-
guard?: undefined;
|
|
377
473
|
})[];
|
|
378
474
|
SWITCH_TO_MAIN_CALL: {
|
|
379
475
|
actions: string[];
|
|
@@ -393,8 +489,6 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
393
489
|
actions: string[];
|
|
394
490
|
} | {
|
|
395
491
|
actions: string[];
|
|
396
|
-
guard?: undefined;
|
|
397
|
-
target?: undefined;
|
|
398
492
|
})[];
|
|
399
493
|
TRANSFER_SUCCESS: ({
|
|
400
494
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -435,6 +529,15 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
435
529
|
target: TaskState;
|
|
436
530
|
actions: string[];
|
|
437
531
|
};
|
|
532
|
+
OUTBOUND_FAILED: ({
|
|
533
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
534
|
+
target: TaskState;
|
|
535
|
+
actions: string[];
|
|
536
|
+
} | {
|
|
537
|
+
target: TaskState;
|
|
538
|
+
actions: string[];
|
|
539
|
+
guard?: undefined;
|
|
540
|
+
})[];
|
|
438
541
|
MERGE_TO_CONFERENCE: {
|
|
439
542
|
target: TaskState;
|
|
440
543
|
};
|
|
@@ -455,9 +558,15 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
455
558
|
actions: string[];
|
|
456
559
|
};
|
|
457
560
|
CONSULT_END: ({
|
|
458
|
-
guard: (
|
|
459
|
-
|
|
460
|
-
|
|
561
|
+
guard: (params: any) => boolean;
|
|
562
|
+
target: TaskState;
|
|
563
|
+
actions: string[];
|
|
564
|
+
} | {
|
|
565
|
+
target: TaskState;
|
|
566
|
+
actions: string[];
|
|
567
|
+
})[];
|
|
568
|
+
OUTBOUND_FAILED: ({
|
|
569
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
461
570
|
target: TaskState;
|
|
462
571
|
actions: string[];
|
|
463
572
|
} | {
|
|
@@ -465,6 +574,10 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
465
574
|
actions: string[];
|
|
466
575
|
guard?: undefined;
|
|
467
576
|
})[];
|
|
577
|
+
TASK_WRAPUP: {
|
|
578
|
+
target: TaskState;
|
|
579
|
+
actions: string[];
|
|
580
|
+
};
|
|
468
581
|
};
|
|
469
582
|
};
|
|
470
583
|
CONFERENCING: {
|
|
@@ -482,16 +595,11 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
482
595
|
guard?: undefined;
|
|
483
596
|
})[];
|
|
484
597
|
CONSULT_END: ({
|
|
485
|
-
guard: (
|
|
486
|
-
context: any;
|
|
487
|
-
event: any;
|
|
488
|
-
}) => boolean;
|
|
598
|
+
guard: (params: any) => boolean;
|
|
489
599
|
target: TaskState;
|
|
490
600
|
actions: string[];
|
|
491
601
|
} | {
|
|
492
602
|
actions: string[];
|
|
493
|
-
guard?: undefined;
|
|
494
|
-
target?: undefined;
|
|
495
603
|
})[];
|
|
496
604
|
HOLD_SUCCESS: ({
|
|
497
605
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -525,8 +633,6 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
525
633
|
actions: string[];
|
|
526
634
|
} | {
|
|
527
635
|
actions: string[];
|
|
528
|
-
guard?: undefined;
|
|
529
|
-
target?: undefined;
|
|
530
636
|
})[];
|
|
531
637
|
TRANSFER_CONFERENCE: {
|
|
532
638
|
actions: string[];
|
|
@@ -574,11 +680,29 @@ export declare function getTaskStateMachineConfig(uiControlConfig: UIControlConf
|
|
|
574
680
|
target: TaskState;
|
|
575
681
|
actions: string[];
|
|
576
682
|
};
|
|
683
|
+
OUTBOUND_FAILED: ({
|
|
684
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
685
|
+
target: TaskState;
|
|
686
|
+
actions: string[];
|
|
687
|
+
} | {
|
|
688
|
+
target: TaskState;
|
|
689
|
+
actions: string[];
|
|
690
|
+
guard?: undefined;
|
|
691
|
+
})[];
|
|
577
692
|
};
|
|
578
693
|
};
|
|
579
694
|
WRAPPING_UP: {
|
|
580
695
|
entry: string[];
|
|
581
696
|
on: {
|
|
697
|
+
TASK_WRAPUP: ({
|
|
698
|
+
guard: ({ context }: {
|
|
699
|
+
context: any;
|
|
700
|
+
}) => boolean;
|
|
701
|
+
actions: string[];
|
|
702
|
+
} | {
|
|
703
|
+
actions: string[];
|
|
704
|
+
guard?: undefined;
|
|
705
|
+
})[];
|
|
582
706
|
WRAPUP_COMPLETE: {
|
|
583
707
|
target: TaskState;
|
|
584
708
|
actions: string[];
|
|
@@ -685,10 +809,15 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
685
809
|
target: TaskState;
|
|
686
810
|
actions: string[];
|
|
687
811
|
};
|
|
688
|
-
TASK_WRAPUP: {
|
|
812
|
+
TASK_WRAPUP: ({
|
|
813
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
689
814
|
target: TaskState;
|
|
690
815
|
actions: string[];
|
|
691
|
-
}
|
|
816
|
+
} | {
|
|
817
|
+
target: TaskState;
|
|
818
|
+
actions: string[];
|
|
819
|
+
guard?: undefined;
|
|
820
|
+
})[];
|
|
692
821
|
CONTACT_ENDED: {
|
|
693
822
|
target: TaskState;
|
|
694
823
|
actions: string[];
|
|
@@ -781,10 +910,7 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
781
910
|
actions: string[];
|
|
782
911
|
};
|
|
783
912
|
CONSULT_END: ({
|
|
784
|
-
guard: (
|
|
785
|
-
context: any;
|
|
786
|
-
event: any;
|
|
787
|
-
}) => boolean;
|
|
913
|
+
guard: (params: any) => boolean;
|
|
788
914
|
target: TaskState;
|
|
789
915
|
actions: string[];
|
|
790
916
|
} | {
|
|
@@ -792,7 +918,6 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
792
918
|
context: any;
|
|
793
919
|
}) => boolean;
|
|
794
920
|
actions: string[];
|
|
795
|
-
target?: undefined;
|
|
796
921
|
})[];
|
|
797
922
|
CONTACT_ENDED: ({
|
|
798
923
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -807,12 +932,30 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
807
932
|
target: TaskState;
|
|
808
933
|
actions: string[];
|
|
809
934
|
};
|
|
935
|
+
OUTBOUND_FAILED: ({
|
|
936
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
937
|
+
target: TaskState;
|
|
938
|
+
actions: string[];
|
|
939
|
+
} | {
|
|
940
|
+
target: TaskState;
|
|
941
|
+
actions: string[];
|
|
942
|
+
guard?: undefined;
|
|
943
|
+
})[];
|
|
810
944
|
PAUSE_RECORDING: {
|
|
811
945
|
actions: string[];
|
|
812
946
|
};
|
|
813
947
|
RESUME_RECORDING: {
|
|
814
948
|
actions: string[];
|
|
815
949
|
};
|
|
950
|
+
EXIT_CONFERENCE_SUCCESS: ({
|
|
951
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
952
|
+
target: TaskState;
|
|
953
|
+
actions: string[];
|
|
954
|
+
} | {
|
|
955
|
+
target: TaskState;
|
|
956
|
+
actions: string[];
|
|
957
|
+
guard?: undefined;
|
|
958
|
+
})[];
|
|
816
959
|
};
|
|
817
960
|
};
|
|
818
961
|
HOLD_INITIATING: {
|
|
@@ -825,6 +968,19 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
825
968
|
target: TaskState;
|
|
826
969
|
actions: string[];
|
|
827
970
|
};
|
|
971
|
+
OUTBOUND_FAILED: ({
|
|
972
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
973
|
+
target: TaskState;
|
|
974
|
+
actions: string[];
|
|
975
|
+
} | {
|
|
976
|
+
target: TaskState;
|
|
977
|
+
actions: string[];
|
|
978
|
+
guard?: undefined;
|
|
979
|
+
})[];
|
|
980
|
+
TASK_WRAPUP: {
|
|
981
|
+
target: TaskState;
|
|
982
|
+
actions: string[];
|
|
983
|
+
};
|
|
828
984
|
};
|
|
829
985
|
};
|
|
830
986
|
HELD: {
|
|
@@ -875,13 +1031,42 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
875
1031
|
actions: string[];
|
|
876
1032
|
guard?: undefined;
|
|
877
1033
|
})[];
|
|
878
|
-
CONSULT_END: {
|
|
1034
|
+
CONSULT_END: ({
|
|
1035
|
+
guard: (params: any) => boolean;
|
|
1036
|
+
target: TaskState;
|
|
879
1037
|
actions: string[];
|
|
880
|
-
}
|
|
1038
|
+
} | {
|
|
1039
|
+
actions: string[];
|
|
1040
|
+
})[];
|
|
1041
|
+
PARTICIPANT_LEAVE: ({
|
|
1042
|
+
guard: (params: any) => boolean;
|
|
1043
|
+
target: TaskState;
|
|
1044
|
+
actions: string[];
|
|
1045
|
+
} | {
|
|
1046
|
+
actions: string[];
|
|
1047
|
+
})[];
|
|
881
1048
|
TASK_WRAPUP: {
|
|
882
1049
|
target: TaskState;
|
|
883
1050
|
actions: string[];
|
|
884
1051
|
};
|
|
1052
|
+
OUTBOUND_FAILED: ({
|
|
1053
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1054
|
+
target: TaskState;
|
|
1055
|
+
actions: string[];
|
|
1056
|
+
} | {
|
|
1057
|
+
target: TaskState;
|
|
1058
|
+
actions: string[];
|
|
1059
|
+
guard?: undefined;
|
|
1060
|
+
})[];
|
|
1061
|
+
EXIT_CONFERENCE_SUCCESS: ({
|
|
1062
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1063
|
+
target: TaskState;
|
|
1064
|
+
actions: string[];
|
|
1065
|
+
} | {
|
|
1066
|
+
target: TaskState;
|
|
1067
|
+
actions: string[];
|
|
1068
|
+
guard?: undefined;
|
|
1069
|
+
})[];
|
|
885
1070
|
};
|
|
886
1071
|
};
|
|
887
1072
|
RESUME_INITIATING: {
|
|
@@ -893,6 +1078,26 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
893
1078
|
UNHOLD_FAILED: {
|
|
894
1079
|
target: TaskState;
|
|
895
1080
|
};
|
|
1081
|
+
PARTICIPANT_LEAVE: ({
|
|
1082
|
+
guard: (params: any) => boolean;
|
|
1083
|
+
target: TaskState;
|
|
1084
|
+
actions: string[];
|
|
1085
|
+
} | {
|
|
1086
|
+
actions: string[];
|
|
1087
|
+
})[];
|
|
1088
|
+
OUTBOUND_FAILED: ({
|
|
1089
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1090
|
+
target: TaskState;
|
|
1091
|
+
actions: string[];
|
|
1092
|
+
} | {
|
|
1093
|
+
target: TaskState;
|
|
1094
|
+
actions: string[];
|
|
1095
|
+
guard?: undefined;
|
|
1096
|
+
})[];
|
|
1097
|
+
TASK_WRAPUP: {
|
|
1098
|
+
target: TaskState;
|
|
1099
|
+
actions: string[];
|
|
1100
|
+
};
|
|
896
1101
|
};
|
|
897
1102
|
};
|
|
898
1103
|
CONSULT_INITIATING: {
|
|
@@ -933,7 +1138,22 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
933
1138
|
guard?: undefined;
|
|
934
1139
|
})[];
|
|
935
1140
|
CONSULT_END: ({
|
|
936
|
-
guard: (
|
|
1141
|
+
guard: (params: any) => boolean;
|
|
1142
|
+
target: TaskState;
|
|
1143
|
+
actions: string[];
|
|
1144
|
+
} | {
|
|
1145
|
+
target: TaskState;
|
|
1146
|
+
actions: string[];
|
|
1147
|
+
})[];
|
|
1148
|
+
PARTICIPANT_LEAVE: ({
|
|
1149
|
+
guard: (params: any) => boolean;
|
|
1150
|
+
target: TaskState;
|
|
1151
|
+
actions: string[];
|
|
1152
|
+
} | {
|
|
1153
|
+
actions: string[];
|
|
1154
|
+
})[];
|
|
1155
|
+
OUTBOUND_FAILED: ({
|
|
1156
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
937
1157
|
target: TaskState;
|
|
938
1158
|
actions: string[];
|
|
939
1159
|
} | {
|
|
@@ -941,6 +1161,10 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
941
1161
|
actions: string[];
|
|
942
1162
|
guard?: undefined;
|
|
943
1163
|
})[];
|
|
1164
|
+
TASK_WRAPUP: {
|
|
1165
|
+
target: TaskState;
|
|
1166
|
+
actions: string[];
|
|
1167
|
+
};
|
|
944
1168
|
};
|
|
945
1169
|
};
|
|
946
1170
|
CONSULTING: {
|
|
@@ -960,16 +1184,12 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
960
1184
|
guard?: undefined;
|
|
961
1185
|
})[];
|
|
962
1186
|
CONSULT_END: ({
|
|
963
|
-
guard: (
|
|
964
|
-
context: any;
|
|
965
|
-
event: any;
|
|
966
|
-
}) => boolean;
|
|
1187
|
+
guard: (params: any) => boolean;
|
|
967
1188
|
target: TaskState;
|
|
968
1189
|
actions: string[];
|
|
969
1190
|
} | {
|
|
970
1191
|
target: TaskState;
|
|
971
1192
|
actions: string[];
|
|
972
|
-
guard?: undefined;
|
|
973
1193
|
})[];
|
|
974
1194
|
SWITCH_TO_MAIN_CALL: {
|
|
975
1195
|
actions: string[];
|
|
@@ -989,8 +1209,6 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
989
1209
|
actions: string[];
|
|
990
1210
|
} | {
|
|
991
1211
|
actions: string[];
|
|
992
|
-
guard?: undefined;
|
|
993
|
-
target?: undefined;
|
|
994
1212
|
})[];
|
|
995
1213
|
TRANSFER_SUCCESS: ({
|
|
996
1214
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -1031,6 +1249,15 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1031
1249
|
target: TaskState;
|
|
1032
1250
|
actions: string[];
|
|
1033
1251
|
};
|
|
1252
|
+
OUTBOUND_FAILED: ({
|
|
1253
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1254
|
+
target: TaskState;
|
|
1255
|
+
actions: string[];
|
|
1256
|
+
} | {
|
|
1257
|
+
target: TaskState;
|
|
1258
|
+
actions: string[];
|
|
1259
|
+
guard?: undefined;
|
|
1260
|
+
})[];
|
|
1034
1261
|
MERGE_TO_CONFERENCE: {
|
|
1035
1262
|
target: TaskState;
|
|
1036
1263
|
};
|
|
@@ -1051,9 +1278,15 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1051
1278
|
actions: string[];
|
|
1052
1279
|
};
|
|
1053
1280
|
CONSULT_END: ({
|
|
1054
|
-
guard: (
|
|
1055
|
-
|
|
1056
|
-
|
|
1281
|
+
guard: (params: any) => boolean;
|
|
1282
|
+
target: TaskState;
|
|
1283
|
+
actions: string[];
|
|
1284
|
+
} | {
|
|
1285
|
+
target: TaskState;
|
|
1286
|
+
actions: string[];
|
|
1287
|
+
})[];
|
|
1288
|
+
OUTBOUND_FAILED: ({
|
|
1289
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1057
1290
|
target: TaskState;
|
|
1058
1291
|
actions: string[];
|
|
1059
1292
|
} | {
|
|
@@ -1061,6 +1294,10 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1061
1294
|
actions: string[];
|
|
1062
1295
|
guard?: undefined;
|
|
1063
1296
|
})[];
|
|
1297
|
+
TASK_WRAPUP: {
|
|
1298
|
+
target: TaskState;
|
|
1299
|
+
actions: string[];
|
|
1300
|
+
};
|
|
1064
1301
|
};
|
|
1065
1302
|
};
|
|
1066
1303
|
CONFERENCING: {
|
|
@@ -1078,16 +1315,11 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1078
1315
|
guard?: undefined;
|
|
1079
1316
|
})[];
|
|
1080
1317
|
CONSULT_END: ({
|
|
1081
|
-
guard: (
|
|
1082
|
-
context: any;
|
|
1083
|
-
event: any;
|
|
1084
|
-
}) => boolean;
|
|
1318
|
+
guard: (params: any) => boolean;
|
|
1085
1319
|
target: TaskState;
|
|
1086
1320
|
actions: string[];
|
|
1087
1321
|
} | {
|
|
1088
1322
|
actions: string[];
|
|
1089
|
-
guard?: undefined;
|
|
1090
|
-
target?: undefined;
|
|
1091
1323
|
})[];
|
|
1092
1324
|
HOLD_SUCCESS: ({
|
|
1093
1325
|
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
@@ -1121,8 +1353,6 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1121
1353
|
actions: string[];
|
|
1122
1354
|
} | {
|
|
1123
1355
|
actions: string[];
|
|
1124
|
-
guard?: undefined;
|
|
1125
|
-
target?: undefined;
|
|
1126
1356
|
})[];
|
|
1127
1357
|
TRANSFER_CONFERENCE: {
|
|
1128
1358
|
actions: string[];
|
|
@@ -1170,11 +1400,29 @@ export declare function createTaskStateMachine(uiControlConfig: UIControlConfig,
|
|
|
1170
1400
|
target: TaskState;
|
|
1171
1401
|
actions: string[];
|
|
1172
1402
|
};
|
|
1403
|
+
OUTBOUND_FAILED: ({
|
|
1404
|
+
guard: ({ context, event }: import("./guards").GuardParams) => boolean;
|
|
1405
|
+
target: TaskState;
|
|
1406
|
+
actions: string[];
|
|
1407
|
+
} | {
|
|
1408
|
+
target: TaskState;
|
|
1409
|
+
actions: string[];
|
|
1410
|
+
guard?: undefined;
|
|
1411
|
+
})[];
|
|
1173
1412
|
};
|
|
1174
1413
|
};
|
|
1175
1414
|
WRAPPING_UP: {
|
|
1176
1415
|
entry: string[];
|
|
1177
1416
|
on: {
|
|
1417
|
+
TASK_WRAPUP: ({
|
|
1418
|
+
guard: ({ context }: {
|
|
1419
|
+
context: any;
|
|
1420
|
+
}) => boolean;
|
|
1421
|
+
actions: string[];
|
|
1422
|
+
} | {
|
|
1423
|
+
actions: string[];
|
|
1424
|
+
guard?: undefined;
|
|
1425
|
+
})[];
|
|
1178
1426
|
WRAPUP_COMPLETE: {
|
|
1179
1427
|
target: TaskState;
|
|
1180
1428
|
actions: string[];
|
|
@@ -78,13 +78,14 @@ export declare const guards: {
|
|
|
78
78
|
*/
|
|
79
79
|
shouldWrapUpOrIsInitiator: ({ context, event }: GuardParams) => boolean;
|
|
80
80
|
/**
|
|
81
|
-
* True
|
|
81
|
+
* True when an updated lifecycle event shows that this agent left the main interaction.
|
|
82
82
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
83
|
+
* Returns true when the event names this agent, or when this agent is absent from the
|
|
84
|
+
* updated participants map. EP-DN payloads remove the leaving participant instead of
|
|
85
|
+
* setting hasLeft. Remaining in the map with hasLeft, or disappearing only from
|
|
86
|
+
* mainCall media, is not treated as departure.
|
|
86
87
|
*/
|
|
87
|
-
|
|
88
|
+
didCurrentAgentLeaveMainInteraction: ({ context, event }: GuardParams) => boolean;
|
|
88
89
|
/**
|
|
89
90
|
* True when this agent initiated the conference transfer (widgets or desktop).
|
|
90
91
|
* Mirrors determineConsultInitiator: consultingAgentId === self only (not consultState).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* These types define states, events, context, and schemas for task lifecycle management.
|
|
6
6
|
*/
|
|
7
7
|
import type { AnyStateNodeConfig, ActionFunctionMap, EventObject, ActionArgs } from 'xstate';
|
|
8
|
-
import { DestinationType, TaskChannelType, TaskData, TaskUIControls, VoiceVariant } from '../types';
|
|
8
|
+
import { ConsultTransferDestinationConfig, DestinationType, TaskChannelType, TaskData, TaskUIControls, VoiceVariant } from '../types';
|
|
9
9
|
import { TaskEvent, TaskState } from './constants';
|
|
10
10
|
/**
|
|
11
11
|
* Represents a participant in a conference call
|
|
@@ -40,6 +40,14 @@ export interface UIControlConfig {
|
|
|
40
40
|
isRecordingEnabled: boolean;
|
|
41
41
|
/** Current agent ID for ownership checks (transfer conference) */
|
|
42
42
|
agentId?: string;
|
|
43
|
+
/** Agent-profile policy for ordered consult/transfer destinations */
|
|
44
|
+
consultTransferConfig?: ConsultTransferDestinationConfig;
|
|
45
|
+
/** Whether wxApp thick-client answer is enabled (WXCC-6026) */
|
|
46
|
+
enableWxBetterTogether?: boolean;
|
|
47
|
+
/** True while wxApp telephony answer is in flight (outdial Calling… label) */
|
|
48
|
+
wxAppAnswerPending?: boolean;
|
|
49
|
+
/** True only during the wxApp accept REST call (decline disabled for inbound + outdial) */
|
|
50
|
+
wxAppAcceptInFlight?: boolean;
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
45
53
|
* Task state machine context.
|