@webex/contact-center 3.12.0-next.13 → 3.12.0-next.130

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 (312) hide show
  1. package/.sdd/manifest.json +884 -0
  2. package/AGENTS.md +94 -0
  3. package/ai-docs/ARCHITECTURE.md +168 -0
  4. package/ai-docs/CONTRACTS.md +53 -0
  5. package/ai-docs/GETTING_STARTED.md +168 -0
  6. package/ai-docs/GLOSSARY.md +43 -0
  7. package/ai-docs/README.md +138 -0
  8. package/ai-docs/REVIEW_CHECKLIST.md +41 -0
  9. package/ai-docs/RULES.md +444 -0
  10. package/ai-docs/SECURITY.md +52 -0
  11. package/ai-docs/SERVICE_STATE.md +52 -0
  12. package/ai-docs/SPEC_INDEX.md +65 -0
  13. package/ai-docs/adr/0001-spec-source-policy.md +55 -0
  14. package/ai-docs/adr/README.md +8 -0
  15. package/ai-docs/adr/_adr-template.md +31 -0
  16. package/ai-docs/contact-center-spec.md +382 -0
  17. package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
  18. package/ai-docs/features/contact-owner-change-refactor.md +78 -0
  19. package/ai-docs/features/generated-spec-conformance-fidelity-remediation/spec/feature-spec.md +117 -0
  20. package/ai-docs/features/residual-warning-coverage-completion/spec/feature-spec.md +203 -0
  21. package/ai-docs/features/validator-code-fidelity-drift-fix/spec/feature-spec.md +315 -0
  22. package/ai-docs/patterns/event-driven-patterns.md +485 -0
  23. package/ai-docs/patterns/testing-patterns.md +480 -0
  24. package/ai-docs/patterns/typescript-patterns.md +365 -0
  25. package/ai-docs/templates/README.md +102 -0
  26. package/ai-docs/templates/documentation/create-agents-md.md +240 -0
  27. package/ai-docs/templates/documentation/create-architecture-md.md +295 -0
  28. package/ai-docs/templates/existing-service/bug-fix.md +254 -0
  29. package/ai-docs/templates/existing-service/feature-enhancement.md +450 -0
  30. package/ai-docs/templates/new-method/00-master.md +80 -0
  31. package/ai-docs/templates/new-method/01-requirements.md +232 -0
  32. package/ai-docs/templates/new-method/02-implementation.md +295 -0
  33. package/ai-docs/templates/new-method/03-tests.md +201 -0
  34. package/ai-docs/templates/new-method/04-validation.md +141 -0
  35. package/ai-docs/templates/new-service/00-master.md +109 -0
  36. package/ai-docs/templates/new-service/01-pre-questions.md +159 -0
  37. package/ai-docs/templates/new-service/02-code-generation.md +346 -0
  38. package/ai-docs/templates/new-service/03-integration.md +178 -0
  39. package/ai-docs/templates/new-service/04-test-generation.md +205 -0
  40. package/ai-docs/templates/new-service/05-validation.md +145 -0
  41. package/dist/cc.js +971 -42
  42. package/dist/cc.js.map +1 -1
  43. package/dist/config.js +13 -0
  44. package/dist/config.js.map +1 -1
  45. package/dist/constants.js +31 -3
  46. package/dist/constants.js.map +1 -1
  47. package/dist/index.js +45 -15
  48. package/dist/index.js.map +1 -1
  49. package/dist/metrics/MetricsManager.js +16 -0
  50. package/dist/metrics/MetricsManager.js.map +1 -1
  51. package/dist/metrics/behavioral-events.js +205 -0
  52. package/dist/metrics/behavioral-events.js.map +1 -1
  53. package/dist/metrics/constants.js +48 -4
  54. package/dist/metrics/constants.js.map +1 -1
  55. package/dist/services/AddressBook.js +18 -15
  56. package/dist/services/AddressBook.js.map +1 -1
  57. package/dist/services/AnswerCallOnWebexService.js +202 -0
  58. package/dist/services/AnswerCallOnWebexService.js.map +1 -0
  59. package/dist/services/ApiAiAssistant.js +269 -9
  60. package/dist/services/ApiAiAssistant.js.map +1 -1
  61. package/dist/services/EntryPoint.js +46 -68
  62. package/dist/services/EntryPoint.js.map +1 -1
  63. package/dist/services/Queue.js +27 -22
  64. package/dist/services/Queue.js.map +1 -1
  65. package/dist/services/UserPreference.js +427 -0
  66. package/dist/services/UserPreference.js.map +1 -0
  67. package/dist/services/WebexCrossClientService.js +222 -0
  68. package/dist/services/WebexCrossClientService.js.map +1 -0
  69. package/dist/services/WxAppTelephonyMercurySync.js +108 -0
  70. package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
  71. package/dist/services/config/Util.js +11 -4
  72. package/dist/services/config/Util.js.map +1 -1
  73. package/dist/services/config/constants.js +41 -7
  74. package/dist/services/config/constants.js.map +1 -1
  75. package/dist/services/config/index.js +51 -0
  76. package/dist/services/config/index.js.map +1 -1
  77. package/dist/services/config/types.js +57 -12
  78. package/dist/services/config/types.js.map +1 -1
  79. package/dist/services/core/Err.js.map +1 -1
  80. package/dist/services/core/Utils.js +111 -32
  81. package/dist/services/core/Utils.js.map +1 -1
  82. package/dist/services/core/WebexRequest.js +6 -2
  83. package/dist/services/core/WebexRequest.js.map +1 -1
  84. package/dist/services/core/aqm-reqs.js +28 -14
  85. package/dist/services/core/aqm-reqs.js.map +1 -1
  86. package/dist/services/core/types.js.map +1 -1
  87. package/dist/services/core/websocket/WebSocketManager.js +2 -1
  88. package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
  89. package/dist/services/core/websocket/types.js.map +1 -1
  90. package/dist/services/index.js +1 -1
  91. package/dist/services/index.js.map +1 -1
  92. package/dist/services/task/Task.js +754 -0
  93. package/dist/services/task/Task.js.map +1 -0
  94. package/dist/services/task/TaskFactory.js +49 -0
  95. package/dist/services/task/TaskFactory.js.map +1 -0
  96. package/dist/services/task/TaskManager.js +1172 -521
  97. package/dist/services/task/TaskManager.js.map +1 -1
  98. package/dist/services/task/TaskUtils.js +211 -27
  99. package/dist/services/task/TaskUtils.js.map +1 -1
  100. package/dist/services/task/WebexCallingUtils.js +70 -0
  101. package/dist/services/task/WebexCallingUtils.js.map +1 -0
  102. package/dist/services/task/constants.js +12 -2
  103. package/dist/services/task/constants.js.map +1 -1
  104. package/dist/services/task/contact.js +29 -0
  105. package/dist/services/task/contact.js.map +1 -1
  106. package/dist/services/task/dialer.js +78 -0
  107. package/dist/services/task/dialer.js.map +1 -1
  108. package/dist/services/task/digital/Digital.js +78 -0
  109. package/dist/services/task/digital/Digital.js.map +1 -0
  110. package/dist/services/task/state-machine/TaskStateMachine.js +982 -0
  111. package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
  112. package/dist/services/task/state-machine/actions.js +572 -0
  113. package/dist/services/task/state-machine/actions.js.map +1 -0
  114. package/dist/services/task/state-machine/constants.js +161 -0
  115. package/dist/services/task/state-machine/constants.js.map +1 -0
  116. package/dist/services/task/state-machine/guards.js +379 -0
  117. package/dist/services/task/state-machine/guards.js.map +1 -0
  118. package/dist/services/task/state-machine/index.js +53 -0
  119. package/dist/services/task/state-machine/index.js.map +1 -0
  120. package/dist/services/task/state-machine/types.js +54 -0
  121. package/dist/services/task/state-machine/types.js.map +1 -0
  122. package/dist/services/task/state-machine/uiControlsComputer.js +703 -0
  123. package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -0
  124. package/dist/services/task/taskDataNormalizer.js +99 -0
  125. package/dist/services/task/taskDataNormalizer.js.map +1 -0
  126. package/dist/services/task/types.js +228 -5
  127. package/dist/services/task/types.js.map +1 -1
  128. package/dist/services/task/voice/Voice.js +1485 -0
  129. package/dist/services/task/voice/Voice.js.map +1 -0
  130. package/dist/services/task/voice/WebRTC.js +152 -0
  131. package/dist/services/task/voice/WebRTC.js.map +1 -0
  132. package/dist/services/task/voice/wxAppVoiceMethods.js +354 -0
  133. package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
  134. package/dist/services/wxAppDiagnosticLogging.js +122 -0
  135. package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
  136. package/dist/services/wxAppTelephonyUtils.js +19 -0
  137. package/dist/services/wxAppTelephonyUtils.js.map +1 -0
  138. package/dist/types/cc.d.ts +193 -6
  139. package/dist/types/config.d.ts +13 -0
  140. package/dist/types/constants.d.ts +29 -1
  141. package/dist/types/index.d.ts +35 -8
  142. package/dist/types/metrics/MetricsManager.d.ts +6 -0
  143. package/dist/types/metrics/constants.d.ts +43 -1
  144. package/dist/types/services/AddressBook.d.ts +2 -1
  145. package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
  146. package/dist/types/services/ApiAiAssistant.d.ts +56 -5
  147. package/dist/types/services/EntryPoint.d.ts +7 -5
  148. package/dist/types/services/Queue.d.ts +5 -3
  149. package/dist/types/services/UserPreference.d.ts +118 -0
  150. package/dist/types/services/WebexCrossClientService.d.ts +32 -0
  151. package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
  152. package/dist/types/services/config/constants.d.ts +34 -5
  153. package/dist/types/services/config/types.d.ts +197 -12
  154. package/dist/types/services/core/Err.d.ts +6 -0
  155. package/dist/types/services/core/Utils.d.ts +35 -13
  156. package/dist/types/services/core/WebexRequest.d.ts +1 -0
  157. package/dist/types/services/core/types.d.ts +2 -0
  158. package/dist/types/services/core/websocket/WebSocketManager.d.ts +1 -0
  159. package/dist/types/services/core/websocket/types.d.ts +1 -1
  160. package/dist/types/services/index.d.ts +1 -1
  161. package/dist/types/services/task/Task.d.ts +175 -0
  162. package/dist/types/services/task/TaskFactory.d.ts +13 -0
  163. package/dist/types/services/task/TaskUtils.d.ts +48 -2
  164. package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
  165. package/dist/types/services/task/constants.d.ts +10 -0
  166. package/dist/types/services/task/contact.d.ts +4 -0
  167. package/dist/types/services/task/dialer.d.ts +30 -0
  168. package/dist/types/services/task/digital/Digital.d.ts +22 -0
  169. package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1442 -0
  170. package/dist/types/services/task/state-machine/actions.d.ts +10 -0
  171. package/dist/types/services/task/state-machine/constants.d.ts +107 -0
  172. package/dist/types/services/task/state-machine/guards.d.ts +103 -0
  173. package/dist/types/services/task/state-machine/index.d.ts +13 -0
  174. package/dist/types/services/task/state-machine/types.d.ts +277 -0
  175. package/dist/types/services/task/state-machine/uiControlsComputer.d.ts +9 -0
  176. package/dist/types/services/task/taskDataNormalizer.d.ts +10 -0
  177. package/dist/types/services/task/types.d.ts +680 -66
  178. package/dist/types/services/task/voice/Voice.d.ts +227 -0
  179. package/dist/types/services/task/voice/WebRTC.d.ts +53 -0
  180. package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +55 -0
  181. package/dist/types/services/wxAppDiagnosticLogging.d.ts +51 -0
  182. package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
  183. package/dist/types/types.d.ts +205 -9
  184. package/dist/types/utils/PageCache.d.ts +20 -3
  185. package/dist/types/webex.d.ts +1 -0
  186. package/dist/types.js +162 -4
  187. package/dist/types.js.map +1 -1
  188. package/dist/utils/PageCache.js +19 -5
  189. package/dist/utils/PageCache.js.map +1 -1
  190. package/dist/webex.js +22 -2
  191. package/dist/webex.js.map +1 -1
  192. package/package.json +16 -12
  193. package/src/cc.ts +1289 -112
  194. package/src/config.ts +13 -0
  195. package/src/constants.ts +29 -1
  196. package/src/index.ts +36 -5
  197. package/src/metrics/MetricsManager.ts +16 -0
  198. package/src/metrics/ai-docs/AGENTS.md +350 -0
  199. package/src/metrics/ai-docs/ARCHITECTURE.md +338 -0
  200. package/src/metrics/ai-docs/metrics-spec.md +921 -0
  201. package/src/metrics/behavioral-events.ts +212 -0
  202. package/src/metrics/constants.ts +52 -4
  203. package/src/services/AddressBook.ts +17 -6
  204. package/src/services/AnswerCallOnWebexService.ts +239 -0
  205. package/src/services/ApiAiAssistant.ts +356 -9
  206. package/src/services/EntryPoint.ts +59 -60
  207. package/src/services/Queue.ts +29 -12
  208. package/src/services/UserPreference.ts +509 -0
  209. package/src/services/WebexCrossClientService.ts +293 -0
  210. package/src/services/WxAppTelephonyMercurySync.ts +142 -0
  211. package/src/services/agent/ai-docs/AGENTS.md +240 -0
  212. package/src/services/agent/ai-docs/ARCHITECTURE.md +304 -0
  213. package/src/services/agent/ai-docs/agent-spec.md +505 -0
  214. package/src/services/ai-docs/AGENTS.md +386 -0
  215. package/src/services/ai-docs/services-spec.md +505 -0
  216. package/src/services/config/Util.ts +12 -3
  217. package/src/services/config/ai-docs/AGENTS.md +255 -0
  218. package/src/services/config/ai-docs/ARCHITECTURE.md +426 -0
  219. package/src/services/config/ai-docs/config-spec.md +686 -0
  220. package/src/services/config/constants.ts +46 -6
  221. package/src/services/config/index.ts +65 -0
  222. package/src/services/config/types.ts +197 -13
  223. package/src/services/core/Err.ts +3 -0
  224. package/src/services/core/Utils.ts +127 -37
  225. package/src/services/core/WebexRequest.ts +3 -1
  226. package/src/services/core/ai-docs/AGENTS.md +381 -0
  227. package/src/services/core/ai-docs/ARCHITECTURE.md +698 -0
  228. package/src/services/core/ai-docs/core-spec.md +787 -0
  229. package/src/services/core/aqm-reqs.ts +30 -15
  230. package/src/services/core/types.ts +2 -0
  231. package/src/services/core/websocket/WebSocketManager.ts +2 -0
  232. package/src/services/core/websocket/types.ts +1 -1
  233. package/src/services/index.ts +1 -1
  234. package/src/services/task/Task.ts +908 -0
  235. package/src/services/task/TaskFactory.ts +60 -0
  236. package/src/services/task/TaskManager.ts +1419 -608
  237. package/src/services/task/TaskUtils.ts +303 -25
  238. package/src/services/task/WebexCallingUtils.ts +136 -0
  239. package/src/services/task/ai-docs/AGENTS.md +457 -0
  240. package/src/services/task/ai-docs/ARCHITECTURE.md +595 -0
  241. package/src/services/task/ai-docs/task-spec.md +1474 -0
  242. package/src/services/task/constants.ts +10 -0
  243. package/src/services/task/contact.ts +30 -0
  244. package/src/services/task/dialer.ts +80 -0
  245. package/src/services/task/digital/Digital.ts +97 -0
  246. package/src/services/task/state-machine/TaskStateMachine.ts +1320 -0
  247. package/src/services/task/state-machine/actions.ts +741 -0
  248. package/src/services/task/state-machine/ai-docs/AGENTS.md +460 -0
  249. package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1156 -0
  250. package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +2247 -0
  251. package/src/services/task/state-machine/constants.ts +172 -0
  252. package/src/services/task/state-machine/guards.ts +442 -0
  253. package/src/services/task/state-machine/index.ts +28 -0
  254. package/src/services/task/state-machine/types.ts +258 -0
  255. package/src/services/task/state-machine/uiControlsComputer.ts +1135 -0
  256. package/src/services/task/taskDataNormalizer.ts +137 -0
  257. package/src/services/task/types.ts +819 -70
  258. package/src/services/task/voice/Voice.ts +1851 -0
  259. package/src/services/task/voice/WebRTC.ts +191 -0
  260. package/src/services/task/voice/wxAppVoiceMethods.ts +516 -0
  261. package/src/services/wxAppDiagnosticLogging.ts +174 -0
  262. package/src/services/wxAppTelephonyUtils.ts +14 -0
  263. package/src/types.ts +262 -11
  264. package/src/utils/AGENTS.md +289 -0
  265. package/src/utils/PageCache.ts +38 -5
  266. package/src/utils/ai-docs/utils-spec.md +391 -0
  267. package/src/webex.js +10 -0
  268. package/test/unit/spec/cc.ts +2210 -119
  269. package/test/unit/spec/logger-proxy.ts +70 -0
  270. package/test/unit/spec/metrics/MetricsManager.ts +25 -0
  271. package/test/unit/spec/metrics/behavioral-events.ts +60 -0
  272. package/test/unit/spec/services/AddressBook.ts +37 -6
  273. package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
  274. package/test/unit/spec/services/ApiAiAssistant.ts +311 -21
  275. package/test/unit/spec/services/EntryPoint.ts +87 -40
  276. package/test/unit/spec/services/Queue.ts +123 -12
  277. package/test/unit/spec/services/UserPreference.ts +401 -0
  278. package/test/unit/spec/services/WebCallingService.ts +7 -1
  279. package/test/unit/spec/services/WebexCrossClientService.ts +467 -0
  280. package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
  281. package/test/unit/spec/services/config/Util.ts +129 -0
  282. package/test/unit/spec/services/config/index.ts +97 -29
  283. package/test/unit/spec/services/core/Utils.ts +425 -8
  284. package/test/unit/spec/services/core/WebexRequest.ts +3 -1
  285. package/test/unit/spec/services/core/aqm-reqs.ts +113 -1
  286. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +66 -40
  287. package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
  288. package/test/unit/spec/services/task/Task.ts +745 -0
  289. package/test/unit/spec/services/task/TaskFactory.ts +99 -0
  290. package/test/unit/spec/services/task/TaskManager.ts +2518 -1494
  291. package/test/unit/spec/services/task/TaskUtils.ts +235 -0
  292. package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
  293. package/test/unit/spec/services/task/contact.ts +33 -0
  294. package/test/unit/spec/services/task/dialer.ts +190 -0
  295. package/test/unit/spec/services/task/digital/Digital.ts +105 -0
  296. package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +4060 -0
  297. package/test/unit/spec/services/task/state-machine/guards.ts +839 -0
  298. package/test/unit/spec/services/task/state-machine/types.ts +18 -0
  299. package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +3101 -0
  300. package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
  301. package/test/unit/spec/services/task/voice/Voice.ts +2061 -0
  302. package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
  303. package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +603 -0
  304. package/test/unit/spec/services/wxAppDiagnosticLogging.ts +143 -0
  305. package/test/unit/spec/wellnessSampleUtils.ts +288 -0
  306. package/umd/contact-center.min.js +2 -2
  307. package/umd/contact-center.min.js.map +1 -1
  308. package/dist/services/task/index.js +0 -1525
  309. package/dist/services/task/index.js.map +0 -1
  310. package/dist/types/services/task/index.d.ts +0 -650
  311. package/src/services/task/index.ts +0 -1801
  312. package/test/unit/spec/services/task/index.ts +0 -2184
