@webex/contact-center 3.12.0-webex-services-ready.4 → 3.13.0

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.
Files changed (250) hide show
  1. package/.sdd/manifest.json +24 -13
  2. package/ai-docs/ARCHITECTURE.md +1 -1
  3. package/ai-docs/CONTRACTS.md +19 -3
  4. package/ai-docs/SECURITY.md +1 -1
  5. package/ai-docs/SERVICE_STATE.md +4 -0
  6. package/ai-docs/contact-center-spec.md +50 -6
  7. package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
  8. package/ai-docs/features/contact-owner-change-refactor.md +78 -0
  9. package/dist/cc.js +757 -22
  10. package/dist/cc.js.map +1 -1
  11. package/dist/config.js +7 -0
  12. package/dist/config.js.map +1 -1
  13. package/dist/constants.js +23 -2
  14. package/dist/constants.js.map +1 -1
  15. package/dist/index.js +34 -12
  16. package/dist/index.js.map +1 -1
  17. package/dist/metrics/MetricsManager.js +16 -0
  18. package/dist/metrics/MetricsManager.js.map +1 -1
  19. package/dist/metrics/behavioral-events.js +110 -0
  20. package/dist/metrics/behavioral-events.js.map +1 -1
  21. package/dist/metrics/constants.js +33 -0
  22. package/dist/metrics/constants.js.map +1 -1
  23. package/dist/services/AddressBook.js +18 -15
  24. package/dist/services/AddressBook.js.map +1 -1
  25. package/dist/services/AnswerCallOnWebexService.js +202 -0
  26. package/dist/services/AnswerCallOnWebexService.js.map +1 -0
  27. package/dist/services/ApiAiAssistant.js +221 -11
  28. package/dist/services/ApiAiAssistant.js.map +1 -1
  29. package/dist/services/EntryPoint.js +46 -68
  30. package/dist/services/EntryPoint.js.map +1 -1
  31. package/dist/services/Queue.js +27 -22
  32. package/dist/services/Queue.js.map +1 -1
  33. package/dist/services/WebCallingService.js +10 -2
  34. package/dist/services/WebCallingService.js.map +1 -1
  35. package/dist/services/WebexCrossClientService.js +225 -0
  36. package/dist/services/WebexCrossClientService.js.map +1 -0
  37. package/dist/services/WxAppTelephonyMercurySync.js +111 -0
  38. package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
  39. package/dist/services/config/Util.js +46 -46
  40. package/dist/services/config/Util.js.map +1 -1
  41. package/dist/services/config/constants.js +34 -77
  42. package/dist/services/config/constants.js.map +1 -1
  43. package/dist/services/config/index.js +100 -226
  44. package/dist/services/config/index.js.map +1 -1
  45. package/dist/services/config/types.js +51 -18
  46. package/dist/services/config/types.js.map +1 -1
  47. package/dist/services/constants.js +11 -1
  48. package/dist/services/constants.js.map +1 -1
  49. package/dist/services/core/Err.js.map +1 -1
  50. package/dist/services/core/Utils.js +25 -1
  51. package/dist/services/core/Utils.js.map +1 -1
  52. package/dist/services/core/WebexRequest.js +6 -2
  53. package/dist/services/core/WebexRequest.js.map +1 -1
  54. package/dist/services/core/aqm-reqs.js +17 -11
  55. package/dist/services/core/aqm-reqs.js.map +1 -1
  56. package/dist/services/core/constants.js +9 -1
  57. package/dist/services/core/constants.js.map +1 -1
  58. package/dist/services/core/types.js.map +1 -1
  59. package/dist/services/core/websocket/WebSocketManager.js +17 -1
  60. package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
  61. package/dist/services/task/Task.js +275 -8
  62. package/dist/services/task/Task.js.map +1 -1
  63. package/dist/services/task/TaskFactory.js +11 -6
  64. package/dist/services/task/TaskFactory.js.map +1 -1
  65. package/dist/services/task/TaskManager.js +590 -42
  66. package/dist/services/task/TaskManager.js.map +1 -1
  67. package/dist/services/task/TaskUtils.js +11 -1
  68. package/dist/services/task/TaskUtils.js.map +1 -1
  69. package/dist/services/task/WebexCallingUtils.js +70 -0
  70. package/dist/services/task/WebexCallingUtils.js.map +1 -0
  71. package/dist/services/task/constants.js +14 -2
  72. package/dist/services/task/constants.js.map +1 -1
  73. package/dist/services/task/contact.js +29 -0
  74. package/dist/services/task/contact.js.map +1 -1
  75. package/dist/services/task/digital/Digital.js +4 -3
  76. package/dist/services/task/digital/Digital.js.map +1 -1
  77. package/dist/services/task/state-machine/TaskStateMachine.js +162 -53
  78. package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -1
  79. package/dist/services/task/state-machine/actions.js +6 -1
  80. package/dist/services/task/state-machine/actions.js.map +1 -1
  81. package/dist/services/task/state-machine/guards.js +7 -10
  82. package/dist/services/task/state-machine/guards.js.map +1 -1
  83. package/dist/services/task/state-machine/types.js.map +1 -1
  84. package/dist/services/task/state-machine/uiControlsComputer.js +118 -18
  85. package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -1
  86. package/dist/services/task/types.js +47 -1
  87. package/dist/services/task/types.js.map +1 -1
  88. package/dist/services/task/voice/Voice.js +477 -17
  89. package/dist/services/task/voice/Voice.js.map +1 -1
  90. package/dist/services/task/voice/WebRTC.js +6 -3
  91. package/dist/services/task/voice/WebRTC.js.map +1 -1
  92. package/dist/services/task/voice/wxAppOfferObservability.js +145 -0
  93. package/dist/services/task/voice/wxAppOfferObservability.js.map +1 -0
  94. package/dist/services/task/voice/wxAppVoiceMethods.js +395 -0
  95. package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
  96. package/dist/services/wxAppDiagnosticLogging.js +159 -0
  97. package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
  98. package/dist/services/wxAppTelephonyUtils.js +19 -0
  99. package/dist/services/wxAppTelephonyUtils.js.map +1 -0
  100. package/dist/types/cc.d.ts +102 -8
  101. package/dist/types/config.d.ts +7 -0
  102. package/dist/types/constants.d.ts +21 -0
  103. package/dist/types/index.d.ts +34 -15
  104. package/dist/types/metrics/MetricsManager.d.ts +6 -0
  105. package/dist/types/metrics/constants.d.ts +31 -0
  106. package/dist/types/services/AddressBook.d.ts +2 -1
  107. package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
  108. package/dist/types/services/ApiAiAssistant.d.ts +48 -4
  109. package/dist/types/services/EntryPoint.d.ts +7 -5
  110. package/dist/types/services/Queue.d.ts +5 -3
  111. package/dist/types/services/WebexCrossClientService.d.ts +32 -0
  112. package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
  113. package/dist/types/services/config/Util.d.ts +4 -8
  114. package/dist/types/services/config/constants.d.ts +28 -76
  115. package/dist/types/services/config/index.d.ts +16 -64
  116. package/dist/types/services/config/types.d.ts +146 -173
  117. package/dist/types/services/constants.d.ts +9 -0
  118. package/dist/types/services/core/Err.d.ts +2 -0
  119. package/dist/types/services/core/Utils.d.ts +10 -0
  120. package/dist/types/services/core/WebexRequest.d.ts +1 -0
  121. package/dist/types/services/core/constants.d.ts +7 -0
  122. package/dist/types/services/core/types.d.ts +2 -0
  123. package/dist/types/services/task/Task.d.ts +34 -5
  124. package/dist/types/services/task/TaskFactory.d.ts +4 -2
  125. package/dist/types/services/task/TaskUtils.d.ts +6 -0
  126. package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
  127. package/dist/types/services/task/constants.d.ts +12 -0
  128. package/dist/types/services/task/contact.d.ts +4 -0
  129. package/dist/types/services/task/digital/Digital.d.ts +4 -3
  130. package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +304 -56
  131. package/dist/types/services/task/state-machine/guards.d.ts +6 -5
  132. package/dist/types/services/task/state-machine/types.d.ts +9 -1
  133. package/dist/types/services/task/types.d.ts +192 -5
  134. package/dist/types/services/task/voice/Voice.d.ts +68 -11
  135. package/dist/types/services/task/voice/WebRTC.d.ts +5 -4
  136. package/dist/types/services/task/voice/wxAppOfferObservability.d.ts +39 -0
  137. package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +68 -0
  138. package/dist/types/services/wxAppDiagnosticLogging.d.ts +63 -0
  139. package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
  140. package/dist/types/types.d.ts +80 -13
  141. package/dist/types/utils/PageCache.d.ts +20 -3
  142. package/dist/types.js +54 -8
  143. package/dist/types.js.map +1 -1
  144. package/dist/utils/PageCache.js +19 -5
  145. package/dist/utils/PageCache.js.map +1 -1
  146. package/dist/webex.js +9 -1
  147. package/dist/webex.js.map +1 -1
  148. package/package.json +10 -9
  149. package/src/cc.ts +969 -38
  150. package/src/config.ts +7 -0
  151. package/src/constants.ts +24 -0
  152. package/src/index.ts +39 -10
  153. package/src/metrics/MetricsManager.ts +16 -0
  154. package/src/metrics/ai-docs/metrics-spec.md +138 -21
  155. package/src/metrics/behavioral-events.ts +112 -0
  156. package/src/metrics/constants.ts +36 -0
  157. package/src/services/AddressBook.ts +17 -6
  158. package/src/services/AnswerCallOnWebexService.ts +239 -0
  159. package/src/services/ApiAiAssistant.ts +297 -13
  160. package/src/services/EntryPoint.ts +59 -60
  161. package/src/services/Queue.ts +29 -12
  162. package/src/services/WebCallingService.ts +16 -2
  163. package/src/services/WebexCrossClientService.ts +298 -0
  164. package/src/services/WxAppTelephonyMercurySync.ts +142 -0
  165. package/src/services/agent/ai-docs/AGENTS.md +1 -1
  166. package/src/services/agent/ai-docs/agent-spec.md +1 -0
  167. package/src/services/ai-docs/AGENTS.md +10 -10
  168. package/src/services/ai-docs/services-spec.md +25 -5
  169. package/src/services/config/Util.ts +52 -82
  170. package/src/services/config/ai-docs/AGENTS.md +35 -40
  171. package/src/services/config/ai-docs/ARCHITECTURE.md +90 -103
  172. package/src/services/config/ai-docs/config-spec.md +132 -132
  173. package/src/services/config/constants.ts +39 -85
  174. package/src/services/config/index.ts +116 -277
  175. package/src/services/config/types.ts +140 -195
  176. package/src/services/constants.ts +10 -0
  177. package/src/services/core/Err.ts +1 -0
  178. package/src/services/core/Utils.ts +28 -0
  179. package/src/services/core/WebexRequest.ts +3 -1
  180. package/src/services/core/ai-docs/core-spec.md +25 -11
  181. package/src/services/core/aqm-reqs.ts +18 -12
  182. package/src/services/core/constants.ts +8 -0
  183. package/src/services/core/types.ts +33 -1
  184. package/src/services/core/websocket/WebSocketManager.ts +26 -2
  185. package/src/services/task/Task.ts +386 -12
  186. package/src/services/task/TaskFactory.ts +33 -6
  187. package/src/services/task/TaskManager.ts +857 -41
  188. package/src/services/task/TaskUtils.ts +13 -0
  189. package/src/services/task/WebexCallingUtils.ts +136 -0
  190. package/src/services/task/ai-docs/ARCHITECTURE.md +1 -0
  191. package/src/services/task/ai-docs/task-spec.md +190 -8
  192. package/src/services/task/constants.ts +13 -0
  193. package/src/services/task/contact.ts +30 -0
  194. package/src/services/task/digital/Digital.ts +11 -4
  195. package/src/services/task/state-machine/TaskStateMachine.ts +235 -81
  196. package/src/services/task/state-machine/actions.ts +5 -2
  197. package/src/services/task/state-machine/ai-docs/AGENTS.md +6 -4
  198. package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +35 -16
  199. package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +103 -33
  200. package/src/services/task/state-machine/guards.ts +7 -10
  201. package/src/services/task/state-machine/types.ts +16 -1
  202. package/src/services/task/state-machine/uiControlsComputer.ts +206 -32
  203. package/src/services/task/types.ts +269 -4
  204. package/src/services/task/voice/Voice.ts +625 -17
  205. package/src/services/task/voice/WebRTC.ts +11 -4
  206. package/src/services/task/voice/wxAppOfferObservability.ts +204 -0
  207. package/src/services/task/voice/wxAppVoiceMethods.ts +575 -0
  208. package/src/services/wxAppDiagnosticLogging.ts +286 -0
  209. package/src/services/wxAppTelephonyUtils.ts +14 -0
  210. package/src/types.ts +108 -13
  211. package/src/utils/AGENTS.md +21 -10
  212. package/src/utils/PageCache.ts +38 -5
  213. package/src/utils/ai-docs/utils-spec.md +21 -11
  214. package/src/webex.js +8 -0
  215. package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
  216. package/test/unit/spec/cc.ts +3408 -152
  217. package/test/unit/spec/index.ts +885 -0
  218. package/test/unit/spec/metrics/MetricsManager.ts +25 -0
  219. package/test/unit/spec/metrics/behavioral-events.ts +60 -0
  220. package/test/unit/spec/services/AddressBook.ts +37 -6
  221. package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
  222. package/test/unit/spec/services/ApiAiAssistant.ts +269 -8
  223. package/test/unit/spec/services/EntryPoint.ts +87 -40
  224. package/test/unit/spec/services/Queue.ts +123 -12
  225. package/test/unit/spec/services/WebCallingService.ts +38 -0
  226. package/test/unit/spec/services/WebexCrossClientService.ts +509 -0
  227. package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
  228. package/test/unit/spec/services/config/Util.ts +501 -0
  229. package/test/unit/spec/services/config/index.ts +313 -543
  230. package/test/unit/spec/services/core/Utils.ts +22 -0
  231. package/test/unit/spec/services/core/WebexRequest.ts +8 -7
  232. package/test/unit/spec/services/core/aqm-reqs.ts +142 -1
  233. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +64 -14
  234. package/test/unit/spec/services/task/Task.ts +2257 -11
  235. package/test/unit/spec/services/task/TaskFactory.ts +56 -2
  236. package/test/unit/spec/services/task/TaskManager.ts +5559 -1493
  237. package/test/unit/spec/services/task/TaskUtils.ts +72 -0
  238. package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
  239. package/test/unit/spec/services/task/contact.ts +33 -0
  240. package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +1501 -92
  241. package/test/unit/spec/services/task/state-machine/guards.ts +210 -8
  242. package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +445 -7
  243. package/test/unit/spec/services/task/voice/Voice.ts +1710 -4
  244. package/test/unit/spec/services/task/voice/wxAppOfferObservability.ts +361 -0
  245. package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +719 -0
  246. package/test/unit/spec/services/wxAppDiagnosticLogging.ts +179 -0
  247. package/test/unit/spec/wellnessSampleUtils.ts +288 -0
  248. package/typedoc.md +1 -1
  249. package/umd/contact-center.min.js +2 -2
  250. package/umd/contact-center.min.js.map +1 -1
