@webex/contact-center 3.12.0 → 3.13.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/.sdd/manifest.json +887 -0
  2. package/AGENTS.md +94 -0
  3. package/ai-docs/ARCHITECTURE.md +168 -0
  4. package/ai-docs/CONTRACTS.md +64 -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 +388 -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 +1102 -47
  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 +46 -3
  46. package/dist/constants.js.map +1 -1
  47. package/dist/index.js +86 -17
  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 +211 -0
  52. package/dist/metrics/behavioral-events.js.map +1 -1
  53. package/dist/metrics/constants.js +58 -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 +369 -14
  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/WebCallingService.js +287 -37
  68. package/dist/services/WebCallingService.js.map +1 -1
  69. package/dist/services/WebexCrossClientService.js +225 -0
  70. package/dist/services/WebexCrossClientService.js.map +1 -0
  71. package/dist/services/WxAppTelephonyMercurySync.js +111 -0
  72. package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
  73. package/dist/services/config/Util.js +48 -48
  74. package/dist/services/config/Util.js.map +1 -1
  75. package/dist/services/config/constants.js +57 -79
  76. package/dist/services/config/constants.js.map +1 -1
  77. package/dist/services/config/index.js +100 -226
  78. package/dist/services/config/index.js.map +1 -1
  79. package/dist/services/config/types.js +100 -40
  80. package/dist/services/config/types.js.map +1 -1
  81. package/dist/services/constants.js +19 -1
  82. package/dist/services/constants.js.map +1 -1
  83. package/dist/services/core/Err.js.map +1 -1
  84. package/dist/services/core/Utils.js +131 -32
  85. package/dist/services/core/Utils.js.map +1 -1
  86. package/dist/services/core/WebexRequest.js +6 -2
  87. package/dist/services/core/WebexRequest.js.map +1 -1
  88. package/dist/services/core/aqm-reqs.js +17 -11
  89. package/dist/services/core/aqm-reqs.js.map +1 -1
  90. package/dist/services/core/constants.js +9 -1
  91. package/dist/services/core/constants.js.map +1 -1
  92. package/dist/services/core/types.js.map +1 -1
  93. package/dist/services/core/websocket/WebSocketManager.js +26 -6
  94. package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
  95. package/dist/services/core/websocket/connection-service.js +3 -1
  96. package/dist/services/core/websocket/connection-service.js.map +1 -1
  97. package/dist/services/core/websocket/types.js.map +1 -1
  98. package/dist/services/index.js +6 -0
  99. package/dist/services/index.js.map +1 -1
  100. package/dist/services/task/Task.js +955 -0
  101. package/dist/services/task/Task.js.map +1 -0
  102. package/dist/services/task/TaskFactory.js +50 -0
  103. package/dist/services/task/TaskFactory.js.map +1 -0
  104. package/dist/services/task/TaskManager.js +1275 -504
  105. package/dist/services/task/TaskManager.js.map +1 -1
  106. package/dist/services/task/TaskUtils.js +221 -27
  107. package/dist/services/task/TaskUtils.js.map +1 -1
  108. package/dist/services/task/WebexCallingUtils.js +70 -0
  109. package/dist/services/task/WebexCallingUtils.js.map +1 -0
  110. package/dist/services/task/constants.js +22 -2
  111. package/dist/services/task/constants.js.map +1 -1
  112. package/dist/services/task/contact.js +29 -0
  113. package/dist/services/task/contact.js.map +1 -1
  114. package/dist/services/task/dialer.js +78 -0
  115. package/dist/services/task/dialer.js.map +1 -1
  116. package/dist/services/task/digital/Digital.js +78 -0
  117. package/dist/services/task/digital/Digital.js.map +1 -0
  118. package/dist/services/task/state-machine/TaskStateMachine.js +982 -0
  119. package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
  120. package/dist/services/task/state-machine/actions.js +572 -0
  121. package/dist/services/task/state-machine/actions.js.map +1 -0
  122. package/dist/services/task/state-machine/constants.js +161 -0
  123. package/dist/services/task/state-machine/constants.js.map +1 -0
  124. package/dist/services/task/state-machine/guards.js +379 -0
  125. package/dist/services/task/state-machine/guards.js.map +1 -0
  126. package/dist/services/task/state-machine/index.js +53 -0
  127. package/dist/services/task/state-machine/index.js.map +1 -0
  128. package/dist/services/task/state-machine/types.js +54 -0
  129. package/dist/services/task/state-machine/types.js.map +1 -0
  130. package/dist/services/task/state-machine/uiControlsComputer.js +703 -0
  131. package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -0
  132. package/dist/services/task/taskDataNormalizer.js +99 -0
  133. package/dist/services/task/taskDataNormalizer.js.map +1 -0
  134. package/dist/services/task/types.js +259 -5
  135. package/dist/services/task/types.js.map +1 -1
  136. package/dist/services/task/voice/Voice.js +1504 -0
  137. package/dist/services/task/voice/Voice.js.map +1 -0
  138. package/dist/services/task/voice/WebRTC.js +152 -0
  139. package/dist/services/task/voice/WebRTC.js.map +1 -0
  140. package/dist/services/task/voice/wxAppOfferObservability.js +145 -0
  141. package/dist/services/task/voice/wxAppOfferObservability.js.map +1 -0
  142. package/dist/services/task/voice/wxAppVoiceMethods.js +395 -0
  143. package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
  144. package/dist/services/wxAppDiagnosticLogging.js +159 -0
  145. package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
  146. package/dist/services/wxAppTelephonyUtils.js +19 -0
  147. package/dist/services/wxAppTelephonyUtils.js.map +1 -0
  148. package/dist/types/cc.d.ts +222 -10
  149. package/dist/types/config.d.ts +13 -0
  150. package/dist/types/constants.d.ts +40 -1
  151. package/dist/types/index.d.ts +58 -22
  152. package/dist/types/metrics/MetricsManager.d.ts +6 -0
  153. package/dist/types/metrics/constants.d.ts +52 -1
  154. package/dist/types/services/AddressBook.d.ts +2 -1
  155. package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
  156. package/dist/types/services/ApiAiAssistant.d.ts +67 -5
  157. package/dist/types/services/EntryPoint.d.ts +7 -5
  158. package/dist/types/services/Queue.d.ts +5 -3
  159. package/dist/types/services/UserPreference.d.ts +118 -0
  160. package/dist/types/services/WebexCrossClientService.d.ts +32 -0
  161. package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
  162. package/dist/types/services/config/Util.d.ts +4 -8
  163. package/dist/types/services/config/constants.d.ts +49 -76
  164. package/dist/types/services/config/index.d.ts +16 -64
  165. package/dist/types/services/config/types.d.ts +252 -114
  166. package/dist/types/services/constants.d.ts +16 -0
  167. package/dist/types/services/core/Err.d.ts +6 -0
  168. package/dist/types/services/core/Utils.d.ts +43 -13
  169. package/dist/types/services/core/WebexRequest.d.ts +1 -0
  170. package/dist/types/services/core/constants.d.ts +7 -0
  171. package/dist/types/services/core/types.d.ts +2 -0
  172. package/dist/types/services/core/websocket/WebSocketManager.d.ts +2 -0
  173. package/dist/types/services/core/websocket/types.d.ts +1 -1
  174. package/dist/types/services/index.d.ts +2 -0
  175. package/dist/types/services/task/Task.d.ts +186 -0
  176. package/dist/types/services/task/TaskFactory.d.ts +14 -0
  177. package/dist/types/services/task/TaskUtils.d.ts +54 -2
  178. package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
  179. package/dist/types/services/task/constants.d.ts +20 -0
  180. package/dist/types/services/task/contact.d.ts +4 -0
  181. package/dist/types/services/task/dialer.d.ts +30 -0
  182. package/dist/types/services/task/digital/Digital.d.ts +23 -0
  183. package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1442 -0
  184. package/dist/types/services/task/state-machine/actions.d.ts +10 -0
  185. package/dist/types/services/task/state-machine/constants.d.ts +107 -0
  186. package/dist/types/services/task/state-machine/guards.d.ts +103 -0
  187. package/dist/types/services/task/state-machine/index.d.ts +13 -0
  188. package/dist/types/services/task/state-machine/types.d.ts +277 -0
  189. package/dist/types/services/task/state-machine/uiControlsComputer.d.ts +9 -0
  190. package/dist/types/services/task/taskDataNormalizer.d.ts +10 -0
  191. package/dist/types/services/task/types.d.ts +790 -66
  192. package/dist/types/services/task/voice/Voice.d.ts +241 -0
  193. package/dist/types/services/task/voice/WebRTC.d.ts +54 -0
  194. package/dist/types/services/task/voice/wxAppOfferObservability.d.ts +39 -0
  195. package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +68 -0
  196. package/dist/types/services/wxAppDiagnosticLogging.d.ts +63 -0
  197. package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
  198. package/dist/types/types.d.ts +258 -11
  199. package/dist/types/utils/PageCache.d.ts +20 -3
  200. package/dist/types/webex.d.ts +1 -0
  201. package/dist/types.js +204 -6
  202. package/dist/types.js.map +1 -1
  203. package/dist/utils/PageCache.js +19 -5
  204. package/dist/utils/PageCache.js.map +1 -1
  205. package/dist/webex.js +22 -2
  206. package/dist/webex.js.map +1 -1
  207. package/package.json +16 -12
  208. package/src/cc.ts +1439 -105
  209. package/src/config.ts +13 -0
  210. package/src/constants.ts +53 -1
  211. package/src/index.ts +72 -16
  212. package/src/metrics/MetricsManager.ts +16 -0
  213. package/src/metrics/ai-docs/AGENTS.md +350 -0
  214. package/src/metrics/ai-docs/ARCHITECTURE.md +338 -0
  215. package/src/metrics/ai-docs/metrics-spec.md +971 -0
  216. package/src/metrics/behavioral-events.ts +218 -0
  217. package/src/metrics/constants.ts +63 -4
  218. package/src/services/AddressBook.ts +17 -6
  219. package/src/services/AnswerCallOnWebexService.ts +239 -0
  220. package/src/services/ApiAiAssistant.ts +494 -15
  221. package/src/services/EntryPoint.ts +59 -60
  222. package/src/services/Queue.ts +29 -12
  223. package/src/services/UserPreference.ts +509 -0
  224. package/src/services/WebCallingService.ts +362 -40
  225. package/src/services/WebexCrossClientService.ts +298 -0
  226. package/src/services/WxAppTelephonyMercurySync.ts +142 -0
  227. package/src/services/agent/ai-docs/AGENTS.md +240 -0
  228. package/src/services/agent/ai-docs/ARCHITECTURE.md +304 -0
  229. package/src/services/agent/ai-docs/agent-spec.md +505 -0
  230. package/src/services/ai-docs/AGENTS.md +386 -0
  231. package/src/services/ai-docs/services-spec.md +512 -0
  232. package/src/services/config/Util.ts +54 -84
  233. package/src/services/config/ai-docs/AGENTS.md +250 -0
  234. package/src/services/config/ai-docs/ARCHITECTURE.md +413 -0
  235. package/src/services/config/ai-docs/config-spec.md +669 -0
  236. package/src/services/config/constants.ts +64 -86
  237. package/src/services/config/index.ts +116 -277
  238. package/src/services/config/types.ts +238 -125
  239. package/src/services/constants.ts +18 -0
  240. package/src/services/core/Err.ts +3 -0
  241. package/src/services/core/Utils.ts +151 -37
  242. package/src/services/core/WebexRequest.ts +3 -1
  243. package/src/services/core/ai-docs/AGENTS.md +381 -0
  244. package/src/services/core/ai-docs/ARCHITECTURE.md +698 -0
  245. package/src/services/core/ai-docs/core-spec.md +797 -0
  246. package/src/services/core/aqm-reqs.ts +18 -12
  247. package/src/services/core/constants.ts +8 -0
  248. package/src/services/core/types.ts +33 -1
  249. package/src/services/core/websocket/WebSocketManager.ts +37 -8
  250. package/src/services/core/websocket/connection-service.ts +5 -1
  251. package/src/services/core/websocket/types.ts +1 -1
  252. package/src/services/index.ts +4 -0
  253. package/src/services/task/Task.ts +1211 -0
  254. package/src/services/task/TaskFactory.ts +82 -0
  255. package/src/services/task/TaskManager.ts +1551 -584
  256. package/src/services/task/TaskUtils.ts +316 -25
  257. package/src/services/task/WebexCallingUtils.ts +136 -0
  258. package/src/services/task/ai-docs/AGENTS.md +457 -0
  259. package/src/services/task/ai-docs/ARCHITECTURE.md +595 -0
  260. package/src/services/task/ai-docs/task-spec.md +1501 -0
  261. package/src/services/task/constants.ts +21 -0
  262. package/src/services/task/contact.ts +30 -0
  263. package/src/services/task/dialer.ts +80 -0
  264. package/src/services/task/digital/Digital.ts +102 -0
  265. package/src/services/task/state-machine/TaskStateMachine.ts +1320 -0
  266. package/src/services/task/state-machine/actions.ts +741 -0
  267. package/src/services/task/state-machine/ai-docs/AGENTS.md +460 -0
  268. package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1156 -0
  269. package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +2247 -0
  270. package/src/services/task/state-machine/constants.ts +172 -0
  271. package/src/services/task/state-machine/guards.ts +442 -0
  272. package/src/services/task/state-machine/index.ts +28 -0
  273. package/src/services/task/state-machine/types.ts +258 -0
  274. package/src/services/task/state-machine/uiControlsComputer.ts +1135 -0
  275. package/src/services/task/taskDataNormalizer.ts +137 -0
  276. package/src/services/task/types.ts +974 -70
  277. package/src/services/task/voice/Voice.ts +1878 -0
  278. package/src/services/task/voice/WebRTC.ts +194 -0
  279. package/src/services/task/voice/wxAppOfferObservability.ts +204 -0
  280. package/src/services/task/voice/wxAppVoiceMethods.ts +575 -0
  281. package/src/services/wxAppDiagnosticLogging.ts +286 -0
  282. package/src/services/wxAppTelephonyUtils.ts +14 -0
  283. package/src/types.ts +323 -13
  284. package/src/utils/AGENTS.md +289 -0
  285. package/src/utils/PageCache.ts +38 -5
  286. package/src/utils/ai-docs/utils-spec.md +391 -0
  287. package/src/webex.js +10 -0
  288. package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
  289. package/test/unit/spec/cc.ts +4046 -181
  290. package/test/unit/spec/index.ts +891 -0
  291. package/test/unit/spec/logger-proxy.ts +70 -0
  292. package/test/unit/spec/metrics/MetricsManager.ts +25 -0
  293. package/test/unit/spec/metrics/behavioral-events.ts +60 -0
  294. package/test/unit/spec/services/AddressBook.ts +37 -6
  295. package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
  296. package/test/unit/spec/services/ApiAiAssistant.ts +442 -23
  297. package/test/unit/spec/services/EntryPoint.ts +87 -40
  298. package/test/unit/spec/services/Queue.ts +123 -12
  299. package/test/unit/spec/services/UserPreference.ts +401 -0
  300. package/test/unit/spec/services/WebCallingService.ts +484 -49
  301. package/test/unit/spec/services/WebexCrossClientService.ts +509 -0
  302. package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
  303. package/test/unit/spec/services/config/Util.ts +501 -0
  304. package/test/unit/spec/services/config/index.ts +318 -548
  305. package/test/unit/spec/services/core/Utils.ts +447 -8
  306. package/test/unit/spec/services/core/WebexRequest.ts +8 -7
  307. package/test/unit/spec/services/core/aqm-reqs.ts +142 -1
  308. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +132 -56
  309. package/test/unit/spec/services/core/websocket/connection-service.ts +3 -1
  310. package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
  311. package/test/unit/spec/services/task/Task.ts +2723 -0
  312. package/test/unit/spec/services/task/TaskFactory.ts +116 -0
  313. package/test/unit/spec/services/task/TaskManager.ts +4800 -1586
  314. package/test/unit/spec/services/task/TaskUtils.ts +307 -0
  315. package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
  316. package/test/unit/spec/services/task/contact.ts +33 -0
  317. package/test/unit/spec/services/task/dialer.ts +190 -0
  318. package/test/unit/spec/services/task/digital/Digital.ts +105 -0
  319. package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +4060 -0
  320. package/test/unit/spec/services/task/state-machine/guards.ts +839 -0
  321. package/test/unit/spec/services/task/state-machine/types.ts +18 -0
  322. package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +3101 -0
  323. package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
  324. package/test/unit/spec/services/task/voice/Voice.ts +2355 -0
  325. package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
  326. package/test/unit/spec/services/task/voice/wxAppOfferObservability.ts +361 -0
  327. package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +719 -0
  328. package/test/unit/spec/services/wxAppDiagnosticLogging.ts +179 -0
  329. package/test/unit/spec/wellnessSampleUtils.ts +288 -0
  330. package/typedoc.md +1 -1
  331. package/umd/contact-center.min.js +2 -2
  332. package/umd/contact-center.min.js.map +1 -1
  333. package/dist/services/task/index.js +0 -1525
  334. package/dist/services/task/index.js.map +0 -1
  335. package/dist/types/services/task/index.d.ts +0 -650
  336. package/src/services/task/index.ts +0 -1801
  337. package/test/unit/spec/services/task/index.ts +0 -2184