@@ -0,0 +1,227 @@
1
+ import routingContact from '../contact';
2
+ import { ConsultPayload, ConsultEndPayload, ResumeRecordingPayload, TaskData, TaskResponse, DropConferenceParticipantPayload, IVoice, VoiceUIControlOptions, TaskToggleMuteOptions, TaskTransmitDtmfOptions, TransferPayLoad } from '../types';
3
+ import Task from '../Task';
4
+ import { TaskActionArgs } from '../state-machine';
5
+ import { WrapupData } from '../../config/types';
6
+ export default class Voice extends Task implements IVoice {
7
+ private static readonly WXAPP_MUTE_SYNC_RETRY_DELAY_MS;
8
+ private static readonly WXAPP_MUTE_SYNC_MAX_RETRIES;
9
+ private answerCallOnWebexService?;
10
+ private enableWxBetterTogether;
11
+ private wxAppMuted;
12
+ private wxAppAnswerPending;
13
+ private wxAppAcceptInFlight;
14
+ private wxAppMuteSyncInFlight?;
15
+ private wxAppMuteToggleTail;
16
+ private wxAppDtmfTail;
17
+ private lastLoggedWxAppAcceptReason?;
18
+ constructor(contact: ReturnType<typeof routingContact>, data: TaskData, callOptions?: VoiceUIControlOptions, wrapupData?: WrapupData, agentId?: string);
19
+ private getWxAppVoiceDependencies;
20
+ /** @deprecated Use {@link Voice.getWxAppVoiceDependencies} */
21
+ private getWxAppVoiceDeps;
22
+ isWebexAppCallingOffer(): boolean;
23
+ isWebexAppInboundCallingOffer(): boolean;
24
+ private setWxAppAnswerPending;
25
+ private setWxAppAcceptInFlight;
26
+ setEnableWxBetterTogether(enabled: boolean): void;
27
+ protected updateUiControls(forceEmit?: boolean): void;
28
+ private logWxAppOfferDecisionIfNeeded;
29
+ applyWxAppMuteStateFromSync(incomingCallId: string, muted: boolean): void;
30
+ getWxAppMuted(): boolean;
31
+ private static delay;
32
+ private canRetryWxAppMuteSync;
33
+ private shouldSkipWxAppMuteSync;
34
+ private applyWxAppMuteFromBackfill;
35
+ syncWxAppMuteFromCallDetails(retryAttempt?: number): Promise<boolean | undefined>;
36
+ private performWxAppMuteSync;
37
+ protected onTaskAssigned(): void;
38
+ protected onTaskHydrated(): void;
39
+ getCallingDeviceDetails(): import("../WebexCallingUtils").WebexCallingDeviceDetails;
40
+ getWebexCallingCallId(): string | null;
41
+ private createWxAppLifecycle;
42
+ private getStateMachineSnapshot;
43
+ /**
44
+ * Accepts the task. Routes to wxApp telephony answer when `enableWxBetterTogether` and wxApp offer.
45
+ */
46
+ accept(): Promise<TaskResponse>;
47
+ /**
48
+ * Declines the task. Routes wxApp inbound to telephony reject; wxApp outdial offer to cancelTask.
49
+ */
50
+ decline(): Promise<TaskResponse>;
51
+ /**
52
+ * Toggles mute for wxApp engaged telephony when `enableWxBetterTogether` is active.
53
+ */
54
+ toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
55
+ /**
56
+ * Sends in-call DTMF for wxApp engaged telephony when `enableWxBetterTogether` is active.
57
+ */
58
+ transmitDtmf(options: TaskTransmitDtmfOptions): Promise<void>;
59
+ /**
60
+ * This is used to hold the task.
61
+ * @returns Promise<TaskResponse>
62
+ * @throws Error
63
+ * @example
64
+ * ```typescript
65
+ * task.hold().then(()=>{}).catch(()=>{})
66
+ * ```
67
+ * */
68
+ hold(): Promise<TaskResponse>;
69
+ /**
70
+ * This is used to resume the task.
71
+ * @returns Promise<TaskResponse>
72
+ * @throws Error
73
+ * @example
74
+ * ```typescript
75
+ * task.resume().then(()=>{}).catch(()=>{})
76
+ * ```
77
+ * */
78
+ resume(): Promise<TaskResponse>;
79
+ /**
80
+ * This is used to hold or resume the task.
81
+ * @param isHeld: boolean - true to hold the task, false to resume it
82
+ * @returns Promise<TaskResponse>
83
+ * @throws Error
84
+ * @example
85
+ * ```typescript
86
+ * task.holdResume(isHeld: true).then(()=>{}).catch(()=>{})
87
+ * ```
88
+ * */
89
+ holdResume(): Promise<TaskResponse>;
90
+ /**
91
+ * This is used to pause the call recording
92
+ * @returns Promise<TaskResponse>
93
+ * @throws Error
94
+ * @example
95
+ * ```typescript
96
+ * task.pauseRecording().then(()=>{}).catch(()=>{});
97
+ * ```
98
+ */
99
+ pauseRecording(): Promise<TaskResponse>;
100
+ /**
101
+ * This is used to pause the call recording
102
+ * @param resumeRecordingPayload
103
+ * @returns Promise<TaskResponse>
104
+ * @throws Error
105
+ * @example
106
+ * ```typescript
107
+ * task.resumeRecording(resumeRecordingPayload).then(()=>{}).catch(()=>{});
108
+ * ```
109
+ */
110
+ resumeRecording(resumeRecordingPayload?: ResumeRecordingPayload): Promise<TaskResponse>;
111
+ /**
112
+ * This is used to consult the task
113
+ * @param consultPayload
114
+ * @returns Promise<TaskResponse>
115
+ * @throws Error
116
+ * @example
117
+ * ```typescript
118
+ * const consultPayload = {
119
+ * destination: 'myBuddyAgentId',
120
+ * destinationType: DESTINATION_TYPE.AGENT,
121
+ * }
122
+ * task.consult(consultPayload).then(()=>{}).catch(()=>{});
123
+ * ```
124
+ * */
125
+ consult(consultPayload?: ConsultPayload): Promise<TaskResponse>;
126
+ /**
127
+ * This is used to end the consult session on the task.
128
+ * @param consultEndPayload - Payload indicating consult end flags and identifiers
129
+ * @returns Promise<TaskResponse>
130
+ * @throws Error
131
+ * @example
132
+ * ```typescript
133
+ * task.endConsult({
134
+ * isConsult: true,
135
+ * queueId: 'myQueueId',
136
+ * taskId: 'taskId',
137
+ * });
138
+ * ```
139
+ */
140
+ endConsult(consultEndPayload?: ConsultEndPayload): Promise<TaskResponse>;
141
+ /**
142
+ * This is used to transfer the task.
143
+ * @param payload - Transfer payload
144
+ * @returns Promise<TaskResponse>
145
+ * @throws Error
146
+ * @example
147
+ * ```typescript
148
+ * task.transfer({
149
+ * to: 'destinationId',
150
+ * destinationType: DESTINATION_TYPE.AGENT,
151
+ * consult: true, // Optional, if true will perform a consult transfer else blind transfer
152
+ * });
153
+ * ```
154
+ */
155
+ transfer(payload: TransferPayLoad): Promise<TaskResponse>;
156
+ /**
157
+ * Start a consult conference, merging main and consult calls.
158
+ */
159
+ consultConference(): Promise<TaskResponse>;
160
+ /**
161
+ * Removes another participant from an active conference.
162
+ * Completion is correlated with ParticipantLeftConference by the AQM request layer.
163
+ * @param payload - Participant identifier to remove
164
+ * @returns Promise<TaskResponse>
165
+ */
166
+ dropConferenceParticipant(payload: DropConferenceParticipantPayload): Promise<TaskResponse>;
167
+ /**
168
+ * Exit from a conference call.
169
+ * Per conference-spec.md:
170
+ * - Primary agent exits to wrapup
171
+ * - Non-primary agent exits to available/connected
172
+ * - Other participants continue the call
173
+ *
174
+ * @returns Promise<TaskResponse>
175
+ * @throws Error if not in conference or exit fails
176
+ * @example
177
+ * ```typescript
178
+ * task.exitConference().then(() => {}).catch(() => {});
179
+ * ```
180
+ */
181
+ exitConference(): Promise<TaskResponse>;
182
+ /**
183
+ * Transfer the conference to another participant.
184
+ * Per conference-spec.md: Only primary agent can transfer conference.
185
+ * After transfer, the transferring agent exits to wrapup.
186
+ *
187
+ * @returns Promise<TaskResponse>
188
+ * @throws Error if not in conference or transfer fails
189
+ * @example
190
+ * ```typescript
191
+ * task.transferConference().then(() => {}).catch(() => {});
192
+ * ```
193
+ */
194
+ transferConference(): Promise<TaskResponse>;
195
+ /**
196
+ * Toggle between consult call and main call during consulting.
197
+ * If on consult leg (consultCallHeld = false), switches to main call by holding consult.
198
+ * If on main call (consultCallHeld = true), switches to consult by resuming consult.
199
+ *
200
+ * @returns Promise<TaskResponse>
201
+ * @throws Error if not in CONSULTING state or no consult media resource
202
+ * @example
203
+ * ```typescript
204
+ * await task.switchCall();
205
+ * ```
206
+ */
207
+ switchCall(): Promise<TaskResponse>;
208
+ protected getChannelSpecificActionOverrides(): {
209
+ emitTaskHold: ({ event }: TaskActionArgs) => void;
210
+ emitTaskResume: ({ event }: TaskActionArgs) => void;
211
+ emitTaskRecordingStarted: ({ event }: TaskActionArgs) => void;
212
+ emitTaskRecordingPaused: ({ event }: TaskActionArgs) => void;
213
+ emitTaskRecordingPauseFailed: ({ event }: TaskActionArgs) => void;
214
+ emitTaskRecordingResumed: ({ event }: TaskActionArgs) => void;
215
+ emitTaskRecordingResumeFailed: ({ event }: TaskActionArgs) => void;
216
+ emitTaskParticipantJoined: ({ event }: TaskActionArgs) => void;
217
+ emitTaskParticipantLeft: ({ event }: TaskActionArgs) => void;
218
+ emitTaskConferenceStarted: ({ event }: TaskActionArgs) => void;
219
+ emitTaskConferenceEnded: ({ event }: TaskActionArgs) => void;
220
+ emitTaskConferenceFailed: ({ event }: TaskActionArgs) => void;
221
+ emitTaskExitConference: ({ event }: TaskActionArgs) => void;
222
+ emitTaskTransferConference: ({ event }: TaskActionArgs) => void;
223
+ emitTaskSwitchCall: ({ event }: TaskActionArgs) => void;
224
+ emitTaskTransferConferenceFailed: ({ event }: TaskActionArgs) => void;
225
+ emitTaskOutdialFailed: ({ event }: TaskActionArgs) => void;
226
+ };
227
+ }
@@ -0,0 +1,53 @@
1
+ import routingContact from '../contact';
2
+ import { TaskData, TaskResponse, IWebRTC, VoiceUIControlOptions, TaskToggleMuteOptions } from '../types';
3
+ import Voice from './Voice';
4
+ import WebCallingService from '../../WebCallingService';
5
+ import { WrapupData } from '../../config/types';
6
+ export default class WebRTC extends Voice implements IWebRTC {
7
+ private localAudioStream;
8
+ private webCallingService;
9
+ constructor(contact: ReturnType<typeof routingContact>, webCallingService: WebCallingService, data: TaskData, callOptions?: VoiceUIControlOptions, wrapupData?: WrapupData, agentId?: string);
10
+ private registerWebCallListeners;
11
+ private handleRemoteMedia;
12
+ /**
13
+ * This method is used to unregister the web call listeners.
14
+ * @returns void
15
+ * @example
16
+ * ```typescript
17
+ * task.unregisterWebCallListeners();
18
+ * ```
19
+ */
20
+ unregisterWebCallListeners(): void;
21
+ /**
22
+ * This is used for incoming task accept by agent.
23
+ *
24
+ * @returns Promise<TaskResponse>
25
+ * @throws Error
26
+ * @example
27
+ * ```typescript
28
+ * task.accept().then(()=>{}).catch(()=>{})
29
+ * ```
30
+ */
31
+ accept(): Promise<TaskResponse>;
32
+ /**
33
+ * This is used for the incoming task decline by agent.
34
+ *
35
+ * @returns Promise<TaskResponse>
36
+ * @throws Error
37
+ * @example
38
+ * ```typescript
39
+ * task.decline().then(()=>{}).catch(()=>{})
40
+ * ```
41
+ */
42
+ decline(): Promise<TaskResponse>;
43
+ /**
44
+ * This is used for the placing the call in mute or unmute by the agent.
45
+ *
46
+ * @throws Error
47
+ * @example
48
+ * ```typescript
49
+ * task.toggleMute().then(()=>{}).catch(()=>{})
50
+ * ```
51
+ */
52
+ toggleMute(options?: TaskToggleMuteOptions): Promise<void>;
53
+ }
@@ -0,0 +1,55 @@
1
+ import AnswerCallOnWebexService from '../../AnswerCallOnWebexService';
2
+ import { TaskData, TaskToggleMuteOptions, TaskTransmitDtmfOptions } from '../types';
3
+ import { TaskState } from '../state-machine';
4
+ import MetricsManager from '../../../metrics/MetricsManager';
5
+ import { WebexCallingDeviceDetails } from '../WebexCallingUtils';
6
+ export type WxAppVoiceDependencies = {
7
+ enableWxBetterTogether: boolean;
8
+ answerCallOnWebexService?: AnswerCallOnWebexService;
9
+ agentId?: string;
10
+ metricsManager: MetricsManager;
11
+ getTaskData: () => TaskData;
12
+ getTaskState: () => TaskState | undefined;
13
+ getWxAppMuted: () => boolean;
14
+ setWxAppMuted: (muted: boolean) => void;
15
+ };
16
+ /** @deprecated Use {@link WxAppVoiceDependencies} */
17
+ export type WxAppVoiceDeps = WxAppVoiceDependencies;
18
+ export type WxAppVoiceLifecycle = {
19
+ setWxAppAcceptInFlight: (inFlight: boolean) => void;
20
+ setWxAppAnswerPending: (pending: boolean) => void;
21
+ resetWxAppMuted: () => void;
22
+ syncWxAppMuteFromCallDetails: () => Promise<boolean | undefined>;
23
+ mapWxAppVoiceError: (error: unknown, method: string) => never;
24
+ };
25
+ export declare function getCallingDeviceDetails(deps: WxAppVoiceDependencies): WebexCallingDeviceDetails | undefined;
26
+ export declare function isWebexAppCallingOffer(deps: WxAppVoiceDependencies): boolean;
27
+ /** Inbound wxApp offer only — outdial decline uses CC routing, not telephony reject. */
28
+ export declare function isWebexAppInboundCallingOffer(deps: WxAppVoiceDependencies): boolean;
29
+ export declare function getWebexCallingCallId(deps: WxAppVoiceDependencies): string | null;
30
+ export declare function getWxAppLineOwnerId(deps: WxAppVoiceDependencies): string | undefined;
31
+ export declare function resolveWxAppLineOwnerId(deps: WxAppVoiceDependencies, override?: string): string | undefined;
32
+ export declare function acceptOnWebex(deps: WxAppVoiceDependencies, options?: {
33
+ lineOwnerId?: string;
34
+ }): Promise<void>;
35
+ export declare function rejectOnWebex(deps: WxAppVoiceDependencies, options?: {
36
+ lineOwnerId?: string;
37
+ }): Promise<void>;
38
+ export declare function toggleMuteOnWebex(deps: WxAppVoiceDependencies, options?: {
39
+ lineOwnerId?: string;
40
+ muted?: boolean;
41
+ }): Promise<void>;
42
+ export declare function transmitDtmfOnWebex(deps: WxAppVoiceDependencies, options: {
43
+ dtmf: string;
44
+ lineOwnerId?: string;
45
+ }): Promise<void>;
46
+ export declare function runWxAppAccept(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: {
47
+ lineOwnerId?: string;
48
+ }): Promise<void>;
49
+ export declare function runWxAppReject(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: {
50
+ lineOwnerId?: string;
51
+ }): Promise<void>;
52
+ export declare function runWxAppOutdialDecline<T>(deps: WxAppVoiceDependencies, executeCancel: () => Promise<T>): Promise<T>;
53
+ export declare function runWxAppToggleMute(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options?: TaskToggleMuteOptions): Promise<void>;
54
+ export declare function runWxAppTransmitDtmf(deps: WxAppVoiceDependencies, lifecycle: WxAppVoiceLifecycle, options: TaskTransmitDtmfOptions): Promise<void>;
55
+ export declare function mapWxAppVoiceError(error: unknown, method: string, module: string): never;
@@ -0,0 +1,51 @@
1
+ export declare const WXAPP_LOG_FEATURE = "wxApp";
2
+ export declare const WXAPP_LOG_PREFIX = "[CC wxApp]";
3
+ export type WxAppAcceptReason = 'wxApp_offer_ready' | 'wxApp_answer_pending' | 'wxApp_accept_in_flight' | 'extension_non_wxApp_offer' | 'browser_webrtc_offer' | 'outdial_auto_answer';
4
+ export type WxAppSessionSkipReason = 'unsupported_browser_login' | 'flag_disabled' | 'mercury_subscribe_failed' | 'publish_failed';
5
+ export type WxAppTelephonyAction = 'accept' | 'decline' | 'mute' | 'dtmf';
6
+ export type WxAppTelephonyPhase = 'started' | 'success' | 'failed';
7
+ /** Last 8 chars of callId for correlation without logging full id. */
8
+ export declare function callIdSuffix(callId: string | null | undefined): string | undefined;
9
+ export declare function logWxAppSessionReadiness(params: {
10
+ enableWxBetterTogether: boolean;
11
+ loginOption: string | undefined;
12
+ wxAppHooksApplied: boolean;
13
+ usersubPublished: boolean;
14
+ mercurySubscribed: boolean;
15
+ telephonyTaskType: 'Voice' | 'WebRTC' | 'unknown';
16
+ skipReason?: WxAppSessionSkipReason;
17
+ }): void;
18
+ export declare function deriveWxAppAcceptReason(params: {
19
+ isWxAppInboundOffer: boolean;
20
+ isWxAppOutdialOffer: boolean;
21
+ isWebrtc: boolean;
22
+ isOutdial: boolean;
23
+ wxAppAcceptInFlight: boolean;
24
+ wxAppAnswerPending: boolean;
25
+ enableWxBetterTogether: boolean;
26
+ hasDeviceCallId: boolean;
27
+ }): WxAppAcceptReason;
28
+ export declare function logWxAppOfferDecision(params: {
29
+ interactionId: string;
30
+ acceptVisible: boolean;
31
+ acceptEnabled: boolean;
32
+ acceptReason: WxAppAcceptReason;
33
+ wxAppParticipantDeviceType?: string;
34
+ hasDeviceCallId: boolean;
35
+ }): void;
36
+ export declare function logWxAppTelephonyAction(params: {
37
+ action: WxAppTelephonyAction;
38
+ phase: WxAppTelephonyPhase;
39
+ interactionId?: string;
40
+ trackingId?: string;
41
+ httpStatus?: number | string;
42
+ failureReason?: string;
43
+ }): void;
44
+ export declare function logWxAppValidationFailure(reason: string, interactionId?: string): void;
45
+ export declare function logWxAppMercuryMuteSync(params: {
46
+ phase: 'received' | 'applied' | 'dropped';
47
+ muted?: boolean;
48
+ callIdSuffix?: string;
49
+ interactionId?: string;
50
+ dropReason?: string;
51
+ }): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Expected Hydra responses when mute backfill races call creation (WXCC-6026).
3
+ * These must not be logged as errors — see task-spec wxApp mute backfill guard.
4
+ */
5
+ export declare function isWxAppCallNotFoundError(error: unknown): boolean;
@@ -1,6 +1,6 @@
1
1
  import { CallingClientConfig } from '@webex/calling';