@@ -3,6 +3,7 @@ import type {AnyActorRef} from 'xstate';
3
3
  import {TaskEventPayload} from './state-machine';
4
4
  import {Msg} from '../core/GlobalTypes';
5
5
  import AutoWrapup from './AutoWrapup';
6
+ import type {CollaborationAccess} from '../config/types';
6
7
 
7
8
  /**
8
9
  * Unique identifier for a task in the contact center system
@@ -33,7 +34,7 @@ export const DESTINATION_TYPE = {
33
34
  DIALNUMBER: 'dialNumber',
34
35
  /** Route task to a specific agent */
35
36
  AGENT: 'agent',
36
- /** Route task to an entry point (supported only for consult operations) */
37
+ /** Route task to an entry point */
37
38
  ENTRYPOINT: 'entryPoint',
38
39
  };
39
40
 
@@ -67,6 +68,17 @@ export const CONSULT_TRANSFER_DESTINATION_TYPE = {
67
68
  */
68
69
  export type ConsultTransferDestinationType = Enum<typeof CONSULT_TRANSFER_DESTINATION_TYPE>;
69
70
 
71
+ /**
72
+ * Agent-profile policy used by the task state machine to derive consult/transfer destinations.
73
+ * @internal
74
+ */
75
+ export type ConsultTransferDestinationConfig = {
76
+ allowConsultToQueue: boolean;
77
+ accessQueue?: CollaborationAccess;
78
+ accessEntryPoint?: CollaborationAccess;
79
+ accessBuddyTeam?: CollaborationAccess;
80
+ };
81
+
70
82
  /**
71
83
  * Defines all supported media channel types for customer interactions
72
84
  * These represent the different ways customers can communicate with agents
@@ -234,6 +246,11 @@ export enum TASK_EVENTS {
234
246
  */
235
247
  TASK_UI_CONTROLS_UPDATED = 'task:ui-controls-updated',
236
248
 
249
+ /**
250
+ * Triggered when wxApp mute state changes from Webex App (Mercury sync or call details).
251
+ */
252
+ TASK_WXAPP_MUTE_STATE_UPDATED = 'task:wxapp-mute-state-updated',
253
+
237
254
  /**
238
255
  * Triggered when a consultation request is accepted
239
256
  * @example
@@ -699,6 +716,27 @@ export enum TASK_EVENTS {
699
716
  * ```
700
717
  */
701
718
  TASK_CAMPAIGN_CONTACT_UPDATED = 'task:campaignContactUpdated',
719
+
720
+ /**
721
+ * Triggered when a mid-call summary is received for the task.
722
+ */
723
+ TASK_MID_CALL_SUMMARY_RECEIVED = 'task:midCallSummaryReceived',
724
+
725
+ /**
726
+ * Triggered on the task object when AI feature enablement flags arrive for that task's interaction.
727
+ * Fires immediately if the frame arrived after the task was registered, or at registration time
728
+ * if the frame arrived before the task (orphan retention). Consumers should use this event
729
+ * instead of the cc-level `FEATURE_ENABLEMENT` event so they do not need to maintain an
730
+ * interactionId → flags map manually.
731
+ * @example
732
+ * ```typescript
733
+ * task.on(TASK_EVENTS.TASK_FEATURE_ENABLEMENT, (enablement: AISummaryFeatureEnablement) => {
734
+ * const { midCallEnabled, postCallEnabled } = enablement;
735
+ * // gate summary UI on these flags
736
+ * });
737
+ * ```
738
+ */
739
+ TASK_FEATURE_ENABLEMENT = 'task:featureEnablement',
702
740
  }