package/src/types.ts CHANGED
@@ -6,7 +6,13 @@ import {
6
6
  } from '@webex/internal-plugin-metrics/src/metrics.types';
7
7
  import * as Agent from './services/agent/types';
8
8
  import * as Contact from './services/task/types';
9
- import {Profile} from './services/config/types';
9
+ import {
10
+ AIFeatureFlags,
11
+ Entity,
12
+ Profile,
13
+ CreateUserPreferenceRequest,
14
+ UpdateUserPreferenceRequest,
15
+ } from './services/config/types';
10
16
  import {PaginatedResponse, BaseSearchParams} from './utils/PageCache';
11
17
 
12
18
  /**
@@ -69,6 +75,8 @@ export type WebexRequestPayload = {
69
75
  uri?: string;
70
76
  /** Whether to add authorization header */
71
77
  addAuthHeader?: boolean;
78
+ /** Request timeout in milliseconds */
79
+ timeout?: number;
72
80
  /** Custom headers to include in request */
73
81
  headers?: {
74
82
  [key: string]: string | null;
@@ -88,12 +96,19 @@ export type WebexRequestPayload = {
88
96
  */
89
97
  type Listener = (e: string, data?: unknown) => void;
90
98
 
99
+ /**
100
+ * Mercury event handler callback.
101
+ * @internal
102
+ * @ignore
103
+ */
104
+ type MercuryEventHandler = (data?: unknown) => void;
105
+
91
106
  /**
92
107
  * Event listener removal function type.
93
108
  * @internal
94
109
  * @ignore
95
110
  */
96
- type ListenerOff = (e: string) => void;
111
+ type ListenerOff = (e: string, handler?: MercuryEventHandler) => void;
97
112
 
98
113
  /**
99
114
  * Service host configuration.
@@ -156,6 +171,10 @@ export interface CCPluginConfig {
156
171
  };
157
172
  /** Configuration for the calling client */
158
173
  callingClientConfig: CallingClientConfig;
174
+ /** Whether to skip Mobius/WebRTC registration for browser login flows */
175
+ disableWebRTCRegistration?: boolean;
176
+ /** Whether wxApp Better Together (telephony REST + usersub) is enabled at init (WXCC-6026) */
177
+ enableWxBetterTogether?: boolean;
159
178
  }
160
179
 
161
180
  /**
@@ -286,6 +305,12 @@ interface IWebexInternal {
286
305
  version: string;
287
306
  /** Calling behavior configuration */
288
307
  callingBehavior: string;
308
+ /** Whether the device is registered with WDM */
309
+ registered?: boolean;
310
+ /** Register the device with WDM */
311
+ register?: () => Promise<void>;
312
+ /** Unregister the device from WDM */
313
+ unregister?: () => Promise<void>;
289
314
  };
