@webex/contact-center 3.12.0-next.16 → 3.12.0-next.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +887 -0
- package/AGENTS.md +94 -0
- package/ai-docs/ARCHITECTURE.md +168 -0
- package/ai-docs/CONTRACTS.md +62 -0
- package/ai-docs/GETTING_STARTED.md +168 -0
- package/ai-docs/GLOSSARY.md +43 -0
- package/ai-docs/README.md +138 -0
- package/ai-docs/REVIEW_CHECKLIST.md +41 -0
- package/ai-docs/RULES.md +444 -0
- package/ai-docs/SECURITY.md +52 -0
- package/ai-docs/SERVICE_STATE.md +52 -0
- package/ai-docs/SPEC_INDEX.md +65 -0
- package/ai-docs/adr/0001-spec-source-policy.md +55 -0
- package/ai-docs/adr/README.md +8 -0
- package/ai-docs/adr/_adr-template.md +31 -0
- package/ai-docs/contact-center-spec.md +385 -0
- package/ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md +362 -0
- package/ai-docs/features/contact-owner-change-refactor.md +78 -0
- package/ai-docs/features/generated-spec-conformance-fidelity-remediation/spec/feature-spec.md +117 -0
- package/ai-docs/features/residual-warning-coverage-completion/spec/feature-spec.md +203 -0
- package/ai-docs/features/validator-code-fidelity-drift-fix/spec/feature-spec.md +315 -0
- package/ai-docs/patterns/event-driven-patterns.md +485 -0
- package/ai-docs/patterns/testing-patterns.md +480 -0
- package/ai-docs/patterns/typescript-patterns.md +365 -0
- package/ai-docs/templates/README.md +102 -0
- package/ai-docs/templates/documentation/create-agents-md.md +240 -0
- package/ai-docs/templates/documentation/create-architecture-md.md +295 -0
- package/ai-docs/templates/existing-service/bug-fix.md +254 -0
- package/ai-docs/templates/existing-service/feature-enhancement.md +450 -0
- package/ai-docs/templates/new-method/00-master.md +80 -0
- package/ai-docs/templates/new-method/01-requirements.md +232 -0
- package/ai-docs/templates/new-method/02-implementation.md +295 -0
- package/ai-docs/templates/new-method/03-tests.md +201 -0
- package/ai-docs/templates/new-method/04-validation.md +141 -0
- package/ai-docs/templates/new-service/00-master.md +109 -0
- package/ai-docs/templates/new-service/01-pre-questions.md +159 -0
- package/ai-docs/templates/new-service/02-code-generation.md +346 -0
- package/ai-docs/templates/new-service/03-integration.md +178 -0
- package/ai-docs/templates/new-service/04-test-generation.md +205 -0
- package/ai-docs/templates/new-service/05-validation.md +145 -0
- package/dist/cc.js +888 -49
- package/dist/cc.js.map +1 -1
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +38 -3
- package/dist/constants.js.map +1 -1
- package/dist/index.js +54 -17
- package/dist/index.js.map +1 -1
- package/dist/metrics/MetricsManager.js +16 -0
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +185 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +54 -4
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +18 -15
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/AnswerCallOnWebexService.js +202 -0
- package/dist/services/AnswerCallOnWebexService.js.map +1 -0
- package/dist/services/ApiAiAssistant.js +369 -14
- package/dist/services/ApiAiAssistant.js.map +1 -1
- package/dist/services/EntryPoint.js +46 -68
- package/dist/services/EntryPoint.js.map +1 -1
- package/dist/services/Queue.js +27 -22
- package/dist/services/Queue.js.map +1 -1
- package/dist/services/UserPreference.js +427 -0
- package/dist/services/UserPreference.js.map +1 -0
- package/dist/services/WebCallingService.js +10 -2
- package/dist/services/WebCallingService.js.map +1 -1
- package/dist/services/WebexCrossClientService.js +225 -0
- package/dist/services/WebexCrossClientService.js.map +1 -0
- package/dist/services/WxAppTelephonyMercurySync.js +111 -0
- package/dist/services/WxAppTelephonyMercurySync.js.map +1 -0
- package/dist/services/config/Util.js +48 -48
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js +56 -78
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +100 -226
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +93 -24
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js +11 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/Utils.js +131 -32
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/WebexRequest.js +6 -2
- package/dist/services/core/WebexRequest.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +17 -11
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +9 -1
- package/dist/services/core/constants.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +19 -2
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/types.js.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/task/Task.js +955 -0
- package/dist/services/task/Task.js.map +1 -0
- package/dist/services/task/TaskFactory.js +50 -0
- package/dist/services/task/TaskFactory.js.map +1 -0
- package/dist/services/task/TaskManager.js +1272 -605
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +221 -27
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/WebexCallingUtils.js +70 -0
- package/dist/services/task/WebexCallingUtils.js.map +1 -0
- package/dist/services/task/constants.js +19 -2
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +29 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/digital/Digital.js +78 -0
- package/dist/services/task/digital/Digital.js.map +1 -0
- package/dist/services/task/state-machine/TaskStateMachine.js +982 -0
- package/dist/services/task/state-machine/TaskStateMachine.js.map +1 -0
- package/dist/services/task/state-machine/actions.js +572 -0
- package/dist/services/task/state-machine/actions.js.map +1 -0
- package/dist/services/task/state-machine/constants.js +161 -0
- package/dist/services/task/state-machine/constants.js.map +1 -0
- package/dist/services/task/state-machine/guards.js +379 -0
- package/dist/services/task/state-machine/guards.js.map +1 -0
- package/dist/services/task/state-machine/index.js +53 -0
- package/dist/services/task/state-machine/index.js.map +1 -0
- package/dist/services/task/state-machine/types.js +54 -0
- package/dist/services/task/state-machine/types.js.map +1 -0
- package/dist/services/task/state-machine/uiControlsComputer.js +703 -0
- package/dist/services/task/state-machine/uiControlsComputer.js.map +1 -0
- package/dist/services/task/taskDataNormalizer.js +99 -0
- package/dist/services/task/taskDataNormalizer.js.map +1 -0
- package/dist/services/task/types.js +215 -5
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +1504 -0
- package/dist/services/task/voice/Voice.js.map +1 -0
- package/dist/services/task/voice/WebRTC.js +152 -0
- package/dist/services/task/voice/WebRTC.js.map +1 -0
- package/dist/services/task/voice/wxAppOfferObservability.js +145 -0
- package/dist/services/task/voice/wxAppOfferObservability.js.map +1 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js +395 -0
- package/dist/services/task/voice/wxAppVoiceMethods.js.map +1 -0
- package/dist/services/wxAppDiagnosticLogging.js +159 -0
- package/dist/services/wxAppDiagnosticLogging.js.map +1 -0
- package/dist/services/wxAppTelephonyUtils.js +19 -0
- package/dist/services/wxAppTelephonyUtils.js.map +1 -0
- package/dist/types/cc.d.ts +152 -9
- package/dist/types/config.d.ts +13 -0
- package/dist/types/constants.d.ts +36 -1
- package/dist/types/index.d.ts +54 -20
- package/dist/types/metrics/MetricsManager.d.ts +6 -0
- package/dist/types/metrics/constants.d.ts +48 -1
- package/dist/types/services/AddressBook.d.ts +2 -1
- package/dist/types/services/AnswerCallOnWebexService.d.ts +38 -0
- package/dist/types/services/ApiAiAssistant.d.ts +67 -5
- package/dist/types/services/EntryPoint.d.ts +7 -5
- package/dist/types/services/Queue.d.ts +5 -3
- package/dist/types/services/UserPreference.d.ts +118 -0
- package/dist/types/services/WebexCrossClientService.d.ts +32 -0
- package/dist/types/services/WxAppTelephonyMercurySync.d.ts +28 -0
- package/dist/types/services/config/Util.d.ts +4 -8
- package/dist/types/services/config/constants.d.ts +49 -76
- package/dist/types/services/config/index.d.ts +16 -64
- package/dist/types/services/config/types.d.ts +240 -114
- package/dist/types/services/constants.d.ts +9 -0
- package/dist/types/services/core/Err.d.ts +2 -0
- package/dist/types/services/core/Utils.d.ts +43 -13
- package/dist/types/services/core/WebexRequest.d.ts +1 -0
- package/dist/types/services/core/constants.d.ts +7 -0
- package/dist/types/services/core/types.d.ts +2 -0
- package/dist/types/services/core/websocket/WebSocketManager.d.ts +1 -0
- package/dist/types/services/core/websocket/types.d.ts +1 -1
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/services/task/Task.d.ts +186 -0
- package/dist/types/services/task/TaskFactory.d.ts +14 -0
- package/dist/types/services/task/TaskUtils.d.ts +54 -2
- package/dist/types/services/task/WebexCallingUtils.d.ts +11 -0
- package/dist/types/services/task/constants.d.ts +17 -0
- package/dist/types/services/task/contact.d.ts +4 -0
- package/dist/types/services/task/digital/Digital.d.ts +23 -0
- package/dist/types/services/task/state-machine/TaskStateMachine.d.ts +1442 -0
- package/dist/types/services/task/state-machine/actions.d.ts +10 -0
- package/dist/types/services/task/state-machine/constants.d.ts +107 -0
- package/dist/types/services/task/state-machine/guards.d.ts +103 -0
- package/dist/types/services/task/state-machine/index.d.ts +13 -0
- package/dist/types/services/task/state-machine/types.d.ts +277 -0
- package/dist/types/services/task/state-machine/uiControlsComputer.d.ts +9 -0
- package/dist/types/services/task/taskDataNormalizer.d.ts +10 -0
- package/dist/types/services/task/types.d.ts +738 -66
- package/dist/types/services/task/voice/Voice.d.ts +241 -0
- package/dist/types/services/task/voice/WebRTC.d.ts +54 -0
- package/dist/types/services/task/voice/wxAppOfferObservability.d.ts +39 -0
- package/dist/types/services/task/voice/wxAppVoiceMethods.d.ts +68 -0
- package/dist/types/services/wxAppDiagnosticLogging.d.ts +63 -0
- package/dist/types/services/wxAppTelephonyUtils.d.ts +5 -0
- package/dist/types/types.d.ts +213 -11
- package/dist/types/utils/PageCache.d.ts +20 -3
- package/dist/types/webex.d.ts +1 -0
- package/dist/types.js +168 -6
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +19 -5
- package/dist/utils/PageCache.js.map +1 -1
- package/dist/webex.js +22 -2
- package/dist/webex.js.map +1 -1
- package/package.json +16 -12
- package/src/cc.ts +1137 -67
- package/src/config.ts +13 -0
- package/src/constants.ts +39 -1
- package/src/index.ts +62 -15
- package/src/metrics/MetricsManager.ts +16 -0
- package/src/metrics/ai-docs/AGENTS.md +350 -0
- package/src/metrics/ai-docs/ARCHITECTURE.md +338 -0
- package/src/metrics/ai-docs/metrics-spec.md +971 -0
- package/src/metrics/behavioral-events.ts +190 -0
- package/src/metrics/constants.ts +59 -4
- package/src/services/AddressBook.ts +17 -6
- package/src/services/AnswerCallOnWebexService.ts +239 -0
- package/src/services/ApiAiAssistant.ts +494 -15
- package/src/services/EntryPoint.ts +59 -60
- package/src/services/Queue.ts +29 -12
- package/src/services/UserPreference.ts +509 -0
- package/src/services/WebCallingService.ts +16 -2
- package/src/services/WebexCrossClientService.ts +298 -0
- package/src/services/WxAppTelephonyMercurySync.ts +142 -0
- package/src/services/agent/ai-docs/AGENTS.md +240 -0
- package/src/services/agent/ai-docs/ARCHITECTURE.md +304 -0
- package/src/services/agent/ai-docs/agent-spec.md +505 -0
- package/src/services/ai-docs/AGENTS.md +386 -0
- package/src/services/ai-docs/services-spec.md +512 -0
- package/src/services/config/Util.ts +54 -84
- package/src/services/config/ai-docs/AGENTS.md +250 -0
- package/src/services/config/ai-docs/ARCHITECTURE.md +413 -0
- package/src/services/config/ai-docs/config-spec.md +669 -0
- package/src/services/config/constants.ts +63 -85
- package/src/services/config/index.ts +116 -277
- package/src/services/config/types.ts +229 -125
- package/src/services/constants.ts +10 -0
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/Utils.ts +151 -37
- package/src/services/core/WebexRequest.ts +3 -1
- package/src/services/core/ai-docs/AGENTS.md +381 -0
- package/src/services/core/ai-docs/ARCHITECTURE.md +698 -0
- package/src/services/core/ai-docs/core-spec.md +797 -0
- package/src/services/core/aqm-reqs.ts +18 -12
- package/src/services/core/constants.ts +8 -0
- package/src/services/core/types.ts +33 -1
- package/src/services/core/websocket/WebSocketManager.ts +28 -2
- package/src/services/core/websocket/types.ts +1 -1
- package/src/services/index.ts +1 -1
- package/src/services/task/Task.ts +1211 -0
- package/src/services/task/TaskFactory.ts +82 -0
- package/src/services/task/TaskManager.ts +1585 -724
- package/src/services/task/TaskUtils.ts +316 -25
- package/src/services/task/WebexCallingUtils.ts +136 -0
- package/src/services/task/ai-docs/AGENTS.md +457 -0
- package/src/services/task/ai-docs/ARCHITECTURE.md +595 -0
- package/src/services/task/ai-docs/task-spec.md +1501 -0
- package/src/services/task/constants.ts +18 -0
- package/src/services/task/contact.ts +30 -0
- package/src/services/task/digital/Digital.ts +102 -0
- package/src/services/task/state-machine/TaskStateMachine.ts +1320 -0
- package/src/services/task/state-machine/actions.ts +741 -0
- package/src/services/task/state-machine/ai-docs/AGENTS.md +460 -0
- package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +1156 -0
- package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +2247 -0
- package/src/services/task/state-machine/constants.ts +172 -0
- package/src/services/task/state-machine/guards.ts +442 -0
- package/src/services/task/state-machine/index.ts +28 -0
- package/src/services/task/state-machine/types.ts +258 -0
- package/src/services/task/state-machine/uiControlsComputer.ts +1135 -0
- package/src/services/task/taskDataNormalizer.ts +137 -0
- package/src/services/task/types.ts +918 -70
- package/src/services/task/voice/Voice.ts +1878 -0
- package/src/services/task/voice/WebRTC.ts +194 -0
- package/src/services/task/voice/wxAppOfferObservability.ts +204 -0
- package/src/services/task/voice/wxAppVoiceMethods.ts +575 -0
- package/src/services/wxAppDiagnosticLogging.ts +286 -0
- package/src/services/wxAppTelephonyUtils.ts +14 -0
- package/src/types.ts +272 -13
- package/src/utils/AGENTS.md +289 -0
- package/src/utils/PageCache.ts +38 -5
- package/src/utils/ai-docs/utils-spec.md +391 -0
- package/src/webex.js +10 -0
- package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
- package/test/unit/spec/cc.ts +3553 -107
- package/test/unit/spec/index.ts +885 -0
- package/test/unit/spec/logger-proxy.ts +70 -0
- package/test/unit/spec/metrics/MetricsManager.ts +25 -0
- package/test/unit/spec/metrics/behavioral-events.ts +60 -0
- package/test/unit/spec/services/AddressBook.ts +37 -6
- package/test/unit/spec/services/AnswerCallOnWebexService.ts +264 -0
- package/test/unit/spec/services/ApiAiAssistant.ts +442 -23
- package/test/unit/spec/services/EntryPoint.ts +87 -40
- package/test/unit/spec/services/Queue.ts +123 -12
- package/test/unit/spec/services/UserPreference.ts +401 -0
- package/test/unit/spec/services/WebCallingService.ts +45 -1
- package/test/unit/spec/services/WebexCrossClientService.ts +509 -0
- package/test/unit/spec/services/WxAppTelephonyMercurySync.ts +136 -0
- package/test/unit/spec/services/config/Util.ts +501 -0
- package/test/unit/spec/services/config/index.ts +317 -547
- package/test/unit/spec/services/core/Utils.ts +447 -8
- package/test/unit/spec/services/core/WebexRequest.ts +8 -7
- package/test/unit/spec/services/core/aqm-reqs.ts +142 -1
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +129 -53
- package/test/unit/spec/services/task/AutoWrapup.ts +63 -0
- package/test/unit/spec/services/task/Task.ts +2723 -0
- package/test/unit/spec/services/task/TaskFactory.ts +116 -0
- package/test/unit/spec/services/task/TaskManager.ts +4734 -1769
- package/test/unit/spec/services/task/TaskUtils.ts +307 -0
- package/test/unit/spec/services/task/WebexCallingUtils.ts +153 -0
- package/test/unit/spec/services/task/contact.ts +33 -0
- package/test/unit/spec/services/task/digital/Digital.ts +105 -0
- package/test/unit/spec/services/task/state-machine/TaskStateMachine.ts +4060 -0
- package/test/unit/spec/services/task/state-machine/guards.ts +839 -0
- package/test/unit/spec/services/task/state-machine/types.ts +18 -0
- package/test/unit/spec/services/task/state-machine/uiControlsComputer.ts +3101 -0
- package/test/unit/spec/services/task/taskTestUtils.ts +87 -0
- package/test/unit/spec/services/task/voice/Voice.ts +2355 -0
- package/test/unit/spec/services/task/voice/WebRTC.ts +235 -0
- package/test/unit/spec/services/task/voice/wxAppOfferObservability.ts +361 -0
- package/test/unit/spec/services/task/voice/wxAppVoiceMethods.ts +719 -0
- package/test/unit/spec/services/wxAppDiagnosticLogging.ts +179 -0
- package/test/unit/spec/wellnessSampleUtils.ts +288 -0
- package/typedoc.md +1 -1
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
- package/dist/services/task/index.js +0 -1530
- package/dist/services/task/index.js.map +0 -1
- package/dist/types/services/task/index.d.ts +0 -650
- package/src/services/task/index.ts +0 -1806
- package/test/unit/spec/services/task/index.ts +0 -2205
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CC_TASK_EVENTS","exports","AGENT_CONTACT_ASSIGN_FAILED","AGENT_CONTACT_OFFER_RONA","AGENT_CONTACT_HELD","AGENT_CONTACT_HOLD_FAILED","AGENT_CONTACT_UNHELD","AGENT_CONTACT_UNHOLD_FAILED","AGENT_CONSULT_CREATED","AGENT_OFFER_CONSULT","AGENT_CONSULTING","AGENT_CONSULT_FAILED","AGENT_CTQ_FAILED","AGENT_CTQ_CANCELLED","AGENT_CTQ_CANCEL_FAILED","AGENT_CONSULT_ENDED","AGENT_CONSULT_END_FAILED","AGENT_CONSULT_CONFERENCE_ENDED","AGENT_CONSULT_CONFERENCING","AGENT_CONSULT_CONFERENCED","AGENT_CONSULT_CONFERENCE_FAILED","PARTICIPANT_JOINED_CONFERENCE","PARTICIPANT_LEFT_CONFERENCE","PARTICIPANT_LEFT_CONFERENCE_FAILED","AGENT_CONSULT_CONFERENCE_END_FAILED","AGENT_CONFERENCE_TRANSFERRED","AGENT_CONFERENCE_TRANSFER_FAILED","PARTICIPANT_POST_CALL_ACTIVITY","AGENT_BLIND_TRANSFERRED","AGENT_BLIND_TRANSFER_FAILED","AGENT_VTEAM_TRANSFERRED","AGENT_VTEAM_TRANSFER_FAILED","AGENT_CONSULT_TRANSFERRING","AGENT_CONSULT_TRANSFERRED","AGENT_CONSULT_TRANSFER_FAILED","CONTACT_RECORDING_PAUSED","CONTACT_RECORDING_PAUSE_FAILED","CONTACT_RECORDING_RESUMED","CONTACT_RECORDING_RESUME_FAILED","CONTACT_ENDED","CONTACT_MERGED","AGENT_CONTACT_END_FAILED","AGENT_WRAPUP","AGENT_WRAPPEDUP","AGENT_WRAPUP_FAILED","AGENT_OUTBOUND_FAILED","AGENT_CONTACT","AGENT_OFFER_CONTACT","AGENT_CONTACT_ASSIGNED","AGENT_CONTACT_UNASSIGNED","AGENT_INVITE_FAILED","AGENT_OFFER_CAMPAIGN_RESERVATION","CAMPAIGN_CONTACT_UPDATED","CAMPAIGN_PREVIEW_ACCEPT_FAILED","CAMPAIGN_PREVIEW_SKIP_FAILED","CAMPAIGN_PREVIEW_REMOVE_FAILED","REAL_TIME_TRANSCRIPTION","CC_AGENT_EVENTS","WELCOME","AGENT_RELOGIN_SUCCESS","AGENT_RELOGIN_FAILED","AGENT_DN_REGISTERED","AGENT_LOGOUT","AGENT_LOGOUT_SUCCESS","AGENT_LOGOUT_FAILED","AGENT_STATION_LOGIN","AGENT_STATION_LOGIN_SUCCESS","AGENT_STATION_LOGIN_FAILED","AGENT_STATE_CHANGE","AGENT_MULTI_LOGIN","AGENT_STATE_CHANGE_SUCCESS","AGENT_STATE_CHANGE_FAILED","AGENT_BUDDY_AGENTS","AGENT_BUDDY_AGENTS_SUCCESS","AGENT_BUDDY_AGENTS_RETRIEVE_FAILED","AGENT_CONTACT_RESERVED","CC_EVENTS","IDLE_CODE","WRAP_UP_CODE"],"sources":["types.ts"],"sourcesContent":["import * as Agent from '../agent/types';\n\n/**\n * Generic type for converting a const enum object into a union type of its values\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * Events emitted on task objects\n * @enum {string}\n * @private\n * @ignore\n */\nexport const CC_TASK_EVENTS = {\n /** Event emitted when assigning contact to agent fails */\n AGENT_CONTACT_ASSIGN_FAILED: 'AgentContactAssignFailed',\n /** Event emitted when agent does not respond to contact offer */\n AGENT_CONTACT_OFFER_RONA: 'AgentOfferContactRona',\n /** Event emitted when contact is put on hold */\n AGENT_CONTACT_HELD: 'AgentContactHeld',\n /** Event emitted when putting contact on hold fails */\n AGENT_CONTACT_HOLD_FAILED: 'AgentContactHoldFailed',\n /** Event emitted when contact is taken off hold */\n AGENT_CONTACT_UNHELD: 'AgentContactUnheld',\n /** Event emitted when taking contact off hold fails */\n AGENT_CONTACT_UNHOLD_FAILED: 'AgentContactUnHoldFailed',\n /** Event emitted when consultation is created */\n AGENT_CONSULT_CREATED: 'AgentConsultCreated',\n /** Event emitted when consultation is offered */\n AGENT_OFFER_CONSULT: 'AgentOfferConsult',\n /** Event emitted when agent is consulting */\n AGENT_CONSULTING: 'AgentConsulting',\n /** Event emitted when consultation fails */\n AGENT_CONSULT_FAILED: 'AgentConsultFailed',\n /** Event emitted when consulting to queue (CTQ) fails */\n AGENT_CTQ_FAILED: 'AgentCtqFailed',\n /** Event emitted when CTQ is cancelled */\n AGENT_CTQ_CANCELLED: 'AgentCtqCancelled',\n /** Event emitted when CTQ cancellation fails */\n AGENT_CTQ_CANCEL_FAILED: 'AgentCtqCancelFailed',\n /** Event emitted when consultation ends */\n AGENT_CONSULT_ENDED: 'AgentConsultEnded',\n /** Event emitted when ending consultation fails */\n AGENT_CONSULT_END_FAILED: 'AgentConsultEndFailed',\n /** Event emitted when consultation conference ends */\n AGENT_CONSULT_CONFERENCE_ENDED: 'AgentConsultConferenceEnded',\n /** Event emitted when consultation conference is in progress */\n AGENT_CONSULT_CONFERENCING: 'AgentConsultConferencing',\n /** Event emitted when consultation conference starts */\n AGENT_CONSULT_CONFERENCED: 'AgentConsultConferenced',\n /** Event emitted when consultation conference fails */\n AGENT_CONSULT_CONFERENCE_FAILED: 'AgentConsultConferenceFailed',\n /** Event emitted when participant joins conference */\n PARTICIPANT_JOINED_CONFERENCE: 'ParticipantJoinedConference',\n /** Event emitted when participant leaves conference */\n PARTICIPANT_LEFT_CONFERENCE: 'ParticipantLeftConference',\n /** Event emitted when participant leaving conference fails */\n PARTICIPANT_LEFT_CONFERENCE_FAILED: 'ParticipantLeftConferenceFailed',\n /** Event emitted when consultation conference end fails */\n AGENT_CONSULT_CONFERENCE_END_FAILED: 'AgentConsultConferenceEndFailed',\n /** Event emitted when conference is successfully transferred */\n AGENT_CONFERENCE_TRANSFERRED: 'AgentConferenceTransferred',\n /** Event emitted when conference transfer fails */\n AGENT_CONFERENCE_TRANSFER_FAILED: 'AgentConferenceTransferFailed',\n /** Event emitted for post-call activity by participant */\n PARTICIPANT_POST_CALL_ACTIVITY: 'ParticipantPostCallActivity',\n /** Event emitted when contact is blind transferred */\n AGENT_BLIND_TRANSFERRED: 'AgentBlindTransferred',\n /** Event emitted when blind transfer fails */\n AGENT_BLIND_TRANSFER_FAILED: 'AgentBlindTransferFailed',\n /** Event emitted when contact is transferred to virtual team */\n AGENT_VTEAM_TRANSFERRED: 'AgentVteamTransferred',\n /** Event emitted when virtual team transfer fails */\n AGENT_VTEAM_TRANSFER_FAILED: 'AgentVteamTransferFailed',\n /** Event emitted when consultation transfer is in progress */\n AGENT_CONSULT_TRANSFERRING: 'AgentConsultTransferring',\n /** Event emitted when consultation transfer completes */\n AGENT_CONSULT_TRANSFERRED: 'AgentConsultTransferred',\n /** Event emitted when consultation transfer fails */\n AGENT_CONSULT_TRANSFER_FAILED: 'AgentConsultTransferFailed',\n /** Event emitted when contact recording is paused */\n CONTACT_RECORDING_PAUSED: 'ContactRecordingPaused',\n /** Event emitted when pausing contact recording fails */\n CONTACT_RECORDING_PAUSE_FAILED: 'ContactRecordingPauseFailed',\n /** Event emitted when contact recording is resumed */\n CONTACT_RECORDING_RESUMED: 'ContactRecordingResumed',\n /** Event emitted when resuming contact recording fails */\n CONTACT_RECORDING_RESUME_FAILED: 'ContactRecordingResumeFailed',\n /** Event emitted when contact ends */\n CONTACT_ENDED: 'ContactEnded',\n /** Event emitted when contact is merged */\n CONTACT_MERGED: 'ContactMerged',\n /** Event emitted when ending contact fails */\n AGENT_CONTACT_END_FAILED: 'AgentContactEndFailed',\n /** Event emitted when agent enters wrap-up state */\n AGENT_WRAPUP: 'AgentWrapup',\n /** Event emitted when agent completes wrap-up */\n AGENT_WRAPPEDUP: 'AgentWrappedUp',\n /** Event emitted when wrap-up fails */\n AGENT_WRAPUP_FAILED: 'AgentWrapupFailed',\n /** Event emitted when outbound call fails */\n AGENT_OUTBOUND_FAILED: 'AgentOutboundFailed',\n /** Event emitted for general agent contact events */\n AGENT_CONTACT: 'AgentContact',\n /** Event emitted when contact is offered to agent */\n AGENT_OFFER_CONTACT: 'AgentOfferContact',\n /** Event emitted when contact is assigned to agent */\n AGENT_CONTACT_ASSIGNED: 'AgentContactAssigned',\n /** Event emitted when contact is unassigned from agent */\n AGENT_CONTACT_UNASSIGNED: 'AgentContactUnassigned',\n /** Event emitted when inviting agent fails */\n AGENT_INVITE_FAILED: 'AgentInviteFailed',\n /** Event emitted when a campaign preview contact is offered to the agent */\n AGENT_OFFER_CAMPAIGN_RESERVATION: 'AgentOfferCampaignReservation',\n /** Event emitted when campaign contact is updated */\n CAMPAIGN_CONTACT_UPDATED: 'CampaignContactUpdated',\n /** Event emitted when accepting a campaign preview contact fails */\n CAMPAIGN_PREVIEW_ACCEPT_FAILED: 'CampaignPreviewAcceptFailed',\n /** Event emitted when skipping a campaign preview contact fails */\n CAMPAIGN_PREVIEW_SKIP_FAILED: 'CampaignPreviewSkipFailed',\n /** Event emitted when removing a campaign preview contact fails */\n CAMPAIGN_PREVIEW_REMOVE_FAILED: 'CampaignPreviewRemoveFailed',\n /** Event emitted when a real-time transcript chunk is received */\n REAL_TIME_TRANSCRIPTION: 'REAL_TIME_TRANSCRIPTION',\n} as const;\n\n/**\n * Events emitted on Contact Center agent operations\n * @enum {string}\n * @private\n * @ignore\n */\nexport const CC_AGENT_EVENTS = {\n /** Welcome event when agent connects to websocket/backend */\n WELCOME: 'Welcome',\n /** Event emitted when agent re-login is successful */\n AGENT_RELOGIN_SUCCESS: 'AgentReloginSuccess',\n /** Event emitted when agent re-login fails */\n AGENT_RELOGIN_FAILED: 'AgentReloginFailed',\n /** Event emitted when agent DN registration completes */\n AGENT_DN_REGISTERED: 'AgentDNRegistered',\n /** Event emitted when agent initiates logout */\n AGENT_LOGOUT: 'Logout',\n /** Event emitted when agent logout is successful */\n AGENT_LOGOUT_SUCCESS: 'AgentLogoutSuccess',\n /** Event emitted when agent logout fails */\n AGENT_LOGOUT_FAILED: 'AgentLogoutFailed',\n /** Event emitted when agent initiates station login */\n AGENT_STATION_LOGIN: 'StationLogin',\n /** Event emitted when agent station login is successful */\n AGENT_STATION_LOGIN_SUCCESS: 'AgentStationLoginSuccess',\n /** Event emitted when agent station login fails */\n AGENT_STATION_LOGIN_FAILED: 'AgentStationLoginFailed',\n /** Event emitted when agent's state changes */\n AGENT_STATE_CHANGE: 'AgentStateChange',\n /** Event emitted when multiple logins detected for same agent */\n AGENT_MULTI_LOGIN: 'AGENT_MULTI_LOGIN',\n /** Event emitted when agent state change is successful */\n AGENT_STATE_CHANGE_SUCCESS: 'AgentStateChangeSuccess',\n /** Event emitted when agent state change fails */\n AGENT_STATE_CHANGE_FAILED: 'AgentStateChangeFailed',\n /** Event emitted when requesting buddy agents list */\n AGENT_BUDDY_AGENTS: 'BuddyAgents',\n /** Event emitted when buddy agents list is successfully retrieved */\n AGENT_BUDDY_AGENTS_SUCCESS: 'BuddyAgents',\n /** Event emitted when retrieving buddy agents list fails */\n AGENT_BUDDY_AGENTS_RETRIEVE_FAILED: 'BuddyAgentsRetrieveFailed',\n /** Event emitted when contact is reserved for agent */\n AGENT_CONTACT_RESERVED: 'AgentContactReserved',\n} as const;\n\n/**\n * Combined Contact Center events including both agent and task events\n * @enum {string}\n * @public\n */\nexport const CC_EVENTS = {\n ...CC_AGENT_EVENTS,\n ...CC_TASK_EVENTS,\n} as const;\n\n/**\n * Event data received when agent connects to the system\n * @public\n */\nexport type WelcomeEvent = {\n /** ID of the agent that connected */\n agentId: string;\n};\n\n/**\n * Response type for welcome events which can be either success or error\n * @public\n */\nexport type WelcomeResponse = WelcomeEvent | Error;\n\n/**\n * Type representing the union of all possible Contact Center events\n * @public\n */\nexport type CC_EVENTS = Enum<typeof CC_EVENTS>;\n\n/**\n * WebSocket event structure for Contact Center events\n * @public\n */\nexport type WebSocketEvent = {\n /** Type of the event */\n type: CC_EVENTS;\n /** Event payload data */\n data:\n | WelcomeEvent\n | Agent.StationLoginSuccess\n | Agent.LogoutSuccess\n | Agent.ReloginSuccess\n | Agent.StateChangeSuccess\n | Agent.BuddyAgentsSuccess;\n};\n\n/**\n * Represents the response from getUserUsingCI method.\n */\nexport type AgentResponse = {\n /**\n * ID of the agent.\n */\n id: string;\n\n /**\n * The ciUserId of the agent.\n */\n ciUserId: string;\n\n /**\n * The first name of the agent.\n */\n firstName: string;\n\n /**\n * The last name of the agent.\n */\n lastName: string;\n\n /**\n * Identifier for a Desktop Profile.\n */\n agentProfileId: string;\n\n /**\n * The email address of the agent.\n */\n email: string;\n\n /**\n * Team IDs assigned to the agent.\n */\n teamIds: string[];\n\n /**\n * Multimedia profile ID associated with the agent.\n */\n multimediaProfileId: string;\n\n /**\n * Skill profile ID of the agent.\n */\n skillProfileId: string;\n\n /**\n * Site ID of the agent.\n */\n siteId: string;\n\n /**\n * Database ID of the agent.\n */\n dbId?: string;\n\n /**\n * The default dialed number of the agent.\n */\n defaultDialledNumber?: string;\n};\n\n/**\n * Represents the response from getDesktopProfileById method.\n */\nexport type DesktopProfileResponse = {\n /**\n * Represents the voice options of an agent.\n */\n loginVoiceOptions: LoginOption[];\n\n /**\n * Wrap-up codes that the agents can select when they wrap up a contact. It can take one of these values: ALL - To make all wrap-up codes available. SPECIFIC - To make specific codes available.\n */\n accessWrapUpCode: string;\n\n /**\n * Idle codes that the agents can select in Agent Desktop. It can take one of these values: ALL - To make all idle codes available. SPECIFIC - To make specific codes available.\n */\n accessIdleCode: string;\n\n /**\n * Wrap-up codes list that the agents can select when they wrap up a contact.\n */\n wrapUpCodes: string[];\n\n /**\n * Idle codes list that the agents can select in Agent Desktop.\n */\n idleCodes: string[];\n\n /**\n * Dial plan enabled for the agent.\n */\n dialPlanEnabled: boolean;\n\n /**\n * Last agent routing enabled for the agent.\n */\n lastAgentRouting: boolean;\n\n /**\n * Auto wrap-up allowed.\n */\n autoWrapUp: boolean;\n\n /**\n * Auto answer allowed.\n */\n autoAnswer: boolean;\n\n /**\n * Auto wrap-up after seconds.\n */\n autoWrapAfterSeconds: number;\n\n /**\n * Agent available after outdial.\n */\n agentAvailableAfterOutdial: boolean;\n\n /**\n * Allow auto wrap-up extension.\n */\n allowAutoWrapUpExtension: boolean;\n\n /**\n * Outdial enabled for the agent.\n */\n outdialEnabled: boolean;\n\n /**\n * Outdial entry point ID of the agent.\n */\n outdialEntryPointId: string;\n\n /**\n * Outdial ANI ID of the agent.\n */\n outdialANIId: string;\n\n /**\n * Consult to queue allowed.\n */\n consultToQueue: boolean;\n\n /**\n * Address book ID of the agent.\n */\n addressBookId: string;\n\n /**\n * Viewable statistics of the agent.\n */\n viewableStatistics: {\n id: string;\n agentStats: boolean;\n accessQueueStats: string;\n contactServiceQueues: string[];\n loggedInTeamStats: boolean;\n accessTeamStats: string;\n teams: string[];\n };\n\n /**\n * Agent DN validation of the agent.\n */\n agentDNValidation: string;\n\n /**\n * Dial plans of the agent.\n */\n dialPlans: string[];\n\n /**\n * Timeout desktop inactivity custom enabled.\n */\n timeoutDesktopInactivityCustomEnabled: boolean;\n\n /**\n * Timeout desktop inactivity minutes.\n */\n timeoutDesktopInactivityMins: number;\n\n /**\n * Show user details in Microsoft enabled or not.\n */\n showUserDetailsMS: boolean;\n\n /**\n * State synchronization in Microsoft enabled or not.\n */\n stateSynchronizationMS: boolean;\n\n /**\n * Show user details in Webex enabled or not.\n */\n showUserDetailsWebex: boolean;\n\n /**\n * State synchronization in Webex enabled or not.\n */\n stateSynchronizationWebex: boolean;\n};\n\n/**\n * Response containing multimedia profile configuration for an agent\n * Defines capabilities across different communication channels\n * @private\n */\nexport type MultimediaProfileResponse = {\n /** Organization identifier */\n organizationId: string;\n /** Profile identifier */\n id: string;\n /** Version number of the profile */\n version: number;\n /** Profile name */\n name: string;\n /** Profile description */\n description: string;\n /** Maximum number of concurrent chat interactions */\n chat: number;\n /** Maximum number of concurrent email interactions */\n email: number;\n /** Maximum number of concurrent voice interactions */\n telephony: number;\n /** Maximum number of concurrent social media interactions */\n social: number;\n /** Whether the profile is active */\n active: boolean;\n /** Whether channel blending is enabled */\n blendingModeEnabled: boolean;\n /** Type of blending mode configuration */\n blendingMode: string;\n /** Whether this is the system default profile */\n systemDefault: boolean;\n /** Timestamp when profile was created */\n createdTime: number;\n /** Timestamp when profile was last updated */\n lastUpdatedTime: number;\n};\n\n/**\n * Response from subscription requests containing WebSocket connection details\n * @public\n */\nexport type SubscribeResponse = {\n /** HTTP status code of the response */\n statusCode: number;\n /** Response body containing connection details */\n body: {\n /** WebSocket URL for real-time updates */\n webSocketUrl?: string;\n /** Unique subscription identifier */\n subscriptionId?: string;\n };\n /** Optional status or error message */\n message: string | null;\n};\n\nexport type AuxCode = {\n /**\n * ID of the Auxiliary Code.\n */\n id: string;\n\n /**\n * Indicates whether the auxiliary code is active or not.\n */\n active: boolean;\n\n /**\n * Indicates whether this is the default code (true) or not (false).\n */\n defaultCode: boolean;\n\n /**\n * Indicates whether this is the system default code (true) or not (false).\n */\n isSystemCode: boolean;\n\n /**\n * A short description indicating the context of the code.\n */\n description: string;\n\n /**\n * Name of the Auxiliary Code.\n */\n name: string;\n\n /**\n * Indicates the work type associated with this code.\n */\n workTypeCode: string;\n};\n\nexport type ListAuxCodesResponse = {\n data: AuxCode[];\n meta: {\n page: number;\n pageSize: number;\n totalPages: number;\n totalRecords: number;\n };\n};\n\n/**\n * Configuration for a team in the contact center system\n * @private\n */\nexport type TeamList = {\n /** Unique identifier for the team */\n id: string;\n /** Team name */\n name: string;\n /** Type of team (e.g., 'AGENT_BASED') */\n teamType: string;\n /** Current status of the team */\n teamStatus: string;\n /** Whether the team is active */\n active: boolean;\n /** Site identifier where team is located */\n siteId: string;\n /** Name of the site */\n siteName: string;\n /** Optional multimedia profile ID for team */\n multiMediaProfileId?: string;\n /** List of user IDs belonging to team */\n userIds: string[];\n /** Whether queue rankings are enabled for team */\n rankQueuesForTeam: boolean;\n /** Ordered list of queue rankings */\n queueRankings: string[];\n /** Optional database identifier */\n dbId?: string;\n /** Optional desktop layout identifier */\n desktopLayoutId?: string;\n};\n\n/**\n * Response type for listing teams with pagination metadata\n * @private\n */\nexport type ListTeamsResponse = {\n /** Array of team configurations */\n data: TeamList[];\n /** Pagination metadata */\n meta: {\n /** Current page number */\n page: number;\n /** Number of items per page */\n pageSize: number;\n /** Total number of pages */\n totalPages: number;\n /** Total number of records */\n totalRecords: number;\n };\n};\n\n/**\n * Basic organization information in the contact center system\n * @private\n * @ignore\n */\nexport type OrgInfo = {\n /** Tenant identifier */\n tenantId: string;\n /** Organization timezone */\n timezone: string;\n /** Current environment (e.g., 'produs1', 'intgus1') */\n environment: string;\n};\n\n/**\n * Organization-wide feature settings and configurations\n * @private\n */\nexport type OrgSettings = {\n /** Whether WebRTC functionality is enabled */\n webRtcEnabled: boolean;\n /** Whether sensitive data masking is enabled */\n maskSensitiveData: boolean;\n /** Whether campaign manager features are enabled */\n campaignManagerEnabled: boolean;\n};\n\n/**\n * Contact center site configuration information\n * @private\n */\nexport type SiteInfo = {\n /** Unique site identifier */\n id: string;\n /** Site name */\n name: string;\n /** Whether site is active */\n active: boolean;\n /** Multimedia profile ID for site */\n multimediaProfileId: string;\n /** Whether this is the system default site */\n systemDefault: boolean;\n};\n\n/**\n * Tenant-level configuration data and settings\n * @private\n */\nexport type TenantData = {\n /** Desktop inactivity timeout in minutes */\n timeoutDesktopInactivityMins: number;\n /** Whether default DN is enforced */\n forceDefaultDn: boolean;\n /** Regex pattern for default DN validation */\n dnDefaultRegex: string;\n /** Regex pattern for other DN validation */\n dnOtherRegex: string;\n /** Whether privacy shield feature is visible */\n privacyShieldVisible: boolean;\n /** Whether outbound dialing is enabled */\n outdialEnabled: boolean;\n /** Whether ending calls is enabled */\n endCallEnabled: boolean;\n /** Whether ending consultations is enabled */\n endConsultEnabled: boolean;\n /** Whether call variables are suppressed */\n callVariablesSuppressed: boolean;\n /** Whether desktop inactivity timeout is enabled */\n timeoutDesktopInactivityEnabled: boolean;\n /** Lost connection recovery timeout in seconds */\n lostConnectionRecoveryTimeout: number;\n};\n\n/**\n * URL mapping configuration for external integrations\n * @public\n */\nexport type URLMapping = {\n id: string;\n name: string;\n url: string;\n links: string[]; // Assuming 'links' is an array of strings, adjust if necessary\n createdTime: number; // Assuming timestamps are represented as numbers\n lastUpdatedTime: number;\n};\n\n/**\n * Constant representing idle code\n * @public\n * @ignore\n */\nexport const IDLE_CODE = 'IDLE_CODE';\n\n/**\n * Constant representing wrap up code\n * @public\n * @ignore\n */\nexport const WRAP_UP_CODE = 'WRAP_UP_CODE';\n\n/**\n * Type representing the possible auxiliary code types\n * @public\n */\nexport type AuxCodeType = typeof IDLE_CODE | typeof WRAP_UP_CODE;\n\n/**\n * Sort order configuration for queries\n * @internal\n */\ntype SortOrder = {\n /** Property to sort by */\n property: string;\n /** Sort order direction */\n order: string;\n};\n\n/**\n * Search query configuration\n * @internal\n */\ntype SearchQuery = {\n /** Properties to search in */\n properties: string;\n /** Search value */\n value: string;\n};\n\n/**\n * Parameters for querying Contact Center resources\n * @public\n */\nexport type QueryParams = {\n /** Page number for pagination */\n pageNumber?: number;\n pageSize?: number;\n attributes?: Array<string>;\n ids?: Array<string>;\n queueType?: string;\n entryPointType?: string;\n channelType?: string;\n isActive?: boolean;\n workTypeCode?: AuxCodeType;\n names?: Array<string>;\n sortOrder?: SortOrder;\n searchQuery?: SearchQuery;\n defaultCode?: boolean;\n search?: string;\n desktopProfileFilter?: boolean;\n};\n\n/**\n * Basic entity information used throughout the system\n * @public\n */\nexport type Entity = {\n /** Whether this is a system entity */\n isSystem: boolean;\n /** Entity name */\n name: string;\n /** Unique entity identifier */\n id: string;\n /** Whether this is the default entity */\n isDefault: boolean;\n};\n\n/**\n * Dial plan entity definition containing number manipulation rules\n * @public\n */\nexport type DialPlanEntity = {\n /** Unique identifier for the dial plan */\n id: string;\n /** Regular expression pattern for matching numbers */\n regularExpression: string;\n /** Prefix to add to matched numbers */\n prefix: string;\n /** Characters to strip from matched numbers */\n strippedChars: string;\n /** Name of the dial plan */\n name: string;\n};\n\n/**\n * Complete dial plan configuration for number handling\n * @public\n */\nexport type DialPlan = {\n /** Type of dial plan (e.g., 'adhocDial') */\n type: string;\n /** List of dial plan entities with transformation rules */\n dialPlanEntity: {\n /** Regular expression pattern */\n regex: string;\n /** Number prefix */\n prefix: string;\n /** Characters to strip */\n strippedChars: string;\n /** Entity name */\n name: string;\n }[];\n};\n\n/**\n * Agent wrap-up codes configuration with pagination metadata\n * @public\n */\nexport type agentWrapUpCodes = {\n /** Array of wrap-up code entities */\n data: Entity[];\n /** Pagination and navigation metadata */\n meta: {\n /** Navigation URLs for pagination */\n links: {\n /** URL for first page */\n first: string;\n /** URL for last page */\n last: string;\n /** URL for next page */\n next: string;\n /** URL for current page */\n self: string;\n };\n /** Organization identifier */\n orgid: string;\n /** Current page number */\n page: number;\n /** Number of items per page */\n pageSize: number;\n /** Total number of pages */\n totalPages: number;\n /** Total number of records */\n totalRecords: number;\n };\n};\n\n/**\n * Default wrap-up code configuration for an agent\n * @public\n */\nexport type agentDefaultWrapupCode = {\n /** Unique identifier for the wrap-up code */\n id: string;\n /** Display name of the wrap-up code */\n name: string;\n};\n\n/**\n * Wrap-up reason configuration used to classify completed interactions\n * @public\n */\nexport type WrapUpReason = {\n /** Whether this is a system-defined reason */\n isSystem: boolean;\n /** Display name of the reason */\n name: string;\n /** Unique identifier */\n id: string;\n /** Whether this is the default reason */\n isDefault: boolean;\n};\n\n/**\n * Wrap-up configuration data containing settings and available options\n * @public\n */\nexport type WrapupData = {\n /** Wrap-up configuration properties */\n wrapUpProps: {\n /** Whether automatic wrap-up is enabled */\n autoWrapup?: boolean;\n /** Time in seconds before auto wrap-up triggers */\n autoWrapupInterval?: number;\n /** Whether last agent routing is enabled */\n lastAgentRoute?: boolean;\n /** List of available wrap-up reasons */\n wrapUpReasonList: Array<WrapUpReason>;\n /** List of available wrap-up codes */\n wrapUpCodesList?: Array<string>;\n /** Access control for idle codes ('ALL' or 'SPECIFIC') */\n idleCodesAccess?: 'ALL' | 'SPECIFIC';\n /** Associated interaction identifier */\n interactionId?: string;\n /** Whether cancelling auto wrap-up is allowed */\n allowCancelAutoWrapup?: boolean;\n };\n};\n\n/**\n * Available login options for voice channel access\n * 'AGENT_DN' - Login using agent's DN\n * 'EXTENSION' - Login using extension number\n * 'BROWSER' - Login using browser-based WebRTC\n * @public\n */\nexport type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';\n\n/**\n * Team configuration information\n * @public\n */\nexport type Team = {\n /** Unique team identifier */\n teamId: string;\n /** Team display name */\n teamName: string;\n /** Optional desktop layout configuration identifier */\n desktopLayoutId?: string;\n};\n\n/**\n * Basic queue configuration information\n * @public\n */\nexport type Queue = {\n /** Queue identifier */\n queueId: string;\n /** Queue display name */\n queueName: string;\n};\n\n/**\n * URL mappings for external system integrations\n * @public\n */\nexport type URLMappings = {\n /** Acqueon API endpoint URL */\n acqueonApiUrl: string;\n /** Acqueon console URL */\n acqueonConsoleUrl: string;\n};\n\n/**\n * AI feature resource row returned by /v2/ai-feature API.\n * @public\n */\nexport type AIFeatureFlags = {\n id: string;\n realtimeTranscripts?: {\n enable?: boolean;\n agentInclusionType?: string;\n };\n suggestedResponses?: {\n enable?: boolean;\n };\n generatedSummaries?: {\n callDropSummariesEnabled?: boolean;\n virtualAgentTransferSummariesEnabled?: boolean;\n consultTransferSummariesEnabled?: boolean;\n wrapUpSummariesEnabled?: boolean;\n queuesInclusionType?: string;\n };\n agentWellbeing?: {\n enable?: boolean;\n agentInclusionType?: string;\n wellnessBreakReminders?: string;\n };\n autoCSAT?: {\n enable?: boolean;\n queuesInclusionType?: string;\n surveyDataSource?: string;\n };\n links?: string[];\n createdTime?: number;\n lastUpdatedTime?: number;\n};\n\n/**\n * Response type for list AI feature resources API.\n * @public\n */\nexport type AIFeatureFlagsResponse = {\n meta?: {\n orgid?: string;\n page?: number;\n pageSize?: number;\n totalPages?: number;\n totalRecords?: number;\n links?: {\n self?: string;\n };\n };\n data: AIFeatureFlags[];\n};\n\n/**\n * Comprehensive agent profile configuration in the contact center system\n * Contains all settings and capabilities for an agent\n * @public\n */\nexport type Profile = {\n /** Microsoft Teams integration configuration */\n microsoftConfig?: {\n /** Whether to show user details in Teams */\n showUserDetailsMS?: boolean;\n /** Whether to sync agent state with Teams */\n stateSynchronizationMS?: boolean;\n };\n /** Webex integration configuration */\n webexConfig?: {\n /** Whether to show user details in Webex */\n showUserDetailsWebex?: boolean;\n /** Whether to sync agent state with Webex */\n stateSynchronizationWebex?: boolean;\n };\n /** List of teams the agent belongs to */\n teams: Team[];\n /** Agent's default dial number */\n defaultDn: string;\n dn?: string;\n /** Whether default DN is enforced at tenant level */\n forceDefaultDn: boolean;\n /** Whether default DN is enforced for this agent */\n forceDefaultDnForAgent: boolean;\n /** Regex pattern for US phone number validation */\n regexUS: RegExp | string;\n /** Regex pattern for international phone number validation */\n regexOther: RegExp | string;\n /** Unique identifier for the agent */\n agentId: string;\n /** Display name for the agent */\n agentName: string;\n /** Email address for the agent */\n agentMailId: string;\n /** Agent's profile configuration ID */\n agentProfileID: string;\n /** Dial plan configuration for number handling */\n dialPlan: DialPlan;\n /** Multimedia profile defining channel capabilities */\n multimediaProfileId: string;\n /** Skill profile defining agent competencies */\n skillProfileId: string;\n /** Site where agent is located */\n siteId: string;\n /** Enterprise-wide identifier */\n enterpriseId: string;\n /** Whether privacy shield feature is visible */\n privacyShieldVisible: boolean;\n /** Available idle codes */\n idleCodes: Entity[];\n /** List of specific idle codes */\n idleCodesList?: Array<string>;\n /** Access control for idle codes */\n idleCodesAccess?: 'ALL' | 'SPECIFIC';\n /** Available wrap-up codes */\n wrapupCodes: Entity[];\n /** Agent-specific wrap-up codes */\n agentWrapUpCodes?: agentWrapUpCodes;\n /** Default wrap-up code for agent */\n agentDefaultWrapUpCode?: agentDefaultWrapupCode;\n /** Default wrap-up code identifier */\n defaultWrapupCode: string;\n /** Wrap-up configuration data */\n wrapUpData: WrapupData;\n /** Organization identifier */\n orgId?: string;\n /** Whether outbound is enabled at tenant level */\n isOutboundEnabledForTenant: boolean;\n /** Whether outbound is enabled for this agent */\n isOutboundEnabledForAgent: boolean;\n /** Whether ad-hoc dialing is enabled */\n isAdhocDialingEnabled: boolean;\n /** Whether agent becomes available after outdial */\n isAgentAvailableAfterOutdial: boolean;\n /** Whether campaign management is enabled */\n isCampaignManagementEnabled: boolean;\n /** Outbound entry point */\n outDialEp: string;\n /** Whether ending calls is enabled */\n isEndCallEnabled: boolean;\n /** Whether ending consultations is enabled */\n isEndConsultEnabled: boolean;\n /** Optional lifecycle manager URL */\n lcmUrl?: string;\n /** Database identifier for agent */\n agentDbId: string;\n /** Optional analyzer identifier for agent */\n agentAnalyzerId?: string;\n /** Whether consult to queue is allowed */\n allowConsultToQueue: boolean;\n /** Additional campaign manager information */\n campaignManagerAdditionalInfo?: string;\n /** Whether personal statistics are enabled */\n agentPersonalStatsEnabled: boolean;\n /** Optional address book identifier */\n addressBookId?: string;\n /** Optional outbound ANI identifier */\n outdialANIId?: string;\n /** Optional analyzer user identifier */\n analyserUserId?: string;\n /** Whether call monitoring is enabled */\n isCallMonitoringEnabled?: boolean;\n /** Whether mid-call monitoring is enabled */\n isMidCallMonitoringEnabled?: boolean;\n /** Whether barge-in functionality is enabled */\n isBargeInEnabled?: boolean;\n /** Whether managed teams feature is enabled */\n isManagedTeamsEnabled?: boolean;\n /** Whether managed queues feature is enabled */\n isManagedQueuesEnabled?: boolean;\n /** Whether sending messages is enabled */\n isSendMessageEnabled?: boolean;\n /** Whether agent state changes are enabled */\n isAgentStateChangeEnabled?: boolean;\n /** Whether signing out agents is enabled */\n isSignOutAgentsEnabled?: boolean;\n /** Integration URL mappings */\n urlMappings?: URLMappings;\n /** Whether desktop inactivity timeout is enabled */\n isTimeoutDesktopInactivityEnabled: boolean;\n /** Desktop inactivity timeout in minutes */\n timeoutDesktopInactivityMins?: number;\n /** Whether analyzer features are enabled */\n isAnalyzerEnabled?: boolean;\n /** Tenant timezone */\n tenantTimezone?: string;\n /** Current environment (e.g., 'produs1', 'intgus1') */\n environment?: string;\n /** Available voice login options */\n loginVoiceOptions?: LoginOption[];\n /** Current login device type */\n deviceType?: LoginOption;\n /** Current team identifier */\n currentTeamId?: string;\n /** Whether WebRTC is enabled */\n webRtcEnabled: boolean;\n /** Organization-wide idle codes */\n organizationIdleCodes?: Entity[];\n /** Whether recording management is enabled */\n isRecordingManagementEnabled?: boolean;\n /** Connection recovery timeout in milliseconds */\n lostConnectionRecoveryTimeout: number;\n /** Whether sensitive data masking is enabled */\n maskSensitiveData?: boolean;\n /** Whether agent is currently logged in */\n isAgentLoggedIn?: boolean;\n /** Last auxiliary code ID used for state change */\n lastStateAuxCodeId?: string;\n /** Timestamp of last state change */\n lastStateChangeTimestamp?: number;\n /** Timestamp of last idle code change */\n lastIdleCodeChangeTimestamp?: number;\n /** AI feature flags resolved from organization config */\n aiFeature?: AIFeatureFlags;\n};\n\n/**\n * Contact distribution group configuration for routing logic\n * @public\n */\nexport type CallDistributionGroup = {\n /** List of agent groups in this distribution group */\n agentGroups: {\n /** Team identifier */\n teamId: string;\n }[];\n /** Distribution order priority */\n order: number;\n /** Distribution time duration in seconds */\n duration: number;\n};\n\n/**\n * Represents a single outdial ANI (Automatic Number Identification) entry\n * @public\n */\nexport type OutdialAniEntry = {\n /** Unique identifier for the ANI entry */\n id: string;\n /** Display name for the ANI entry */\n name: string;\n /** Phone number associated with this ANI entry */\n number: string;\n /** Related links for this ANI entry */\n links: string[];\n /** Timestamp when this entry was created (Unix timestamp in milliseconds) */\n createdTime: number;\n /** Timestamp when this entry was last updated (Unix timestamp in milliseconds) */\n lastUpdatedTime: number;\n};\n\n/**\n * Response structure for outdial ANI entries API call\n * @public\n */\nexport type OutdialAniEntriesResponse = OutdialAniEntry[];\n\n/**\n * Parameters for fetching outdial ANI entries\n * @public\n */\nexport type OutdialAniParams = {\n /** Outdial ANI ID from agent profile */\n outdialANI: string;\n /** Page number for pagination (optional) */\n page?: number;\n /** Number of entries per page (optional) */\n pageSize?: number;\n /** Search string to filter entries (optional) */\n search?: string;\n /** Filter expression for advanced filtering (optional) */\n filter?: string;\n /** Comma-separated list of attributes to include in response (optional) */\n attributes?: string;\n};\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5B;EACAE,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,kBAAkB,EAAE,kBAAkB;EACtC;EACAC,yBAAyB,EAAE,wBAAwB;EACnD;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,gBAAgB,EAAE,iBAAiB;EACnC;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,gBAAgB,EAAE,gBAAgB;EAClC;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,uBAAuB,EAAE,sBAAsB;EAC/C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,0BAA0B,EAAE,0BAA0B;EACtD;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,+BAA+B,EAAE,8BAA8B;EAC/D;EACAC,6BAA6B,EAAE,6BAA6B;EAC5D;EACAC,2BAA2B,EAAE,2BAA2B;EACxD;EACAC,kCAAkC,EAAE,iCAAiC;EACrE;EACAC,mCAAmC,EAAE,iCAAiC;EACtE;EACAC,4BAA4B,EAAE,4BAA4B;EAC1D;EACAC,gCAAgC,EAAE,+BAA+B;EACjE;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,uBAAuB,EAAE,uBAAuB;EAChD;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,uBAAuB,EAAE,uBAAuB;EAChD;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,0BAA0B,EAAE,0BAA0B;EACtD;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,6BAA6B,EAAE,4BAA4B;EAC3D;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,+BAA+B,EAAE,8BAA8B;EAC/D;EACAC,aAAa,EAAE,cAAc;EAC7B;EACAC,cAAc,EAAE,eAAe;EAC/B;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,YAAY,EAAE,aAAa;EAC3B;EACAC,eAAe,EAAE,gBAAgB;EACjC;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,aAAa,EAAE,cAAc;EAC7B;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,sBAAsB,EAAE,sBAAsB;EAC9C;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,gCAAgC,EAAE,+BAA+B;EACjE;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,4BAA4B,EAAE,2BAA2B;EACzD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,uBAAuB,EAAE;AAC3B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,GAAAxD,OAAA,CAAAwD,eAAA,GAAG;EAC7B;EACAC,OAAO,EAAE,SAAS;EAClB;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,YAAY,EAAE,QAAQ;EACtB;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,mBAAmB,EAAE,cAAc;EACnC;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,0BAA0B,EAAE,yBAAyB;EACrD;EACAC,kBAAkB,EAAE,kBAAkB;EACtC;EACAC,iBAAiB,EAAE,mBAAmB;EACtC;EACAC,0BAA0B,EAAE,yBAAyB;EACrD;EACAC,yBAAyB,EAAE,wBAAwB;EACnD;EACAC,kBAAkB,EAAE,aAAa;EACjC;EACAC,0BAA0B,EAAE,aAAa;EACzC;EACAC,kCAAkC,EAAE,2BAA2B;EAC/D;EACAC,sBAAsB,EAAE;AAC1B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAA3E,OAAA,CAAA2E,SAAA,GAAG;EACvB,GAAGnB,eAAe;EAClB,GAAGzD;AACL,CAAU;;AAEV;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAcA;AACA;AACA;;AA+DA;AACA;AACA;;AA6IA;AACA;AACA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AA8DA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAM6E,SAAS,GAAA5E,OAAA,CAAA4E,SAAA,GAAG,WAAW;;AAEpC;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAA7E,OAAA,CAAA6E,YAAA,GAAG,cAAc;;AAE1C;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;;AA6JA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["CC_TASK_EVENTS","exports","AGENT_CONTACT_ASSIGN_FAILED","AGENT_CONTACT_OFFER_RONA","AGENT_CONTACT_HELD","AGENT_CONTACT_HOLD_FAILED","AGENT_CONTACT_UNHELD","AGENT_CONTACT_UNHOLD_FAILED","AGENT_CONSULT_CREATED","AGENT_OFFER_CONSULT","AGENT_CONSULTING","AGENT_CONSULT_FAILED","AGENT_CTQ_FAILED","AGENT_CTQ_CANCELLED","AGENT_CTQ_CANCEL_FAILED","AGENT_CONSULT_ENDED","AGENT_CONSULT_END_FAILED","AGENT_CONSULT_CONFERENCE_ENDED","AGENT_CONSULT_CONFERENCING","AGENT_CONSULT_CONFERENCED","AGENT_CONSULT_CONFERENCE_FAILED","PARTICIPANT_JOINED_CONFERENCE","PARTICIPANT_LEFT_CONFERENCE","PARTICIPANT_LEFT_CONFERENCE_FAILED","PARTICIPANT_DROP_CONFERENCE_FAILED","AGENT_CONSULT_CONFERENCE_END_FAILED","AGENT_CONFERENCE_TRANSFERRED","AGENT_CONFERENCE_TRANSFER_FAILED","PARTICIPANT_POST_CALL_ACTIVITY","CONSULTED_PARTICIPANT_MOVING","AGENT_BLIND_TRANSFERRED","AGENT_BLIND_TRANSFER_FAILED","AGENT_VTEAM_TRANSFERRED","AGENT_VTEAM_TRANSFER_FAILED","AGENT_CONSULT_TRANSFERRING","AGENT_CONSULT_TRANSFERRED","AGENT_CONSULT_TRANSFER_FAILED","CONTACT_RECORDING_PAUSED","CONTACT_RECORDING_STARTED","CONTACT_RECORDING_PAUSE_FAILED","CONTACT_RECORDING_RESUMED","CONTACT_RECORDING_RESUME_FAILED","CONTACT_ENDED","CONTACT_MERGED","CONTACT_UPDATED","CONTACT_OWNER_CHANGED","AGENT_CONTACT_END_FAILED","AGENT_WRAPUP","AGENT_WRAPPEDUP","AGENT_WRAPUP_FAILED","AGENT_OUTBOUND_FAILED","AGENT_CONTACT","AGENT_OFFER_CONTACT","AGENT_CONTACT_ASSIGNED","AGENT_CONTACT_UNASSIGNED","AGENT_INVITE_FAILED","AGENT_OFFER_CAMPAIGN_RESERVATION","CAMPAIGN_CONTACT_UPDATED","CAMPAIGN_PREVIEW_ACCEPT_FAILED","CAMPAIGN_PREVIEW_SKIP_FAILED","CAMPAIGN_PREVIEW_REMOVE_FAILED","REAL_TIME_TRANSCRIPTION","SUGGESTED_RESPONSE","SUGGESTED_RESPONSE_ACKNOWLEDGE","POST_CALL_SUMMARY","MID_CALL_SUMMARY","FEATURE_ENABLEMENT","MID_CALL_SUMMARY_RESPONSE_SUBSEQUENT_AGENT","CC_AGENT_EVENTS","WELCOME","AGENT_RELOGIN_SUCCESS","AGENT_RELOGIN_FAILED","AGENT_DN_REGISTERED","AGENT_LOGOUT","AGENT_LOGOUT_SUCCESS","AGENT_LOGOUT_FAILED","AGENT_STATION_LOGIN","AGENT_STATION_LOGIN_SUCCESS","AGENT_STATION_LOGIN_FAILED","AGENT_STATE_CHANGE","AGENT_MULTI_LOGIN","AGENT_STATE_CHANGE_SUCCESS","AGENT_STATE_CHANGE_FAILED","AGENT_BUDDY_AGENTS","AGENT_BUDDY_AGENTS_SUCCESS","AGENT_BUDDY_AGENTS_RETRIEVE_FAILED","AGENT_CONTACT_RESERVED","WELLNESS_BREAK","CC_EVENTS","IDLE_CODE","WRAP_UP_CODE"],"sources":["types.ts"],"sourcesContent":["import * as Agent from '../agent/types';\nimport {COLLABORATION_ACCESS} from './constants';\n\n/**\n * Generic type for converting a const enum object into a union type of its values\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/** Desktop Profile access level for a collaboration destination category. */\nexport type CollaborationAccess = Enum<typeof COLLABORATION_ACCESS>;\n\n/**\n * Contact Center backend and realtime event types.\n *\n * Includes task lifecycle, transcript, suggested-response, and AI summary events.\n * @enum {string}\n * @private\n * @ignore\n */\nexport const CC_TASK_EVENTS = {\n /** Event emitted when assigning contact to agent fails */\n AGENT_CONTACT_ASSIGN_FAILED: 'AgentContactAssignFailed',\n /** Event emitted when agent does not respond to contact offer */\n AGENT_CONTACT_OFFER_RONA: 'AgentOfferContactRona',\n /** Event emitted when contact is put on hold */\n AGENT_CONTACT_HELD: 'AgentContactHeld',\n /** Event emitted when putting contact on hold fails */\n AGENT_CONTACT_HOLD_FAILED: 'AgentContactHoldFailed',\n /** Event emitted when contact is taken off hold */\n AGENT_CONTACT_UNHELD: 'AgentContactUnheld',\n /** Event emitted when taking contact off hold fails */\n AGENT_CONTACT_UNHOLD_FAILED: 'AgentContactUnHoldFailed',\n /** Event emitted when consultation is created */\n AGENT_CONSULT_CREATED: 'AgentConsultCreated',\n /** Event emitted when consultation is offered */\n AGENT_OFFER_CONSULT: 'AgentOfferConsult',\n /** Event emitted when agent is consulting */\n AGENT_CONSULTING: 'AgentConsulting',\n /** Event emitted when consultation fails */\n AGENT_CONSULT_FAILED: 'AgentConsultFailed',\n /** Event emitted when consulting to queue (CTQ) fails */\n AGENT_CTQ_FAILED: 'AgentCtqFailed',\n /** Event emitted when CTQ is cancelled */\n AGENT_CTQ_CANCELLED: 'AgentCtqCancelled',\n /** Event emitted when CTQ cancellation fails */\n AGENT_CTQ_CANCEL_FAILED: 'AgentCtqCancelFailed',\n /** Event emitted when consultation ends */\n AGENT_CONSULT_ENDED: 'AgentConsultEnded',\n /** Event emitted when ending consultation fails */\n AGENT_CONSULT_END_FAILED: 'AgentConsultEndFailed',\n /** Event emitted when consultation conference ends */\n AGENT_CONSULT_CONFERENCE_ENDED: 'AgentConsultConferenceEnded',\n /** Event emitted when consultation conference is in progress */\n AGENT_CONSULT_CONFERENCING: 'AgentConsultConferencing',\n /** Event emitted when consultation conference starts */\n AGENT_CONSULT_CONFERENCED: 'AgentConsultConferenced',\n /** Event emitted when consultation conference fails */\n AGENT_CONSULT_CONFERENCE_FAILED: 'AgentConsultConferenceFailed',\n /** Event emitted when participant joins conference */\n PARTICIPANT_JOINED_CONFERENCE: 'ParticipantJoinedConference',\n /** Event emitted when participant leaves conference */\n PARTICIPANT_LEFT_CONFERENCE: 'ParticipantLeftConference',\n /** Event emitted when participant leaving conference fails */\n PARTICIPANT_LEFT_CONFERENCE_FAILED: 'ParticipantLeftConferenceFailed',\n /** Event emitted when dropping another conference participant fails */\n PARTICIPANT_DROP_CONFERENCE_FAILED: 'ParticipantDropConferenceFailed',\n /** Event emitted when consultation conference end fails */\n AGENT_CONSULT_CONFERENCE_END_FAILED: 'AgentConsultConferenceEndFailed',\n /** Event emitted when conference is successfully transferred */\n AGENT_CONFERENCE_TRANSFERRED: 'AgentConferenceTransferred',\n /** Event emitted when conference transfer fails */\n AGENT_CONFERENCE_TRANSFER_FAILED: 'AgentConferenceTransferFailed',\n /** Event emitted for post-call activity by participant */\n PARTICIPANT_POST_CALL_ACTIVITY: 'ParticipantPostCallActivity',\n /** Event emitted when consulted participant is being moved/transferred */\n CONSULTED_PARTICIPANT_MOVING: 'ConsultedParticipantMoving',\n /** Event emitted when contact is blind transferred */\n AGENT_BLIND_TRANSFERRED: 'AgentBlindTransferred',\n /** Event emitted when blind transfer fails */\n AGENT_BLIND_TRANSFER_FAILED: 'AgentBlindTransferFailed',\n /** Event emitted when contact is transferred to virtual team */\n AGENT_VTEAM_TRANSFERRED: 'AgentVteamTransferred',\n /** Event emitted when virtual team transfer fails */\n AGENT_VTEAM_TRANSFER_FAILED: 'AgentVteamTransferFailed',\n /** Event emitted when consultation transfer is in progress */\n AGENT_CONSULT_TRANSFERRING: 'AgentConsultTransferring',\n /** Event emitted when consultation transfer completes */\n AGENT_CONSULT_TRANSFERRED: 'AgentConsultTransferred',\n /** Event emitted when consultation transfer fails */\n AGENT_CONSULT_TRANSFER_FAILED: 'AgentConsultTransferFailed',\n /** Event emitted when contact recording is paused */\n CONTACT_RECORDING_PAUSED: 'ContactRecordingPaused',\n /** Event emitted when contact recording is started */\n CONTACT_RECORDING_STARTED: 'ContactRecordingStarted',\n /** Event emitted when pausing contact recording fails */\n CONTACT_RECORDING_PAUSE_FAILED: 'ContactRecordingPauseFailed',\n /** Event emitted when contact recording is resumed */\n CONTACT_RECORDING_RESUMED: 'ContactRecordingResumed',\n /** Event emitted when resuming contact recording fails */\n CONTACT_RECORDING_RESUME_FAILED: 'ContactRecordingResumeFailed',\n /** Event emitted when contact ends */\n CONTACT_ENDED: 'ContactEnded',\n /** Event emitted when contact is merged */\n CONTACT_MERGED: 'ContactMerged',\n /** Event emitted when contact payload is updated (routing updates) */\n CONTACT_UPDATED: 'ContactUpdated',\n /** Event emitted when contact owner changes */\n CONTACT_OWNER_CHANGED: 'ContactOwnerChanged',\n /** Event emitted when ending contact fails */\n AGENT_CONTACT_END_FAILED: 'AgentContactEndFailed',\n /** Event emitted when agent enters wrap-up state */\n AGENT_WRAPUP: 'AgentWrapup',\n /** Event emitted when agent completes wrap-up */\n AGENT_WRAPPEDUP: 'AgentWrappedUp',\n /** Event emitted when wrap-up fails */\n AGENT_WRAPUP_FAILED: 'AgentWrapupFailed',\n /** Event emitted when outbound call fails */\n AGENT_OUTBOUND_FAILED: 'AgentOutboundFailed',\n /** Event emitted for general agent contact events */\n AGENT_CONTACT: 'AgentContact',\n /** Event emitted when contact is offered to agent */\n AGENT_OFFER_CONTACT: 'AgentOfferContact',\n /** Event emitted when contact is assigned to agent */\n AGENT_CONTACT_ASSIGNED: 'AgentContactAssigned',\n /** Event emitted when contact is unassigned from agent */\n AGENT_CONTACT_UNASSIGNED: 'AgentContactUnassigned',\n /** Event emitted when inviting agent fails */\n AGENT_INVITE_FAILED: 'AgentInviteFailed',\n /** Event emitted when a campaign preview contact is offered to the agent */\n AGENT_OFFER_CAMPAIGN_RESERVATION: 'AgentOfferCampaignReservation',\n /** Event emitted when campaign contact is updated */\n CAMPAIGN_CONTACT_UPDATED: 'CampaignContactUpdated',\n /** Event emitted when accepting a campaign preview contact fails */\n CAMPAIGN_PREVIEW_ACCEPT_FAILED: 'CampaignPreviewAcceptFailed',\n /** Event emitted when skipping a campaign preview contact fails */\n CAMPAIGN_PREVIEW_SKIP_FAILED: 'CampaignPreviewSkipFailed',\n /** Event emitted when removing a campaign preview contact fails */\n CAMPAIGN_PREVIEW_REMOVE_FAILED: 'CampaignPreviewRemoveFailed',\n /** Event emitted when a real-time transcript chunk is received */\n REAL_TIME_TRANSCRIPTION: 'REAL_TIME_TRANSCRIPTION',\n /** Event emitted when an AI assistant suggested response is available */\n SUGGESTED_RESPONSE: 'SUGGESTED_RESPONSE',\n /** Event emitted when backend acknowledges it is listening for more context */\n SUGGESTED_RESPONSE_ACKNOWLEDGE: 'SUGGESTED_RESPONSE_ACKNOWLEDGE',\n /** Event received when a post-call summary is available through realtime delivery */\n POST_CALL_SUMMARY: 'POST_CALL_SUMMARY',\n /** Event received when a mid-call summary is available through realtime delivery */\n MID_CALL_SUMMARY: 'MID_CALL_SUMMARY',\n /** Event received when AI-summary feature enablement is available through realtime delivery */\n FEATURE_ENABLEMENT: 'FEATURE_ENABLEMENT',\n /** Event received when a subsequent agent receives a mid-call summary */\n MID_CALL_SUMMARY_RESPONSE_SUBSEQUENT_AGENT: 'MID_CALL_SUMMARY_RESPONSE_SUBSEQUENT_AGENT',\n} as const;\n\n/**\n * Events emitted on Contact Center agent operations\n * @enum {string}\n * @public\n */\nexport const CC_AGENT_EVENTS = {\n /** Welcome event when agent connects to websocket/backend */\n WELCOME: 'Welcome',\n /** Event emitted when agent re-login is successful */\n AGENT_RELOGIN_SUCCESS: 'AgentReloginSuccess',\n /** Event emitted when agent re-login fails */\n AGENT_RELOGIN_FAILED: 'AgentReloginFailed',\n /** Event emitted when agent DN registration completes */\n AGENT_DN_REGISTERED: 'AgentDNRegistered',\n /** Event emitted when agent initiates logout */\n AGENT_LOGOUT: 'Logout',\n /** Event emitted when agent logout is successful */\n AGENT_LOGOUT_SUCCESS: 'AgentLogoutSuccess',\n /** Event emitted when agent logout fails */\n AGENT_LOGOUT_FAILED: 'AgentLogoutFailed',\n /** Event emitted when agent initiates station login */\n AGENT_STATION_LOGIN: 'StationLogin',\n /** Event emitted when agent station login is successful */\n AGENT_STATION_LOGIN_SUCCESS: 'AgentStationLoginSuccess',\n /** Event emitted when agent station login fails */\n AGENT_STATION_LOGIN_FAILED: 'AgentStationLoginFailed',\n /** Event emitted when agent's state changes */\n AGENT_STATE_CHANGE: 'AgentStateChange',\n /** Event emitted when multiple logins detected for same agent */\n AGENT_MULTI_LOGIN: 'AGENT_MULTI_LOGIN',\n /** Event emitted when agent state change is successful */\n AGENT_STATE_CHANGE_SUCCESS: 'AgentStateChangeSuccess',\n /** Event emitted when agent state change fails */\n AGENT_STATE_CHANGE_FAILED: 'AgentStateChangeFailed',\n /** Event emitted when requesting buddy agents list */\n AGENT_BUDDY_AGENTS: 'BuddyAgents',\n /** Event emitted when buddy agents list is successfully retrieved */\n AGENT_BUDDY_AGENTS_SUCCESS: 'BuddyAgents',\n /** Event emitted when retrieving buddy agents list fails */\n AGENT_BUDDY_AGENTS_RETRIEVE_FAILED: 'BuddyAgentsRetrieveFailed',\n /** Event emitted when contact is reserved for agent */\n AGENT_CONTACT_RESERVED: 'AgentContactReserved',\n /** Agent-level Agent Wellness Break notification */\n WELLNESS_BREAK: 'WellnessBreak',\n} as const;\n\n/**\n * Combined Contact Center events including both agent and task events\n * @enum {string}\n * @public\n */\nexport const CC_EVENTS = {\n ...CC_AGENT_EVENTS,\n ...CC_TASK_EVENTS,\n} as const;\n\n/**\n * Event data received when agent connects to the system\n * @public\n */\nexport type WelcomeEvent = {\n /** ID of the agent that connected */\n agentId: string;\n};\n\n/**\n * Available login options for voice channel access\n * 'AGENT_DN' - Login using agent's DN\n * 'EXTENSION' - Login using extension number\n * 'BROWSER' - Login using browser-based WebRTC\n * @public\n */\nexport type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';\n\n/**\n * Response type for welcome events which can be either success or error\n * @public\n */\nexport type WelcomeResponse = WelcomeEvent | Error;\n\n/**\n * Type representing the union of all possible Contact Center events\n * @public\n */\nexport type CC_EVENTS = Enum<typeof CC_EVENTS>;\n\n/**\n * WebSocket event structure for Contact Center events\n * @public\n */\nexport type WebSocketEvent = {\n /** Type of the event */\n type: CC_EVENTS;\n /** Event payload data */\n data:\n | WelcomeEvent\n | Agent.StationLoginSuccess\n | Agent.LogoutSuccess\n | Agent.ReloginSuccess\n | Agent.StateChangeSuccess\n | Agent.BuddyAgentsSuccess;\n};\n\n/**\n * Agent identity carried by the `user` section of the user desktop-login aggregate.\n */\nexport type AgentResponse = {\n /**\n * ID of the agent.\n */\n id: string;\n\n /**\n * The ciUserId of the agent.\n */\n ciUserId: string;\n\n /**\n * The first name of the agent.\n */\n firstName: string;\n\n /**\n * The last name of the agent.\n */\n lastName: string;\n\n /**\n * Identifier for a Desktop Profile.\n */\n agentProfileId: string;\n\n /**\n * The email address of the agent.\n */\n email: string;\n\n /**\n * Skill profile ID of the agent.\n */\n skillProfileId: string;\n\n /**\n * Site ID of the agent.\n */\n siteId: string;\n\n /**\n * Database ID of the agent, distinct from `ciUserId`. Passed as `userDbId` to the team lookup,\n * which sends it as the backend's `filter=userId==` value.\n */\n dbId: string;\n\n /**\n * The default dialed number of the agent.\n * Note: The API returns this field as \"deafultDialledNumber\" (with typo).\n */\n deafultDialledNumber?: string;\n};\n\n/**\n * Desktop Profile settings carried by the `agentProfile` section of the user desktop-login\n * aggregate.\n */\nexport type AgentProfile = {\n /**\n * Represents the voice options of an agent. The order is nondeterministic; treat as a set.\n */\n loginVoiceOptions: LoginOption[];\n\n /**\n * Wrap-up codes that the agents can select when they wrap up a contact. It can take one of these values: ALL - To make all wrap-up codes available. SPECIFIC - To make specific codes available.\n */\n accessWrapUpCode: string;\n\n /**\n * Idle codes that the agents can select in Agent Desktop. It can take one of these values: ALL - To make all idle codes available. SPECIFIC - To make specific codes available.\n */\n accessIdleCode: string;\n\n /**\n * Dial plan enabled for the agent.\n */\n dialPlanEnabled: boolean;\n\n /**\n * Last agent routing enabled for the agent.\n */\n lastAgentRouting: boolean;\n\n /**\n * Auto wrap-up allowed.\n */\n autoWrapUp: boolean;\n\n /**\n * Whether the agent personal greeting is enabled.\n */\n agentPersonalGreeting?: boolean;\n\n /**\n * Auto wrap-up after seconds.\n */\n autoWrapAfterSeconds: number;\n\n /**\n * Agent available after outdial.\n */\n agentAvailableAfterOutdial: boolean;\n\n /**\n * Allow auto wrap-up extension.\n */\n allowAutoWrapUpExtension: boolean;\n\n /**\n * Access control for queues assigned to the agent (ALL, SPECIFIC, or NONE).\n */\n accessQueue: CollaborationAccess;\n\n /**\n * Access control for entry points assigned to the agent.\n */\n accessEntryPoint: CollaborationAccess;\n\n /**\n * Access control for buddy teams assigned to the agent.\n */\n accessBuddyTeam: CollaborationAccess;\n\n /**\n * Outdial enabled for the agent.\n */\n outdialEnabled: boolean;\n\n /**\n * Outdial entry point ID of the agent.\n */\n outdialEntryPointId: string;\n\n /**\n * Outdial ANI ID of the agent.\n */\n outdialANIId: string;\n\n /**\n * Whether the agent can schedule and manage callbacks.\n */\n scheduleAndManageCallBack?: boolean;\n\n /**\n * Consult to queue allowed.\n */\n consultToQueue: boolean;\n\n /**\n * Address book ID of the agent.\n */\n addressBookId?: string;\n\n /**\n * Viewable statistics of the agent.\n */\n viewableStatistics: {\n agentStats: boolean;\n aiAgentPerformance?: boolean;\n };\n\n /**\n * Agent DN validation of the agent.\n */\n agentDNValidation: string;\n\n /**\n * Timeout desktop inactivity custom enabled.\n */\n timeoutDesktopInactivityCustomEnabled: boolean;\n\n /**\n * Timeout desktop inactivity minutes.\n */\n timeoutDesktopInactivityMins?: number;\n};\n\n/**\n * Response containing multimedia profile configuration for an agent\n * Defines capabilities across different communication channels\n * @private\n */\nexport type MultimediaProfileResponse = {\n /** Organization identifier */\n organizationId: string;\n /** Profile identifier */\n id: string;\n /** Version number of the profile */\n version: number;\n /** Profile name */\n name: string;\n /** Profile description */\n description: string;\n /** Maximum number of concurrent chat interactions */\n chat: number;\n /** Maximum number of concurrent email interactions */\n email: number;\n /** Maximum number of concurrent voice interactions */\n telephony: number;\n /** Maximum number of concurrent social media interactions */\n social: number;\n /** Whether the profile is active */\n active: boolean;\n /** Whether channel blending is enabled */\n blendingModeEnabled: boolean;\n /** Type of blending mode configuration */\n blendingMode: string;\n /** Whether this is the system default profile */\n systemDefault: boolean;\n /** Timestamp when profile was created */\n createdTime: number;\n /** Timestamp when profile was last updated */\n lastUpdatedTime: number;\n};\n\n/**\n * Response from subscription requests containing WebSocket connection details\n * @public\n */\nexport type SubscribeResponse = {\n /** HTTP status code of the response */\n statusCode: number;\n /** Response body containing connection details */\n body: {\n /** WebSocket URL for real-time updates */\n webSocketUrl?: string;\n /** Unique subscription identifier */\n subscriptionId?: string;\n };\n /** Optional status or error message */\n message: string | null;\n};\n\nexport type AuxCode = {\n /**\n * ID of the Auxiliary Code.\n */\n id: string;\n\n /**\n * Indicates whether the auxiliary code is active or not.\n */\n active: boolean;\n\n /**\n * Indicates whether this is the default code (true) or not (false).\n */\n defaultCode: boolean;\n\n /**\n * Indicates whether this is the system default code (true) or not (false).\n */\n isSystemCode: boolean;\n\n /**\n * A short description indicating the context of the code.\n */\n description: string;\n\n /**\n * Name of the Auxiliary Code.\n */\n name: string;\n\n /**\n * Indicates the work type associated with this code.\n */\n workTypeCode: string;\n};\n\nexport type ListAuxCodesResponse = {\n data: AuxCode[];\n meta: {\n page: number;\n pageSize: number;\n totalPages: number;\n totalRecords: number;\n };\n};\n\n/**\n * Configuration for a team in the contact center system\n * @private\n */\nexport type TeamList = {\n /** Unique identifier for the team */\n id: string;\n /** Team name */\n name: string;\n /** Type of team (e.g., 'AGENT_BASED') */\n teamType: string;\n /** Current status of the team */\n teamStatus: string;\n /** Whether the team is active */\n active: boolean;\n /** Site identifier where team is located */\n siteId: string;\n /** Name of the site */\n siteName: string;\n /** Optional multimedia profile ID for team */\n multiMediaProfileId?: string;\n /** List of user IDs belonging to team */\n userIds: string[];\n /** Whether queue rankings are enabled for team */\n rankQueuesForTeam: boolean;\n /** Ordered list of queue rankings */\n queueRankings: string[];\n /** Optional database identifier */\n dbId?: string;\n /** Optional desktop layout identifier */\n desktopLayoutId?: string;\n};\n\n/**\n * Response type for listing teams with pagination metadata\n * @private\n */\nexport type ListTeamsResponse = {\n /** Array of team configurations */\n data: TeamList[];\n /** Pagination metadata */\n meta: {\n /** Current page number */\n page: number;\n /** Number of items per page */\n pageSize: number;\n /** Total number of pages */\n totalPages: number;\n /** Total number of records */\n totalRecords: number;\n };\n};\n\n/**\n * Basic organization information carried by the `organization` section of the org desktop-login\n * aggregate.\n * @private\n * @ignore\n */\nexport type OrgInfo = {\n /** Tenant identifier */\n tenantId: string;\n /** Organization timezone */\n timezone: string;\n};\n\n/**\n * Organization-wide feature settings carried by the `organizationSetting` section of the org\n * desktop-login aggregate.\n * @private\n */\nexport type OrgSettings = {\n /** Whether WebRTC functionality is enabled */\n webRtcEnabled: boolean;\n /** Whether sensitive data masking is enabled */\n maskSensitiveData: boolean;\n /** Whether campaign manager features are enabled */\n campaignManagerEnabled: boolean;\n /** Number of AI Assistant licenses assigned to the organization */\n aiAssistantQuantity?: number | null;\n};\n\n/**\n * Contact center site configuration information\n * @private\n */\nexport type SiteInfo = {\n /** Unique site identifier */\n id: string;\n /** Site name */\n name: string;\n /** Whether site is active */\n active: boolean;\n /** Multimedia profile ID for site */\n multimediaProfileId: string;\n /** Whether this is the system default site */\n systemDefault: boolean;\n};\n\n/**\n * Tenant-level configuration carried by the `tenantConfiguration` section of the org\n * desktop-login aggregate.\n * @private\n */\nexport type TenantData = {\n /** Desktop inactivity timeout in minutes. Omitted when the timeout is not enabled. */\n timeoutDesktopInactivityMins?: number;\n /** Whether default DN is enforced */\n forceDefaultDn: boolean;\n /** Regex pattern for default DN validation */\n dnDefaultRegex: string;\n /** Regex pattern for other DN validation */\n dnOtherRegex: string;\n /** Whether privacy shield feature is visible */\n privacyShieldVisible: boolean;\n /** Whether outbound dialing is enabled */\n outdialEnabled: boolean;\n /** Whether ending calls is enabled */\n endCallEnabled: boolean;\n /** Whether ending consultations is enabled */\n endConsultEnabled: boolean;\n /** Whether call variables are suppressed */\n callVariablesSuppressed: boolean;\n /** Whether desktop inactivity timeout is enabled */\n timeoutDesktopInactivityEnabled: boolean;\n /** Lost connection recovery timeout in seconds */\n lostConnectionRecoveryTimeout: number;\n};\n\n/**\n * URL mappings carried by the `urlMappings` section of the org desktop-login aggregate, keyed by\n * mapping name. The aggregate returns `{}` when the organization has no Acqueon configuration.\n * @public\n */\nexport type OrgUrlMappings = {\n /** Acqueon API endpoint URL */\n ACQUEON_API_URL?: string;\n /** Acqueon console URL */\n ACQUEON_CONSOLE_URL?: string;\n};\n\n/**\n * Organization-level Microsoft Teams integration configuration carried by the `microsoftConfig`\n * section of the org desktop-login aggregate. The whole section is absent when the organization\n * has no Microsoft integration.\n * @public\n */\nexport type MicrosoftConfig = {\n /** Whether to show user details in Teams */\n showUserDetails?: boolean;\n /** Whether to sync agent state with Teams */\n stateSynchronization?: boolean;\n /** Whether the integration is enabled organization-wide */\n active?: boolean;\n /** Idle codes mapped to Teams presence states */\n idleCodes?: Record<string, string>;\n};\n\n/**\n * Organization-level Webex integration configuration carried by the `webexConfig` section of the\n * org desktop-login aggregate.\n * @public\n */\nexport type WebexConfig = {\n /** Whether to show user details in Webex */\n showUserDetails?: boolean;\n /** Whether to sync agent state with Webex */\n stateSynchronization?: boolean;\n /** Idle codes mapped to Webex presence states */\n idleCodes?: Record<string, string>;\n};\n\n/**\n * Constant representing idle code\n * @public\n * @ignore\n */\nexport const IDLE_CODE = 'IDLE_CODE';\n\n/**\n * Constant representing wrap up code\n * @public\n * @ignore\n */\nexport const WRAP_UP_CODE = 'WRAP_UP_CODE';\n\n/**\n * Type representing the possible auxiliary code types\n * @public\n */\nexport type AuxCodeType = typeof IDLE_CODE | typeof WRAP_UP_CODE;\n\n/**\n * Sort order configuration for queries\n * @internal\n */\ntype SortOrder = {\n /** Property to sort by */\n property: string;\n /** Sort order direction */\n order: string;\n};\n\n/**\n * Search query configuration\n * @internal\n */\ntype SearchQuery = {\n /** Properties to search in */\n properties: string;\n /** Search value */\n value: string;\n};\n\n/**\n * Parameters for querying Contact Center resources\n * @public\n */\nexport type QueryParams = {\n /** Page number for pagination */\n pageNumber?: number;\n pageSize?: number;\n attributes?: Array<string>;\n ids?: Array<string>;\n queueType?: string;\n entryPointType?: string;\n channelType?: string;\n isActive?: boolean;\n workTypeCode?: AuxCodeType;\n names?: Array<string>;\n sortOrder?: SortOrder;\n searchQuery?: SearchQuery;\n defaultCode?: boolean;\n search?: string;\n desktopProfileFilter?: boolean;\n};\n\n/**\n * Basic entity information used throughout the system\n * @public\n */\nexport type Entity = {\n /** Whether this is a system entity */\n isSystem: boolean;\n /** Entity name */\n name: string;\n /** Unique entity identifier */\n id: string;\n /** Whether this is the default entity */\n isDefault: boolean;\n};\n\n/**\n * Dial plan entity definition containing number manipulation rules\n * @public\n */\nexport type DialPlanEntity = {\n /** Unique identifier for the dial plan */\n id: string;\n /** Regular expression pattern for matching numbers */\n regularExpression: string;\n /** Prefix to add to matched numbers */\n prefix: string;\n /** Characters to strip from matched numbers */\n strippedChars: string;\n /** Name of the dial plan */\n name: string;\n /** Whether the dial plan is active */\n active: boolean;\n};\n\n/**\n * Complete dial plan configuration for number handling\n * @public\n */\nexport type DialPlan = {\n /** Type of dial plan (e.g., 'adhocDial') */\n type: string;\n /** List of dial plan entities with transformation rules */\n dialPlanEntity: {\n /** Regular expression pattern */\n regex: string;\n /** Number prefix */\n prefix: string;\n /** Characters to strip */\n strippedChars: string;\n /** Entity name */\n name: string;\n }[];\n};\n\n/**\n * Agent wrap-up codes configuration with pagination metadata\n * @public\n */\nexport type agentWrapUpCodes = {\n /** Array of wrap-up code entities */\n data: Entity[];\n /** Pagination and navigation metadata */\n meta: {\n /** Navigation URLs for pagination */\n links: {\n /** URL for first page */\n first: string;\n /** URL for last page */\n last: string;\n /** URL for next page */\n next: string;\n /** URL for current page */\n self: string;\n };\n /** Organization identifier */\n orgid: string;\n /** Current page number */\n page: number;\n /** Number of items per page */\n pageSize: number;\n /** Total number of pages */\n totalPages: number;\n /** Total number of records */\n totalRecords: number;\n };\n};\n\n/**\n * Default wrap-up code configuration for an agent\n * @public\n */\nexport type agentDefaultWrapupCode = {\n /** Unique identifier for the wrap-up code */\n id: string;\n /** Display name of the wrap-up code */\n name: string;\n};\n\n/**\n * Wrap-up reason configuration used to classify completed interactions\n * @public\n */\nexport type WrapUpReason = {\n /** Whether this is a system-defined reason */\n isSystem: boolean;\n /** Display name of the reason */\n name: string;\n /** Unique identifier */\n id: string;\n /** Whether this is the default reason */\n isDefault: boolean;\n};\n\n/**\n * Wrap-up configuration data containing settings and available options\n * @public\n */\nexport type WrapupData = {\n /** Wrap-up configuration properties */\n wrapUpProps: {\n /** Whether automatic wrap-up is enabled */\n autoWrapup?: boolean;\n /** Time in seconds before auto wrap-up triggers */\n autoWrapupInterval?: number;\n /** Whether last agent routing is enabled */\n lastAgentRoute?: boolean;\n /** List of available wrap-up reasons */\n wrapUpReasonList: Array<WrapUpReason>;\n /** List of available wrap-up codes */\n wrapUpCodesList?: Array<string>;\n /** Access control for idle codes ('ALL' or 'SPECIFIC') */\n idleCodesAccess?: 'ALL' | 'SPECIFIC';\n /** Associated interaction identifier */\n interactionId?: string;\n /** Whether cancelling auto wrap-up is allowed */\n allowCancelAutoWrapup?: boolean;\n };\n};\n\n/**\n * Basic queue configuration information\n * @public\n */\nexport type Queue = {\n /** Queue identifier */\n queueId: string;\n /** Queue display name */\n queueName: string;\n};\n\n/**\n * URL mappings for external system integrations\n * @public\n */\nexport type URLMappings = {\n /** Acqueon API endpoint URL */\n acqueonApiUrl: string;\n /** Acqueon console URL */\n acqueonConsoleUrl: string;\n};\n\n/**\n * AI feature flags carried by the `aiFeature` section of the org desktop-login aggregate.\n * @public\n */\nexport type AIFeatureFlags = {\n /** Not carried by the aggregate; retained for responses that still supply a record id. */\n id?: string;\n realtimeTranscripts?: {\n enable?: boolean;\n agentInclusionType?: string;\n };\n suggestedResponses?: {\n enable?: boolean;\n };\n generatedSummaries?: {\n callDropSummariesEnabled?: boolean;\n virtualAgentTransferSummariesEnabled?: boolean;\n consultTransferSummariesEnabled?: boolean;\n wrapUpSummariesEnabled?: boolean;\n queuesInclusionType?: string;\n };\n agentWellbeing?: {\n enable?: boolean;\n agentInclusionType?: string;\n wellnessBreakReminders?: string;\n };\n autoCSAT?: {\n enable?: boolean;\n queuesInclusionType?: string;\n surveyDataSource?: string;\n };\n};\n\n/**\n * Aggregated organization configuration returned by `organization/{orgId}/desktop-login`.\n * Replaces the separate organization, organization-setting, tenant-configuration,\n * org-url-mapping and ai-feature calls.\n * @public\n */\nexport type OrgDesktopLoginResponse = {\n /** Organization identity and timezone */\n organization: OrgInfo;\n /** Organization-wide feature settings */\n organizationSetting: OrgSettings;\n /** Tenant-level configuration */\n tenantConfiguration: TenantData;\n /** External integration URLs, keyed by mapping name */\n urlMappings?: OrgUrlMappings;\n /** AI feature flags */\n aiFeature?: AIFeatureFlags;\n /** Microsoft Teams integration configuration; absent when not configured */\n microsoftConfig?: MicrosoftConfig;\n /** Webex integration configuration */\n webexConfig?: WebexConfig;\n};\n\n/**\n * Aggregated user configuration returned by\n * `organization/{orgId}/v2/user/by-ci-user-id/{ciUserId}/desktop-login`.\n * Replaces the separate user and agent-profile calls.\n * @public\n */\nexport type UserDesktopLoginResponse = {\n /** Agent identity */\n user: AgentResponse;\n /** Desktop Profile settings for the agent */\n agentProfile: AgentProfile;\n};\n\n/**\n * Comprehensive agent profile configuration in the contact center system\n * Contains all settings and capabilities for an agent\n * @public\n */\nexport type Profile = {\n /** Microsoft Teams integration configuration */\n microsoftConfig?: {\n /** Whether to show user details in Teams */\n showUserDetailsMS?: boolean;\n /** Whether to sync agent state with Teams */\n stateSynchronizationMS?: boolean;\n };\n /** Webex integration configuration */\n webexConfig?: {\n /** Whether to show user details in Webex */\n showUserDetailsWebex?: boolean;\n /** Whether to sync agent state with Webex */\n stateSynchronizationWebex?: boolean;\n };\n /** List of teams the agent belongs to, as returned by the team API */\n teams: TeamList[];\n /** Agent's default dial number */\n defaultDn: string;\n dn?: string;\n /** Whether default DN is enforced at tenant level */\n forceDefaultDn: boolean;\n /** Whether default DN is enforced for this agent */\n forceDefaultDnForAgent: boolean;\n /** Regex pattern for US phone number validation */\n regexUS: RegExp | string;\n /** Regex pattern for international phone number validation */\n regexOther: RegExp | string;\n /** Unique identifier for the agent */\n agentId: string;\n /** Display name for the agent */\n agentName: string;\n /** Email address for the agent */\n agentMailId: string;\n /** Agent's profile configuration ID */\n agentProfileID: string;\n /** Dial plan configuration for number handling */\n dialPlan: DialPlan;\n /** Multimedia profile defining channel capabilities */\n multimediaProfileId: string;\n /** Skill profile defining agent competencies */\n skillProfileId: string;\n /** Site where agent is located */\n siteId: string;\n /** Enterprise-wide identifier */\n enterpriseId: string;\n /** Whether privacy shield feature is visible */\n privacyShieldVisible: boolean;\n /** Available idle codes */\n idleCodes: Entity[];\n /** List of specific idle codes */\n idleCodesList?: Array<string>;\n /** Access control for idle codes */\n idleCodesAccess?: 'ALL' | 'SPECIFIC';\n /** Available wrap-up codes */\n wrapupCodes: Entity[];\n /** Agent-specific wrap-up codes */\n agentWrapUpCodes?: agentWrapUpCodes;\n /** Default wrap-up code for agent */\n agentDefaultWrapUpCode?: agentDefaultWrapupCode;\n /** Default wrap-up code identifier */\n defaultWrapupCode: string;\n /** Wrap-up configuration data */\n wrapUpData: WrapupData;\n /** Organization identifier */\n orgId?: string;\n /** Whether outbound is enabled at tenant level */\n isOutboundEnabledForTenant: boolean;\n /** Whether outbound is enabled for this agent */\n isOutboundEnabledForAgent: boolean;\n /** Whether ad-hoc dialing is enabled */\n isAdhocDialingEnabled: boolean;\n /** Whether agent becomes available after outdial */\n isAgentAvailableAfterOutdial: boolean;\n /** Whether campaign management is enabled */\n isCampaignManagementEnabled: boolean;\n /** Outbound entry point */\n outDialEp: string;\n /** Whether ending calls is enabled */\n isEndTaskEnabled: boolean;\n /** Whether ending consultations is enabled */\n isEndConsultEnabled: boolean;\n /** Optional lifecycle manager URL */\n lcmUrl?: string;\n /** Database identifier for agent */\n agentDbId: string;\n /** Optional analyzer identifier for agent */\n agentAnalyzerId?: string;\n /** Whether consult to queue is allowed */\n allowConsultToQueue: boolean;\n /** Access control for queues on Desktop Profile Collaboration tab */\n accessQueue?: CollaborationAccess;\n /** Access control for entry points on Desktop Profile Collaboration tab */\n accessEntryPoint?: CollaborationAccess;\n /** Access control for buddy teams on Desktop Profile Collaboration tab */\n accessBuddyTeam?: CollaborationAccess;\n /** Additional campaign manager information */\n campaignManagerAdditionalInfo?: string;\n /** Whether personal statistics are enabled */\n agentPersonalStatsEnabled: boolean;\n /** Optional address book identifier */\n addressBookId?: string;\n /** Optional outbound ANI identifier */\n outdialANIId?: string;\n /** Optional analyzer user identifier */\n analyserUserId?: string;\n /** Whether call monitoring is enabled */\n isCallMonitoringEnabled?: boolean;\n /** Whether mid-call monitoring is enabled */\n isMidCallMonitoringEnabled?: boolean;\n /** Whether barge-in functionality is enabled */\n isBargeInEnabled?: boolean;\n /** Whether managed teams feature is enabled */\n isManagedTeamsEnabled?: boolean;\n /** Whether managed queues feature is enabled */\n isManagedQueuesEnabled?: boolean;\n /** Whether sending messages is enabled */\n isSendMessageEnabled?: boolean;\n /** Whether agent state changes are enabled */\n isAgentStateChangeEnabled?: boolean;\n /** Whether signing out agents is enabled */\n isSignOutAgentsEnabled?: boolean;\n /** Integration URL mappings */\n urlMappings?: URLMappings;\n /** Whether desktop inactivity timeout is enabled */\n isTimeoutDesktopInactivityEnabled: boolean;\n /** Desktop inactivity timeout in minutes */\n timeoutDesktopInactivityMins?: number;\n /** Whether analyzer features are enabled */\n isAnalyzerEnabled?: boolean;\n /** Tenant timezone */\n tenantTimezone?: string;\n /** Available voice login options */\n loginVoiceOptions?: LoginOption[];\n /** Current login device type */\n deviceType?: LoginOption;\n /** Current team identifier */\n currentTeamId?: string;\n /** Whether WebRTC is enabled */\n webRtcEnabled: boolean;\n /** Organization-wide idle codes */\n organizationIdleCodes?: Entity[];\n /** Whether recording management is enabled */\n isRecordingManagementEnabled?: boolean;\n /** Connection recovery timeout in milliseconds */\n lostConnectionRecoveryTimeout: number;\n /** Whether sensitive data masking is enabled */\n maskSensitiveData?: boolean;\n /** Whether agent is currently logged in */\n isAgentLoggedIn?: boolean;\n /** Active station session after a successful registered relogin. */\n agentSessionId?: string;\n /** Last auxiliary code ID used for state change */\n lastStateAuxCodeId?: string;\n /** Timestamp of last state change */\n lastStateChangeTimestamp?: number;\n /** Timestamp of last idle code change */\n lastIdleCodeChangeTimestamp?: number;\n /** AI feature flags resolved from organization config */\n aiFeature?: AIFeatureFlags;\n /**\n * Whether Agent Wellness Break is effectively enabled for this profile.\n * This combines the organization wellbeing configuration with AI Assistant licensing;\n * Server-side rollout remains enforced by the backend configuration and notification delivery.\n */\n isWellnessBreakEnabled?: boolean;\n};\n\n/**\n * Contact distribution group configuration for routing logic\n * @public\n */\nexport type CallDistributionGroup = {\n /** List of agent groups in this distribution group */\n agentGroups: {\n /** Team identifier */\n teamId: string;\n }[];\n /** Distribution order priority */\n order: number;\n /** Distribution time duration in seconds */\n duration: number;\n};\n\n/**\n * Represents a single outdial ANI (Automatic Number Identification) entry\n * @public\n */\nexport type OutdialAniEntry = {\n /** Unique identifier for the ANI entry */\n id: string;\n /** Display name for the ANI entry */\n name: string;\n /** Phone number associated with this ANI entry */\n number: string;\n /** Related links for this ANI entry */\n links: string[];\n /** Timestamp when this entry was created (Unix timestamp in milliseconds) */\n createdTime: number;\n /** Timestamp when this entry was last updated (Unix timestamp in milliseconds) */\n lastUpdatedTime: number;\n};\n\n/**\n * Response structure for outdial ANI entries API call\n * @public\n */\nexport type OutdialAniEntriesResponse = OutdialAniEntry[];\n\n/**\n * Parameters for fetching outdial ANI entries\n * @public\n */\nexport type OutdialAniParams = {\n /** Outdial ANI ID from agent profile */\n outdialANI: string;\n /** Page number for pagination (optional) */\n page?: number;\n /** Number of entries per page (optional) */\n pageSize?: number;\n /** Search string to filter entries (optional) */\n search?: string;\n /** Filter expression for advanced filtering (optional) */\n filter?: string;\n /** Comma-separated list of attributes to include in response (optional) */\n attributes?: string;\n};\n\n/**\n * User preference data structure\n * @public\n */\nexport type UserPreference = {\n /** Unique identifier for the user preference */\n id: string;\n /** Organization ID */\n organizationId: string;\n /** User ID (CI user ID) */\n userId: string;\n /** User preference data as key-value pairs */\n preferences: Record<string, unknown>;\n /** Timestamp when this preference was created (Unix timestamp in milliseconds) */\n createdTime?: number;\n /** Timestamp when this preference was last updated (Unix timestamp in milliseconds) */\n lastUpdatedTime?: number;\n};\n\n/**\n * Request payload for creating user preferences\n * @public\n */\nexport type CreateUserPreferenceRequest = {\n /** User ID (CI user ID) */\n userId: string;\n /** Desktop preference data as a JSON string (required) */\n desktopPreference: string;\n};\n\n/**\n * Request payload for updating user preferences\n * @public\n */\nexport type UpdateUserPreferenceRequest = {\n /** Desktop preference data as a JSON string (required) */\n desktopPreference: string;\n};\n\n/**\n * Query parameters for fetching user preferences\n * @public\n */\nexport type GetUserPreferenceParams = {\n /** User ID to fetch preferences for. Defaults to current user's CI user ID. */\n userId?: string;\n /** Page number (0-indexed). Default: 0 */\n page?: number;\n /** Number of items per page. Default: 100 */\n pageSize?: number;\n};\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5B;EACAE,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,kBAAkB,EAAE,kBAAkB;EACtC;EACAC,yBAAyB,EAAE,wBAAwB;EACnD;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,gBAAgB,EAAE,iBAAiB;EACnC;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,gBAAgB,EAAE,gBAAgB;EAClC;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,uBAAuB,EAAE,sBAAsB;EAC/C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,0BAA0B,EAAE,0BAA0B;EACtD;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,+BAA+B,EAAE,8BAA8B;EAC/D;EACAC,6BAA6B,EAAE,6BAA6B;EAC5D;EACAC,2BAA2B,EAAE,2BAA2B;EACxD;EACAC,kCAAkC,EAAE,iCAAiC;EACrE;EACAC,kCAAkC,EAAE,iCAAiC;EACrE;EACAC,mCAAmC,EAAE,iCAAiC;EACtE;EACAC,4BAA4B,EAAE,4BAA4B;EAC1D;EACAC,gCAAgC,EAAE,+BAA+B;EACjE;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,4BAA4B,EAAE,4BAA4B;EAC1D;EACAC,uBAAuB,EAAE,uBAAuB;EAChD;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,uBAAuB,EAAE,uBAAuB;EAChD;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,0BAA0B,EAAE,0BAA0B;EACtD;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,6BAA6B,EAAE,4BAA4B;EAC3D;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,yBAAyB,EAAE,yBAAyB;EACpD;EACAC,+BAA+B,EAAE,8BAA8B;EAC/D;EACAC,aAAa,EAAE,cAAc;EAC7B;EACAC,cAAc,EAAE,eAAe;EAC/B;EACAC,eAAe,EAAE,gBAAgB;EACjC;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,wBAAwB,EAAE,uBAAuB;EACjD;EACAC,YAAY,EAAE,aAAa;EAC3B;EACAC,eAAe,EAAE,gBAAgB;EACjC;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,aAAa,EAAE,cAAc;EAC7B;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,sBAAsB,EAAE,sBAAsB;EAC9C;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,gCAAgC,EAAE,+BAA+B;EACjE;EACAC,wBAAwB,EAAE,wBAAwB;EAClD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,4BAA4B,EAAE,2BAA2B;EACzD;EACAC,8BAA8B,EAAE,6BAA6B;EAC7D;EACAC,uBAAuB,EAAE,yBAAyB;EAClD;EACAC,kBAAkB,EAAE,oBAAoB;EACxC;EACAC,8BAA8B,EAAE,gCAAgC;EAChE;EACAC,iBAAiB,EAAE,mBAAmB;EACtC;EACAC,gBAAgB,EAAE,kBAAkB;EACpC;EACAC,kBAAkB,EAAE,oBAAoB;EACxC;EACAC,0CAA0C,EAAE;AAC9C,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,GAAAnE,OAAA,CAAAmE,eAAA,GAAG;EAC7B;EACAC,OAAO,EAAE,SAAS;EAClB;EACAC,qBAAqB,EAAE,qBAAqB;EAC5C;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,YAAY,EAAE,QAAQ;EACtB;EACAC,oBAAoB,EAAE,oBAAoB;EAC1C;EACAC,mBAAmB,EAAE,mBAAmB;EACxC;EACAC,mBAAmB,EAAE,cAAc;EACnC;EACAC,2BAA2B,EAAE,0BAA0B;EACvD;EACAC,0BAA0B,EAAE,yBAAyB;EACrD;EACAC,kBAAkB,EAAE,kBAAkB;EACtC;EACAC,iBAAiB,EAAE,mBAAmB;EACtC;EACAC,0BAA0B,EAAE,yBAAyB;EACrD;EACAC,yBAAyB,EAAE,wBAAwB;EACnD;EACAC,kBAAkB,EAAE,aAAa;EACjC;EACAC,0BAA0B,EAAE,aAAa;EACzC;EACAC,kCAAkC,EAAE,2BAA2B;EAC/D;EACAC,sBAAsB,EAAE,sBAAsB;EAC9C;EACAC,cAAc,EAAE;AAClB,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAAvF,OAAA,CAAAuF,SAAA,GAAG;EACvB,GAAGpB,eAAe;EAClB,GAAGpE;AACL,CAAU;;AAEV;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAcA;AACA;AACA;;AAuDA;AACA;AACA;AACA;;AAyHA;AACA;AACA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AA8DA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAMyF,SAAS,GAAAxF,OAAA,CAAAwF,SAAA,GAAG,WAAW;;AAEpC;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAzF,OAAA,CAAAyF,YAAA,GAAG,cAAc;;AAE1C;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAuBA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAyKA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WEB_RTC_PREFIX = exports.WEBSOCKET_EVENT_TIMEOUT = exports.WCC_CALLING_RTMS_DOMAIN = exports.WCC_API_GATEWAY = exports.SUBSCRIBE_API = exports.STATE_CHANGE_API = exports.RTD_SUBSCRIBE_API = exports.POST_AUTH = exports.METHODS = exports.LOGIN_API = exports.DEREGISTER_WEBCALLING_LINE_MSG = exports.DEFAULT_RTMS_DOMAIN = exports.AI_ASSISTANT_ENV_MAP = exports.AI_ASSISTANT_BASE_URL_TEMPLATE = exports.AI_ASSISTANT_API_URLS = exports.AGENT = void 0;
|
|
6
|
+
exports.WEB_RTC_PREFIX = exports.WEBSOCKET_EVENT_TIMEOUT = exports.WCC_CALLING_RTMS_DOMAIN = exports.WCC_API_GATEWAY = exports.SUBSCRIBE_API = exports.STATE_CHANGE_API = exports.RTD_SUBSCRIBE_API = exports.POST_AUTH = exports.METHODS = exports.LOGIN_API = exports.DEREGISTER_WEBCALLING_LINE_MSG = exports.DEFAULT_RTMS_DOMAIN = exports.ALLOWED_RTMS_DOMAIN = exports.AI_ASSISTANT_ENV_MAP = exports.AI_ASSISTANT_BASE_URL_TEMPLATE = exports.AI_ASSISTANT_API_URLS = exports.AGENT = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Post-authentication event name.
|
|
9
9
|
* @type {string}
|
|
@@ -38,6 +38,16 @@ const WCC_CALLING_RTMS_DOMAIN = exports.WCC_CALLING_RTMS_DOMAIN = 'wcc-calling-r
|
|
|
38
38
|
*/
|
|
39
39
|
const DEFAULT_RTMS_DOMAIN = exports.DEFAULT_RTMS_DOMAIN = 'rtw.prod-us1.rtmsprod.net';
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Trusted domain suffix for RTMS hosts returned by the u2c service catalog. A catalog-provided
|
|
43
|
+
* RTMS host is only used when its hostname is, or is a subdomain of, this domain; otherwise
|
|
44
|
+
* `DEFAULT_RTMS_DOMAIN` is used.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @public
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
const ALLOWED_RTMS_DOMAIN = exports.ALLOWED_RTMS_DOMAIN = 'rtmsprod.net';
|
|
50
|
+
|
|
41
51
|
/**
|
|
42
52
|
* Timeout in milliseconds for WebSocket events.
|
|
43
53
|
* @type {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["POST_AUTH","exports","WCC_API_GATEWAY","WCC_CALLING_RTMS_DOMAIN","DEFAULT_RTMS_DOMAIN","WEBSOCKET_EVENT_TIMEOUT","AGENT","SUBSCRIBE_API","RTD_SUBSCRIBE_API","LOGIN_API","WEB_RTC_PREFIX","STATE_CHANGE_API","DEREGISTER_WEBCALLING_LINE_MSG","METHODS","SET_LOGIN_OPTION","HANDLE_MEDIA_EVENT","HANDLE_DISCONNECT_EVENT","REGISTER_CALL_LISTENERS","CLEAN_UP_CALL","GET_RTMS_DOMAIN","REGISTER_WEB_CALLING_LINE","DEREGISTER_WEB_CALLING_LINE","ANSWER_CALL","MUTE_UNMUTE_CALL","IS_CALL_MUTED","DECLINE_CALL","MAP_CALL_TO_TASK","GET_TASK_ID_FOR_CALL","AI_ASSISTANT_API_URLS","EVENT","TRANSCRIPTS_LIST","AI_ASSISTANT_BASE_URL_TEMPLATE","AI_ASSISTANT_ENV_MAP"],"sources":["constants.ts"],"sourcesContent":["/**\n * Post-authentication event name.\n * @type {string}\n * @public\n * @example\n * if (event === POST_AUTH) { ... }\n * @ignore\n */\nexport const POST_AUTH = 'postauth';\n\n/**\n * API gateway identifier for Webex Contact Center.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WCC_API_GATEWAY = 'wcc-api-gateway';\n\n/**\n * Domain identifier for WCC Calling RTMS.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WCC_CALLING_RTMS_DOMAIN = 'wcc-calling-rtms-domain';\n\n/**\n * Default RTMS domain for production use.\n * @type {string}\n * @public\n * @ignore\n */\nexport const DEFAULT_RTMS_DOMAIN = 'rtw.prod-us1.rtmsprod.net';\n\n/**\n * Timeout in milliseconds for WebSocket events.\n * @type {number}\n * @public\n * @example\n * setTimeout(() => { ... }, WEBSOCKET_EVENT_TIMEOUT);\n * @ignore\n */\nexport const WEBSOCKET_EVENT_TIMEOUT = 20000;\n\n/**\n * Agent role identifier.\n * @type {string}\n * @public\n * @ignore\n */\nexport const AGENT = 'agent';\n\n// CC GATEWAY API URL PATHS\n/**\n * API path for notification subscription.\n * @type {string}\n * @public\n * @ignore\n */\nexport const SUBSCRIBE_API = 'v1/notification/subscribe';\n\n/**\n * API path for realtime transcription subscription.\n * @type {string}\n * @public\n * @ignore\n */\nexport const RTD_SUBSCRIBE_API = 'v1/realtime/subscribe';\n\n/**\n * API path for agent login.\n * @type {string}\n * @public\n * @ignore\n */\nexport const LOGIN_API = 'v1/agents/login';\n\n/**\n * Prefix for WebRTC-related API endpoints.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WEB_RTC_PREFIX = 'webrtc-';\n\n/**\n * API path for agent session state changes.\n * @type {string}\n * @public\n * @ignore\n */\nexport const STATE_CHANGE_API = 'v1/agents/session/state';\n\n/**\n * Message for deregistering WebCalling line and cleaning up resources.\n * @type {string}\n * @public\n * @ignore\n */\nexport const DEREGISTER_WEBCALLING_LINE_MSG =\n 'Deregistering WebCalling line and cleaning up resources';\n\n// WebCallingService method names\nexport const METHODS = {\n SET_LOGIN_OPTION: 'setLoginOption',\n HANDLE_MEDIA_EVENT: 'handleMediaEvent',\n HANDLE_DISCONNECT_EVENT: 'handleDisconnectEvent',\n REGISTER_CALL_LISTENERS: 'registerCallListeners',\n CLEAN_UP_CALL: 'cleanUpCall',\n GET_RTMS_DOMAIN: 'getRTMSDomain',\n REGISTER_WEB_CALLING_LINE: 'registerWebCallingLine',\n DEREGISTER_WEB_CALLING_LINE: 'deregisterWebCallingLine',\n ANSWER_CALL: 'answerCall',\n MUTE_UNMUTE_CALL: 'muteUnmuteCall',\n IS_CALL_MUTED: 'isCallMuted',\n DECLINE_CALL: 'declineCall',\n MAP_CALL_TO_TASK: 'mapCallToTask',\n GET_TASK_ID_FOR_CALL: 'getTaskIdForCall',\n};\n\nexport const AI_ASSISTANT_API_URLS = {\n EVENT: '/event',\n TRANSCRIPTS_LIST: '/transcripts/list',\n};\n\nexport const AI_ASSISTANT_BASE_URL_TEMPLATE = 'https://api-ai-assistant.%s.ciscoccservice.com';\n\nexport const AI_ASSISTANT_ENV_MAP: Record<string, string> = {\n 'api.intgus1.ciscoccservice.com': 'intgus1',\n 'api.qaus1.ciscoccservice.com': 'qaus1',\n 'api.wxcc-us1.cisco.com': 'produs1',\n 'api.wxcc-eu1.cisco.com': 'prodeu1',\n 'api.wxcc-eu2.cisco.com': 'prodeu2',\n 'api.wxcc-anz1.cisco.com': 'prodanz1',\n 'api.wxcc-ca1.cisco.com': 'prodca1',\n 'api.wxcc-jp1.cisco.com': 'prodjp1',\n 'api.wxcc-sg1.cisco.com': 'prodsg1',\n 'api.wxcc-in1.cisco.com': 'prodin1',\n 'api.loadus1.cisco.com': 'loadus1',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,iBAAiB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAAF,OAAA,CAAAE,uBAAA,GAAG,yBAAyB;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,GAAAH,OAAA,CAAAG,mBAAA,GAAG,2BAA2B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,
|
|
1
|
+
{"version":3,"names":["POST_AUTH","exports","WCC_API_GATEWAY","WCC_CALLING_RTMS_DOMAIN","DEFAULT_RTMS_DOMAIN","ALLOWED_RTMS_DOMAIN","WEBSOCKET_EVENT_TIMEOUT","AGENT","SUBSCRIBE_API","RTD_SUBSCRIBE_API","LOGIN_API","WEB_RTC_PREFIX","STATE_CHANGE_API","DEREGISTER_WEBCALLING_LINE_MSG","METHODS","SET_LOGIN_OPTION","HANDLE_MEDIA_EVENT","HANDLE_DISCONNECT_EVENT","REGISTER_CALL_LISTENERS","CLEAN_UP_CALL","GET_RTMS_DOMAIN","REGISTER_WEB_CALLING_LINE","DEREGISTER_WEB_CALLING_LINE","ANSWER_CALL","MUTE_UNMUTE_CALL","IS_CALL_MUTED","DECLINE_CALL","MAP_CALL_TO_TASK","GET_TASK_ID_FOR_CALL","AI_ASSISTANT_API_URLS","EVENT","TRANSCRIPTS_LIST","AI_ASSISTANT_BASE_URL_TEMPLATE","AI_ASSISTANT_ENV_MAP"],"sources":["constants.ts"],"sourcesContent":["/**\n * Post-authentication event name.\n * @type {string}\n * @public\n * @example\n * if (event === POST_AUTH) { ... }\n * @ignore\n */\nexport const POST_AUTH = 'postauth';\n\n/**\n * API gateway identifier for Webex Contact Center.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WCC_API_GATEWAY = 'wcc-api-gateway';\n\n/**\n * Domain identifier for WCC Calling RTMS.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WCC_CALLING_RTMS_DOMAIN = 'wcc-calling-rtms-domain';\n\n/**\n * Default RTMS domain for production use.\n * @type {string}\n * @public\n * @ignore\n */\nexport const DEFAULT_RTMS_DOMAIN = 'rtw.prod-us1.rtmsprod.net';\n\n/**\n * Trusted domain suffix for RTMS hosts returned by the u2c service catalog. A catalog-provided\n * RTMS host is only used when its hostname is, or is a subdomain of, this domain; otherwise\n * `DEFAULT_RTMS_DOMAIN` is used.\n * @type {string}\n * @public\n * @ignore\n */\nexport const ALLOWED_RTMS_DOMAIN = 'rtmsprod.net';\n\n/**\n * Timeout in milliseconds for WebSocket events.\n * @type {number}\n * @public\n * @example\n * setTimeout(() => { ... }, WEBSOCKET_EVENT_TIMEOUT);\n * @ignore\n */\nexport const WEBSOCKET_EVENT_TIMEOUT = 20000;\n\n/**\n * Agent role identifier.\n * @type {string}\n * @public\n * @ignore\n */\nexport const AGENT = 'agent';\n\n// CC GATEWAY API URL PATHS\n/**\n * API path for notification subscription.\n * @type {string}\n * @public\n * @ignore\n */\nexport const SUBSCRIBE_API = 'v1/notification/subscribe';\n\n/**\n * API path for realtime transcription subscription.\n * @type {string}\n * @public\n * @ignore\n */\nexport const RTD_SUBSCRIBE_API = 'v1/realtime/subscribe';\n\n/**\n * API path for agent login.\n * @type {string}\n * @public\n * @ignore\n */\nexport const LOGIN_API = 'v1/agents/login';\n\n/**\n * Prefix for WebRTC-related API endpoints.\n * @type {string}\n * @public\n * @ignore\n */\nexport const WEB_RTC_PREFIX = 'webrtc-';\n\n/**\n * API path for agent session state changes.\n * @type {string}\n * @public\n * @ignore\n */\nexport const STATE_CHANGE_API = 'v1/agents/session/state';\n\n/**\n * Message for deregistering WebCalling line and cleaning up resources.\n * @type {string}\n * @public\n * @ignore\n */\nexport const DEREGISTER_WEBCALLING_LINE_MSG =\n 'Deregistering WebCalling line and cleaning up resources';\n\n// WebCallingService method names\nexport const METHODS = {\n SET_LOGIN_OPTION: 'setLoginOption',\n HANDLE_MEDIA_EVENT: 'handleMediaEvent',\n HANDLE_DISCONNECT_EVENT: 'handleDisconnectEvent',\n REGISTER_CALL_LISTENERS: 'registerCallListeners',\n CLEAN_UP_CALL: 'cleanUpCall',\n GET_RTMS_DOMAIN: 'getRTMSDomain',\n REGISTER_WEB_CALLING_LINE: 'registerWebCallingLine',\n DEREGISTER_WEB_CALLING_LINE: 'deregisterWebCallingLine',\n ANSWER_CALL: 'answerCall',\n MUTE_UNMUTE_CALL: 'muteUnmuteCall',\n IS_CALL_MUTED: 'isCallMuted',\n DECLINE_CALL: 'declineCall',\n MAP_CALL_TO_TASK: 'mapCallToTask',\n GET_TASK_ID_FOR_CALL: 'getTaskIdForCall',\n};\n\nexport const AI_ASSISTANT_API_URLS = {\n EVENT: '/event',\n TRANSCRIPTS_LIST: '/transcripts/list',\n};\n\nexport const AI_ASSISTANT_BASE_URL_TEMPLATE = 'https://api-ai-assistant.%s.ciscoccservice.com';\n\nexport const AI_ASSISTANT_ENV_MAP: Record<string, string> = {\n 'api.intgus1.ciscoccservice.com': 'intgus1',\n 'api.qaus1.ciscoccservice.com': 'qaus1',\n 'api.wxcc-us1.cisco.com': 'produs1',\n 'api.wxcc-eu1.cisco.com': 'prodeu1',\n 'api.wxcc-eu2.cisco.com': 'prodeu2',\n 'api.wxcc-anz1.cisco.com': 'prodanz1',\n 'api.wxcc-ca1.cisco.com': 'prodca1',\n 'api.wxcc-jp1.cisco.com': 'prodjp1',\n 'api.wxcc-sg1.cisco.com': 'prodsg1',\n 'api.wxcc-in1.cisco.com': 'prodin1',\n 'api.loadus1.cisco.com': 'loadus1',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,iBAAiB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAAF,OAAA,CAAAE,uBAAA,GAAG,yBAAyB;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,GAAAH,OAAA,CAAAG,mBAAA,GAAG,2BAA2B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,GAAAJ,OAAA,CAAAI,mBAAA,GAAG,cAAc;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAAL,OAAA,CAAAK,uBAAA,GAAG,KAAK;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GAAG,OAAO;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAa,GAAAP,OAAA,CAAAO,aAAA,GAAG,2BAA2B;;AAExD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAR,OAAA,CAAAQ,iBAAA,GAAG,uBAAuB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAAT,OAAA,CAAAS,SAAA,GAAG,iBAAiB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,GAAAV,OAAA,CAAAU,cAAA,GAAG,SAAS;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAAG,yBAAyB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,8BAA8B,GAAAZ,OAAA,CAAAY,8BAAA,GACzC,yDAAyD;;AAE3D;AACO,MAAMC,OAAO,GAAAb,OAAA,CAAAa,OAAA,GAAG;EACrBC,gBAAgB,EAAE,gBAAgB;EAClCC,kBAAkB,EAAE,kBAAkB;EACtCC,uBAAuB,EAAE,uBAAuB;EAChDC,uBAAuB,EAAE,uBAAuB;EAChDC,aAAa,EAAE,aAAa;EAC5BC,eAAe,EAAE,eAAe;EAChCC,yBAAyB,EAAE,wBAAwB;EACnDC,2BAA2B,EAAE,0BAA0B;EACvDC,WAAW,EAAE,YAAY;EACzBC,gBAAgB,EAAE,gBAAgB;EAClCC,aAAa,EAAE,aAAa;EAC5BC,YAAY,EAAE,aAAa;EAC3BC,gBAAgB,EAAE,eAAe;EACjCC,oBAAoB,EAAE;AACxB,CAAC;AAEM,MAAMC,qBAAqB,GAAA5B,OAAA,CAAA4B,qBAAA,GAAG;EACnCC,KAAK,EAAE,QAAQ;EACfC,gBAAgB,EAAE;AACpB,CAAC;AAEM,MAAMC,8BAA8B,GAAA/B,OAAA,CAAA+B,8BAAA,GAAG,gDAAgD;AAEvF,MAAMC,oBAA4C,GAAAhC,OAAA,CAAAgC,oBAAA,GAAG;EAC1D,gCAAgC,EAAE,SAAS;EAC3C,8BAA8B,EAAE,OAAO;EACvC,wBAAwB,EAAE,SAAS;EACnC,wBAAwB,EAAE,SAAS;EACnC,wBAAwB,EAAE,SAAS;EACnC,yBAAyB,EAAE,UAAU;EACrC,wBAAwB,EAAE,SAAS;EACnC,wBAAwB,EAAE,SAAS;EACnC,wBAAwB,EAAE,SAAS;EACnC,wBAAwB,EAAE,SAAS;EACnC,uBAAuB,EAAE;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Message","Error","constructor","id","value","stack","message","name","isErr","exports","Details","details"],"sources":["Err.ts"],"sourcesContent":["import {WebexRequestPayload} from '../../types';\nimport {Failure} from './GlobalTypes';\n\n/**\n * Err module provides a structured way to handle errors in the Contact Center plugin.\n * @ignore\n */\n\nexport type ErrDetails = {status: number; type: string; trackingId: string};\n\nexport type AgentErrorIds =\n | {'Service.aqm.agent.stationLogin': ErrDetails}\n | {'Service.aqm.agent.stationLoginFailed': Failure}\n | {'Service.aqm.agent.stateChange': Failure}\n | {'Service.aqm.agent.reload': Failure}\n | {'Service.aqm.agent.logout': Failure}\n | {'Service.reqs.generic.failure': {trackingId: string}}\n | {'Service.aqm.agent.BuddyAgentsRetrieveFailed': Failure};\n\nexport type vteamType = 'inboundqueue' | 'inboundentrypoint' | string;\n\nexport type TaskErrorIds =\n | {'Service.aqm.task.accept': Failure}\n | {'Service.aqm.task.end': Failure}\n | {'Service.aqm.task.wrapup': Failure}\n | {'Service.aqm.task.AgentVteamTransferFailed': Failure}\n | {'Service.aqm.task.AgentBlindTransferFailedEvent': Failure}\n | {'Service.aqm.task.AgentConsultTransferFailed': Failure}\n | {'Service.aqm.task.consult': Failure}\n | {'Service.aqm.err.trackingId': {trackingId: string}}\n | {'Service.aqm.task.consultAccept': Failure}\n | {'Service.aqm.task.consultConference': Failure}\n | {'Service.aqm.task.consultEnd': Failure}\n | {'Service.aqm.task.cancelCtq': Failure}\n | {'Service.aqm.task.hold': Failure}\n | {'Service.aqm.task.unHold': Failure}\n | {'Service.aqm.task.VteamListFailed': Failure}\n | {'Service.aqm.task.pauseRecording': Failure}\n | {'Service.aqm.task.resumeRecording': Failure}\n | {'Service.aqm.dialer.startOutdial': Failure}\n | {'Service.aqm.dialer.acceptPreviewContact': Failure}\n | {'Service.aqm.dialer.skipPreviewContact': Failure}\n | {'Service.aqm.dialer.removePreviewContact': Failure}\n | {'Service.reqs.generic.failure': {trackingId: string}};\n\nexport type ReqError =\n | 'Service.aqm.reqs.GenericRequestError'\n | {'Service.aqm.reqs.Pending': {key: string; msg: string}}\n | {'Service.aqm.reqs.PendingEvent': {key: string}}\n | {'Service.aqm.reqs.Timeout': {key: string; response: WebexRequestPayload}}\n | {'Service.aqm.reqs.TimeoutEvent': {key: string}};\n\nexport interface Ids {\n 'Service.aqm.agent': AgentErrorIds;\n 'Service.aqm.reqs': ReqError;\n 'Service.aqm.task': TaskErrorIds;\n}\n\nexport type IdsGlobal =\n | 'system' // to handle errors that was not created by 'new Err.WithId()'\n | 'handle'\n | 'fallback';\n\nexport type IdsSub = Ids[keyof Ids];\n\nexport type IdsMessage = IdsGlobal | keyof Ids | Exclude<IdsSub, object>;\n\nexport type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never;\n\nexport type FlattenUnion<T> = {\n [K in keyof UnionToIntersection<T>]: K extends keyof T\n ? T[K] extends any[]\n ? T[K]\n : T[K] extends object\n ? FlattenUnion<T[K]>\n : T[K]\n : UnionToIntersection<T>[K];\n};\nexport type IdsDetailsType = FlattenUnion<Exclude<IdsSub, string>>;\n\nexport type IdsDetails = keyof IdsDetailsType;\n\nexport type Id = IdsMessage | IdsDetails;\n\nexport class Message extends Error {\n readonly id: Id;\n\n constructor(id: IdsMessage);\n constructor(id: IdsMessage, message: string);\n constructor(id: IdsMessage, errror: Error);\n constructor(id: IdsMessage, value?: string | Error) {\n super();\n\n this.id = id;\n this.stack = new Error().stack!;\n\n if (typeof value === 'string') {\n this.message = value;\n } else if (value instanceof Error) {\n this.message = value.message;\n this.name = value.name;\n } else {\n this.message = '';\n }\n }\n\n // Marker to distinct Err class from other errors\n private isErr = 'yes';\n}\n\nexport class Details<T extends IdsDetails> extends Error {\n readonly id: Id;\n readonly details: IdsDetailsType[T];\n\n constructor(id: T, details: IdsDetailsType[T]) {\n super();\n\n this.id = id;\n this.stack = new Error().stack!;\n this.details = details;\n }\n\n // Marker to distinct Err class from other errors\n private isErr = 'yes';\n}\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["Message","Error","constructor","id","value","stack","message","name","isErr","exports","Details","details"],"sources":["Err.ts"],"sourcesContent":["import {WebexRequestPayload} from '../../types';\nimport {Failure} from './GlobalTypes';\n\n/**\n * Err module provides a structured way to handle errors in the Contact Center plugin.\n * @ignore\n */\n\nexport type ErrDetails = {status: number; type: string; trackingId: string};\n\nexport type AgentErrorIds =\n | {'Service.aqm.agent.stationLogin': ErrDetails}\n | {'Service.aqm.agent.stationLoginFailed': Failure}\n | {'Service.aqm.agent.stateChange': Failure}\n | {'Service.aqm.agent.reload': Failure}\n | {'Service.aqm.agent.logout': Failure}\n | {'Service.reqs.generic.failure': {trackingId: string}}\n | {'Service.aqm.agent.BuddyAgentsRetrieveFailed': Failure};\n\nexport type vteamType = 'inboundqueue' | 'inboundentrypoint' | string;\n\nexport type TaskErrorIds =\n | {'Service.aqm.task.accept': Failure}\n | {'Service.aqm.task.end': Failure}\n | {'Service.aqm.task.wrapup': Failure}\n | {'Service.aqm.task.AgentVteamTransferFailed': Failure}\n | {'Service.aqm.task.AgentBlindTransferFailedEvent': Failure}\n | {'Service.aqm.task.AgentConsultTransferFailed': Failure}\n | {'Service.aqm.task.consult': Failure}\n | {'Service.aqm.err.trackingId': {trackingId: string}}\n | {'Service.aqm.task.consultAccept': Failure}\n | {'Service.aqm.task.consultConference': Failure}\n | {'Service.aqm.task.dropConferenceParticipant': Failure}\n | {'Service.aqm.task.consultEnd': Failure}\n | {'Service.aqm.task.cancelCtq': Failure}\n | {'Service.aqm.task.hold': Failure}\n | {'Service.aqm.task.unHold': Failure}\n | {'Service.aqm.task.VteamListFailed': Failure}\n | {'Service.aqm.task.pauseRecording': Failure}\n | {'Service.aqm.task.resumeRecording': Failure}\n | {'Service.aqm.dialer.startOutdial': Failure}\n | {'Service.aqm.dialer.acceptPreviewContact': Failure}\n | {'Service.aqm.dialer.skipPreviewContact': Failure}\n | {'Service.aqm.dialer.removePreviewContact': Failure}\n | {'Service.reqs.generic.failure': {trackingId: string}};\n\nexport type ReqError =\n | 'Service.aqm.reqs.GenericRequestError'\n | {'Service.aqm.reqs.Pending': {key: string; msg: string}}\n | {'Service.aqm.reqs.PendingEvent': {key: string}}\n | {'Service.aqm.reqs.Timeout': {key: string; response: WebexRequestPayload}}\n | {'Service.aqm.reqs.TimeoutEvent': {key: string}};\n\nexport interface Ids {\n 'Service.aqm.agent': AgentErrorIds;\n 'Service.aqm.reqs': ReqError;\n 'Service.aqm.task': TaskErrorIds;\n}\n\nexport type IdsGlobal =\n | 'system' // to handle errors that was not created by 'new Err.WithId()'\n | 'handle'\n | 'fallback';\n\nexport type IdsSub = Ids[keyof Ids];\n\nexport type IdsMessage = IdsGlobal | keyof Ids | Exclude<IdsSub, object>;\n\nexport type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never;\n\nexport type FlattenUnion<T> = {\n [K in keyof UnionToIntersection<T>]: K extends keyof T\n ? T[K] extends any[]\n ? T[K]\n : T[K] extends object\n ? FlattenUnion<T[K]>\n : T[K]\n : UnionToIntersection<T>[K];\n};\nexport type IdsDetailsType = FlattenUnion<Exclude<IdsSub, string>>;\n\nexport type IdsDetails = keyof IdsDetailsType;\n\nexport type Id = IdsMessage | IdsDetails;\n\nexport class Message extends Error {\n readonly id: Id;\n\n constructor(id: IdsMessage);\n constructor(id: IdsMessage, message: string);\n constructor(id: IdsMessage, errror: Error);\n constructor(id: IdsMessage, value?: string | Error) {\n super();\n\n this.id = id;\n this.stack = new Error().stack!;\n\n if (typeof value === 'string') {\n this.message = value;\n } else if (value instanceof Error) {\n this.message = value.message;\n this.name = value.name;\n } else {\n this.message = '';\n }\n }\n\n // Marker to distinct Err class from other errors\n private isErr = 'yes';\n}\n\nexport class Details<T extends IdsDetails> extends Error {\n readonly id: Id;\n readonly details: IdsDetailsType[T];\n\n constructor(id: T, details: IdsDetailsType[T]) {\n super();\n\n this.id = id;\n this.stack = new Error().stack!;\n this.details = details;\n }\n\n // Marker to distinct Err class from other errors\n private isErr = 'yes';\n}\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;;AAmFO,MAAMA,OAAO,SAASC,KAAK,CAAC;EAMjCC,WAAWA,CAACC,EAAc,EAAEC,KAAsB,EAAE;IAClD,KAAK,CAAC,CAAC;IAEP,IAAI,CAACD,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACE,KAAK,GAAG,IAAIJ,KAAK,CAAC,CAAC,CAACI,KAAM;IAE/B,IAAI,OAAOD,KAAK,KAAK,QAAQ,EAAE;MAC7B,IAAI,CAACE,OAAO,GAAGF,KAAK;IACtB,CAAC,MAAM,IAAIA,KAAK,YAAYH,KAAK,EAAE;MACjC,IAAI,CAACK,OAAO,GAAGF,KAAK,CAACE,OAAO;MAC5B,IAAI,CAACC,IAAI,GAAGH,KAAK,CAACG,IAAI;IACxB,CAAC,MAAM;MACL,IAAI,CAACD,OAAO,GAAG,EAAE;IACnB;EACF;;EAEA;EACQE,KAAK,GAAG,KAAK;AACvB;AAACC,OAAA,CAAAT,OAAA,GAAAA,OAAA;AAEM,MAAMU,OAAO,SAA+BT,KAAK,CAAC;EAIvDC,WAAWA,CAACC,EAAK,EAAEQ,OAA0B,EAAE;IAC7C,KAAK,CAAC,CAAC;IAEP,IAAI,CAACR,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACE,KAAK,GAAG,IAAIJ,KAAK,CAAC,CAAC,CAACI,KAAM;IAC/B,IAAI,CAACM,OAAO,GAAGA,OAAO;EACxB;;EAEA;EACQH,KAAK,GAAG,KAAK;AACvB;AAACC,OAAA,CAAAC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isValidDialNumber = exports.getStationLoginErrorData = exports.getErrorDetails = exports.getDestAgentIdForCBT = exports.getConsultedAgentId = exports.generateTaskErrorObject = exports.deriveConsultTransferDestinationType = exports.createErrDetailsObject = exports.calculateDestType = exports.calculateDestAgentId = exports.
|
|
6
|
+
exports.stripDialPlanChars = exports.isValidDialNumber = exports.isRecord = exports.isAllowedUrlHost = exports.getStationLoginErrorData = exports.getErrorDetails = exports.getDestAgentIdForCBT = exports.getConsultedAgentId = exports.generateTaskErrorObject = exports.deriveConsultTransferDestinationType = exports.createErrDetailsObject = exports.calculateDestType = exports.calculateDestAgentId = exports.buildConsultConferenceParamData = void 0;
|
|
7
7
|
var Err = _interopRequireWildcard(require("./Err"));
|
|
8
8
|
var _types = require("../../types");
|
|
9
9
|
var _loggerProxy = _interopRequireDefault(require("../../logger-proxy"));
|
|
@@ -12,6 +12,9 @@ var _types2 = require("../task/types");
|
|
|
12
12
|
var _constants = require("./constants");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
/** Returns whether a value is a non-null object with string keys. */
|
|
16
|
+
const isRecord = value => typeof value === 'object' && value !== null;
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Extracts common error details from a Webex request payload.
|
|
17
20
|
*
|
|
@@ -20,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
20
23
|
* @private
|
|
21
24
|
* @ignore
|
|
22
25
|
*/
|
|
26
|
+
exports.isRecord = isRecord;
|
|
23
27
|
const getCommonErrorDetails = errObj => {
|
|
24
28
|
return {
|
|
25
29
|
trackingId: errObj?.headers?.trackingid || errObj?.headers?.TrackingID,
|
|
@@ -28,54 +32,80 @@ const getCommonErrorDetails = errObj => {
|
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Determines if the task involves dialing a number based on the destination type.
|
|
39
|
-
* Returns 'DIAL_NUMBER' for dial-related destinations, empty string otherwise.
|
|
35
|
+
* Strips characters defined in the dial plan entry from the input string.
|
|
36
|
+
*
|
|
37
|
+
* @param input - The dial number to sanitize
|
|
38
|
+
* @param strippedChars - String of characters to remove from the input
|
|
39
|
+
* @returns The sanitized input with specified characters removed
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// If the destination type is a dial number or an entry point variant, return 'DIAL_NUMBER'
|
|
49
|
-
return isDialNumber || isEntryPointVariant ? 'DIAL_NUMBER' : '';
|
|
41
|
+
const stripDialPlanChars = (input, strippedChars) => {
|
|
42
|
+
if (!strippedChars) {
|
|
43
|
+
return input;
|
|
44
|
+
}
|
|
45
|
+
const charsToStrip = new Set(strippedChars.split(''));
|
|
46
|
+
return input.split('').filter(c => !charsToStrip.has(c)).join('');
|
|
50
47
|
};
|
|
51
48
|
|
|
52
|
-
// Fallback regex for US/Canada dial numbers when no dial plan entries are configured
|
|
53
|
-
const FALLBACK_DIAL_NUMBER_REGEX = exports.FALLBACK_DIAL_NUMBER_REGEX = /1[0-9]{3}[2-9][0-9]{6}([,]{1,10}[0-9]+){0,1}/;
|
|
54
|
-
|
|
55
49
|
/**
|
|
56
50
|
* Validates a dial number against the provided dial plan regex patterns.
|
|
57
51
|
* A number is valid if it matches at least one regex pattern in the dial plans.
|
|
58
|
-
*
|
|
52
|
+
* Skips validation when no dial plan entries are configured, deferring to the server.
|
|
59
53
|
*
|
|
60
54
|
* @param input - The dial number to validate
|
|
61
55
|
* @param dialPlanEntries - Array of dial plan entries containing regex patterns
|
|
62
|
-
* @returns true if the input matches at least one dial plan regex pattern, false otherwise
|
|
56
|
+
* @returns true if the input matches at least one dial plan regex pattern or no entries are configured, false otherwise
|
|
63
57
|
*/
|
|
58
|
+
exports.stripDialPlanChars = stripDialPlanChars;
|
|
64
59
|
const isValidDialNumber = (input, dialPlanEntries) => {
|
|
60
|
+
if (!input) {
|
|
61
|
+
_loggerProxy.default.warn('Dial number is empty or undefined.', {
|
|
62
|
+
module: 'Utils',
|
|
63
|
+
method: 'isValidDialNumber'
|
|
64
|
+
});
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
65
67
|
if (!dialPlanEntries || dialPlanEntries.length === 0) {
|
|
66
|
-
_loggerProxy.default.
|
|
67
|
-
|
|
68
|
+
_loggerProxy.default.log('No dial plan entries found. Skipping client-side validation, deferring to server.', {
|
|
69
|
+
module: 'Utils',
|
|
70
|
+
method: 'isValidDialNumber'
|
|
71
|
+
});
|
|
72
|
+
return true;
|
|
68
73
|
}
|
|
69
74
|
return dialPlanEntries.some(entry => {
|
|
70
75
|
try {
|
|
76
|
+
const sanitizedInput = stripDialPlanChars(input, entry.strippedChars);
|
|
71
77
|
const regex = new RegExp(entry.regex);
|
|
72
|
-
return regex.test(
|
|
73
|
-
} catch {
|
|
78
|
+
return regex.test(sanitizedInput);
|
|
79
|
+
} catch (e) {
|
|
80
|
+
_loggerProxy.default.warn(`Failed to validate dial number against entry "${entry.name}": ${e}`, {
|
|
81
|
+
module: 'Utils',
|
|
82
|
+
method: 'isValidDialNumber'
|
|
83
|
+
});
|
|
74
84
|
return false;
|
|
75
85
|
}
|
|
76
86
|
});
|
|
77
87
|
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Checks whether a URL's hostname is, or is a subdomain of, one of the allowed domains.
|
|
91
|
+
*
|
|
92
|
+
* @param url - The candidate URL to validate
|
|
93
|
+
* @param allowedDomains - Domains (or domain suffixes) the URL's hostname must match
|
|
94
|
+
* @returns true when the URL parses and its hostname matches an allowed domain, false otherwise
|
|
95
|
+
*/
|
|
78
96
|
exports.isValidDialNumber = isValidDialNumber;
|
|
97
|
+
const isAllowedUrlHost = (url, allowedDomains) => {
|
|
98
|
+
if (!url) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
const hostname = new URL(url).hostname.toLowerCase();
|
|
103
|
+
return allowedDomains.some(domain => hostname === domain || hostname.endsWith(`.${domain}`));
|
|
104
|
+
} catch (error) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
exports.isAllowedUrlHost = isAllowedUrlHost;
|
|
79
109
|
const getStationLoginErrorData = (failure, loginOption) => {
|
|
80
110
|
let duplicateLocationMessage = 'This value is already in use';
|
|
81
111
|
if (loginOption === _types.LoginOption.EXTENSION) {
|
|
@@ -213,6 +243,7 @@ const createErrDetailsObject = errObj => {
|
|
|
213
243
|
return new Err.Details('Service.reqs.generic.failure', details);
|
|
214
244
|
};
|
|
215
245
|
|
|
246
|
+
/*
|
|
216
247
|
/**
|
|
217
248
|
* Gets the consulted agent ID from the media object by finding the agent
|
|
218
249
|
* in the consult media participants (excluding the current agent).
|
|
@@ -282,7 +313,14 @@ const calculateDestAgentId = (interaction, agentId) => {
|
|
|
282
313
|
if (destAgentIdCBT) {
|
|
283
314
|
return destAgentIdCBT;
|
|
284
315
|
}
|
|
285
|
-
|
|
316
|
+
const participant = interaction.participants[consultingAgent];
|
|
317
|
+
if (!participant) {
|
|
318
|
+
return '';
|
|
319
|
+
}
|
|
320
|
+
if (participant.type === _constants.PARTICIPANT_TYPES.EP_DN) {
|
|
321
|
+
return participant.epId ?? '';
|
|
322
|
+
}
|
|
323
|
+
return participant.id ?? '';
|
|
286
324
|
};
|
|
287
325
|
|
|
288
326
|
/**
|
|
@@ -314,12 +352,73 @@ const calculateDestType = (interaction, agentId) => {
|
|
|
314
352
|
}
|
|
315
353
|
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;
|
|
316
354
|
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Gets the destination agent ID from participants.
|
|
358
|
+
* Finds a participant who is not the current agent and is an agent type.
|
|
359
|
+
*
|
|
360
|
+
* @param participants - The participants object from interaction
|
|
361
|
+
* @param agentId - The current agent's ID
|
|
362
|
+
* @returns The destination agent ID, or undefined if none found
|
|
363
|
+
*/
|
|
317
364
|
exports.calculateDestType = calculateDestType;
|
|
365
|
+
const buildConsultConferenceParamData = (dataPassed, interactionIdPassed) => {
|
|
366
|
+
const data = {
|
|
367
|
+
...('agentId' in dataPassed && {
|
|
368
|
+
agentId: dataPassed.agentId
|
|
369
|
+
}),
|
|
370
|
+
to: dataPassed.destAgentId,
|
|
371
|
+
destinationType: ''
|
|
372
|
+
};
|
|
373
|
+
if ('destinationType' in dataPassed) {
|
|
374
|
+
const destinationType = String(dataPassed.destinationType || '').trim();
|
|
375
|
+
const normalizedDestinationType = destinationType.toUpperCase().replace(/[-_\s]/g, '');
|
|
376
|
+
if (normalizedDestinationType === 'DN' || normalizedDestinationType === 'DIALNUMBER') {
|
|
377
|
+
data.destinationType = _types2.DESTINATION_TYPE.DIALNUMBER;
|
|
378
|
+
} else if (normalizedDestinationType === 'EPDN' || normalizedDestinationType === 'ENTRYPOINT') {
|
|
379
|
+
data.destinationType = _types2.DESTINATION_TYPE.ENTRYPOINT;
|
|
380
|
+
} else if (normalizedDestinationType === 'QUEUE') {
|
|
381
|
+
data.destinationType = _types2.DESTINATION_TYPE.QUEUE;
|
|
382
|
+
} else if (normalizedDestinationType === 'AGENT') {
|
|
383
|
+
data.destinationType = _types2.DESTINATION_TYPE.AGENT;
|
|
384
|
+
} else {
|
|
385
|
+
data.destinationType = destinationType;
|
|
386
|
+
}
|
|
387
|
+
} else {
|
|
388
|
+
data.destinationType = _types2.DESTINATION_TYPE.AGENT;
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
interactionId: interactionIdPassed,
|
|
392
|
+
data
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Derives the consult transfer destination type based on task data.
|
|
398
|
+
* This function determines the appropriate destination type for a consult transfer
|
|
399
|
+
* by examining the destination type stored in the task data.
|
|
400
|
+
*
|
|
401
|
+
* @param taskData - The task data containing destination information
|
|
402
|
+
* @returns The derived consult transfer destination type
|
|
403
|
+
* @public
|
|
404
|
+
*/
|
|
405
|
+
exports.buildConsultConferenceParamData = buildConsultConferenceParamData;
|
|
318
406
|
const deriveConsultTransferDestinationType = taskData => {
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
407
|
+
const destType = taskData?.destinationType;
|
|
408
|
+
const normalizedDestType = String(destType || '').toUpperCase().replace(/[-_\s]/g, '');
|
|
409
|
+
|
|
410
|
+
// Map destination types to consult transfer destination types
|
|
411
|
+
if (normalizedDestType === 'DN' || normalizedDestType === 'DIALNUMBER') {
|
|
412
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;
|
|
413
|
+
}
|
|
414
|
+
if (normalizedDestType === 'EPDN' || normalizedDestType === 'ENTRYPOINT') {
|
|
415
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT;
|
|
322
416
|
}
|
|
417
|
+
if (normalizedDestType === 'QUEUE') {
|
|
418
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.QUEUE;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Default to agent if no specific type matches
|
|
323
422
|
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;
|
|
324
423
|
};
|
|
325
424
|
exports.deriveConsultTransferDestinationType = deriveConsultTransferDestinationType;
|