703
741
 
704
742
  /**
@@ -1134,6 +1172,8 @@ export type TaskData = {
1134
1172
  reservedAgentChannelId?: string;
1135
1173
  /** Indicates if wrap-up is required for this task */
1136
1174
  wrapUpRequired?: boolean;
1175
+ /** SDK-internal: skip task:outdialFailed when non-wxApp agent-terminated outdial still needs wrapup */
1176
+ suppressOutdialFailedPopup?: boolean;
1137
1177
 
1138
1178
  /**
1139
1179
  * Current consultation status derived from state machine
@@ -1215,6 +1255,19 @@ export type InteractionUIControls = {
1215
1255
  mergeToConference: TaskUIControlState;
1216
1256
  wrapup: TaskUIControlState;
1217
1257
  switch: TaskUIControlState;
1258
+ keypad?: TaskUIControlState;
1259
+ };
1260
+
1261
+ /** Options for {@link ITask.toggleMute} — wxApp engaged calls use `muted` for target state. */
1262
+ export type TaskToggleMuteOptions = {
1263
+ muted?: boolean;
1264
+ lineOwnerId?: string;
1265
+ };
1266
+
1267
+ /** Options for {@link ITask.transmitDtmf} — wxApp engaged in-call DTMF. */
1268
+ export type TaskTransmitDtmfOptions = {
1269
+ dtmf: string;
1270
+ lineOwnerId?: string;
1218
1271
  };