2
2
  import * as Agent from './services/agent/types';
3
- import { Profile } from './services/config/types';
3
+ import { Entity, Profile } from './services/config/types';
4
4
  import { PaginatedResponse, BaseSearchParams } from './utils/PageCache';
5
5
  /**
6
6
  * HTTP methods supported by WebexRequest.
@@ -106,6 +106,10 @@ export interface CCPluginConfig {
106
106
  };
107
107
  /** Configuration for the calling client */
108
108
  callingClientConfig: CallingClientConfig;
109
+ /** Whether to skip Mobius/WebRTC registration for browser login flows */
110
+ disableWebRTCRegistration?: boolean;
111
+ /** Whether wxApp Better Together (telephony REST + usersub) is enabled at init (WXCC-6026) */
112
+ enableWxBetterTogether?: boolean;
109
113
  }
110
114
  /**
111
115
  * Logger interface for standardized logging throughout the plugin.
@@ -249,6 +253,8 @@ export interface IContactCenter {
249
253
  * cc.register().then(profile => { ... });
250
254
  */
251
255
  register(): Promise<Profile>;
256
+ /** Returns the system-managed WellbeingBreak idle code for the registered session. */
257
+ getWellbeingBreakIdleCode(): Promise<Entity>;
252
258
  }
253
259
  /**
254
260
  * Generic HTTP response structure.
@@ -364,26 +370,29 @@ export type AgentLogin = {
364
370
  export type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;
365
371
  /**
366
372
  * Represents the options to fetch buddy agents for the logged in agent.
367
- * Buddy agents are other agents who can be consulted or transfered to.
373
+ * Buddy agents are other agents who can be consulted or transferred to.
368
374
  * @public
369
375
  * @example
370
376
  * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
371
- * @ignore
372
377
  */