290
315
  /** Presence service */
291
316
  presence: unknown;
@@ -377,6 +402,50 @@ export interface WebexSDK {
377
402
  logger: Logger;
378
403
  }
379
404
 
405
+ /** Current browser voice availability. @public */
406
+ export enum VOICE_CONNECTION_STATUS {
407
+ READY = 'ready',
408
+ UNAVAILABLE = 'unavailable',
409
+ NOT_REQUIRED = 'not-required',
410
+ }
411
+
412
+ /** Stable error codes for browser voice availability failures. @public */
413
+ export enum VOICE_CONNECTION_ERROR {
414
+ NOT_READY = 'BROWSER_VOICE_NOT_READY',
415
+ }
416
+
417
+ /** Browser voice line registration states. @public */
418
+ export enum VoiceLineStatus {
419
+ UNKNOWN = 'unknown',
420
+ CONNECTING = 'connecting',
421
+ REGISTERED = 'registered',
422
+ RECONNECTING = 'reconnecting',
423
+ RECONNECTED = 'reconnected',
424
+ UNREGISTERED = 'unregistered',
425
+ ERROR = 'error',
426
+ }
427
+
428
+ /** Mobius socket states reported by the Calling SDK. @public */
429
+ export enum VoiceMobiusSocketStatus {
430
+ UNKNOWN = 'unknown',
431
+ NOT_IN_USE = 'not-in-use',
432
+ CONNECTED = 'connected',
433
+ DISCONNECTED = 'disconnected',
434
+ }
435
+
436
+ /**
437
+ * Current browser voice availability and the underlying line and Mobius states.
438
+ * Mobius socket state is separate from Contact Center WebSocket health.
439
+ * @public
440
+ */
441
+ export type VoiceConnectionState = {
442
+ status: VOICE_CONNECTION_STATUS;
443
+ lineStatus: VoiceLineStatus;
444
+ mobiusSocketStatus: VoiceMobiusSocketStatus;
445
+ reason?: string;
446
+ retryable?: boolean;
447
+ };
448
+
380
449
  /**
381
450
  * An interface for the `ContactCenter` class.
382
451
  * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.
@@ -397,6 +466,16 @@ export interface IContactCenter {
397
466
  * cc.register().then(profile => { ... });
398
467
  */