1219
1272
 
1220
1273
  export type TaskUILeg = 'main' | 'consult';
@@ -1228,6 +1281,14 @@ export type TaskUIControls = {
1228
1281
  main: InteractionUIControls;
1229
1282
  consult: InteractionUIControls;
1230
1283
  activeLeg: TaskUILeg;
1284
+ /**
1285
+ * Ordered destination categories available for each action.
1286
+ * The first category is the default for consumers that render a destination picker.
1287
+ */
1288
+ consultTransferDestinations: {
1289
+ consult: ConsultTransferDestinationType[];
1290
+ transfer: ConsultTransferDestinationType[];
1291
+ };
1231
1292
  };
1232
1293
 
1233
1294
  /**
@@ -1629,6 +1690,87 @@ export type ParticipantBooleanKey =
1629
1690
  */
1630
1691
  export type TaskResponse = AgentContact | Error | void;
1631
1692
 
1693
+ /** AI-assisted mid-call summary action. @public */
1694
+ export type AISummaryAction = 'CONSULT' | 'TRANSFER';
1695
+
1696
+ /** Feedback value sent with an AI summary response. @public */
1697
+ export type AISummaryFeedback = 'none' | 'thumbs_up' | 'thumbs_down';
1698
+
1699
+ /** AI summary response state for post-call and mid-call flows. @public */
1700
+ export type AISummaryState =
1701
+ | 'DEFAULT'
1702
+ | 'EXCLUDED'
1703
+ | 'IGNORED'
1704
+ | 'MID_CALL_CANCELLED'
1705
+ | 'NOT_RECEIVED';
1706
+
1707
+ /** Structured fields shared by post-call and mid-call summaries. @public */
1708
+ export type AISummarySections = {
1709
+ initialContactReason?: string;
1710
+ additionalContactReasons?: string;
1711
+ additionalContext?: string;
1712
+ keyActionsTaken?: string;
1713
+ nextSteps?: string;
1714
+ reasonForTransferOrConsult?: string;
1715
+ };
1716
+
1717
+ /** RTD payload returned or delivered for an AI summary. @public */
1718
+ export type AISummary = {
1719
+ conversationId: string;
1720
+ adaptiveCard?: Record<string, unknown>;
1721
+ adaptiveCardId?: string;
1722
+ editAdaptiveCard?: Record<string, unknown>;
1723
+ editAdaptiveCardId?: string;
1724
+ areTranscriptsAvailable?: boolean;
1725
+ languageCode?: string;
1726
+ resolution?: string;
1727
+ sections?: AISummarySections;
1728
+ suggestedWrapUpCodes?: Array<{name: string; [key: string]: unknown}>;
1729
+ suggestedWrapUpCodesMessage?: string;
1730
+ summaryText?: string;
1731
+ timestamp?: number;
1732
+ [key: string]: unknown;
1733
+ };
1734
+
1735
+ /** RTD payload describing AI-summary feature enablement for an interaction. @public */
1736
+ export type AISummaryFeatureEnablement = {
1737
+ interactionId: string;
1738
+ midCallEnabled?: boolean;
1739
+ postCallEnabled?: boolean;
1740
+ actionTimestamp?: number;
1741
+ [key: string]: unknown;
1742
+ };
1743
+
1744
+ /** Current AI-summary capabilities for a task. @public */
1745
+ export type AISummaryCapabilities = Required<
1746
+ Pick<AISummaryFeatureEnablement, 'midCallEnabled' | 'postCallEnabled'>
1747
+ >;
1748
+
1749
+ /**
1750
+ * Payload sent when reporting a post-call or mid-call summary result.
1751
+ * Transport timestamps are generated by the SDK when the response is sent.
1752
+ * @public
1753
+ */
1754
+ export type AISummaryResponse = {
1755
+ summary: AISummarySections | string;
1756
+ feedback: AISummaryFeedback;
1757
+ state: AISummaryState;
1758
+ numberOfTimesViewed: number;
1759
+ numberOfTimesEdited: number;
1760
+ numberOfTimesCopied: number;
1761
+ summaryReceived?: boolean;
1762
+ wrapUpCode?: string;
1763
+ };
1764
+
1765
+ /**
1766
+ * Request payload for removing a supported participant from an active conference.
1767
+ * @public
1768
+ */
1769
+ export type DropConferenceParticipantPayload = {
1770
+ /** Participant identifier supplied by the current task roster. */
1771
+ participantId: string;
1772
+ };
1773
+
1632
1774
  /**
1633
1775
  * Payload shape used by consult conference helper utilities.
1634
1776
  */