373
378
  export type BuddyAgents = {
374
379
  /**
375
- * The media type channel to filter buddy agents.
376
- * Determines which channel capability the returned agents must have.
380
+ * The media type channel to filter buddy agents. Defaults to telephony when omitted.
377
381
  */
378
- mediaType: 'telephony' | 'chat' | 'social' | 'email';
382
+ mediaType?: 'telephony' | 'chat' | 'social' | 'email';
379
383
  /**
380
384
  * Optional filter for agent state.
381
385
  * If specified, returns only agents in that state.
382
386
  * If omitted, returns both available and idle agents.
383
387
  */
384
388
  state?: 'Available' | 'Idle';
389
+ /**
390
+ * Applies the default state policy for the operation. An explicit state takes precedence.
391
+ */
392
+ action?: 'Consult' | 'Transfer';
385
393
  };
386
394
  /**
395
+
387
396
  * Generic error structure for Contact Center SDK errors.
388
397
  * Contains detailed information about the error context.
389
398
  * @public
@@ -461,10 +470,12 @@ export interface AddressBookEntrySearchParams extends BaseSearchParams {
461
470
  export interface EntryPointRecord {
462
471
  id: string;
463
472
  name: string;
473
+ /** Dialled number mapped to this entry point when included in the list response. */
474
+ number?: string;
464
475
  description?: string;
