@webex/contact-center 3.10.0-next.2 → 3.10.0-next.21
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/dist/cc.js +13 -1
- package/dist/cc.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/logger-proxy.js.map +1 -1
- package/dist/metrics/MetricsManager.js +2 -1
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +12 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +4 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +2 -3
- package/dist/services/AddressBook.js.map +1 -1
- package/dist/services/EntryPoint.js +2 -3
- package/dist/services/EntryPoint.js.map +1 -1
- package/dist/services/Queue.js +2 -3
- package/dist/services/Queue.js.map +1 -1
- package/dist/services/WebCallingService.js +1 -1
- package/dist/services/WebCallingService.js.map +1 -1
- package/dist/services/agent/index.js +1 -2
- package/dist/services/agent/index.js.map +1 -1
- package/dist/services/agent/types.js +10 -0
- package/dist/services/agent/types.js.map +1 -1
- package/dist/services/config/Util.js.map +1 -1
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +1 -1
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +2 -2
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/constants.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/GlobalTypes.js.map +1 -1
- package/dist/services/core/Utils.js +92 -74
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/WebexRequest.js +1 -2
- package/dist/services/core/WebexRequest.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +2 -3
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/constants.js +17 -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 +1 -2
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/core/websocket/connection-service.js +1 -1
- package/dist/services/core/websocket/connection-service.js.map +1 -1
- package/dist/services/core/websocket/keepalive.worker.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/AutoWrapup.js +1 -1
- package/dist/services/task/AutoWrapup.js.map +1 -1
- package/dist/services/task/TaskManager.js +177 -56
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +122 -5
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +3 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +0 -2
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/index.js +46 -40
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +377 -4
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/services/config/types.d.ts +4 -4
- package/dist/types/services/core/Utils.d.ts +32 -17
- package/dist/types/services/core/constants.d.ts +14 -0
- package/dist/types/services/task/TaskUtils.d.ts +59 -3
- package/dist/types/services/task/constants.d.ts +2 -0
- package/dist/types/services/task/types.d.ts +57 -13
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +1 -1
- package/dist/utils/PageCache.js.map +1 -1
- package/dist/webex-config.js.map +1 -1
- package/dist/webex.js +2 -2
- package/dist/webex.js.map +1 -1
- package/package.json +8 -8
- package/src/cc.ts +12 -0
- package/src/index.ts +1 -0
- package/src/metrics/behavioral-events.ts +12 -0
- package/src/metrics/constants.ts +4 -0
- package/src/services/config/types.ts +2 -2
- package/src/services/core/Utils.ts +101 -85
- package/src/services/core/constants.ts +16 -0
- package/src/services/task/TaskManager.ts +204 -36
- package/src/services/task/TaskUtils.ts +145 -5
- package/src/services/task/constants.ts +2 -0
- package/src/services/task/index.ts +50 -63
- package/src/services/task/types.ts +60 -13
- package/test/unit/spec/cc.ts +1 -0
- package/test/unit/spec/metrics/behavioral-events.ts +14 -0
- package/test/unit/spec/services/core/Utils.ts +262 -31
- package/test/unit/spec/services/task/TaskManager.ts +748 -5
- package/test/unit/spec/services/task/TaskUtils.ts +311 -9
- package/test/unit/spec/services/task/index.ts +323 -68
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -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","CONSULTED_PARTICIPANT_MOVING","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","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","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 when consulted participant is moving/being transferred */\n CONSULTED_PARTICIPANT_MOVING: 'ConsultedParticipantMoving',\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 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} 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};\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 * 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 /** 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};\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;EA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;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,GAAArE,OAAA,CAAAqE,SAAA,GAAG;EACvB,GAAGnB,eAAe;EAClB,GAAGnD;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;;AAQA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAMuE,SAAS,GAAAtE,OAAA,CAAAsE,SAAA,GAAG,WAAW;;AAEpC;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAvE,OAAA,CAAAuE,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;AACA;;AAyJA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA"}
|
|
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","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} 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};\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 * 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 /** 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};\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) */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A0B,EAAE,aAAa;EACzC;EACAC,kCAAkC,EAAE,2BAA2B;EAC/D;EACAC,sBAAsB,EAAE;AAC1B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAArE,OAAA,CAAAqE,SAAA,GAAG;EACvB,GAAGnB,eAAe;EAClB,GAAGnD;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;;AAQA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAMuE,SAAS,GAAAtE,OAAA,CAAAsE,SAAA,GAAG,WAAW;;AAEpC;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAvE,OAAA,CAAAuE,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;AACA;;AAyJA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -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","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"],"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 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"],"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,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S_DOMAIN","DEFAULT_RTMS_DOMAIN","WEBSOCKET_EVENT_TIMEOUT","AGENT","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"],"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 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"],"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,uBAAuB,GAAAJ,OAAA,CAAAI,uBAAA,GAAG,KAAK;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAAL,OAAA,CAAAK,KAAA,GAAG,OAAO;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAa,GAAAN,OAAA,CAAAM,aAAA,GAAG,2BAA2B;;AAExD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAAG,iBAAiB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,GAAAR,OAAA,CAAAQ,cAAA,GAAG,SAAS;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAT,OAAA,CAAAS,gBAAA,GAAG,yBAAyB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,8BAA8B,GAAAV,OAAA,CAAAU,8BAAA,GACzC,yDAAyD;;AAE3D;AACO,MAAMC,OAAO,GAAAX,OAAA,CAAAW,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","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.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;;AA+EO,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"}
|
|
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.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;;AA+EO,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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["GlobalTypes.ts"],"sourcesContent":["/**\n * Generic message interface used throughout the plugin\n * @template T - Type of the data payload (defaults to any)\n * @private\n * @ignore\n */\nexport type Msg<T = any> = {\n /** Message/Event type identifier */\n type: string;\n /** Organization identifier */\n orgId: string;\n /** Unique tracking identifier for the message/Event */\n trackingId: string;\n /** Message/Event payload data */\n data: T;\n};\n\n/**\n * Represents a failure message with specific error details\n * @private\n * @ignore\n */\nexport type Failure = Msg<{\n /** Agent identifier associated with the failure */\n agentId: string;\n /** Tracking identifier for the failure event */\n trackingId: string;\n /** Numeric code indicating the reason for failure */\n reasonCode: number;\n /** Organization identifier */\n orgId: string;\n /** Human-readable description of the failure reason */\n reason: string;\n}>;\n\n/**\n * Represents task API error details in a structured format\n * @public\n */\nexport interface TaskError {\n /** Original error object for throwing */\n error: Error;\n /** Unique tracking identifier for correlation */\n trackingId: string;\n /** Detailed error message from the API */\n errorMessage: string;\n /** Type/category of the error (e.g., \"Bad Request\") */\n errorType: string;\n /** Additional error context data */\n errorData: string;\n /** Numeric reason code */\n reasonCode: number;\n}\n\n/**\n * An Error object augmented with a flexible data field for additional context.\n * Use this to attach structured data to thrown errors without ts-ignore.\n */\nexport interface AugmentedError extends Error {\n data?: Record<string, any>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["GlobalTypes.ts"],"sourcesContent":["/**\n * Generic message interface used throughout the plugin\n * @template T - Type of the data payload (defaults to any)\n * @private\n * @ignore\n */\nexport type Msg<T = any> = {\n /** Message/Event type identifier */\n type: string;\n /** Organization identifier */\n orgId: string;\n /** Unique tracking identifier for the message/Event */\n trackingId: string;\n /** Message/Event payload data */\n data: T;\n};\n\n/**\n * Represents a failure message with specific error details\n * @private\n * @ignore\n */\nexport type Failure = Msg<{\n /** Agent identifier associated with the failure */\n agentId: string;\n /** Tracking identifier for the failure event */\n trackingId: string;\n /** Numeric code indicating the reason for failure */\n reasonCode: number;\n /** Organization identifier */\n orgId: string;\n /** Human-readable description of the failure reason */\n reason: string;\n}>;\n\n/**\n * Represents task API error details in a structured format\n * @public\n */\nexport interface TaskError {\n /** Original error object for throwing */\n error: Error;\n /** Unique tracking identifier for correlation */\n trackingId: string;\n /** Detailed error message from the API */\n errorMessage: string;\n /** Type/category of the error (e.g., \"Bad Request\") */\n errorType: string;\n /** Additional error context data */\n errorData: string;\n /** Numeric reason code */\n reasonCode: number;\n}\n\n/**\n * An Error object augmented with a flexible data field for additional context.\n * Use this to attach structured data to thrown errors without ts-ignore.\n */\nexport interface AugmentedError extends Error {\n data?: Record<string, any>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isValidDialNumber = exports.getStationLoginErrorData = exports.getErrorDetails = exports.
|
|
6
|
+
exports.isValidDialNumber = exports.getStationLoginErrorData = exports.getErrorDetails = exports.getDestAgentIdForCBT = exports.getConsultedAgentId = exports.generateTaskErrorObject = exports.deriveConsultTransferDestinationType = exports.createErrDetailsObject = exports.calculateDestType = exports.calculateDestAgentId = void 0;
|
|
7
7
|
var Err = _interopRequireWildcard(require("./Err"));
|
|
8
8
|
var _types = require("../../types");
|
|
9
9
|
var _loggerProxy = _interopRequireDefault(require("../../logger-proxy"));
|
|
10
10
|
var _WebexRequest = _interopRequireDefault(require("./WebexRequest"));
|
|
11
11
|
var _types2 = require("../task/types");
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!
|
|
12
|
+
var _constants = require("./constants");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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
15
|
/**
|
|
16
16
|
* Extracts common error details from a Webex request payload.
|
|
17
17
|
*
|
|
@@ -192,95 +192,113 @@ const createErrDetailsObject = errObj => {
|
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
*
|
|
195
|
+
* Gets the consulted agent ID from the media object by finding the agent
|
|
196
|
+
* in the consult media participants (excluding the current agent).
|
|
196
197
|
*
|
|
197
|
-
*
|
|
198
|
-
* -
|
|
199
|
-
*
|
|
200
|
-
* - DN maps to DIALNUMBER
|
|
201
|
-
* - Otherwise defaults to AGENT
|
|
202
|
-
*
|
|
203
|
-
* @param taskData - The task data used to infer the agent action and destination type
|
|
204
|
-
* @returns The normalized destination type to be used for consult transfer
|
|
205
|
-
*/
|
|
206
|
-
/**
|
|
207
|
-
* Checks if a participant type represents a non-customer participant.
|
|
208
|
-
* Non-customer participants include agents, dial numbers, entry point dial numbers,
|
|
209
|
-
* and entry points.
|
|
198
|
+
* @param media - The media object from the interaction
|
|
199
|
+
* @param agentId - The current agent's ID to exclude from the search
|
|
200
|
+
* @returns The consulted agent ID, or empty string if none found
|
|
210
201
|
*/
|
|
211
202
|
exports.createErrDetailsObject = createErrDetailsObject;
|
|
212
|
-
const
|
|
213
|
-
|
|
203
|
+
const getConsultedAgentId = (media, agentId) => {
|
|
204
|
+
let consultParticipants = [];
|
|
205
|
+
let consultedParticipantId = '';
|
|
206
|
+
Object.keys(media).forEach(key => {
|
|
207
|
+
if (media[key].mType === _constants.STATE_CONSULT) {
|
|
208
|
+
consultParticipants = media[key].participants;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
if (consultParticipants.includes(agentId)) {
|
|
212
|
+
const id = consultParticipants.find(participant => participant !== agentId);
|
|
213
|
+
consultedParticipantId = id || consultedParticipantId;
|
|
214
|
+
}
|
|
215
|
+
return consultedParticipantId;
|
|
214
216
|
};
|
|
215
217
|
|
|
216
218
|
/**
|
|
217
|
-
* Gets the destination agent ID
|
|
218
|
-
*
|
|
219
|
+
* Gets the destination agent ID for CBT (Capacity Based Team) scenarios.
|
|
220
|
+
* CBT refers to teams created in Control Hub with capacity-based routing
|
|
221
|
+
* (as opposed to agent-based routing). This handles cases where the consulted
|
|
222
|
+
* participant is not directly in participants but can be found by matching
|
|
223
|
+
* the dial number (dn).
|
|
219
224
|
*
|
|
220
|
-
* @param
|
|
221
|
-
* @param
|
|
222
|
-
* @returns The destination agent ID, or empty string if none found
|
|
225
|
+
* @param interaction - The interaction object
|
|
226
|
+
* @param consultingAgent - The consulting agent identifier
|
|
227
|
+
* @returns The destination agent ID for CBT scenarios, or empty string if none found
|
|
223
228
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
exports.getConsultedAgentId = getConsultedAgentId;
|
|
230
|
+
const getDestAgentIdForCBT = (interaction, consultingAgent) => {
|
|
231
|
+
const participants = interaction.participants;
|
|
232
|
+
let destAgentIdForCBT = '';
|
|
233
|
+
|
|
234
|
+
// Check if this is a CBT scenario (consultingAgent exists but not directly in participants)
|
|
235
|
+
if (consultingAgent && !participants[consultingAgent]) {
|
|
236
|
+
const foundEntry = Object.entries(participants).find(([, participant]) => {
|
|
237
|
+
return participant.pType.toLowerCase() === _constants.PARTICIPANT_TYPES.DN && participant.type === _constants.PARTICIPANT_TYPES.AGENT && participant.dn === consultingAgent;
|
|
232
238
|
});
|
|
239
|
+
if (foundEntry) {
|
|
240
|
+
destAgentIdForCBT = foundEntry[0];
|
|
241
|
+
}
|
|
233
242
|
}
|
|
234
|
-
return
|
|
243
|
+
return destAgentIdForCBT;
|
|
235
244
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Calculates the destination agent ID for consult operations.
|
|
248
|
+
*
|
|
249
|
+
* @param interaction - The interaction object
|
|
250
|
+
* @param agentId - The current agent's ID
|
|
251
|
+
* @returns The destination agent ID
|
|
252
|
+
*/
|
|
253
|
+
exports.getDestAgentIdForCBT = getDestAgentIdForCBT;
|
|
254
|
+
const calculateDestAgentId = (interaction, agentId) => {
|
|
255
|
+
const consultingAgent = getConsultedAgentId(interaction.media, agentId);
|
|
256
|
+
|
|
257
|
+
// Check if this is a CBT (Capacity Based Team) scenario
|
|
258
|
+
// If not CBT, the function will return empty string and we'll use the normal flow
|
|
259
|
+
const destAgentIdCBT = getDestAgentIdForCBT(interaction, consultingAgent);
|
|
260
|
+
if (destAgentIdCBT) {
|
|
261
|
+
return destAgentIdCBT;
|
|
241
262
|
}
|
|
242
|
-
return
|
|
263
|
+
return interaction.participants[consultingAgent]?.type === _constants.PARTICIPANT_TYPES.EP_DN ? interaction.participants[consultingAgent]?.epId : interaction.participants[consultingAgent]?.id;
|
|
243
264
|
};
|
|
244
265
|
|
|
245
266
|
/**
|
|
246
|
-
*
|
|
247
|
-
* This matches the Agent Desktop's consultConference implementation exactly.
|
|
267
|
+
* Calculates the destination agent ID for fetching destination type.
|
|
248
268
|
*
|
|
249
|
-
* @param
|
|
250
|
-
* @param
|
|
251
|
-
* @returns
|
|
252
|
-
* @public
|
|
269
|
+
* @param interaction - The interaction object
|
|
270
|
+
* @param agentId - The current agent's ID
|
|
271
|
+
* @returns The destination agent ID for determining destination type
|
|
253
272
|
*/
|
|
254
|
-
exports.
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
// Include agentId if present in input data
|
|
258
|
-
...('agentId' in dataPassed && {
|
|
259
|
-
agentId: dataPassed.agentId
|
|
260
|
-
}),
|
|
261
|
-
// Handle destAgentId from consultation data
|
|
262
|
-
to: dataPassed.destAgentId,
|
|
263
|
-
destinationType: ''
|
|
264
|
-
};
|
|
273
|
+
exports.calculateDestAgentId = calculateDestAgentId;
|
|
274
|
+
const calculateDestType = (interaction, agentId) => {
|
|
275
|
+
const consultingAgent = getConsultedAgentId(interaction.media, agentId);
|
|
265
276
|
|
|
266
|
-
//
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// Keep the existing destinationType if it's something else (like "agent" or "Agent")
|
|
274
|
-
// Convert "Agent" to lowercase for consistency
|
|
275
|
-
data.destinationType = dataPassed.destinationType.toLowerCase();
|
|
277
|
+
// Check if this is a CBT (Capacity Based Team) scenario, otherwise use consultingAgent
|
|
278
|
+
const destAgentIdCBT = getDestAgentIdForCBT(interaction, consultingAgent);
|
|
279
|
+
const destinationaegntId = destAgentIdCBT || consultingAgent;
|
|
280
|
+
const destAgentType = destinationaegntId ? interaction.participants[destinationaegntId]?.pType : undefined;
|
|
281
|
+
if (destAgentType) {
|
|
282
|
+
if (destAgentType === 'DN') {
|
|
283
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;
|
|
276
284
|
}
|
|
277
|
-
|
|
278
|
-
|
|
285
|
+
if (destAgentType === 'EP-DN') {
|
|
286
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT;
|
|
287
|
+
}
|
|
288
|
+
// Keep the existing destinationType if it's something else (like "agent" or "Agent")
|
|
289
|
+
// Convert "Agent" to lowercase for consistency
|
|
290
|
+
|
|
291
|
+
return destAgentType.toLowerCase();
|
|
279
292
|
}
|
|
280
|
-
return
|
|
281
|
-
interactionId: interactionIdPassed,
|
|
282
|
-
data
|
|
283
|
-
};
|
|
293
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;
|
|
284
294
|
};
|
|
285
|
-
exports.
|
|
295
|
+
exports.calculateDestType = calculateDestType;
|
|
296
|
+
const deriveConsultTransferDestinationType = taskData => {
|
|
297
|
+
const agentActionType = getAgentActionTypeFromTask(taskData);
|
|
298
|
+
if (agentActionType === 'DIAL_NUMBER') {
|
|
299
|
+
return isEntryPointOrEpdn(taskData?.destinationType) ? _types2.CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT : _types2.CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;
|
|
300
|
+
}
|
|
301
|
+
return _types2.CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;
|
|
302
|
+
};
|
|
303
|
+
exports.deriveConsultTransferDestinationType = deriveConsultTransferDestinationType;
|
|
286
304
|
//# sourceMappingURL=Utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Err","_interopRequireWildcard","require","_types","_loggerProxy","_interopRequireDefault","_WebexRequest","_types2","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","getCommonErrorDetails","errObj","trackingId","headers","trackingid","TrackingID","msg","body","isEntryPointOrEpdn","destAgentType","getAgentActionTypeFromTask","taskData","destinationType","isDialNumber","isEntryPointVariant","isValidDialNumber","input","regexForDn","test","exports","getStationLoginErrorData","failure","loginOption","duplicateLocationMessage","LoginOption","EXTENSION","AGENT_DN","errorCodeMessageMap","DUPLICATE_LOCATION","message","fieldName","INVALID_DIAL_NUMBER","defaultMessage","defaultFieldName","reason","data","getErrorDetails","error","methodName","moduleName","errData","details","LoggerProxy","module","method","WebexRequest","getInstance","uploadLogs","correlationId","err","Error","generateTaskErrorObject","errorMsg","fallbackMessage","errorMessage","errorType","name","errorData","reasonCode","createErrDetailsObject","Details","isNonCustomerParticipant","participantType","getDestinationAgentId","participants","agentId","id","keys","forEach","participant","participantData","type","isWrapUp","deriveConsultTransferDestinationType","agentActionType","CONSULT_TRANSFER_DESTINATION_TYPE","ENTRYPOINT","DIALNUMBER","AGENT","buildConsultConferenceParamData","dataPassed","interactionIdPassed","to","destAgentId","toLowerCase","interactionId"],"sources":["Utils.ts"],"sourcesContent":["import * as Err from './Err';\nimport {LoginOption, WebexRequestPayload} from '../../types';\nimport {Failure, AugmentedError} from './GlobalTypes';\nimport LoggerProxy from '../../logger-proxy';\nimport WebexRequest from './WebexRequest';\nimport {\n TaskData,\n ConsultTransferPayLoad,\n ConsultConferenceData,\n consultConferencePayloadData,\n CONSULT_TRANSFER_DESTINATION_TYPE,\n Interaction,\n} from '../task/types';\n\n/**\n * Extracts common error details from a Webex request payload.\n *\n * @param errObj - The Webex request payload object.\n * @returns An object containing the tracking ID and message body.\n * @private\n * @ignore\n */\nconst getCommonErrorDetails = (errObj: WebexRequestPayload) => {\n return {\n trackingId: errObj?.headers?.trackingid || errObj?.headers?.TrackingID,\n msg: errObj?.body,\n };\n};\n\n/**\n * Checks if the destination type represents an entry point variant (EPDN or ENTRYPOINT).\n */\nconst isEntryPointOrEpdn = (destAgentType?: string): boolean => {\n return destAgentType === 'EPDN' || destAgentType === 'ENTRYPOINT';\n};\n\n/**\n * Determines if the task involves dialing a number based on the destination type.\n * Returns 'DIAL_NUMBER' for dial-related destinations, empty string otherwise.\n */\nconst getAgentActionTypeFromTask = (taskData?: TaskData): 'DIAL_NUMBER' | '' => {\n const destAgentType = taskData?.destinationType;\n\n // Check if destination requires dialing: direct dial number or entry point variants\n const isDialNumber = destAgentType === 'DN';\n const isEntryPointVariant = isEntryPointOrEpdn(destAgentType);\n\n // If the destination type is a dial number or an entry point variant, return 'DIAL_NUMBER'\n return isDialNumber || isEntryPointVariant ? 'DIAL_NUMBER' : '';\n};\n\nexport const isValidDialNumber = (input: string): boolean => {\n // This regex checks for a valid dial number format for only few countries such as US, Canada.\n const regexForDn = /1[0-9]{3}[2-9][0-9]{6}([,]{1,10}[0-9]+){0,1}/;\n\n return regexForDn.test(input);\n};\n\nexport const getStationLoginErrorData = (failure: Failure, loginOption: LoginOption) => {\n let duplicateLocationMessage = 'This value is already in use';\n\n if (loginOption === LoginOption.EXTENSION) {\n duplicateLocationMessage = 'This extension is already in use';\n }\n\n if (loginOption === LoginOption.AGENT_DN) {\n duplicateLocationMessage =\n 'Dial number is in use. Try a different one. For help, reach out to your administrator or support team.';\n }\n\n const errorCodeMessageMap = {\n DUPLICATE_LOCATION: {\n message: duplicateLocationMessage,\n fieldName: loginOption,\n },\n INVALID_DIAL_NUMBER: {\n message:\n 'Enter a valid US dial number. For help, reach out to your administrator or support team.',\n fieldName: loginOption,\n },\n };\n\n const defaultMessage = 'An error occurred while logging in to the station';\n const defaultFieldName = 'generic';\n\n const reason = failure?.data?.reason || '';\n\n return {\n message: errorCodeMessageMap[reason]?.message || defaultMessage,\n fieldName: errorCodeMessageMap[reason]?.fieldName || defaultFieldName,\n };\n};\n\n/**\n * Extracts error details and logs the error. Also uploads logs for the error unless it is a silent relogin agent not found error.\n *\n * @param error - The error object, expected to have a `details` property of type Failure.\n * @param methodName - The name of the method where the error occurred.\n * @param moduleName - The name of the module where the error occurred.\n * @returns An object containing the error instance and the reason string.\n * @public\n * @example\n * const details = getErrorDetails(error, 'fetchData', 'DataModule');\n * if (details.error) { handleError(details.error); }\n * @ignore\n */\nexport const getErrorDetails = (error: any, methodName: string, moduleName: string) => {\n let errData = {message: '', fieldName: ''};\n\n const failure = error.details as Failure;\n const reason = failure?.data?.reason ?? `Error while performing ${methodName}`;\n\n if (!(reason === 'AGENT_NOT_FOUND' && methodName === 'silentRelogin')) {\n LoggerProxy.error(`${methodName} failed with reason: ${reason}`, {\n module: moduleName,\n method: methodName,\n trackingId: failure?.trackingId,\n });\n // we can add more conditions here if not needed for specific cases eg: silentReLogin\n WebexRequest.getInstance().uploadLogs({\n correlationId: failure?.trackingId,\n });\n }\n\n if (methodName === 'stationLogin') {\n errData = getStationLoginErrorData(failure, error.loginOption);\n\n LoggerProxy.error(\n `${methodName} failed with reason: ${reason}, message: ${errData.message}, fieldName: ${errData.fieldName}`,\n {\n module: moduleName,\n method: methodName,\n trackingId: failure?.trackingId,\n }\n );\n }\n\n const err = new Error(reason ?? `Error while performing ${methodName}`);\n // @ts-ignore - add custom property to the error object for backward compatibility\n err.data = errData;\n\n return {\n error: err,\n reason,\n };\n};\n\n/**\n * Extracts error details from task API errors and logs them. Also uploads logs for the error.\n * This handles the specific error format returned by task API calls.\n *\n * @param error - The error object from task API calls with structure: {id: string, details: {trackingId: string, msg: {...}}}\n * @param methodName - The name of the method where the error occurred.\n * @param moduleName - The name of the module where the error occurred.\n * @returns AugmentedError containing structured error details on err.data for metrics and logging\n * @public\n * @example\n * const taskError = generateTaskErrorObject(error, 'transfer', 'TaskModule');\n * throw taskError.error;\n * @ignore\n */\nexport const generateTaskErrorObject = (\n error: any,\n methodName: string,\n moduleName: string\n): AugmentedError => {\n const trackingId = error?.details?.trackingId || error?.trackingId || '';\n const errorMsg = error?.details?.msg;\n\n const fallbackMessage =\n (error && typeof error.message === 'string' && error.message) ||\n `Error while performing ${methodName}`;\n const errorMessage = errorMsg?.errorMessage || fallbackMessage;\n const errorType =\n errorMsg?.errorType ||\n (error && typeof error.name === 'string' && error.name) ||\n 'Unknown Error';\n const errorData = errorMsg?.errorData || '';\n const reasonCode = errorMsg?.reasonCode || 0;\n\n // Log and upload for Task API formatted errors\n LoggerProxy.error(`${methodName} failed: ${errorMessage} (${errorType})`, {\n module: moduleName,\n method: methodName,\n trackingId,\n });\n WebexRequest.getInstance().uploadLogs({\n correlationId: trackingId,\n });\n\n const reason = `${errorType}: ${errorMessage}${errorData ? ` (${errorData})` : ''}`;\n const err: AugmentedError = new Error(reason);\n err.data = {\n message: errorMessage,\n errorType,\n errorData,\n reasonCode,\n trackingId,\n };\n\n return err;\n};\n\n/**\n * Creates an error details object suitable for use with the Err.Details class.\n *\n * @param errObj - The Webex request payload object.\n * @returns An instance of Err.Details with the generic failure message and extracted details.\n * @public\n * @example\n * const errDetails = createErrDetailsObject(webexRequestPayload);\n * @ignore\n */\nexport const createErrDetailsObject = (errObj: WebexRequestPayload) => {\n const details = getCommonErrorDetails(errObj);\n\n return new Err.Details('Service.reqs.generic.failure', details);\n};\n\n/**\n * Derives the consult transfer destination type based on the provided task data.\n *\n * Logic parity with desktop behavior:\n * - If agent action is dialing a number (DN/EPDN/ENTRYPOINT):\n * - ENTRYPOINT/EPDN map to ENTRYPOINT\n * - DN maps to DIALNUMBER\n * - Otherwise defaults to AGENT\n *\n * @param taskData - The task data used to infer the agent action and destination type\n * @returns The normalized destination type to be used for consult transfer\n */\n/**\n * Checks if a participant type represents a non-customer participant.\n * Non-customer participants include agents, dial numbers, entry point dial numbers,\n * and entry points.\n */\nconst isNonCustomerParticipant = (participantType: string): boolean => {\n return (\n participantType === 'Agent' ||\n participantType === 'DN' ||\n participantType === 'EpDn' ||\n participantType === 'entryPoint'\n );\n};\n\n/**\n * Gets the destination agent ID from participants data by finding the first\n * non-customer participant that is not the current agent and is not in wrap-up state.\n *\n * @param participants - The participants data from the interaction\n * @param agentId - The current agent's ID to exclude from the search\n * @returns The destination agent ID, or empty string if none found\n */\nexport const getDestinationAgentId = (\n participants: Interaction['participants'],\n agentId: string\n): string => {\n let id = '';\n\n if (participants) {\n Object.keys(participants).forEach((participant) => {\n const participantData = participants[participant];\n if (\n isNonCustomerParticipant(participantData.type) &&\n participantData.id !== agentId &&\n !participantData.isWrapUp\n ) {\n id = participantData.id;\n }\n });\n }\n\n return id;\n};\n\nexport const deriveConsultTransferDestinationType = (\n taskData?: TaskData\n): ConsultTransferPayLoad['destinationType'] => {\n const agentActionType = getAgentActionTypeFromTask(taskData);\n\n if (agentActionType === 'DIAL_NUMBER') {\n return isEntryPointOrEpdn(taskData?.destinationType)\n ? CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT\n : CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;\n }\n\n return CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;\n};\n\n/**\n * Builds consult conference parameter data using EXACT Agent Desktop logic.\n * This matches the Agent Desktop's consultConference implementation exactly.\n *\n * @param dataPassed - Original consultation data from Agent Desktop format\n * @param interactionIdPassed - The interaction ID for the task\n * @returns Object with interactionId and ConsultConferenceData matching Agent Desktop format\n * @public\n */\nexport const buildConsultConferenceParamData = (\n dataPassed: consultConferencePayloadData,\n interactionIdPassed: string\n): {interactionId: string; data: ConsultConferenceData} => {\n const data: ConsultConferenceData = {\n // Include agentId if present in input data\n ...('agentId' in dataPassed && {agentId: dataPassed.agentId}),\n // Handle destAgentId from consultation data\n to: dataPassed.destAgentId,\n destinationType: '',\n };\n\n // Agent Desktop destination type logic\n if ('destinationType' in dataPassed) {\n if (dataPassed.destinationType === 'DN') {\n data.destinationType = CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;\n } else if (dataPassed.destinationType === 'EP_DN') {\n data.destinationType = CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT;\n } else {\n // Keep the existing destinationType if it's something else (like \"agent\" or \"Agent\")\n // Convert \"Agent\" to lowercase for consistency\n data.destinationType = dataPassed.destinationType.toLowerCase();\n }\n } else {\n data.destinationType = CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;\n }\n\n return {\n interactionId: interactionIdPassed,\n data,\n };\n};\n"],"mappings":";;;;;;AAAA,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,IAAI,SAAS,IAAI6C,UAAU,IAAI;MAACf,OAAO,EAAEe,UAAU,CAACf;IAAO,CAAC,CAAC;IAC7D;IACAiB,EAAE,EAAEF,UAAU,CAACG,WAAW;IAC1BvE,eAAe,EAAE;EACnB,CAAC;;EAED;EACA,IAAI,iBAAiB,IAAIoE,UAAU,EAAE;IACnC,IAAIA,UAAU,CAACpE,eAAe,KAAK,IAAI,EAAE;MACvCuB,IAAI,CAACvB,eAAe,GAAG+D,yCAAiC,CAACE,UAAU;IACrE,CAAC,MAAM,IAAIG,UAAU,CAACpE,eAAe,KAAK,OAAO,EAAE;MACjDuB,IAAI,CAACvB,eAAe,GAAG+D,yCAAiC,CAACC,UAAU;IACrE,CAAC,MAAM;MACL;MACA;MACAzC,IAAI,CAACvB,eAAe,GAAGoE,UAAU,CAACpE,eAAe,CAACwE,WAAW,CAAC,CAAC;IACjE;EACF,CAAC,MAAM;IACLjD,IAAI,CAACvB,eAAe,GAAG+D,yCAAiC,CAACG,KAAK;EAChE;EAEA,OAAO;IACLO,aAAa,EAAEJ,mBAAmB;IAClC9C;EACF,CAAC;AACH,CAAC;AAAChB,OAAA,CAAA4D,+BAAA,GAAAA,+BAAA"}
|
|
1
|
+
{"version":3,"names":["Err","_interopRequireWildcard","require","_types","_loggerProxy","_interopRequireDefault","_WebexRequest","_types2","_constants","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getCommonErrorDetails","errObj","trackingId","headers","trackingid","TrackingID","msg","body","isEntryPointOrEpdn","destAgentType","getAgentActionTypeFromTask","taskData","destinationType","isDialNumber","isEntryPointVariant","isValidDialNumber","input","regexForDn","test","exports","getStationLoginErrorData","failure","loginOption","duplicateLocationMessage","LoginOption","EXTENSION","AGENT_DN","errorCodeMessageMap","DUPLICATE_LOCATION","message","fieldName","INVALID_DIAL_NUMBER","defaultMessage","defaultFieldName","reason","data","getErrorDetails","error","methodName","moduleName","errData","details","LoggerProxy","module","method","WebexRequest","getInstance","uploadLogs","correlationId","err","Error","generateTaskErrorObject","errorMsg","fallbackMessage","errorMessage","errorType","name","errorData","reasonCode","createErrDetailsObject","Details","getConsultedAgentId","media","agentId","consultParticipants","consultedParticipantId","keys","forEach","key","mType","STATE_CONSULT","participants","includes","id","find","participant","getDestAgentIdForCBT","interaction","consultingAgent","destAgentIdForCBT","foundEntry","entries","pType","toLowerCase","PARTICIPANT_TYPES","DN","type","AGENT","dn","calculateDestAgentId","destAgentIdCBT","EP_DN","epId","calculateDestType","destinationaegntId","undefined","CONSULT_TRANSFER_DESTINATION_TYPE","DIALNUMBER","ENTRYPOINT","deriveConsultTransferDestinationType","agentActionType"],"sources":["Utils.ts"],"sourcesContent":["import * as Err from './Err';\nimport {LoginOption, WebexRequestPayload} from '../../types';\nimport {Failure, AugmentedError} from './GlobalTypes';\nimport LoggerProxy from '../../logger-proxy';\nimport WebexRequest from './WebexRequest';\nimport {\n TaskData,\n ConsultTransferPayLoad,\n CONSULT_TRANSFER_DESTINATION_TYPE,\n Interaction,\n} from '../task/types';\nimport {PARTICIPANT_TYPES, STATE_CONSULT} from './constants';\n\n/**\n * Extracts common error details from a Webex request payload.\n *\n * @param errObj - The Webex request payload object.\n * @returns An object containing the tracking ID and message body.\n * @private\n * @ignore\n */\nconst getCommonErrorDetails = (errObj: WebexRequestPayload) => {\n return {\n trackingId: errObj?.headers?.trackingid || errObj?.headers?.TrackingID,\n msg: errObj?.body,\n };\n};\n\n/**\n * Checks if the destination type represents an entry point variant (EPDN or ENTRYPOINT).\n */\nconst isEntryPointOrEpdn = (destAgentType?: string): boolean => {\n return destAgentType === 'EPDN' || destAgentType === 'ENTRYPOINT';\n};\n\n/**\n * Determines if the task involves dialing a number based on the destination type.\n * Returns 'DIAL_NUMBER' for dial-related destinations, empty string otherwise.\n */\nconst getAgentActionTypeFromTask = (taskData?: TaskData): 'DIAL_NUMBER' | '' => {\n const destAgentType = taskData?.destinationType;\n\n // Check if destination requires dialing: direct dial number or entry point variants\n const isDialNumber = destAgentType === 'DN';\n const isEntryPointVariant = isEntryPointOrEpdn(destAgentType);\n\n // If the destination type is a dial number or an entry point variant, return 'DIAL_NUMBER'\n return isDialNumber || isEntryPointVariant ? 'DIAL_NUMBER' : '';\n};\n\nexport const isValidDialNumber = (input: string): boolean => {\n // This regex checks for a valid dial number format for only few countries such as US, Canada.\n const regexForDn = /1[0-9]{3}[2-9][0-9]{6}([,]{1,10}[0-9]+){0,1}/;\n\n return regexForDn.test(input);\n};\n\nexport const getStationLoginErrorData = (failure: Failure, loginOption: LoginOption) => {\n let duplicateLocationMessage = 'This value is already in use';\n\n if (loginOption === LoginOption.EXTENSION) {\n duplicateLocationMessage = 'This extension is already in use';\n }\n\n if (loginOption === LoginOption.AGENT_DN) {\n duplicateLocationMessage =\n 'Dial number is in use. Try a different one. For help, reach out to your administrator or support team.';\n }\n\n const errorCodeMessageMap = {\n DUPLICATE_LOCATION: {\n message: duplicateLocationMessage,\n fieldName: loginOption,\n },\n INVALID_DIAL_NUMBER: {\n message:\n 'Enter a valid US dial number. For help, reach out to your administrator or support team.',\n fieldName: loginOption,\n },\n };\n\n const defaultMessage = 'An error occurred while logging in to the station';\n const defaultFieldName = 'generic';\n\n const reason = failure?.data?.reason || '';\n\n return {\n message: errorCodeMessageMap[reason]?.message || defaultMessage,\n fieldName: errorCodeMessageMap[reason]?.fieldName || defaultFieldName,\n };\n};\n\n/**\n * Extracts error details and logs the error. Also uploads logs for the error unless it is a silent relogin agent not found error.\n *\n * @param error - The error object, expected to have a `details` property of type Failure.\n * @param methodName - The name of the method where the error occurred.\n * @param moduleName - The name of the module where the error occurred.\n * @returns An object containing the error instance and the reason string.\n * @public\n * @example\n * const details = getErrorDetails(error, 'fetchData', 'DataModule');\n * if (details.error) { handleError(details.error); }\n * @ignore\n */\nexport const getErrorDetails = (error: any, methodName: string, moduleName: string) => {\n let errData = {message: '', fieldName: ''};\n\n const failure = error.details as Failure;\n const reason = failure?.data?.reason ?? `Error while performing ${methodName}`;\n\n if (!(reason === 'AGENT_NOT_FOUND' && methodName === 'silentRelogin')) {\n LoggerProxy.error(`${methodName} failed with reason: ${reason}`, {\n module: moduleName,\n method: methodName,\n trackingId: failure?.trackingId,\n });\n // we can add more conditions here if not needed for specific cases eg: silentReLogin\n WebexRequest.getInstance().uploadLogs({\n correlationId: failure?.trackingId,\n });\n }\n\n if (methodName === 'stationLogin') {\n errData = getStationLoginErrorData(failure, error.loginOption);\n\n LoggerProxy.error(\n `${methodName} failed with reason: ${reason}, message: ${errData.message}, fieldName: ${errData.fieldName}`,\n {\n module: moduleName,\n method: methodName,\n trackingId: failure?.trackingId,\n }\n );\n }\n\n const err = new Error(reason ?? `Error while performing ${methodName}`);\n // @ts-ignore - add custom property to the error object for backward compatibility\n err.data = errData;\n\n return {\n error: err,\n reason,\n };\n};\n\n/**\n * Extracts error details from task API errors and logs them. Also uploads logs for the error.\n * This handles the specific error format returned by task API calls.\n *\n * @param error - The error object from task API calls with structure: {id: string, details: {trackingId: string, msg: {...}}}\n * @param methodName - The name of the method where the error occurred.\n * @param moduleName - The name of the module where the error occurred.\n * @returns AugmentedError containing structured error details on err.data for metrics and logging\n * @public\n * @example\n * const taskError = generateTaskErrorObject(error, 'transfer', 'TaskModule');\n * throw taskError.error;\n * @ignore\n */\nexport const generateTaskErrorObject = (\n error: any,\n methodName: string,\n moduleName: string\n): AugmentedError => {\n const trackingId = error?.details?.trackingId || error?.trackingId || '';\n const errorMsg = error?.details?.msg;\n\n const fallbackMessage =\n (error && typeof error.message === 'string' && error.message) ||\n `Error while performing ${methodName}`;\n const errorMessage = errorMsg?.errorMessage || fallbackMessage;\n const errorType =\n errorMsg?.errorType ||\n (error && typeof error.name === 'string' && error.name) ||\n 'Unknown Error';\n const errorData = errorMsg?.errorData || '';\n const reasonCode = errorMsg?.reasonCode || 0;\n\n // Log and upload for Task API formatted errors\n LoggerProxy.error(`${methodName} failed: ${errorMessage} (${errorType})`, {\n module: moduleName,\n method: methodName,\n trackingId,\n });\n WebexRequest.getInstance().uploadLogs({\n correlationId: trackingId,\n });\n\n const reason = `${errorType}: ${errorMessage}${errorData ? ` (${errorData})` : ''}`;\n const err: AugmentedError = new Error(reason);\n err.data = {\n message: errorMessage,\n errorType,\n errorData,\n reasonCode,\n trackingId,\n };\n\n return err;\n};\n\n/**\n * Creates an error details object suitable for use with the Err.Details class.\n *\n * @param errObj - The Webex request payload object.\n * @returns An instance of Err.Details with the generic failure message and extracted details.\n * @public\n * @example\n * const errDetails = createErrDetailsObject(webexRequestPayload);\n * @ignore\n */\nexport const createErrDetailsObject = (errObj: WebexRequestPayload) => {\n const details = getCommonErrorDetails(errObj);\n\n return new Err.Details('Service.reqs.generic.failure', details);\n};\n\n/**\n * Gets the consulted agent ID from the media object by finding the agent\n * in the consult media participants (excluding the current agent).\n *\n * @param media - The media object from the interaction\n * @param agentId - The current agent's ID to exclude from the search\n * @returns The consulted agent ID, or empty string if none found\n */\nexport const getConsultedAgentId = (media: Interaction['media'], agentId: string): string => {\n let consultParticipants: string[] = [];\n let consultedParticipantId = '';\n\n Object.keys(media).forEach((key) => {\n if (media[key].mType === STATE_CONSULT) {\n consultParticipants = media[key].participants;\n }\n });\n\n if (consultParticipants.includes(agentId)) {\n const id = consultParticipants.find((participant) => participant !== agentId);\n consultedParticipantId = id || consultedParticipantId;\n }\n\n return consultedParticipantId;\n};\n\n/**\n * Gets the destination agent ID for CBT (Capacity Based Team) scenarios.\n * CBT refers to teams created in Control Hub with capacity-based routing\n * (as opposed to agent-based routing). This handles cases where the consulted\n * participant is not directly in participants but can be found by matching\n * the dial number (dn).\n *\n * @param interaction - The interaction object\n * @param consultingAgent - The consulting agent identifier\n * @returns The destination agent ID for CBT scenarios, or empty string if none found\n */\nexport const getDestAgentIdForCBT = (interaction: Interaction, consultingAgent: string): string => {\n const participants = interaction.participants;\n let destAgentIdForCBT = '';\n\n // Check if this is a CBT scenario (consultingAgent exists but not directly in participants)\n if (consultingAgent && !participants[consultingAgent]) {\n const foundEntry = Object.entries(participants).find(\n ([, participant]: [string, Interaction['participants'][string]]) => {\n return (\n participant.pType.toLowerCase() === PARTICIPANT_TYPES.DN &&\n participant.type === PARTICIPANT_TYPES.AGENT &&\n participant.dn === consultingAgent\n );\n }\n );\n\n if (foundEntry) {\n destAgentIdForCBT = foundEntry[0];\n }\n }\n\n return destAgentIdForCBT;\n};\n\n/**\n * Calculates the destination agent ID for consult operations.\n *\n * @param interaction - The interaction object\n * @param agentId - The current agent's ID\n * @returns The destination agent ID\n */\nexport const calculateDestAgentId = (interaction: Interaction, agentId: string): string => {\n const consultingAgent = getConsultedAgentId(interaction.media, agentId);\n\n // Check if this is a CBT (Capacity Based Team) scenario\n // If not CBT, the function will return empty string and we'll use the normal flow\n const destAgentIdCBT = getDestAgentIdForCBT(interaction, consultingAgent);\n if (destAgentIdCBT) {\n return destAgentIdCBT;\n }\n\n return interaction.participants[consultingAgent]?.type === PARTICIPANT_TYPES.EP_DN\n ? interaction.participants[consultingAgent]?.epId\n : interaction.participants[consultingAgent]?.id;\n};\n\n/**\n * Calculates the destination agent ID for fetching destination type.\n *\n * @param interaction - The interaction object\n * @param agentId - The current agent's ID\n * @returns The destination agent ID for determining destination type\n */\nexport const calculateDestType = (interaction: Interaction, agentId: string): string => {\n const consultingAgent = getConsultedAgentId(interaction.media, agentId);\n\n // Check if this is a CBT (Capacity Based Team) scenario, otherwise use consultingAgent\n const destAgentIdCBT = getDestAgentIdForCBT(interaction, consultingAgent);\n const destinationaegntId = destAgentIdCBT || consultingAgent;\n const destAgentType = destinationaegntId\n ? interaction.participants[destinationaegntId]?.pType\n : undefined;\n if (destAgentType) {\n if (destAgentType === 'DN') {\n return CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;\n }\n if (destAgentType === 'EP-DN') {\n return CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT;\n }\n // Keep the existing destinationType if it's something else (like \"agent\" or \"Agent\")\n // Convert \"Agent\" to lowercase for consistency\n\n return destAgentType.toLowerCase();\n }\n\n return CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;\n};\n\nexport const deriveConsultTransferDestinationType = (\n taskData?: TaskData\n): ConsultTransferPayLoad['destinationType'] => {\n const agentActionType = getAgentActionTypeFromTask(taskData);\n\n if (agentActionType === 'DIAL_NUMBER') {\n return isEntryPointOrEpdn(taskData?.destinationType)\n ? CONSULT_TRANSFER_DESTINATION_TYPE.ENTRYPOINT\n : CONSULT_TRANSFER_DESTINATION_TYPE.DIALNUMBER;\n }\n\n return CONSULT_TRANSFER_DESTINATION_TYPE.AGENT;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,UAAA,GAAAN,OAAA;AAA6D,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAA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