399
468
  register(): Promise<Profile>;
469
+
470
+ /** Returns the system-managed WellbeingBreak idle code for the registered session. */
471
+ getWellbeingBreakIdleCode(): Promise<Entity>;
472
+
473
+ /**
474
+ * Returns the current browser voice availability snapshot.
475
+ * @returns Current browser voice state, including line and Mobius socket status
476
+ * @public
477
+ */
478
+ getVoiceConnectionState(): VoiceConnectionState;
400
479
  }
401
480
 
402
481
  /**
@@ -542,22 +621,22 @@ export type RequestBody =
542
621
  | Contact.cancelCtq
543
622
  | Contact.WrapupPayLoad
544
623
  | Contact.DialerPayload
545
- | Contact.PreviewContactPayload;
624
+ | Contact.PreviewContactPayload
625
+ | CreateUserPreferenceRequest
626
+ | UpdateUserPreferenceRequest;
546
627
 
547
628
  /**
548
629
  * Represents the options to fetch buddy agents for the logged in agent.
549
- * Buddy agents are other agents who can be consulted or transfered to.
630
+ * Buddy agents are other agents who can be consulted or transferred to.
550
631
  * @public
551
632
  * @example
552
633
  * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };
553
- * @ignore
554
634
  */
555
635
  export type BuddyAgents = {
556
636
  /**
557
- * The media type channel to filter buddy agents.
558
- * Determines which channel capability the returned agents must have.
637
+ * The media type channel to filter buddy agents. Defaults to telephony when omitted.
559
638
  */
560
- mediaType: 'telephony' | 'chat' | 'social' | 'email';
639
+ mediaType?: 'telephony' | 'chat' | 'social' | 'email';
561
640
 
562
641
  /**
563
642
  * Optional filter for agent state.
@@ -565,9 +644,39 @@ export type BuddyAgents = {
565
644
  * If omitted, returns both available and idle agents.
566
645
  */
567
646
  state?: 'Available' | 'Idle';
647
+
648
+ /**
649
+ * Applies the default state policy for the operation. An explicit state takes precedence.
650
+ */
651
+ action?: 'Consult' | 'Transfer';
652
+ };
653
+
654
+ /**
655
+ * Holds the configuration flags for the Agent.
656
+ * These flags determine the availability of certain features in the Agent UI.
657
+ * @internal
658
+ */
659
+ export type ConfigFlags = {
660
+ isEndTaskEnabled: boolean;
661
+ isEndConsultEnabled: boolean;
662
+ webRtcEnabled: boolean;
663
+ autoWrapup: boolean;
664
+ aiFeature?: AIFeatureFlags;
665
+ /** Agent-profile policy used to derive task consult/transfer destination controls. */
666
+ consultTransfer?: Contact.ConsultTransferDestinationConfig;
667
+ /**
668
+ * Optional toggle to globally enable/disable recording controls.
669
+ * Falls back to backend hints when omitted.
670
+ */
671
+ isRecordingEnabled?: boolean;
672
+ /** Whether wxApp thick-client answer controls/APIs are enabled (WXCC-6026) */
673
+ enableWxBetterTogether?: boolean;
674
+ /** Read-only observability: live usersub answer-calls-on-wxcc state for wxApp offer diagnostics. */
675
+ getWxAppUsersubPublished?: () => boolean;
568
676
  };