465
- type: string;
466
- isActive: boolean;
467
- orgId: string;
476
+ type?: string;
477
+ isActive?: boolean;
478
+ orgId?: string;
468
479
  createdAt?: string;
469
480
  updatedAt?: string;
470
481
  settings?: Record<string, any>;
@@ -612,32 +623,217 @@ export type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;
612
623
  * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }
613
624
  */
614
625
  export type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;
626
+ /**
627
+ * Supported transcript control actions for AI Assistant events.
628
+ * @public
629
+ * @example
630
+ * const action: TranscriptAction = 'START';
631
+ * @ignore
632
+ */
615
633
  export type TranscriptAction = 'START' | 'STOP';
634
+ /**
635
+ * Parameters used to request AI Assistant real-time assistance.
636
+ * @public
637
+ * @example
638
+ * const params: RealTimeAssistanceParams = {
639
+ * interactionId: 'interaction-123',
640
+ * context: 'Need help with credit card payment due date',
641
+ * };
642
+ */
643
+ export type RealTimeAssistanceParams = {
644
+ /** Agent identifier */
645
+ agentId: string;
646
+ /** Interaction identifier for which assistance should be generated */
647
+ interactionId: string;
648
+ /** Optional additional context that should refine the assistance */
649
+ context?: string;
650
+ /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */
651
+ languageCode?: string;
652
+ };
653
+ /**
654
+ * Supported user actions on an AI Assistant real-time assistance adaptive card.
655
+ * @public
656
+ */
657
+ export declare const RealTimeAssistanceUserActionId: {
658
+ /** User liked the real-time assistance response */
659
+ readonly LIKE: "likeButton";
660
+ /** User disliked the real-time assistance response */
661
+ readonly DISLIKE: "dislikeButton";
662
+ /** User copied the real-time assistance response */
663
+ readonly COPY: "copyButton";
664
+ };
665
+ /**
666
+ * Union type of supported real-time assistance user actions.
667
+ * @public
668
+ */
669
+ export type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;
670
+ /**
671
+ * Parameters used to send user action feedback for a real-time assistance adaptive card.
672
+ * @public
673
+ * @example
674
+ * const params: RealTimeAssistanceUserActionParams = {
675
+ * agentId: 'agent-123',
676
+ * interactionId: 'interaction-123',
677
+ * adaptiveCardId: 'adaptive-card-123',
678
+ * actionId: RealTimeAssistanceUserActionId.LIKE,
679
+ * };
680
+ */
681
+ export type RealTimeAssistanceUserActionParams = {
682
+ /** Agent identifier */
683
+ agentId: string;
684
+ /** Interaction identifier associated with the real-time assistance response */
685
+ interactionId: string;
686
+ /** Adaptive card identifier from the real-time assistance payload */
687
+ adaptiveCardId: string;
688
+ /** User action performed on the adaptive card */
689
+ actionId: RealTimeAssistanceUserActionId;
690
+ /** Optional language code. Defaults to 'en'. */
691
+ languageCode?: string;
692
+ };
693
+ /**
694
+ * Wellness notification actions delivered by the Contact Center notification service.
695
+ * @public
696
+ */
697
+ export declare const WELLNESS_BREAK_NOTIFICATION_ACTIONS: {
698
+ readonly PROVIDE_WELLNESS_BREAK: "PROVIDE_WELLNESS_BREAK";
699
+ readonly SUGGEST_WELLNESS_BREAK: "SUGGEST_WELLNESS_BREAK";
700
+ readonly WELLNESS_BREAK_NOT_ALLOWED: "WELLNESS_BREAK_NOT_ALLOWED";
701
+ };
702
+ /** Union of supported wellness notification actions. @public */
703
+ export type WellnessBreakNotificationAction = Enum<typeof WELLNESS_BREAK_NOTIFICATION_ACTIONS>;
704
+ /**
705
+ * Agent actions accepted by the wellness action API.
706
+ * @public
707
+ */
708
+ export declare const WELLNESS_BREAK_USER_ACTIONS: {
709
+ readonly REQUESTED: "REQUESTED";
710
+ readonly ACCEPTED: "ACCEPTED";
711
+ readonly REJECTED: "REJECTED";
712
+ readonly NO_RESPONSE: "NO_RESPONSE";
713
+ };
714
+ /** Union of supported wellness action API values. @public */
715
+ export type WellnessBreakUserAction = Enum<typeof WELLNESS_BREAK_USER_ACTIONS>;
716
+ /**
717
+ * Validated, agent-scoped wellness notification emitted by Contact Center.
718
+ * @public
719
+ */
720
+ export interface WellnessBreakEvent {
721
+ /** Agent identifier */
722
+ agentId: string;
723
+ /** Organization identifier */
724
+ orgId: string;
725
+ /** Session identifier supplied by the notification; it may differ from the consumer's active session */
726
+ agentSessionId: string;
727
+ /** Backend wellness action */
728
+ actionEvent: WellnessBreakNotificationAction;
729
+ /** Optional untrusted plain-text message supplied by the backend */
730
+ actionText?: string;
731
+ /** Optional normalized interaction diagnostic */
732
+ interactionId?: string;
733
+ /** Notification diagnostic only; never an action-request correlation identifier */
734
+ trackingId?: string;
735
+ }
736
+ /**
737
+ * Parameters for responding to a backend-provided wellness offer.
738
+ * @public
739
+ */
740
+ export interface RespondToWellnessBreakParams {
741
+ /** Agent response; REQUESTED is available only through requestWellnessBreak */
742
+ action: Exclude<WellnessBreakUserAction, typeof WELLNESS_BREAK_USER_ACTIONS.REQUESTED>;
743
+ }
744
+ /**
745
+ * Supported AI Assistant event categories.
746
+ * @public
747
+ * @example
748
+ * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;
749
+ * @ignore
750
+ */
616
751
  export declare const AIAssistantEventType: {
752
+ /** Custom AI Assistant event */
617
753
  readonly CUSTOM_EVENT: "CUSTOM_EVENT";
754
+ /** CTI-backed AI Assistant event */
618
755
  readonly CTI_EVENT: "CTI_EVENT";
619
756
  };