@@ -1668,6 +1810,12 @@ export interface ITask extends IEventEmitter {
1668
1810
  */
1669
1811
  data: TaskData;
1670
1812
 
1813
+ /**
1814
+ * Current AI-summary capabilities for this task. Both flags are false until
1815
+ * the matching feature-enablement event is received.
1816
+ */
1817
+ readonly aiSummaryCapabilities: Readonly<AISummaryCapabilities>;
1818
+
1671
1819
  /**
1672
1820
  * Map associating tasks with their corresponding call identifiers.
1673
1821
  */
@@ -1687,6 +1835,43 @@ export interface ITask extends IEventEmitter {
1687
1835
  */
1688
1836
  readonly uiControls: TaskUIControls;
1689
1837
 
1838
+ /**
1839
+ * Update wxApp thick-client answer flag at runtime.
1840
+ * Voice tasks override to refresh uiControls; other channel types no-op.
1841
+ * @internal
1842
+ */
1843
+ setEnableWxBetterTogether(enabled: boolean): void;
1844
+
1845
+ /**
1846
+ * Apply wxApp mute state from Mercury sync or call-details fetch.
1847
+ * @internal
1848
+ */
1849
+ applyWxAppMuteStateFromSync(incomingCallId: string, muted: boolean): void;
1850
+
1851
+ /**
1852
+ * Current wxApp mute state for engaged telephony (Voice tasks only).
1853
+ */
1854
+ getWxAppMuted?(): boolean;
1855
+
1856
+ /**
1857
+ * Re-seed wxApp mute from GET telephony/calls/{callId}. Resolves to muted state when known.
1858
+ */
1859
+ syncWxAppMuteFromCallDetails?(): Promise<boolean | undefined>;
1860
+
1861
+ /**
1862
+ * Re-run OFFERED wxApp offer diagnostics without emitting UI controls.
1863
+ * Voice tasks implement this; other channel types omit it.
1864
+ * @internal
1865
+ */
1866
+ refreshWxAppOfferObservability?(): void;
1867
+
1868
+ /**
1869
+ * Cancel pending wxApp offer observability timers (participant-mismatch grace).
1870
+ * Voice tasks implement this; other channel types omit it.
1871
+ * @internal
1872
+ */
1873
+ disposeWxAppOfferObservability?(): void;
1874
+
1690
1875
  /**
1691
1876
  * State machine instance for managing task state transitions and derived properties.
1692
1877
  * The state machine handles:
@@ -1718,6 +1903,46 @@ export interface ITask extends IEventEmitter {
1718
1903
  */
1719
1904
  cancelAutoWrapupTimer(): void;
1720
1905
 
1906
+ /**
1907
+ * Applies the AI-summary feature flags received for this task's interaction.
1908
+ * @internal
1909
+ */
1910
+ setFeatureEnablement?(enablement: AISummaryFeatureEnablement): void;
1911
+
1912
+ /**
1913
+ * Clears the task-local AI-summary feature flags on task removal or session cleanup.
1914
+ * @internal
1915
+ */
1916
+ clearFeatureEnablement?(): void;
1917
+
1918
+ /**
1919
+ * Requests an AI-generated post-call summary for this task.
1920
+ * @returns Promise resolving with the matching post-call summary payload.
1921
+ */
1922
+ requestPostCallSummary(): Promise<AISummary>;
1923
+
1924
+ /**
1925
+ * Sends the consumer's post-call summary response.
1926
+ * @param response - Validated post-call response observations and summary state.
1927
+ * @returns Promise resolving when AI Assistant acknowledges the response.
1928
+ */
1929
+ sendPostCallSummaryResponse(response: AISummaryResponse): Promise<void>;
1930
+
1931
+ /**
1932
+ * Requests an AI-generated mid-call summary for a consult or transfer flow.
1933
+ * @param action - The consult or transfer flow requesting the summary.
1934
+ * @returns Promise resolving with the matching mid-call summary payload.
1935
+ */
1936
+ requestMidCallSummary(action: AISummaryAction): Promise<AISummary>;
1937
+
1938
+ /**
1939
+ * Sends the consumer's mid-call summary response for a consult or transfer flow.
1940
+ * @param response - Validated mid-call response observations and summary state.
1941
+ * @param action - The consult or transfer flow responding to the summary.
1942
+ * @returns Promise resolving when AI Assistant acknowledges the response.
1943
+ */
1944
+ sendMidCallSummaryResponse(response: AISummaryResponse, action: AISummaryAction): Promise<void>;
1945
+
1721
1946
  /**
1722
1947
  * Deregisters all web call event listeners.
1723
1948
  * Used when cleaning up task resources.
@@ -1875,6 +2100,18 @@ export interface ITask extends IEventEmitter {
1875
2100
  */
1876
2101
  consultConference(): Promise<TaskResponse>;
1877
2102
 
2103
+ /**
2104
+ * Removes a supported participant from the active conference.
2105
+ * Resolves after the correlated ParticipantLeftConference routing event.
2106
+ * @param payload - Participant identifier to remove
2107
+ * @returns Promise<TaskResponse>
2108
+ * @example
2109
+ * ```typescript
2110
+ * await task.dropConferenceParticipant({participantId: 'participant-id'});
2111
+ * ```
2112
+ */
2113
+ dropConferenceParticipant(payload: DropConferenceParticipantPayload): Promise<TaskResponse>;
2114
+
1878
2115
  /**
1879
2116
  * Exits from an ongoing conference.
1880
2117
  * @returns Promise<TaskResponse>
@@ -1909,14 +2146,29 @@ export interface ITask extends IEventEmitter {
1909
2146
  switchCall(): Promise<TaskResponse>;
1910
2147
 
1911
2148
  /**
1912
- * Toggles mute/unmute for the local audio stream during a WebRTC task.
2149
+ * Toggles mute/unmute for the active call.
2150
+ * WebRTC tasks toggle the local stream; wxApp engaged tasks route to telephony mute REST when
2151
+ * `enableWxBetterTogether` is active.
2152
+ * @param options - Optional target mute state (`muted`) for wxApp; ignored for WebRTC toggle.
1913
2153
  * @returns Promise<void>
1914
2154
  * @example
1915
2155
  * ```typescript
1916
2156
  * await task.toggleMute();
2157
+ * await task.toggleMute({ muted: true });
2158
+ * ```
2159
+ */
2160
+ toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
2161
+
2162
+ /**
2163
+ * Sends in-call DTMF tones for wxApp engaged telephony tasks when `enableWxBetterTogether` is active.
2164
+ * @param options - DTMF digit(s) and optional shared-line owner id.
2165
+ * @returns Promise<void>
2166
+ * @example
2167
+ * ```typescript
2168
+ * await task.transmitDtmf({ dtmf: '5' });
1917
2169
  * ```
1918
2170
  */
1919
- toggleMute(): Promise<void>;
2171
+ transmitDtmf(options: TaskTransmitDtmfOptions): Promise<void>;
1920
2172
  }
1921
2173
 
1922
2174
  /**
@@ -1952,6 +2204,12 @@ export interface IVoice extends ITask {
1952
2204
  * ```
1953
2205
  */
1954
2206
  holdResume(): Promise<TaskResponse>;
2207
+ /** @see wxAppVoiceMethods — WXCC-6026 */
2208
+ isWebexAppCallingOffer(): boolean;
2209
+ /** @see wxAppVoiceMethods — WXCC-6026 */
2210
+ getCallingDeviceDetails(): import('./WebexCallingUtils').WebexCallingDeviceDetails | undefined;
2211
+ /** @see wxAppVoiceMethods — WXCC-6026 */
2212
+ getWebexCallingCallId(): string | null;
1955
2213
  }