569
677
 
570
678
  /**
679
+
571
680
  * Generic error structure for Contact Center SDK errors.
572
681
  * Contains detailed information about the error context.
573
682
  * @public
@@ -653,10 +762,12 @@ export interface AddressBookEntrySearchParams extends BaseSearchParams {
653
762
  export interface EntryPointRecord {
654
763
  id: string;
655
764
  name: string;
765
+ /** Dialled number mapped to this entry point when included in the list response. */
766
+ number?: string;
656
767
  description?: string;
657
- type: string;
658
- isActive: boolean;
659
- orgId: string;
768
+ type?: string;
769
+ isActive?: boolean;
770
+ orgId?: string;
660
771
  createdAt?: string;
661
772
  updatedAt?: string;
662
773
  settings?: Record<string, any>;
@@ -821,38 +932,237 @@ export type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;
821
932
  */
822
933
  export type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;
823
934
 
935
+ /**
936
+ * Supported transcript control actions for AI Assistant events.
937
+ * @public
938
+ * @example
939
+ * const action: TranscriptAction = 'START';
940
+ * @ignore
941
+ */
824
942
  export type TranscriptAction = 'START' | 'STOP';
825
943
 
944
+ /**
945
+ * Parameters used to request AI Assistant real-time assistance.
946
+ * @public
947
+ * @example
948
+ * const params: RealTimeAssistanceParams = {
949
+ * interactionId: 'interaction-123',
950
+ * context: 'Need help with credit card payment due date',
951
+ * };
952
+ */
953
+ export type RealTimeAssistanceParams = {
954
+ /** Agent identifier */
955
+ agentId: string;
956
+ /** Interaction identifier for which assistance should be generated */
957
+ interactionId: string;
958
+ /** Optional additional context that should refine the assistance */
959
+ context?: string;
960
+ /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */
961
+ languageCode?: string;
962
+ };
963
+
964
+ /**
965
+ * Supported user actions on an AI Assistant real-time assistance adaptive card.
966
+ * @public
967
+ */
968
+ export const RealTimeAssistanceUserActionId = {
969
+ /** User liked the real-time assistance response */
970
+ LIKE: 'likeButton',
971
+ /** User disliked the real-time assistance response */
972
+ DISLIKE: 'dislikeButton',
973
+ /** User copied the real-time assistance response */
974
+ COPY: 'copyButton',
975
+ } as const;
976
+
977
+ /**
978
+ * Union type of supported real-time assistance user actions.
979
+ * @public
980
+ */
981
+ export type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;
982
+
983
+ /**
984
+ * Parameters used to send user action feedback for a real-time assistance adaptive card.
985
+ * @public
986
+ * @example
987
+ * const params: RealTimeAssistanceUserActionParams = {
988
+ * agentId: 'agent-123',
989
+ * interactionId: 'interaction-123',
990
+ * adaptiveCardId: 'adaptive-card-123',
991
+ * actionId: RealTimeAssistanceUserActionId.LIKE,
992
+ * };
993
+ */
994
+ export type RealTimeAssistanceUserActionParams = {
995
+ /** Agent identifier */
996
+ agentId: string;
997
+ /** Interaction identifier associated with the real-time assistance response */
998
+ interactionId: string;
999
+ /** Adaptive card identifier from the real-time assistance payload */
1000
+ adaptiveCardId: string;
1001
+ /** User action performed on the adaptive card */
1002
+ actionId: RealTimeAssistanceUserActionId;
1003
+ /** Optional language code. Defaults to 'en'. */
1004
+ languageCode?: string;
1005
+ };
1006
+
1007
+ /**
1008
+ * Wellness notification actions delivered by the Contact Center notification service.
1009
+ * @public
1010
+ */
1011
+ export const WELLNESS_BREAK_NOTIFICATION_ACTIONS = {
1012
+ PROVIDE_WELLNESS_BREAK: 'PROVIDE_WELLNESS_BREAK',
1013
+ SUGGEST_WELLNESS_BREAK: 'SUGGEST_WELLNESS_BREAK',
1014
+ WELLNESS_BREAK_NOT_ALLOWED: 'WELLNESS_BREAK_NOT_ALLOWED',
1015
+ } as const;
1016
+
1017
+ /** Union of supported wellness notification actions. @public */
1018
+ export type WellnessBreakNotificationAction = Enum<typeof WELLNESS_BREAK_NOTIFICATION_ACTIONS>;
1019
+
1020
+ /**
1021
+ * Agent actions accepted by the wellness action API.
1022
+ * @public
1023
+ */
1024
+ export const WELLNESS_BREAK_USER_ACTIONS = {
1025
+ REQUESTED: 'REQUESTED',
1026
+ ACCEPTED: 'ACCEPTED',
1027
+ REJECTED: 'REJECTED',
1028
+ NO_RESPONSE: 'NO_RESPONSE',
1029
+ } as const;
1030
+
1031
+ /** Union of supported wellness action API values. @public */
1032
+ export type WellnessBreakUserAction = Enum<typeof WELLNESS_BREAK_USER_ACTIONS>;
1033
+
1034
+ /**
1035
+ * Validated, agent-scoped wellness notification emitted by Contact Center.
1036
+ * @public
1037
+ */
1038
+ export interface WellnessBreakEvent {
1039
+ /** Agent identifier */
1040
+ agentId: string;
1041
+ /** Organization identifier */
1042
+ orgId: string;
1043
+ /** Session identifier supplied by the notification; it may differ from the consumer's active session */
1044
+ agentSessionId: string;
1045
+ /** Backend wellness action */
1046
+ actionEvent: WellnessBreakNotificationAction;
1047
+ /** Optional untrusted plain-text message supplied by the backend */
1048
+ actionText?: string;
1049
+ /** Optional normalized interaction diagnostic */
1050
+ interactionId?: string;
1051
+ /** Notification diagnostic only; never an action-request correlation identifier */
1052
+ trackingId?: string;
1053
+ }
1054
+
1055
+ /**
1056
+ * Parameters for responding to a backend-provided wellness offer.
1057
+ * @public
1058
+ */
1059
+ export interface RespondToWellnessBreakParams {
1060
+ /** Agent response; REQUESTED is available only through requestWellnessBreak */
1061
+ action: Exclude<WellnessBreakUserAction, typeof WELLNESS_BREAK_USER_ACTIONS.REQUESTED>;
1062
+ }
1063
+
1064
+ /**
1065
+ * Supported AI Assistant event categories.
1066
+ * @public
1067
+ * @example
1068
+ * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;
1069
+ * @ignore
1070
+ */
826
1071
  export const AIAssistantEventType = {
1072
+ /** Custom AI Assistant event */
827
1073
  CUSTOM_EVENT: 'CUSTOM_EVENT',
1074
+ /** CTI-backed AI Assistant event */
828
1075
  CTI_EVENT: 'CTI_EVENT',
829
1076
  } as const;