757
+ /**
758
+ * Union type of AI Assistant event categories.
759
+ * @public
760
+ * @example
761
+ * function send(type: AIAssistantEventType) { ... }
762
+ * @ignore
763
+ */
620
764
  export type AIAssistantEventType = Enum<typeof AIAssistantEventType>;
765
+ /**
766
+ * Supported AI Assistant event names.
767
+ * @public
768
+ * @example
769
+ * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;
770
+ * @ignore
771
+ */
621
772
  export declare const AIAssistantEventName: {
773
+ /** Request transcript streaming for an interaction */
622
774
  readonly GET_TRANSCRIPTS: "GET_TRANSCRIPTS";
775
+ /** Request a suggested response for an interaction */
776
+ readonly GET_SUGGESTIONS: "GET_SUGGESTIONS";
777
+ /** Add extra context to refine a suggested response */
778
+ readonly ADD_SUGGESTIONS_EXTRA_CONTEXT: "ADD_SUGGESTIONS_EXTRA_CONTEXT";
779
+ /** Request mid-call summary generation */
623
780
  readonly GET_MID_CALL_SUMMARY: "GET_MID_CALL_SUMMARY";
781
+ /** Request post-call summary generation */
624
782
  readonly GET_POST_CALL_SUMMARY: "GET_POST_CALL_SUMMARY";
783
+ /** Mid-call summary response event */
625
784
  readonly MID_CALL_SUMMARY_RESPONSE: "MID_CALL_SUMMARY_RESPONSE";
785
+ /** Post-call summary response event */
626
786
  readonly POST_CALL_SUMMARY_RESPONSE: "POST_CALL_SUMMARY_RESPONSE";
787
+ /** Suggested digital response event */
627
788
  readonly SUGGESTED_RESPONSES_DIGITAL: "SUGGESTED_RESPONSES_DIGITAL";
789
+ /** User action on a suggested response adaptive card */
790
+ readonly SUGGESTED_RESPONSES_USER_ACTION: "SUGGESTED_RESPONSES_USER_ACTION";
791
+ /** Agent Wellness Break request/response action */
792
+ readonly WELLNESS_BREAK_ACTION: "WellnessBreakAction";
628
793
  };