1956
2214
 
1957
2215
  /**
@@ -1962,6 +2220,11 @@ export type VoiceUIControlOptions = {
1962
2220
  isEndConsultEnabled?: boolean;
1963
2221
  voiceVariant?: VoiceVariant;
1964
2222
  isRecordingEnabled?: boolean;
2223
+ enableWxBetterTogether?: boolean;
2224
+ consultTransferConfig?: ConsultTransferDestinationConfig;
2225
+ answerCallOnWebexService?: import('../AnswerCallOnWebexService').default;
2226
+ /** Read-only observability: whether usersub answer-calls-on-wxcc is active this session. */
2227
+ getUsersubPublished?: () => boolean;
1965
2228
  };
1966
2229
 
1967
2230
  /**
@@ -1987,7 +2250,7 @@ export interface IWebRTC extends IVoice {
1987
2250
  * task.toggleMute();
1988
2251
  * ```
1989
2252
  */
1990
- toggleMute(): Promise<void>;
2253
+ toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
1991
2254
  /**
1992
2255
  * Decline the incoming task for Browser Login
1993
2256
  *
@@ -2012,6 +2275,8 @@ export type WebSocketPayload = TaskData & {
2012
2275
  type: string;
2013
2276
  mediaResourceId?: string;
2014
2277
  reason?: string;
2278
+ /** ContactEnded: party that ended the contact (e.g. 'Agent', 'Customer') */
2279
+ terminatingParty?: string;
2015
2280
  /**
2016
2281
  * Optional real-time transcript chunk payload.
2017
2282
  * Present on REAL_TIME_TRANSCRIPTION notifications.