830
1077
 
1078
+ /**
1079
+ * Union type of AI Assistant event categories.
1080
+ * @public
1081
+ * @example
1082
+ * function send(type: AIAssistantEventType) { ... }
1083
+ * @ignore
1084
+ */
831
1085
  export type AIAssistantEventType = Enum<typeof AIAssistantEventType>;
832
1086
 
1087
+ /**
1088
+ * Supported AI Assistant event names.
1089
+ * @public
1090
+ * @example
1091
+ * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;
1092
+ * @ignore
1093
+ */
833
1094
  export const AIAssistantEventName = {
1095
+ /** Request transcript streaming for an interaction */
834
1096
  GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',
835
- GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',
1097
+ /** Request a suggested response for an interaction */
1098
+ GET_SUGGESTIONS: 'GET_SUGGESTIONS',
1099
+ /** Add extra context to refine a suggested response */
1100
+ ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',
1101
+ /** Request post-call summary generation */
836
1102
  GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',
837
- MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',
1103
+ /** Request consult mid-call summary generation */
1104
+ GET_MID_CALL_CONSULT_SUMMARY: 'GET_MID_CALL_CONSULT_SUMMARY',
1105
+ /** Request transfer mid-call summary generation */
1106
+ GET_MID_CALL_TRANSFER_SUMMARY: 'GET_MID_CALL_TRANSFER_SUMMARY',
1107
+ /** Post-call summary response event */
838
1108
  POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',
1109
+ /** Consult mid-call summary response event */
1110
+ MID_CALL_CONSULT_SUMMARY_RESPONSE: 'MID_CALL_CONSULT_SUMMARY_RESPONSE',
1111
+ /** Transfer mid-call summary response event */
1112
+ MID_CALL_TRANSFER_SUMMARY_RESPONSE: 'MID_CALL_TRANSFER_SUMMARY_RESPONSE',
1113
+ /** Suggested digital response event */
839
1114
  SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',
1115
+ /** User action on a suggested response adaptive card */
1116
+ SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',
1117
+ /** Agent Wellness Break request/response action */
1118
+ WELLNESS_BREAK_ACTION: 'WellnessBreakAction',
840
1119
  } as const;