794
+ /**
795
+ * Union type of AI Assistant event names.
796
+ * @public
797
+ * @example
798
+ * function handle(name: AIAssistantEventName) { ... }
799
+ * @ignore
800
+ */
629
801
  export type AIAssistantEventName = Enum<typeof AIAssistantEventName>;
802
+ /**
803
+ * A single transcript message entry returned by AI Assistant APIs.
804
+ * @public
805
+ * @example
806
+ * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };
807
+ *
808
+ */
630
809
  export type TranscriptMessage = {
810
+ /** Speaker role for this message */
631
811
  role: string;
812
+ /** Transcript chunk content */
632
813
  content: string;
814
+ /** Unique message identifier */
633
815
  messageId: string;
816
+ /** Message publish timestamp (epoch milliseconds) */
634
817
  publishTimestamp: number;
635
818
  };
819
+ /**
820
+ * Response payload for historic transcripts API.
821
+ * @public
822
+ * @example
823
+ * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };
824
+ *
825
+ */
636
826
  export type HistoricTranscriptsResponse = {
827
+ /** Organization identifier */
637
828
  orgId: string;
829
+ /** Agent identifier */
638
830
  agentId: string;
831
+ /** Conversation identifier when available */
639
832
  conversationId: string | null;
833
+ /** Interaction identifier */
640
834
  interactionId: string;
835
+ /** Data source identifier */
641
836
  source: string;
837
+ /** Transcript messages */
642
838
  data: TranscriptMessage[];
643
839
  };