841
1120
 
1121
+ /**
1122
+ * Union type of AI Assistant event names.
1123
+ * @public
1124
+ * @example
1125
+ * function handle(name: AIAssistantEventName) { ... }
1126
+ * @ignore
1127
+ */
842
1128
  export type AIAssistantEventName = Enum<typeof AIAssistantEventName>;
843
1129
 
1130
+ /**
1131
+ * A single transcript message entry returned by AI Assistant APIs.
1132
+ * @public
1133
+ * @example
1134
+ * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };
1135
+ *
1136
+ */
844
1137
  export type TranscriptMessage = {
1138
+ /** Speaker role for this message */
845
1139
  role: string;
1140
+ /** Transcript chunk content */
846
1141
  content: string;
1142
+ /** Unique message identifier */
847
1143
  messageId: string;
1144
+ /** Message publish timestamp (epoch milliseconds) */
848
1145
  publishTimestamp: number;
849
1146
  };
850
1147
 
1148
+ /**
1149
+ * Response payload for historic transcripts API.
1150
+ * @public
1151
+ * @example
1152
+ * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };
1153
+ *
1154
+ */
851
1155
  export type HistoricTranscriptsResponse = {
1156
+ /** Organization identifier */
852
1157
  orgId: string;
1158
+ /** Agent identifier */
853
1159
  agentId: string;
1160
+ /** Conversation identifier when available */
854
1161
  conversationId: string | null;
1162
+ /** Interaction identifier */
855
1163
  interactionId: string;
1164
+ /** Data source identifier */
856
1165
  source: string;
1166
+ /** Transcript messages */
857
1167
  data: TranscriptMessage[];
858
1168
  };